FESTIM Capabilities for Modeling Hydrogen Dissolving + Mixing Into Another Material

Hello,

I am modeling hydrogen gas injection into molten FLiNaK salt and want to verify if FESTIM is the appropriate tool for this.

My goal is to track hydrogen content over time as it dissolves in the salt, how much remains as gas and diffuses toward the vacuum section, and how much sticks to the chamber walls. I plan on looking into FEniCS to couple fluid dynamics to FESTIM

Here are some initial inputs and outputs for the problem:

Inputs:

  • Injection gas pressure & volume
  • Initial salt amount
  • Injector geometry

Outputs:

  • Hydrogen dissolution in the salt
  • Gas diffusion toward the vacuum section
  • Hydrogen retention on chamber walls

I have attached a schematic of my system and would appreciate any feedback on using FESTIM for this application. Thank you!

Hey there!

Yes, you could definitely use festim for this application. If you comment with some of the dimensions and typical injection gas pressures I can try to make a small example for you

Thanks for the response! Here are some initial estimates:

Chamber radius = 4 in
Chamber height = 6 in
Injector height from bottom of chamber = 1 in
Injector Thickness/Inlet Length = 1 in
Injector outlet length = 0.1 in
Injector inlet distance from left side = 0.5 in
Injector Length = 6 in
Flinak height from bottom of chamber = 3 in
Injection Gas Pressure = 1000 bar
Injection Gas Volume = 0.5 Liter

Please let me know if there are any other parameters I can provide!

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?

Thank you very much for this example, and yes it would be great to through this in more detail if possible!

Welcome @ckhurana768 :tada:

You could make this mesh with GMSH: see this documentation page for more information

To understand the different building blocks of this model, consider reading through the Task 1 of the FESTIM-workshop covering the basics of FESTIM simulations.

Some other considerations are:

  • what are the boundary conditions on the SS316 walls?
  • if you want to calculate the retention in the walls (I assume you mean the steel walls) then you may have to simulate them explicitly