Ok so made a small example. here:
Not 100% sure of the distance between the left-hand side of the vessel and the end of the injector, also not sure of the temperature, I’ve just used 500K for now.
So in this example, I’ve just reduced it down to the flinak region for now, but from this, you can obtain the flux permeating into the vacuum, also the walls are zero-flux for the moment but we could add the SS 316 walls no problem and could incoperate the trapping within the walls too.
Here are the mesh files if you want to run this yourself:
mesh_boundaries.h5 (103.8 KB)
mesh_boundaries.xdmf (588 Bytes)
mesh_domains.h5 (157.1 KB)
mesh_domains.xdmf (585 Bytes)
Here is the mwe:
import festim as F
import h_transport_materials as htm
# flinak transport properties using HTM
flinak_D = htm.diffusivities.filter(material="flinak").filter(author="fukada")[0]
flinak_D_0 = flinak_D.pre_exp.magnitude
flinak_E_D = flinak_D.act_energy.magnitude
flinak_S = htm.solubilities.filter(material="flinak").filter(author="fukada")[0]
flinak_S_0 = flinak_S.pre_exp.magnitude
flinak_E_S = flinak_S.act_energy.magnitude
# model ids
id_flinak = 6
id_injector_outlet = 7
id_vacuum_side = 8
# define model
my_model = F.Simulation(log_level=20)
# define mesh
my_model.mesh = F.MeshFromXDMF(
volume_file="mesh_domains.xdmf",
boundary_file="mesh_boundaries.xdmf",
)
# define materials
flinak = F.Material(
id=id_flinak, D_0=flinak_D_0, E_D=flinak_E_D, S_0=flinak_S_0, E_S=flinak_E_S
)
my_model.materials = F.Materials([flinak])
# define temperature
my_model.T = F.Temperature(500) # 500 K
# define boundary conditions
vacuum_side = F.DirichletBC(surfaces=id_vacuum_side, value=0, field="solute") # vacuum
injector = F.SievertsBC(
surfaces=id_injector_outlet,
S_0=flinak.S_0,
E_S=flinak.E_S,
pressure=1e08, # 1000 bar
)
my_model.boundary_conditions = [vacuum_side, injector]
# define exports
folder_results = "Results/"
my_derived_quantities = F.DerivedQuantities(
[F.TotalVolume("solute", volume=id_flinak)],
filename=folder_results + "derived_quantities.csv",
nb_iterations_between_exports=1,
show_units=True,
)
my_model.exports = F.Exports(
[
F.XDMFExport("solute", folder=folder_results, mode=1),
my_derived_quantities,
]
)
my_model.settings = F.Settings(
transient=False,
absolute_tolerance=1e-10,
relative_tolerance=1e-10,
maximum_iterations=30,
)
my_model.initialise()
my_model.run()
This does use FLiNaK transport properties from HTM, if you want to use this version of the script you’ll need to download the python package: pip install h-transport-materials
.
This results in the following steady-state mobile concentration field:
I’m happy to go through this with you in more detail early next week if you like?