ThermoFemPhysics
The GeMA Thermo FEM Physics Plugin
Plugin options

Plugin object types

The thermo Fem Physics only publishes one object type (named "heat") and so references to the plugin name while creating a physics object don't need to include a type name.

State variables

The Thermo Fem physics requires the model to contain a single temperature state variable named T. It must be a scalar variable. The default unit is 'K'.

If, for any reason, the model contains a compatible temperature state variable with a name other than T, a renaming table can be included in the set of physics attributes to perform the required name translation.

Example:

StateVar{id = 'T', description = 'Temperature', unit = 'degC'}

Material types

The Thermo Fem physics doesn't uses the concept of a metrial type since it doesn't feature multiple constitutive laws. The material behavior is fully described by the material properties below.

Material properties

The following material properties are supported (required) by the Thermo Fem physics:

Property Description Type Required Def. Unit
k Heat conductivity tensor (1). Scalar, vector or matrix Yes W/(m.K)
rho Density. Scalar Required for transient analysis kg/m3
cp Specific heat capacity at constant pressure. Scalar Required for transient analysis J/(kg.K)
h Element thickness. Scalar Required for 2D elements m
G Heat generation rate per unit volume. Scalar Required if enableGeneration is set to true W/m3

(1) The heat conductivity tensor is a 'dxd' matrix, where 'd' is either 2 or 3 depending on the model dimension. It can be replaced by a vector or a scalar instead. If a vector with size 'd' is given, the tensor matrix is formed with the vector values in its diagonal, with other elements set to 0. For a scalar value, the matrix will be isotropic with the given value at the diagonal.

Material properties are normally read from a property set. If a property is not found at the mesh property sets, it will also be searched in the mesh list of cell attributes. This second option is handy if one wants to create individual materials for each cell (working with a stochastic distribution for a material property, for example).

If, for any reason, the model contains compatible material properties with names other than the expected values above, a renaming table can be included in the set of physics attributes to perform the required name translations.

Example:

PropertySet
{
id = 'LithoProperties',
typeName = 'GemaPropertySet',
description = 'Thermal lithological parameters',
properties = {
{id = 'rho', description = 'Grain density', unit = 'kg/m3' },
{id = 'k', description = 'Grain conductivity', unit = 'W/(m.K)', dim = 2 },
{id = 'cp', description = 'Grain specific heat capacity', unit = 'J/(kg.K)' },
{id = 'G', description = 'Grain radiogenic heat', unit = 'uW/m3' },
{id = 'h', description = 'Element thickness', unit = 'm', defVal = 1.0 },
},
values = {
{id = 'limestone', rho = 2680, k = {3.90, 2.00}, cp = 845, G = 1.40},
{id = 'sandstone', rho = 2720, k = {4.54, 3.95}, cp = 855, G = 0.70},
{id = 'shale', rho = 2700, k = {2.62, 1.64}, cp = 860, G = 2.03},
}
}

Physics attributes

When defining a Thermo Fem Physics object, the following fields are available for usage during the definition:

Attribute Description Type Required Def. Value
id The physics name. String Yes -
Example: id = "myPhysicsName"
typeName Physics plugin name. Should be equal to 'ThermoFemPhysics.(heat | AxHeat | Interface | AxInterface)'. String Yes -
Required value: i.e. typeName = "ThermoFemPhysics.heat"
type Type of physics object. Should be equal to 'fem'. String Yes -
Required value: type= "fem"
description An optional description for this physics role in the simulation. String No Empty
Example: description = "Heat conduction calculation"
mesh The mesh name. String Yes -
Example: mesh = "myMeshName"
boundaryConditions Table filled with the names of the boundary conditions associated with this physics. String table Yes -
Example: boundaryConditions = { "myBc1", "myBc2", "myBc3" }
enableGeneration Boolean value to enable or disable internal heat generation. Boolean No false
Example: enableGeneration = true
isoParametric Boolean value to control whether the temperature will be calculated on every element node (true) or only on the element vertices (false). This flag is only effective for quadratic elements (quad8, for example). Boolean No true
Example: isoParametric = false
heatFluxMode The heat flux can be recovered at the Gauss points, at the mesh nodes, at both or not at all. This option controls the recovery mode. Accepted values are 'gauss', 'node', 'both' or 'none'. String No 'none'
Example: heatFluxMode = "gauss"
directNodeEvaluation When recovering the heat flux at the nodes, defines if the calculation will be made directly on the nodes (true), or if it will be done on Gauss points with a further extrapolation to the nodes (false). Boolean No false
Example: directNodeEvaluation = true

Like other Fem physics, stateVar, property and attribute renaming fields are supported. Likewise, restricting the physics application domain to a set of cell groups, setting the desired integration rule and unit system remapping are also available. Those common optional fields are detailed at the Common Fem physics plugin options page.

Example:

PhysicalMethod
{
id = 'ThermoPhysics',
typeName = 'ThermoFemPhysics.heat',
type = 'fem',
mesh = 'myMesh',
boundaryConditions = {'bcName1', 'bcName2'},
enableGeneration = true,
}

Boundary conditions

The Thermo Fem physics supports both Dirichlet and Neumann conditions. The later can be given as a prescribed normal flux value or as a convective transfer. Currently, prescribed heat flux and convective boundary conditions are available for 2D elements only. Available boundary condition types are:

1) node temperature: Boundary condition type for prescribing nodal temperatures. Always applied on element nodes. Supported attributes are:

Attribute Description Type Required Def. Unit
T Prescribed node temperature. Scalar Yes K

Example:

BoundaryCondition {
id = 'Border temperature',
type = 'node temperature',
mesh = 'meshName',
properties = {
{id = 'T', description = 'External temperature applied on the node', unit = 'degC'},
},
nodeValues = {
{'gridLeft', 100}, -- gridLeft is a named border in the associated mesh.
{'gridBottom', 100}, -- The 100 degC condition will be applied to all its nodes
{'gridRight', 100},
{'gridTop', 500},
}
}

2) surface flux: Boundary condition type for prescribing a heat flux over an element edge for 2D problems or over an element surface for 3D problems. Notice that no-flow conditions (q = 0) doesn't need to be prescribed since they are automatic in FEM problems. Supported attributes are:

Attribute Description Type Required Def. Unit
q Prescribed heat flux magnitude. Positive values are considered to be an outward flow in the normal direction. Negative values are inward flows. Scalar Yes W/m2
qDir Heat flux direction. If not given, the flux is assumed to be normal to the edge/face. If present, it should be a normalized vector with size equal to the mesh dimension. The resulting flux will be equal to q * (qDir dot n) where n is the edge/face normal (pointing outwards to the element). Vector No -

Example:

BoundaryCondition {
id = 'Heated Border',
type = 'surface flux',
mesh = 'meshName',
properties = {
{id = 'q', description = 'Heat flux'},
},
edgeValues = { -- gridLeft is a named border in the associated mesh.
{'gridLeft', -1}, -- The given heat flow will be applied to all element edges in the border.
} -- The negative value means that the flow is entering the element
}

3) convective: Boundary condition type for prescribing a convective heat transfer over an element edge for 2D problems or over an element surface for 3D problems. Supported attributes are:

Attribute Description Type Required Def. Unit
hc Convective heat transfer coefficient. Scalar Yes W/(m2.k)
Ta Ambient temperature. Scalar Yes K

Example:

BoundaryCondition {
id = 'Border convection',
type = 'convective',
mesh = 'meshName',
properties = {
{id = 'hc', description = 'Heat transfer coefficient', unit = 'W/(cm2.degC)'},
{id = 'Ta', description = 'Ambient temperature', unit = 'degC'},
},
faceValues = { -- top is a named face border in the associated 3D mesh.
{'top', 1.2, 30}, -- The given condition will be applied to all element faces in the border.
}
}

4) point generation: Boundary condition type for prescribing point heat generation conditions over cell elements. Supported attributes are:

Attribute Description Type Required Def. Unit
pG Point generation rate. Scalar Yes W/m
pPos Point position. Vector Yes m

Example:

BoundaryCondition {
id = 'Point src',
type = 'point generation',
mesh = 'meshName',
properties = {
{id = 'pPos', description = 'Point position', unit = 'cm', dim = 2},
{id = 'pG', description = 'Generation rate', unit = 'W/cm'},
},
cellValues = {
{42, {1.5, 2.0}, 5}, -- 5 W/cm at point with coordinates (1.5, 2.0) on cell 42
}
}

Constants

The Thermo Fem physics doesn't includes any constants in the constants.ThermoFemPhysics table.

External loads

The Thermo Fem physics doesn't supports the concept of integration with other physics through external loads.

Derived results

Besides calculating temperature values, the Thermo Fem physics can also recover heat flux values, either on mesh nodes or on Gauss points, depending on the value of the heatFluxMode physics attribute.

Recovered values will be stored on the 'q' nodal and/or Gauss attributes. If the needed attributes do not exist on the mesh, they will be created automatically by the physics with the following signature:

Attribute Description Type Required Def. Unit History
q Heat flux. Vector No W/m2 No

If creating the Gauss attribute 'q' manually on the model, please make sure that its associated integration rule is the same as the configured rule for the physics.

If, for any reason, the model contains compatible node and/or Gauss attributes with names other than 'q', a renaming table can be included in the set of physics attributes to perform the required name translations.

Supported elements

The Thermo Fem physics supports 2D and 3D elements. Supported elements are:

  • quad4
  • quad8
  • quad9
  • tri3
  • tri6
  • hex8
  • hex27

Unit system

The Thermo Fem physics uses internally the international system of units for its calculations, as can be seen above by the default units for properties and attributes. The whole unit system can be replaced through the unitSystem physics attribute, as described at the Common Fem physics plugin options page. This replacement can be usefull when working with values that are too small or too big in the default system.

When making the substitution, the units on the follwoing table should be replaced by the desired units, forming a coherent unit system. If any of the mapping entries is not needed in the model, it can be omitted from the table.

local newUnitSystem = {
time = 's',
coord = 'm',
T = 'K',
q = 'W/m2',
k = 'W/(m.K)',
rho = 'kg/m3',
cp = 'J/(kg.K)',
h = 'm',
G = 'W/m3',
hc = 'W/(m2.K)',
Ta = 'K',
pG = 'W/m',
pPos = 'm',
}