Hybrid Discontinuous Galerkin User Manual
In many application context, not only do we need the primal variable (e.g. the potential or the displacement) but also the dual variable (e.g the flux or the stress).
Feel++ supports HdG methods and enables primal/dual variables solves.
1. Mixed Poisson
1.1. Models
Mixed Poisson equations are
completed by boundary conditions and where \(k\) represents the conductivity.
Those equations can represent several problem types, such as electrostatics problems or heat transfer problems. One can choose to use field names and material properties in the model file for a particular physic by using a MixedPoissonPhyics in the constructor of the toolbox.
By default, no physic is used (MixedPoissonPhysics::None). Electric (MixedPoissonPhysics::Electric) and heat (MixedPoissonPhysics::Heat) are also available.
1.2. Materials
Name | Symbol | Shape | Description |
---|---|---|---|
conductivity |
cond |
scalar |
conductivity |
Name | Symbol | Shape | Description |
---|---|---|---|
electric-conductivity |
sigma |
scalar |
electric conductivity |
Name | Symbol | Shape | Description |
---|---|---|---|
thermal-conductivity |
k |
scalar |
thermal conductivity |
1.3. Fields and symbols expressions
Name | Description | Shape |
---|---|---|
potential |
the potential field |
scalar |
flux |
the flux field |
vectorial |
Symbol | Expression | Description |
---|---|---|
poisson_P |
\(P\) |
evaluate the potential |
poisson_grad_P_0 |
\(\frac{\partial p}{\partial x}\) |
evaluate the first component of gradient of potential |
poisson_grad_P_1 |
\(\frac{\partial p}{\partial y}\) |
evaluate the second component of gradient of potential |
poisson_grad_P_2 |
\(\frac{\partial p}{\partial z}\) |
evaluate the third component of gradient of potential |
poisson_dn_P |
\(\nabla p \cdot \boldsymbol{n}\) |
evaluate the normal derivative of potential |
poisson_F_0 |
\(\boldsymbol{u}_x\) |
evaluate the x component of the flux |
poisson_F_1 |
\(\boldsymbol{u}_y\) |
evaluate the y component of the flux |
poisson_F_2 |
\(\boldsymbol{u}_z\) |
evaluate the z component of the flux |
Name | Description | Shape |
---|---|---|
electric-potential |
the electric potential field |
scalar |
current-density |
the current density field |
vectorial |
Symbol | Expression | Description |
---|---|---|
electric_V |
\(V\) |
evaluate the potential |
electric_grad_V_0 |
\(\frac{\partial V}{\partial x}\) |
evaluate the first component of gradient of electric potential |
electric_grad_V_1 |
\(\frac{\partial V}{\partial y}\) |
evaluate the second component of gradient of electric potential |
electric_grad_V_2 |
\(\frac{\partial V}{\partial z}\) |
evaluate the third component of gradient of electric potential |
electric_dn_V |
\(\nabla V \cdot \boldsymbol{n}\) |
evaluate the normal derivative of electric potential |
electric_C_0 |
\(\boldsymbol{j}_x\) |
evaluate the x component of the current density |
electric_C_1 |
\(\boldsymbol{j}_y\) |
evaluate the y component of the current density |
electric_C_2 |
\(\boldsymbol{j}_z\) |
evaluate the z component of the current density |
Name | Description | Shape |
---|---|---|
temperature |
the temperature field |
scalar |
heat-flux |
the heat flux field |
vectorial |
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_F_0 |
\(\boldsymbol{u}_x\) |
evaluate the x component of the heat flux |
heat_F_1 |
\(\boldsymbol{u}_y\) |
evaluate the y component of the heat flux |
heat_F_2 |
\(\boldsymbol{u}_z\) |
evaluate the z component of the heat flux |
1.4. Boundary Conditions
1.4.1. Dirichlet
On the potential/electric-potential/temperature:
1.4.2. Neumann
On the potential/electric-potential/temperature:
1.6. PostProcessing
1.6.1. Exports
Name | Description |
---|---|
potential |
the potential field |
flux |
the flux field |
pid |
the mesh partitioning |
all |
all fields available |
Name | Description |
---|---|
electric-potential |
the electric potential field |
current-density |
the current density flux |
pid |
the mesh partitioning |
all |
all fields available |
Name | Description |
---|---|
temperature |
the temperature field |
heat-flux |
the heat flux field |
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.
|
2. Coupled Mixed Poisson
2.1. Models
The equations of the model are:
coupled with a system of ODE:
where \(\Pi_1\in \boldsymbol{y}\) and the boundary condition:
with \(P_I = p_{|\Gamma}\).
Most of the configuration is the same as for the Mixed Poisson toolbox, except for the boundary condition where the coupling happens.
2.2. Boundary Conditions
2.2.1. Coupling
On the flux/current-density/heat-flux:
"Coupling":
{
"buffer":
{
"markers":"top", (1)
"capacitor": "Cbuffer.C", (2)
"resistor": "Rbuffer.R", (3)
"circuit": "$cfgdir/test3d0d_linear/test3d0d_linear.fmu", (4)
"buffer": "Pi_1.phi" (5)
}
}
1 | marker for \(\Gamma\) |
2 | name of the variable in the FMU for \(C_b\) |
3 | name of the variable in the FMU for \(R_b\) |
4 | path of the FMU |
5 | name of the variable in the FMU for \(\Pi_1\) |
3. Mixed Elasticity
3.1. Notations and units
Notation |
Quantity |
\(\mathcal A\) |
compliance operator |
\(\lambda\) |
first Lamé parameter |
\(\mu\) |
second Lamé parameter |
\(\rho\) |
mass density |
3.2. Equations
Mixed Elasticity equations are
The compliance operator is defined as follow:
where
3.3. MixedElasticity Toolbox
The model is described in a json file which path is given by the option mixedelasticity.model_json
.
The construction of this file is detailed in the following sections.
3.3.2. Materials
In this part we define the two Lamé parameters \(\lambda\) and \(\mu\) and the mass density \(\rho\). It is always necessary to define also the material we work on.
"Materials":
{
"<marker>":
{
"name": "copper",
"rho":"1",
"lambda":"1",
"mu":"1"
}
}
3.3.3. Boundary Conditions
All boundary conditions are described in the same way
"BoundaryConditions":
{
"<field>":
{
"<bc_type>":
{
"<marker>":
{
"<option1>":"<value1>",
"<option2>":"<value2>",
// ...
}
}
}
}
Different types of boundary condition are available.
3.3.4. Source Term
The source term \(\underline{\mathbf{F}}_{ext}\) is treated as a boundary condition.
Field |
Type |
Option |
Value |
|
|
|
\(\underline{\mathbf{F}}_{ext}\) |
3.3.5. Post Process
Two fields can be exported, the displacement \(\uu\) and the stress \(\usigma\).
"PostProcess":
{
"Fields":["displacement","stress"]
}
Moreover it is possible to apply a scaling after the computation and then export the scaled field, in particular we define in the material section the scale factor for the elements with a specific marker.
"Materials":
{
"<marker>":
{
"scale_displacement":"1",
"scale_stress":"1"
}
}
"PostProcess":
{
"Fields":["displacement","stress","scaled_displacement","scaled_stress"]
}
3.4. Create applications
In order to solve linear elasticity problem, an application should contain at least
typedef FeelModels::MixedElasticity<FEELPP_DIM,FEELPP_ORDER> me_type;
auto ME = me_type::New("mixedelasticity");
ME->init();
ME->solve();
ME->exportResults();
The assembling for the constant part is inside the initialization, while the assembling of the non-constant part (e.g. the right hand side) is in the solve method.