Initial conditions block

Listing 11 Initial Conditions block in XML input file.
  <ParameterList name="Initial Conditions">
	  ...
	  ...
	  ...
  </ParameterList> <!--Initial Conditions-->

Initial conditions are specified for each mesh block, and all variables defined as degrees of freedom within a block must be assigned initial values. Vertex-CFD provides several types of initial conditions, listed below. The syntax for defining initial conditions in a mesh block is as follows:

Listing 12 Initial conditions for mesh block eblock-0_0.
        <Parameter name="Type" type="string" value="Constant"/>
        <Parameter name="Equation Set Name" type="string" value="lagrange_pressure"/>
        <Parameter name="Value" type="double" value="0.0"/>
      </ParameterList> <!-- Constant Lagrange Pressure -->
      <ParameterList name="Constant Velocity 0">
        <Parameter name="Type" type="string" value="Constant"/>
        <Parameter name="Equation Set Name" type="string" value="velocity_0"/>
        <Parameter name="Value" type="double" value="1.0"/>
      </ParameterList> <!-- Constant Velocity 0 -->
      <ParameterList name="Constant Velocity 1">
        <Parameter name="Type" type="string" value="Constant"/>
        <Parameter name="Equation Set Name" type="string" value="velocity_1"/>
        <Parameter name="Value" type="double" value="0.0"/>
      </ParameterList> <!-- Constant Velocity 1 -->
    </ParameterList> <!-- eblock-0_0 -->
  </ParameterList> <!-- Initial Conditions -->
Listing 13 Initial conditions for mesh blocks fluid_1, fluid_2, solid_1 and solid_2.
        <Parameter name="Minimum height" type="double" value="-0.015"/>
        <Parameter name="Temperature" type="double" value="300.0"/>
      </ParameterList> <!-- Laminar Flow -->
    </ParameterList> <!-- fluid_1 -->
    <ParameterList name="fluid_2">
      <ParameterList name="Laminar Flow">
        <Parameter name="Type" type="string" value="IncompressibleLaminarFlow"/>
        <Parameter name="Average velocity" type="double" value="0.1"/>
        <Parameter name="Maximum height" type="double" value="-0.005"/>
        <Parameter name="Minimum height" type="double" value="-0.015"/>
        <Parameter name="Temperature" type="double" value="300.0"/>
      </ParameterList> <!-- Laminar Flow -->
    </ParameterList> <!-- fluid_2 -->
    <ParameterList name="solid_1">
      <ParameterList name="Temperature">
        <Parameter name="Type" type="string" value="Constant"/>
        <Parameter name="Equation Set Name" type="string" value="temperature"/>
        <Parameter name="Value" type="double" value="300.0"/>
      </ParameterList> <!-- Temperature -->
    </ParameterList> <!-- solid_1 -->
    <ParameterList name="solid_2">
      <ParameterList name="Temperature">
        <Parameter name="Type" type="string" value="Constant"/>
        <Parameter name="Equation Set Name" type="string" value="temperature"/>
        <Parameter name="Value" type="double" value="300.0"/>
      </ParameterList> <!-- Temperature -->
    </ParameterList> <!-- solid_2 -->
  </ParameterList> <!-- Initial Conditions -->

  <ParameterList name="Closure Models">
    <ParameterList name="fluid">
      <ParameterList name="Fluid Properties">

The initial conditions for mesh block eblock-0_0 are defined in a sub-list whose value matches the mesh block name. Individual initial conditions are then specified within sub-lists selected from the options below. The name of each sub-list is provided by the user. Some initial-condition types apply to a single variable, such as Constant, while others define conditions for a set of variables on a mesh block — for example, Laminar Flow.

<Constant initial condition>
Type
Type:

string

Value:

Constant

Usage:

Required

Description:

Define an uniform initial conditions for the variable defined in Equation Set Name.

Equation Set Name
Type:

string

Value:

Variable name

Usage:

Required

Description:

Variable name to initialize (should be the same name as defined in the source code).

Value
Type:

double

Value:

\([-\infty;\infty]\)

Usage:

Required

Description:

Value to initialize the variable set in Equation Set Name with.

Listing 14 Set an initial condition of 0.0 for the variable lagrange_pressure.
1        <Parameter name="Equation Set Name" type="string" value="lagrange_pressure"/>
2        <Parameter name="Value" type="double" value="0.0"/>
3      </ParameterList> <!-- Constant Lagrange Pressure -->
4      <ParameterList name="Constant Velocity 0">
5        <Parameter name="Type" type="string" value="Constant"/>
<Laminar Flow>

Note

The laminar initial condition is only supported in the x-direction. When selecting this initial condition type, the pressure and velocity components are initialized. The temperature is set to an uniform value when enabled.

Type
Type:

string

Value:

IncompressibleLaminarFlow

Usage:

Required

Description:

Define a laminar profile in the x-direction.

Minimum height
Type:

double

Value:

\([-\infty;\infty]\)

Usage:

Required

Description:

Position of the bottom wall perpandicular to the flow direction.

Maximum height
Type:

double

Value:

\([-\infty;\infty]\)

Usage:

Required

Description:

Position of the top wall perpandicular to the flow direction.

Average velocity
Type:

double

Value:

\([0;\infty]\)

Usage:

Required

Description:

Average velocity in the flow direction.

Temperature
Type:

double

Value:

\([0;\infty]\)

Usage:

Optional

Description:

Uniform value for the temperature when solving temperature equation.

Listing 15 Set laminar flow initial conditions (parabolic velocity profile) and uniform temperature.
1        <Parameter name="Temperature" type="double" value="300.0"/>
2      </ParameterList> <!-- Laminar Flow -->
3    </ParameterList> <!-- fluid_1 -->
4    <ParameterList name="fluid_2">
5      <ParameterList name="Laminar Flow">
6        <Parameter name="Type" type="string" value="IncompressibleLaminarFlow"/>
7        <Parameter name="Average velocity" type="double" value="0.1"/>
<Taylor Green Vortex>

Note

The Taylor-Green-Vortex problem initializes the pressure and velocity components with sinusoidal functions.

Type
Type:

string

Value:

IncompressibleTaylorGreenVortex

Usage:

Required

Description:

Initialize the Navier-Stokes equations with the Taylor-Green-Vortex.

Listing 16 Initialize the velocity and the pressure for the Taylor-Green-Vortex problem.
1    </ParameterList> <!-- eblock-0_0 -->
2  </ParameterList> <!-- Initial Conditions -->
<Turbulent Channel>

Note

The turbulent channel assumes a flow in the x-direction. The wall boundaries are perpandicular to the y-direction and periodic boundaries are assumed in the z-direction.

Type
Type:

string

Value:

IncompressibleTurbulentChannel

Usage:

Required

Description:

Initialize a turbulent flow in a 3-D channel.

Kinematic Viscosity
Type:

double

Value:

\([0;\infty]\)

Usage:

Required

Description:

Kinematic viscosity of the turbulent flow.

Half Width
Type:

double

Value:

\([0;\infty]\)

Usage:

Required

Description:

Half-width of the turbulent channel (y-direction).

Friction Reynolds Number
Type:

double

Value:

\([0;\infty]\)

Usage:

Required

Description:

Targeted friction Reynolds number.

Lx
Type:

double

Value:

\([0;\infty]\)

Usage:

Required

Description:

Geometry dimension in the x-direction/flow direction.

Ly
Type:

double

Value:

\([0;\infty]\)

Usage:

Required

Description:

Geometry dimension in the y-direction/spanwise direction.

LNumber of M
Type:

int

Value:

\([0;\infty]\)

Usage:

Optional

Default:

3

Description:

Number of modes used to generate the turbulent initial conditions.

Add Random Perturbations
Type:

bool

Value:

true, false

Usage:

Optional

Default:

false

Description:

Add random perturbations to the initial turbulent flow.

Temperature
Type:

double

Value:

\([0;\infty]\)

Usage:

Optional

Description:

Initial value for the temperature. Required when solving for the temperature equation.

Listing 17 Initial conditions for a turbulent channel flow.
1        <Parameter name="Friction Reynolds Number" type="double" value="180.0"/>
2        <Parameter name="L_x" type="double" value="12.56637"/>
3        <Parameter name="L_z" type="double" value="4.18879"/>
4        <Parameter name="Number of Modes" type="int" value="3"/>
5      </ParameterList> <!-- Turbulent Channel Flow -->
6    </ParameterList> <!-- block_1 -->
7  </ParameterList> <!-- Initial Conditions -->
8
9  <ParameterList name="Closure Models">
<Circle initial condition>
Type
Type:

string

Value:

Circle

Usage:

Required

Description:

Define a circle/sphere step condition for the variable defined in Equation Set Name.

Equation Set Name
Type:

string

Value:

Variable name

Usage:

Required

Description:

Variable name to initialize (should be the same name as defined in the source code).

Inside Value
Type:

double

Value:

\([-\infty;\infty]\)

Usage:

Required

Description:

Value inside the circle/sphere to initialize the variation set in Equation Set Name with.

Outside Value
Type:

double

Value:

\([-\infty;\infty]\)

Usage:

Required

Description:

Value outside the circle/sphere to initialize the variation set in Equation Set Name with.

Radius
Type:

double

Value:

\([0;\infty]\)

Usage:

Required

Description:

Radius of the circle/sphere.

Center
Type:

Array(double)

Value:

\([-\infty;\infty]\)

Usage:

Required

Description:

Coordiantes of the center of the circle/sphere.

<Sinusoidal initial condition>
Type
Type:

string

Value:

Sinusoidal

Usage:

Required

Description:

Define a sinusoidal initial condition for the variable defined in Equation Set Name of the type \(A \sin(|\vec{x}| + \phi)\).

Equation Set Name
Type:

string

Value:

Variable name

Usage:

Required

Description:

Variable name to initialize (should be the same name as defined in the source code).

Amplitude
Type:

double

Value:

\([0;\infty]\)

Usage:

Required

Description:

Value of the amplitude \(A\) multiplying the sinusoidal function.

Phase Angle
Type:

double

Value:

\([-\infty;\infty]\)

Usage:

Required

Description:

Phase angle \(\phi\).

<Step initial condition>
Type
Type:

string

Value:

Step

Usage:

Required

Description:

Specific a step initial condition with left and right values separated by an axis/plane perpandicular to the x-axis.

Equation Set Name
Type:

string

Value:

Variable name

Usage:

Required

Description:

Variable name to initialize (should be the same name as defined in the source code).

Origin
Type:

double

Value:

\([-\infty;\infty]\)

Usage:

Required

Description:

x-coordinate of the axis/plane separating the left and right values.

Left Value
Type:

double

Value:

\([-\infty;\infty]\)

Usage:

Required

Description:

Left value to axis/plane specified by the Origin x-coordinate.

Right Value
Type:

double

Value:

\([-\infty;\infty]\)

Usage:

Required

Description:

Right value to axis/plane specified by the Origin x-coordinate.

<Gaussian initial condition>
Type
Type:

string

Value:

Gaussian

Usage:

Required

Description:

Gaussian profile with the following definition: \(d + \prod_{i=0}^{d} a_i \exp \left( (b_i - x_i ) (\frac{1}{2\sigma^2} - x_i) \right)\)

Equation Set Name
Type:

string

Value:

Variable name

Usage:

Required

Description:

Variable name to initialize (should be the same name as defined in the source code).

Center
Type:

Array(double)

Value:

\([-\infty;\infty]\)

Usage:

Required

Description:

Speficy \(\vec{b}\).

Sigma
Type:

Array(double)

Value:

\([-\infty;\infty]\)

Usage:

Required

Description:

Speficy \(\vec{\sigma}\).

Base
Type:

Array(double)

Value:

\([-\infty;\infty]\)

Usage:

Required

Description:

Speficy \(d\).

Scaling
Type:

string

Value:

scaled, unscaled

Usage:

Optional

Default:

unscaled

Description:

Scaling factor multiplying the Gaussian function. If unscaled is specified, the scaling is defaulted to \(\sqrt(2\pi) \sigma\).

Scale
Type:

Array(double)

Value:

\([-\infty;\infty]\)

Usage:

Optional if Scaling is set to unscaled.

Default:

\(\sqrt(2\pi) \sigma\)

Description:

Scaling to use when Scaling is set to scaled.

Listing 18 Gaussian initial conditions used in a Vertex-RAD input file.
      <ParameterList name="Gaussian Species 0">
        <Parameter name="Type" type="string" value="Gaussian"/>
        <Parameter name="Scaling" type="string" value="scaled"/>
        <Parameter name="Equation Set Name" type="string" value="species_0"/>
        <Parameter name="Center" type="Array(double)" value="{0.4, 0.5}"/>
        <Parameter name="Base" type="double" value="0.0"/>
        <Parameter name="Sigma" type="Array(double)" value="{0.05, 1000.00}"/>
        <Parameter name="Scale" type="double" value="1.0"/>
      </ParameterList> <!-- Gaussian Species 0 -->
<Inverse Gaussian initial condition>
Type
Type:

string

Value:

InverseGaussian

Usage:

Required

Description:

Gaussian profile with the following definition: \(\frac{1}{d + \prod_{i=0}^{d} a_i \exp \left( (b_i - x_i ) (\frac{1}{2\sigma^2} - x_i) \right)}\)

Equation Set Name
Type:

string

Value:

Variable name

Usage:

Required

Description:

Variable name to initialize (should be the same name as defined in the source code).

Center
Type:

Array(double)

Value:

\([-\infty;\infty]\)

Usage:

Required

Description:

Speficy \(\vec{b}\).

Sigma
Type:

Array(double)

Value:

\([-\infty;\infty]\)

Usage:

Required

Description:

Speficy \(\vec{\sigma}\).

Base
Type:

Array(double)

Value:

\([-\infty;\infty]\)

Usage:

Required

Description:

Speficy \(d\).

Scaling
Type:

string

Value:

scaled, unscaled

Usage:

Optional

Default:

unscaled

Description:

Scaling factor multiplying the Gaussian function. If unscaled is specified, the scaling is defaulted to \(\sqrt(2\pi) \sigma\).

Scale
Type:

Array(double)

Value:

\([-\infty;\infty]\)

Usage:

Optional if Scaling is set to unscaled.

Default:

\(\sqrt(2\pi) \sigma\)

Description:

Scaling to use when Scaling is set to scaled.