Model.xml
Fluid mechanics models used in the computation are specified in the model.xml file. It is mandatory located in the folder of the current case. A typical form of this file is:
<?xml version = "1.0" encoding = "UTF-8" standalone = "yes"?>
<model>
<flowModel name="PressureVelocityEq" numberPhases="2" alphaNull="false"/>
<EOS name="IG_air.xml"/>
<EOS name="SG_water.xml"/>
</model>
Flow model
<flowModel name="PressureVelocityEq" numberPhases="2" numberTransports="1" alphaNull="false"/>
The <flowModel>
markup is mandatory to specify the mathematical model to solve during the computation. This markup may contain the following attributes:
name
: Name of the mathematical flow model. This attribute can take the values: Euler [Eul57], PressureVelocityEq (previously named Kapila) [SPB09][KMB+01], VelocityEq (previously named multiP) [SCazeP+21], VelocityEqTotEnergy, TemperaturePressureVelocityEq (previously named ThermalEq) [LMSN14], EulerHomogeneous, EulerKorteweg or NonLinearSchrodinger [Dha20].numberPhases
: Integer number corresponding to the number of phases present in the simulation. The total amount of equations is related to this number. This attribute is not necessary when the values ofname
are Euler or EulerHomogeneous.numberTransports
: This attribute is optionnal and is set to 0 as default. It can be used to add specific variables advected in the flow (color functions).alphaNull
: For PressureVelocityEq, VelocityEq and VelocityEqTotEnergy models, the volume fraction can either be null (true) or not (false) and this choice is determined by this parameter. Default value is false.
Remark:
If EulerHomogeneous model is chosen, two other attributes are to be used: liquid
and vapor
to specify the number corresponding to the liquid phase and the vapor phase. They are phase 0 for the first and 1 for the second.
<flowModel name="EulerHomogeneous" liquid="0" vapor="1"/>
<EOS name="SG_waterLiq.xml"/>
<EOS name="IG_waterVap.xml"/>
If EulerKorteweg or NonLinearSchrodinger models are chosen, other attributes are needed, in accordance with Dhaouadi’s thesis [Dha20]. Note that Euler–Korteweg model is written for a given temperature and that non-linear Schrödinger model doesn’t need an EOS.
<flowModel name="EulerKorteweg" alpha="1.e-2" beta="2.e-5" temperature="550" kappa="1.e-2"/>
<EOS name="Polynomial_arbitrary.xml"/>
<flowModel name="NonLinearSchrodinger" alpha="3.33e-3" beta="2.e-5"/>
Equations of state (EOS)
<EOS name="IG_air.xml"/>
The model.xml input file must contain as many <EOS>
markups as number of phases specified in the Flow model markup. Each phase is described thanks to relations and parameters (see Section Materials for more details). The values of these parameters are specified in a separate file: the name attribute contains the name of this file which must be placed in the ECOGEN/libEOS/ folder. Some fluid files are already present in the ECOGEN package.
Advected additional variables
<transport name="color"/>
The model.xml input fle must contain as many <transport>
markups as number of transports specified in the Flow model markup. Each transported variable is described by its name. The default number of advected variable is 0.
Relaxation procedures
<relaxation type="PT"/>
An additional markup <relaxation>
may be used to impose some specific equilibrium between the phases depending on the flow model used. The attribute type
specifies the type of equilibrium:
P: A pressure equilibrium is imposed at every location of the flow. The attribute
speed
can be added to specify the speed at which the relaxation operates (infinite or finite). Default is infinite. If a finite relaxation is chosen, therate
andsolver
have to be specified. The rate is a real number while the solver can either be Euler [SCazeP+21] or LSODA [Hin83, Pet83].
<relaxation type="P" speed="infinite"/>
<relaxation type="P" speed="finite" rate="1.e-5" solver="Euler"/>
PT: Both pressure and thermal equilibrium are imposed at every location of the flow. It does not require additional attributes.
PTMu: A thermodynamical equilibrium is imposed at every location of the flow. It must be associated with the node
<dataPTMu>
whose attributes areliquid
andvapor
to specify the name of the EOS of the liquid and the vapor phase. Hereafter the complete node when PTMu is used:
<relaxation type="PTMu">
<dataPTMu liquid="SG_waterLiq.xml" vapor="IG_waterVap.xml"/>
</relaxation>
Source terms
The additional <sourceTerms>
markup can be used to numerically integrate some source terms in the equations. The attribute type
selects the source term:
heating: Related to a thermal energy heating/cooling. This attribute requires the
<dataHeating>
node with the attributevolumeHeatPower
; a real number corresponding to the power by volume unit added to the flow (unit: W/m3 (SI)).
<sourceTerms type="heating" order="EULER">
<dataHeating volumeHeatPower="1.e6"/>
</sourceTerms>
gravity: If the gravity is considered. The node
<dataGravity>
must be present with the attributesx
,y
andz
giving the coordinates for the gravity acceleration vector in real numbers (unit: m/s2 (SI)).
<sourceTerms type="gravity" order="EULER">
<gravity x="0." y="-9.81" z="0."/>
</sourceTerms>
MRF: For a simulation in a moving reference frame. Allow to compute solution in a rotating frame. The node
<omega>
requires the attributesx
,y
andz
giving the coordinates for the rotating vector in real numbers (unit: rad/s (SI)). The node<timeToOmega>
is optional and allow to specify a progressing acceleration (linear) to the final rotating velocity (requires the attributetf
for acceleration time).
<sourceTerms type="MRF" order="RK4">
<omega x="0." y="0." z="1."/>
<timeToOmega tf="1.e-3"/> <!-- Optional: If activated, the angular velocity increase linearly to omega in during tf -->
</sourceTerms>
Source-term integration can be done up to 4th order. Available integration schemes are:
EULER (1st order)
Runge–Kutta 2 RK2 (2nd order)
Runge–Kutta 4 RK4 (4th order)
Scheme selection is done through order
attribute.
Symmetry terms
Both cylindrical (2D) and spherical (1D) symmetries are implemented. The additional <symmetryTerm>
markup can be used. It requires the attribute type
that can take the value cylindrical or spherical. It also requires an additional node to specify the radial axis:
Cylindrical:
<symmetryTerm type="cylindrical">
<dataSymCyl radialAxis="X"/>
</symmetryTerm>
Spherical:
<symmetryTerm type="spherical">
<dataSymSpher radialAxis="X"/>
</symmetryTerm>
Additional physics
Depending on the model chosen in section Flow model, additional physical effects can be added. This is the case for surface tension, viscosity and conductive heat transfers. These additional physical effects are obtained thanks to the additional markup additionalPhysics
with the attribute type
that can take different value according to the chosen effect.
Surface tension
This physical effect is obtained by using the type surface tension and its treatment is detailed in [SPD+17]. Then it requires the node dataSurfaceTension
with following attributes:
transport
: This is the name of advected variable used as color function for surface-tension terms. This advected variable has been precised in the section Advected additional variables. The name should be the same.sigma
: A real number for the surface-tension coefficient (unit: N/m (SI)).
<additionalPhysic type="surfaceTension" >
<dataSurfaceTension transport="color" sigma="72.e-3"/>
</additionalPhysic>
Viscosity
This physical effect is obtained by using the type viscosity and it needs the attribute mu
of the <physicalParameters>
to be set in the EOS files (Materials).
<additionalPhysic type="viscosity"/>
Others
In dev…
Low-Mach preconditioning
In case of low-speed flows, a low-Mach preconditioning can be applied to the selected flow model. The method is detailed in [LMNS13]. Currently this option is compatible with the flow models: Euler, UEq and PUEq.
<lowMach state="true"/>
Note that the minimum reference Mach number can be chosen if required (default is 0.01). When the local Mach number of the flow is lower than this threshold, it is replaced by the threshold value in order to keep a reasonable computation time.
<lowMach state="true" machRefMin="5.e-2"/>
For an example of use, see the test case presented in the Section Low-Mach subsonic flow.
1D geometry with smooth cross section variation
In case of a 2D geometry with smooth cross section variation, it is possible to use a 1D geometry and reproduce 2D effects with this attribute as detailed in the first appendix of [LMNS13]. This option is only compatible with unstructured meshes defined with flow direction along the X-axis. Boundary condition contributions in other directions than the X-axis should use nullFlux boundary condition (see InitialConditions.xml). Note that this option is available for the flow models: Euler, UEq, PUEq and EulerHomogeneous. For an example of use, see the test case presented in the Section Low-Mach subsonic flow.
<geometry smoothCrossSection1d="true"/>