Heat Toolbox
1. Models
The model used by default with the heat toolbox is represented by this equation
with the following properties :

\(q=k \nabla T\) is the conductive heat flux,

\(Q=0\) is heat source by default equal to 0,

\(\Omega\) the domain where the model is applied (.i.e. the materials).
For a steadystate problem, the temperature does not change with time, and the first term disappears.
1.1. Heat sources
The source term \(Q\) in the heat equation is used to model internal heat generation and absorption with positive and negative values respectively.
For adding a heat source term in the model, a JSON key called heatsources
must be added and the JSON value associated can be

a string: explicit expression of \(Q\),

a JSON object: setup one heat source,

an array of JSON object : \(Q\) is composed of several heat sources.
We also consider two ways for defined a heat source :

from an explicit expression of the heat source

from an expression of the heat rate \(P\). In this case, \(Q = P/V\), where \(V\) is the volume of the material belongs to this model.
The setup of a heat source is defined from the properties listed in the next table.
Keyword  Description  Value Type  Default Value 


possible values : 
string 


expression with respect to the type used 
string 
The term \(Q\) can be also split into \(N\) terms (for example due to the multiple physics). The term \(Q\) can be written as \(Q=\sum_{i=1}^N Q_i\).
This setup can be done by using an array of JSON objects for the heatsources
entry. And each JSON object corresponds to the previous description of one heat source.
{
"Models": {
"heat": [
{ (1)
"name": "heat1",
"materials": [
"mymatA",
"mymatB"
],
"setup": {
"heatsources": [ (2)
{ (3)
"type": "heatsource",
"expr": "3"
},
{ (4)
"type": "heatrate",
"expr": "2*exp(t):t"
}
]
}
},
{ (5)
"name": "heat2",
"materials": [
"mymatC"
],
"setup": {
"heatsources": { (6)
"expr": "30"
}
}
}
]
}
}
1  setup of first model called heat1 on materials mymatA and mymatB 
2  heat sources will be composed of 2 terms that we will call \(Q_1\) and \(Q_2\) (with \(Q=Q_1+Q_2\)) 
3  we define \(Q_1=3\) 
4  we define \(Q_2=2*exp(t)/V\) with \(V\) the measure of materials mymatA and mymatB 
5  setup of second model called heat2 on materials mymatC 
6  we define one heat source with \(Q=30\) 
1.2. Convective heat transfert
Modeling heat transfer in fluid requires taking into account the convective effect in the heat equation. The heat equation is written as :
with \(\boldsymbol{u}\) the fluid velocity.
For adding this feature to the model, a convection
section should be added.
The value can be a string corresponding to velocity expression.
{
"Models": {
"heat": {
"setup": {
"convection": "{30*(y+0.7)*(y0.5)*(y>0.5)*(y<0.7),0}:y"
}
}
}
}
2. Materials
Name  Symbol  Shape  Description 

thermalconductivity 
k 
scalar or matrix 
thermal conductivity 
density 
rho 
scalar 
density 
thermalexpansion 
beta 
scalar 
thermal expansion 
specificheatcapacity 
Cp 
scalar 
specific heat capacity 
3. Fields and symbols expressions
Name  Description  Shape 

temperature 
the temperature field 
scalar 
Symbol  Expression  Description 

heat_T 
\(T\) 
evaluate the temperature 
heat_grad_T_0 
\(\frac{\partial T}{\partial x}\) 
evaluate the first component of gradient of temperature 
heat_grad_T_1 
\(\frac{\partial T}{\partial y}\) 
evaluate the second component of gradient of temperature 
heat_grad_T_2 
\(\frac{\partial T}{\partial z}\) 
evaluate the third component of gradient of temperature 
heat_dn_T 
\(\nabla T \cdot \boldsymbol{n}\) 
evaluate the normal derivative of temperature 
heat_nflux 
\(k \nabla T \cdot \boldsymbol{n}\) 
evaluate the normal flux 
4. Boundary Conditions
4.1. Temperature imposed
JSON keywords : temperature
, temperature_imposed
Property  Description  Value Type  Is Optional  Default Value 


mesh marker where the BC is applied 

yes 
name given to the BC 

expression of 

false 
{
"BoundaryConditions": {
"heat": { (1)
"temperature": { (2)
"bc1": { (3)
"markers": "gamma1", (4)
"expr": "29310*(y1)*(y+1):y" (5)
},
"bc2": { (6)
"expr": "293+0.38*t:t"
}
}
}
}
}
1  the toolbox identity 
2  JSON keyword for defining this kind of boundary condition 
3  name given to a boundary condition of type temperature imposed 
4  marker names where the boundary condition is applied 
5  the expression of the temperature imposed 
6  another boundary condition of type temperature imposed where the marker used will be the name (i.e. bc2 ) 
The temperature imposed can be applied on all kind of marked entities (elements,faces,edges,points) 
4.2. Heat flux
JSON keywords : heat_flux
, flux
Property  Description  Value Type  Is Optional  Default Value 


mesh marker where the BC is applied 

yes 
name given to the BC 

expression of 

false 
{
"BoundaryConditions": {
"heat": {
"flux": {
"bc1": {
"markers": [
"MarkerNeumann_1",
"MarkerNeumann_2"
],
"expr": "34*t:t"
}
}
}
}
}
The expression given to the heat flux boundary condition can depend on the unknown (i.e. any symbols depending on the temperature). 
4.3. Convective heat flux
JSON keywords : convective_heat_flux
Property  Description  Value Type  Is Optional  Default Value 


mesh marker where the BC is applied 

yes 
name given to the BC 

expression of 

false 


expression of 

false 
{
"BoundaryConditions": {
"heat": {
"convective_heat_flux": {
"bc1": {
"h": "16",
"Text": "287"
}
}
}
}
}
The expressions given to the convective heat flux boundary condition can depend on the unknown but the automatic differentiation is not implemented here, so the jacobian will be inexact if a Newton solver is used. 
6. Post Processing
6.1. Exports
Name  Description 

temperature 
the temperature field 
velocityconvection 
evaluate the gradient of temperature 
pid 
the mesh partitioning 
all 
all fields available 
All materials properties given in the section Materials can be also exported by specifying the name in the fields entry.

6.2. Measures
6.2.1. NormalHeatFlux
Parameters
section{
"NormalHeatFlux": { (1)
"bottom": { (2)
"markers": [ (3)
"bottom1",
"bottom2"
],
"direction": "inward" (4)
},
"top": { (5)
"direction": "inward"
}
}
}
1  kind of measure 
2  name of measure 
3  surface markers where the measure is computed 
4  direction : inward or outward 
5  another measure applied on surface marker called top (because when markers is no present, the name is used as marker name) 