Several volumetric sources of heat

Hi,

Is it possible to have different volumetric sources of heat in different parts of a system? Imagine a two layered first wall with neutrons generating different amount of heat in tungsten and steel. I was only able to find something like this:

my_model.sources = [
F.Source(value=5e8, volume=1, field=“T”),
]

Where volume=1 means all of the system (correct?). Can I create say volume=2 for tungsten part and make a separate source of heat for it?

Best wishes,

Mikhail

Hi Mikhail,

Yes it is totally possible. Consider this section of the documentation:

You can set different volumetric heat sources with

import festim as F

my_model = F.Simulation()

my_model.sources = [
    F.Source(value=10, volume=1, field="T"),
    F.Source(value=20, volume=2, field="T"),
    ]

Hi Remi,

Thanks a lot! This brings another question: how to assign different numbers to different parts of a system? I just couldn’t find an example with e.g. volume=1 for tungsten, volume=2 for steel etc.

Does this help?
In this script, we define a steady state heat transfer problem. The H transport problem is empty (ie. no boundary conditions or sources, so c=0) just to focus on the heat transfer pb.

If I understand correctly, you want to define different materials and assign different material properties, correct? You can do this by giving several F.Material objects to the Simulation each will have an id corresponding to the volume id and its own set of parameters (diffusivity, solubility, thermal properties, etc.)

Consider this section of the documentation and this tutorial

import festim as F

my_model = F.Simulation()

my_model.T = F.HeatTransferProblem(transient=False)

# ------ Mesh ------

vertices = np.concatenate([np.linspace(0, 0.5), np.linspace(0.5, 1)])
my_model.mesh = F.MeshFromVertices(vertices)


# ------ Materials ------

material_1 = F.Material(id=1, D_0=1, E_D=0, thermal_cond=2, borders=[0, 0.5])
material_2 = F.Material(id=2, D_0=1, E_D=0, thermal_cond=30, borders=[0.5, 1])

my_model.materials = [material_1, material_2]

# ------ Volumetric heat sources ------

my_model.sources = [
    F.Source(value=10, volume=1, field="T"),
    F.Source(value=100, volume=2, field="T"),
]


# ------ Boundary conditions ------

my_model.boundary_conditions = [
    F.DirichletBC(value=0, surfaces=[1, 2], field="T")
]


# ------ Exports, settings ------

my_model.exports = [
    F.XDMFExport(field="T", checkpoint=False)
]

my_model.settings = F.Settings(
    absolute_tolerance=1e-10,
    relative_tolerance=1e-10,
    transient=False,
)

my_model.initialise()
my_model.run()

Opening the XDMF file in paraview you obtain:

Thank you Remi, so volume id is the same as material id, this solves my problem!

Best wishes,

Mikhail

Yes exactly, when in doubt, have a look at the documentation for the class.

Here for F.Source: