InitialConditions.xml

The initialConditions.xml input file includes the initial conditions and the boundary conditions of the flow simulation. It is mandatory located in the folder of the current case. The typical structure of this file is:

<?xml version = "1.0" encoding = "UTF-8" standalone = "yes"?>
<CI>
  <!-- LIST OF GEOMETRICAL DOMAINS  -->
  <physicalDomains>
    <domain name="base" state="leftChamber" type="entireDomain"/>
  </physicalDomains>

  <!-- LIST OF BOUNDARY CONDITIONS -->
  <boundaryConditions>
    <boundCond name="CLXm" type="nonReflecting" number="1"/>
    <boundCond name="CLXp" type="nonReflecting" number="2"/>
  </boundaryConditions>

  <!--  LIST OF STATES  -->
  <state name="leftChamber">
    <material type="fluid" EOS="IG_air.xml">
      <dataFluid alpha="0.5" density="1.0"/>
    </material>
    <material type="fluid" EOS="SG_water.xml">
      <dataFluid alpha="0.5" density="1000.0"/>
    </material>
    <mixture>
      <dataMix pressure = "1.e5"/>
      <velocity x="0." y="0." z="0."/>
    </mixture>
    <transport name="color" value="32."/>
  </state>
</CI>

Physical domains

The <physicalDomains> markup is mandatory. Different initial conditions can be specified for different regions of the computational domain. This markup must contain as many nodes <domain> as necessary to correctly initialize the computational domain (overlaps are possible). A <domain> node contains the following attributes:

  • name: A name for the domain. This name has no influence on the choices remaining in this file.

  • state: This is the state of the fluid which will be specified with the <state> markup further in the file.

  • type: Specify the type of geometric domain to which the state of the fluid will be assigned; EntireDomain, HalfSpace, Disc, Rectangle, Ellipse, Cuboid, Sphere, Ellipsoid, Cylinder.

Important remark:

The initial conditions are attributed on each domain by using an overlapping principle. The order is therefore important: in the case of overlapping, the last attributed data are considered in the flow computation. Hence, it is important to attribute at least the entire domain at the first place thanks to the value entireDomain.

Depending on the geometrical shape, additional information is required through the use of the following nodes.

EntireDomain

Set the initial condition on the entire domain. No more information required.

<domain name="base" state="leftChamber" type="entireDomain"/>

HalfSpace

Set the initial condition on a half domain. The node <dataHalfSpace> must be included with the following attributes:

  • axis: Can take the value x, y or z.

  • origin: Real number indicating the location of the edge between the two subdomains on the specified axis.

  • direction: Can take a positive or negative value on the specified axis.

<domain name="HP"  state="rightChamber" type="halfSpace">
  <dataHalfSpace axis="x" origin="0.5" direction="positive"/>
</domain>

Disc

In 2D, a disc is defined on a plane, while in 3D, a cylinder with an infinite length is defined. The node <dataDisc> must be added with the following attributes:

  • axis1 and axis2: The name of the 2 axes to define the plane on which the disc is defined. Can take two different values among x, y and z.

  • radius: Real number indicating the disc radius (unit: m (SI)).

  • Node <center>: Require the attributes x, y and z, as real numbers (unit: m (SI)), giving the location of the center of the disc in the plane (axis1, axis2).

<domain name="HP"  state="rightChamber" type="disc">
  <dataDisc axis1="x" axis2="y" radius="0.5">
    <center x="0." y="0." z="0."/>
  </dataDisc>
</domain>

Rectangle

In 2D, a rectangle is defined on a plane, while in 3D, a rectangular beam with an infinite length is defined. The node < dataRectangle > must be added with the following attributes:

  • axis1 and axis2: The name of the 2 axes to define the plane on which the rectangle is defined. Can take two different values among x, y and z.

  • lAxis1 and lAxis2: Real number indicating the length of both sides along (axis1, axis2).

  • Node <posInferiorVertex>: Require the attributes x, y and z, as real numbers (unit: m (SI)), giving the location of the inferior corner in the plane (axis1, axis2).

<domain name="HP"  state="rightChamber" type="rectangle">
  <dataRectangle axis1="x" axis2="y" lAxis1="0.3" lAxis2="0.2">
    <posInferiorVertex x="0.4" y="0.5" z="0."/>
  </dataRectangle>
</domain>

Ellipse

In 2D, an ellipse is defined on a plane, while in 3D, an ellipsoid with an infinite length is defined. The node <dataEllipse> must be added with the following attributes:

  • axis1 and axis2: The name of the 2 axes to define the plane on which the ellipse is defined. Can take two different values among x, y and z.

  • radius1 and radius2: Real numbers indicating the ellipse radii (unit: m (SI)) along the corresponding axes.

  • Node <center>: Require the attributes x, y and z, as real numbers (unit: m (SI)), giving the location of the center of the ellipse in the plane (axis1, axis2).

<domain name="HP"  state="rightChamber" type="ellipse">
  <dataEllipse axis1="x" axis2="y" radius1="1." radius2="1.5">
    <center x="0." y="0." z="0."/>
  </dataEllipse>
</domain>

Cuboid

Set the initial condition of a cuboid. The additional node <dataCuboid> must be added with the attributes:

  • lAxisX, lAxisY and lAxisZ: Real numbers for length of each side of the cuboid along axes (unit: m (SI)).

  • Node <posInferiorVertex>: With the attributes x, y and z, real numbers corresponding to the location of the inferior corner (unit: m (SI)).

<domain name="HP"  state="rightChamber" type="cuboid">
  <dataCuboid lAxisX="1." lAxisY="1." lAxisZ="0.5">
    <posInferiorVertex x="1." y="0.5" z="0.5"/>
  </dataCuboid>
</domain>

Sphere

Set the initial condition of a sphere. The additional node <dataSphere> is required with the attributes:

  • radius: Real number giving the radius of the sphere (unit: m (SI)).

  • Node <center>: With the attributes x, y and z, real numbers giving the location on the center of the sphere (unit: m (SI)).

<domain name="HP"  state="rightChamber" type="sphere">
  <dataSphere radius="0.5">
    <center x="1." y="0.5" z="0.5"/>
  </dataSphere>
</domain>

Ellipsoid

Set the initial condition of an ellipsoid. The additional node <dataEllipsoid> is required with the attributes:

  • axis1, axis2 and axis3: The name and therefore order of the 3 axes on which the ellipsoid is defined. Can take values among x, y and z.

  • radius1, radius2 and radius3: Real numbers indicating the ellipsoid radii (unit: m (SI)) along the corresponding axes.

  • Node <center>: Require the attributes x, y and z, as real numbers (unit: m (SI)), giving the location of the center of the ellipsoid.

<domain name="HP"  state="rightChamber" type="ellipsoid">
  <dataEllipsoid axis1="x" axis2="y" axis3="z" radius1="1." radius2="1.5" radius3="1.5">
    <center x="0." y="0." z="0."/>
  </dataEllipsoid>
</domain>

Cylinder

Set the initial condition of a cylinder. The additional node <dataCylinder> is required with the attributes:

  • axis1 and axis2: The name of the 2 axes to define the plane on which the disc surface of the cylinder is defined. Can take two different values among x, y and z.

  • radius: Real number indicating the disc-surface radius (unit: m (SI)).

  • length: Real number indicating the length of the cylinder (unit: m (SI)).

  • Node <center>: Require the attributes x, y and z, as real numbers (unit: m (SI)), giving the location of the center of the cylinder.

<domain name="HP"  state="rightChamber" type="cylinder">
  <dataCylinder axis1="x" axis2="y" radius="0.5" length="1.">
    <center x="0." y="0." z="0."/>
  </dataCylinder>
</domain>

Initializing using physical identity

An additional possible feature for the geometric domain is to use physicalIdentity number coming from mesh software to initialize a geometrical domain.

Example:

<domain name="base" state="leftChamber" type="entireDomain" physicalEntity="10"/>

In this example, the entire computation domain will be initialized accordingly to the physicalIdentity 10 from the mesh file.

Initializing immersed boundaries

When dealing with Cartesian meshes, it is possible to intialize a domain as immersed boundaries by setting the physicalIdentity number to -1 value.

Example:

<domain name="HP"  state="rightChamber" type="rectangle" physicalEntity="-1">
  <dataRectangle axis1="x" axis2="y" lAxis1="0.2" lAxis2="0.2">
    <posInferiorVertex x="0.3" y="0.15" z="0."/>
  </dataRectangle>
</domain>

In this typical example, a square is considered as walls for the air flow.

_images/immBound.gif

Fig. 3 Example with immersed boundaries.

Boundary conditions

The <boundaryConditions> markup is mandatory. The boundary conditions are specified at the boundary of the computational domain. This markup must contain as many nodes <boundCond> as necessary to cover the entire boundary. Each <boundCond> node contains the following attributes:

Depending on the <type>, additional information is required through the use of the following nodes.

Non-reflecting

The numerical treatment corresponds to an in- or out-going flow without any wave reflection. No more information required.

<boundCond name="outlet" type="nonReflecting" number="1" />

Symmetry

The numerical treatment corresponds to a symmetry condition. No more information required.

<boundCond name="symmetry" type="symmetry" number="2" />

Wall

The numerical treatment corresponds to a wall boundary condition. No more information required.

<boundCond name="wall" type="wall" number="3" />

Inlet tank

The numerical treatment corresponds to the link between the boundary with an infinite tank. An infinite tank is characterized by a null velocity while pressure and temperature are constant. tank requires the <dataInletTank> node with the following attributes:

  • p0: Stagnation pressure, real number (unit: Pa (SI)).

  • T0: Stagnation temperature, real number (unit: K (SI)).

  • Node <fluidsProp>: Necessary to define the presence of each phase in the tank. It must contain as many nodes <dataFluid> as the number of phases in the flow simulation and each contains the attributes:

    • EOS: The name of the file corresponding to the choice of the EOS for the phase in the tank. This file must correspond to the one specified in model.xml input file for every fluid.

    • alpha: The volume fraction of the fluid in the tank, real number in the range ]0.,1.[.

<boundCond name="inlet" type="inletTank" number="3">
  <dataInletTank p0="4.e6" T0="93.3"/>
  <fluidsProp>
    <dataFluid EOS="IG_oxyVap.xml" alpha="0.0001"/>
    <dataFluid EOS="SG_oxyLiq.xml" alpha="0.9999"/>
  </fluidsProp>
</boundCond>

Inlet injection using stagnation state

The numerical treatment corresponds to the link between the boundary with an injection defined using a stagnation state. The injection is characterized by an incoming mass-flow rate at a given thermodynamical state. injection requires the <dataInletInj> node with the following attributes:

  • m0: Incoming mass-flow rate, real number (unit: kg/s.m-2 (SI)).

  • Node <dataFluid> for each phase: It must contain as many nodes <dataFluid> as the number of phases in the flow simulation and each contains the attributes:

    • EOS: The name of the file corresponding to the choice of the EOS for the phase in the tank. This file must correspond to the one specified in model.xml input file for every fluid.

    • density: The density of the fluid incoming, real number (unit: kg/m3 (SI)).

    • pressure: The pressure of the fluid incoming, real number (unit: Pa (SI)).

    • alpha: The volume fraction of the fluid incoming, real number in the range ]0.,1.[.

<boundCond name="inlet" type="inletInjStagState" number="1">
  <dataInletInj m0="2.413092"/>
  <dataFluid EOS="IG_air.xml" density="4.04e-3" pressure="2.57404e2" alpha="0.1"/>
  <dataFluid EOS="SG_water.xml" density="1000." pressure="2.57404e2" alpha="0.9"/>
</boundCond>

Inlet injection using temperature

The numerical treatment corresponds to the link between the boundary with an injection defined using temperature. The injection is characterized by an incoming mass-flow rate at a given thermodynamical state. injection requires the <dataInletInj> node with the following attributes:

  • m0: Incoming mass-flow rate, real number (unit: kg/s.m-2 (SI)).

  • Node <dataFluid> for each phase: It must contain as many nodes <dataFluid> as the number of phases in the flow simulation and each contains the attributes:

    • EOS: The name of the file corresponding to the choice of the EOS for the phase in the tank. This file must correspond to the one specified in model.xml input file for every fluid.

    • temperature: The temperature of the fluid incoming, real number (unit: Pa (SI)).

    • alpha: The volume fraction of the fluid incoming, real number in the range ]0.,1.[.

    <boundCond name="inlet" type="inletInjTemp" number="1">
      <dataInletInj m0="6500."/>
<dataFluid EOS="SG_water.xml" temperature="300." alpha="0.9999"/>
<dataFluid EOS="IG_air.xml" temperature="300." alpha="0.0001"/>
    </boundCond>

Outlet at imposed pressure

In the case of a subsonic flow, the pressure is set equal to the ambient (distant) pressure at the boundary. The additional <dataOutletPressure> node is required with the attributes:

  • p0: Outside pressure, real number (unit: Pa (SI)).

  • Node <transport>: This node is also required for each transport equation used.

<boundCond name="outlet" type="outletPressure" number="5">
  <dataOutletPressure p0="1.e5">
    <transport name="color" value="1.e-6"/>
  </dataOutletPressure>
</boundCond>

Important remark

The choice of the boundary-condition number is made according to the type of mesh given in mesh.xml input file and it follows the rules:

  • Cartesian: The boundaries are ordered and labeled from 1 to 6 (in 3D) according to:

    1. boundary condition at the minimal x location,

    2. boundary condition at the maximal x location,

    3. boundary condition at the minimal y location,

    4. boundary condition at the maximal y location,

    5. boundary condition at the minimal z location,

    6. boundary condition at the maximal z location.

  • UnStructured: When an unstructured mesh is used, the number of the boundary condition must correspond to the number specified in the mesh file .geo (see example in section Generating Meshes).

Remark

The boundary conditions are dependent on the flow model specified in model.xml input file. Some boundary conditions may be not available for the flow model considered.

Mechanical and thermodynamical states of the fluid

For each physical domain in the <physicalDomains> markup, a fluid state must correspond. It implies an additional <state> markup for each state of fluid. This <state> markup contains:

  • As many <material> nodes as the number of phases involved in the simulation.

  • A <mixture> node is required if a multiphase model is used.

Each <material> node corresponds to a phase and contains the following attributes or nodes:

  • Attribute type: Only the value fluid is available in the current ECOGEN version.

  • Attribute EOS: The name of the file corresponding to the fluid equation-of-state parameters. This file must correspond to the one specified in model.xml input file for each phase (see section Flow model).

  • Node <dataFluid>: Contain data related to the considered state of the fluid in the current phase.

This last node <dataFluid> as well as the <mixture> node are dependent on the flow model according to:

Euler

Single-phase flow. In this case, the <mixture> node is absent and the <dataFluid> node contains the following attributes or nodes:

  • density or temperature: Initial density or temperature of the fluid, real number (unit: kg/m3 or K (SI)), respectively.

  • Attribute temperature: Initial temperature of the fluid, real number (unit: K (SI)).

  • Attribute pressure: Initial pressure of the fluid, real number (unit: Pa(SI)).

  • Node <velocity>: With x, y and z attributes setting the initial values for the components of the velocity vector, real numbers (unit: m/s (SI)).

<material type="fluid" EOS="IG_air.xml">
  <dataFluid density="10.0" pressure="1.e5">
    <velocity x="1000." y="1000." z="0."/>
  </dataFluid>
</material>

UEq (previously named MultiP) or UEqTotE

Multiphase flow at velocity equilibrium (same velocity for every phase within each cell). Each <dataFluid> node corresponds to a phase with the following attributes:

  • alpha: Volume fraction of the phase, real number in the range ]0.,1.[. The range can be increased to [0.;1.] if the option alphaNull is turned on (true) in the model.xml input file.

  • density or temperature: Initial density or temperature of the fluid, real number (unit: kg/m3 or K (SI)), respectively.

  • pressure: Initial pressure of the fluid, real number (unit: Pa (SI)).

Moreover, in this case, the <mixture> node contains:

  • Node <velocity>: With x, y and z attributes setting the initial values for the components of the velocity vector, real numbers (unit: m/s (SI)).

<material type="fluid" EOS="IG_air.xml">
  <dataFluid alpha="1." density="50." pressure="1.e5"/>
</material>
<material type="fluid" EOS="SG_water.xml">
  <dataFluid alpha="0." density="1000.0" pressure="1.e5"/>
</material>
<mixture>
  <velocity x="0." y="0." z="0."/>
</mixture>

PUEq (previously named Kapila)

Multiphase flow at pressure and velocity equilibrium (same velocity and pressure for every phase within each cell). Each <dataFluid> node corresponds to a phase with the following attributes:

  • alpha: Volume fraction of the phase, real number in the range ]0.,1.[. The range can be increased to [0.;1.] if the option alphaNull is turned on (true) in the model.xml input file.

  • density or temperature: Initial density or temperature of the fluid, real number (unit: kg/m3 or K (SI)), respectively.

Moreover, in this case, the <mixture> node contains:

  • Node <dataMix>: With pressure attribute for initial pressure of the fluid, real number (unit: Pa (SI)).

  • Node <velocity>: With x, y and z attributes setting the initial values for the components of the velocity vector, real numbers (unit: m/s (SI)).

<material type="fluid" EOS="IG_air.xml">
  <dataFluid alpha="0.5" density="1.0"/>
</material>
<material type="fluid" EOS="SG_water.xml">
  <dataFluid alpha="0.5" density="1000.0"/>
</material>
<mixture>
  <dataMix pressure = "1.e5"/>
  <velocity x="0." y="0." z="0."/>
</mixture>

PTUEq (previously named ThermalEq)

Multiphase flow at pressure, velocity and thermal equilibrium (same velocity, pressure and temperature for every phase within each cell). In this case, every <dataFluid> node corresponds to a phase with only one attribute alpha setting the volume-fraction real number in the range ]0.,1.[.

The <mixture> node contains the following attributes and nodes:

  • Node <dataMix>: With temperature and pressure attributes for initial temperature and pressure of the fluid, real numbers (unit: K and Pa (SI)), respectively.

  • Node <velocity>: With x, y and z attributes setting the initial values for the components of the velocity vector of the mixture, real numbers (unit: m/s (SI)).

<material type="fluid" EOS="IG_waterVap.xml">
  <dataFluid alpha="0.2"/>
</material>
<material type="fluid" EOS="SG_waterLiq.xml">
  <dataFluid alpha="0.8"/>
</material>
<mixture>
  <dataMix pressure = "1.e5" temperature ="300."/>
  <velocity x="0." y="0." z="0."/>
</mixture>

EulerHomogeneous

Multiphase flow at mechanical and thermodynamical equilibrium. In this case, every <dataFluid> node corresponds to a phase with only one attribute alpha setting the volume-fraction real number in the range ]0.,1.[.

Moreover, in this case, the <mixture> contains the following attributes and nodes:

  • Node <dataMix>: With pressure attribute for initial pressure of the mixture, real number (unit: Pa (SI)).

  • Node <velocity>: With x, y and z attributes setting the initial values for the components of the velocity vector of the mixture, real numbers (unit: m/s (SI)).

<material type="fluid" EOS="SG_waterLiq.xml">
  <dataFluid alpha="0.99"/>
</material>
<material type="fluid" EOS="IG_waterVap.xml">
  <dataFluid alpha="0.01"/>
</material>
<mixture>
  <dataMix pressure = "1.e6"/>
  <velocity x="0." y="0." z="0."/>
</mixture>

Euler–Korteweg

Single-phase flow. In this case, the <mixture> node is absent and the <dataFluid> node contains the following attributes or nodes:

  • Attribute density: Initial density of the fluid, real number (unit: kg/m3 (SI)).

  • Node <velocity>: With x, y and z attributes setting the initial values for the components of the velocity vector, real numbers (unit: m/s (SI)).

<material type="fluid" EOS="Polynomial_arbitrary.xml">
    <dataFluid density="0.2452">
        <velocity x="0." y="0." z="0."/>
    </dataFluid>
</material>

Non-linear Schrödinger

Defocusing non-linear Schrödinger equation. In this case, there isn’t any EOS, the <mixture> node is absent and the <dataFluid> node contains the following attributes or nodes:

  • Attribute density: Initial density of the fluid, real number (unit: kg/m3 (SI)).

  • Node <velocity>: With x, y and z attributes setting the initial values for the components of the velocity vector, real numbers (unit: m/s (SI)).

<material type="none">
    <dataFluid density="2.0">
        <velocity x="0." y="0." z="0."/>
    </dataFluid>
</material>

Remark

For the multiphase models, be careful to set the volume fraction in the range ]0,.1.[ (unless you use the option alphaNull=true for pressure-velocity- and velocity-equilibrium models) as well as the its sum over all the phases equal to 1.