.. ############################################################################ .. manual/packages/vertex-cfd/initial_conditions.rst .. ############################################################################ .. _sec_initial_conditions: *********************** Initial conditions block *********************** .. literalinclude:: ../xml-blocks/initial_conditions.xml :language: xml :lines: 1-5 :caption: `Initial Conditions` block in XML input file. 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: .. literalinclude:: ../../../../examples/inputs/incompressible/incompressible_2d_channel_periodic.xml :language: xml :lines: 76-92 :caption: Initial conditions for mesh block `eblock-0_0`. .. literalinclude:: ../../../../examples/inputs/cht/solid_to_solid_fluid_cht.xml :language: xml :lines: 170-201 :caption: Initial conditions for mesh blocks `fluid_1`, `fluid_2`, `solid_1` and `solid_2`. 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`. .. dropdown:: :icon: multi-select :color: primary :animate: fade-in-slide-down .. py:data:: Type :type: string :value: Constant :usage: Required :description: Define an uniform initial conditions for the variable defined in Equation Set Name. .. py:data:: 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). .. py:data:: Value :type: double :value: :math:`[-\infty;\infty]` :usage: Required :description: Value to initialize the variable set in Equation Set Name with. .. literalinclude:: ../../../../examples/inputs/incompressible/incompressible_2d_channel_periodic.xml :language: xml :linenos: :lines: 77-81 :caption: Set an initial condition of 0.0 for the variable `lagrange_pressure`. .. dropdown:: :icon: multi-select :color: primary :animate: fade-in-slide-down .. 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. .. py:data:: Type :type: string :value: IncompressibleLaminarFlow :usage: Required :description: Define a laminar profile in the x-direction. .. py:data:: Minimum height :type: double :value: :math:`[-\infty;\infty]` :usage: Required :description: Position of the bottom wall perpandicular to the flow direction. .. py:data:: Maximum height :type: double :value: :math:`[-\infty;\infty]` :usage: Required :description: Position of the top wall perpandicular to the flow direction. .. py:data:: Average velocity :type: double :value: :math:`[0;\infty]` :usage: Required :description: Average velocity in the flow direction. .. py:data:: Temperature :type: double :value: :math:`[0;\infty]` :usage: Optional :description: Uniform value for the temperature when solving temperature equation. .. literalinclude:: ../../../../examples/inputs/cht/solid_to_solid_fluid_cht.xml :language: xml :linenos: :lines: 171-177 :caption: Set laminar flow initial conditions (parabolic velocity profile) and uniform temperature. .. dropdown:: :icon: multi-select :color: primary :animate: fade-in-slide-down .. note:: The Taylor-Green-Vortex problem initializes the pressure and velocity components with sinusoidal functions. .. py:data:: Type :type: string :value: IncompressibleTaylorGreenVortex :usage: Required :description: Initialize the Navier-Stokes equations with the Taylor-Green-Vortex. .. literalinclude:: ../../../../examples/inputs/incompressible/incompressible_2d_taylor_green_vortex.xml :language: xml :linenos: :lines: 69-71 :caption: Initialize the velocity and the pressure for the Taylor-Green-Vortex problem. .. dropdown:: :icon: multi-select :color: primary :animate: fade-in-slide-down .. 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. .. py:data:: Type :type: string :value: IncompressibleTurbulentChannel :usage: Required :description: Initialize a turbulent flow in a 3-D channel. .. py:data:: Kinematic Viscosity :type: double :value: :math:`[0;\infty]` :usage: Required :description: Kinematic viscosity of the turbulent flow. .. py:data:: Half Width :type: double :value: :math:`[0;\infty]` :usage: Required :description: Half-width of the turbulent channel (y-direction). .. py:data:: Friction Reynolds Number :type: double :value: :math:`[0;\infty]` :usage: Required :description: Targeted friction Reynolds number. .. py:data:: Lx :type: double :value: :math:`[0;\infty]` :usage: Required :description: Geometry dimension in the x-direction/flow direction. .. py:data:: Ly :type: double :value: :math:`[0;\infty]` :usage: Required :description: Geometry dimension in the y-direction/spanwise direction. .. py:data:: LNumber of M :type: int :value: :math:`[0;\infty]` :usage: Optional :default: 3 :description: Number of modes used to generate the turbulent initial conditions. .. py:data:: Add Random Perturbations :type: bool :value: true, false :usage: Optional :default: false :description: Add random perturbations to the initial turbulent flow. .. py:data:: Temperature :type: double :value: :math:`[0;\infty]` :usage: Optional :description: Initial value for the temperature. Required when solving for the temperature equation. .. literalinclude:: ../../../../examples/inputs/incompressible/incompressible_3d_wale_channel_re_tau_180.xml :language: xml :linenos: :lines: 133-141 :caption: Initial conditions for a turbulent channel flow. .. dropdown:: :icon: multi-select :color: primary :animate: fade-in-slide-down .. py:data:: Type :type: string :value: Circle :usage: Required :description: Define a circle/sphere step condition for the variable defined in Equation Set Name. .. py:data:: 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). .. py:data:: Inside Value :type: double :value: :math:`[-\infty;\infty]` :usage: Required :description: Value inside the circle/sphere to initialize the variation set in Equation Set Name with. .. py:data:: Outside Value :type: double :value: :math:`[-\infty;\infty]` :usage: Required :description: Value outside the circle/sphere to initialize the variation set in Equation Set Name with. .. py:data:: Radius :type: double :value: :math:`[0;\infty]` :usage: Required :description: Radius of the circle/sphere. .. py:data:: Center :type: Array(double) :value: :math:`[-\infty;\infty]` :usage: Required :description: Coordiantes of the center of the circle/sphere. .. dropdown:: :icon: multi-select :color: primary :animate: fade-in-slide-down .. py:data:: Type :type: string :value: Sinusoidal :usage: Required :description: Define a sinusoidal initial condition for the variable defined in Equation Set Name of the type :math:`A \sin(|\vec{x}| + \phi)`. .. py:data:: 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). .. py:data:: Amplitude :type: double :value: :math:`[0;\infty]` :usage: Required :description: Value of the amplitude :math:`A` multiplying the sinusoidal function. .. py:data:: Phase Angle :type: double :value: :math:`[-\infty;\infty]` :usage: Required :description: Phase angle :math:`\phi`. .. dropdown:: :icon: multi-select :color: primary :animate: fade-in-slide-down .. py:data:: 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. .. py:data:: 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). .. py:data:: Origin :type: double :value: :math:`[-\infty;\infty]` :usage: Required :description: x-coordinate of the axis/plane separating the left and right values. .. py:data:: Left Value :type: double :value: :math:`[-\infty;\infty]` :usage: Required :description: Left value to axis/plane specified by the `Origin` x-coordinate. .. py:data:: Right Value :type: double :value: :math:`[-\infty;\infty]` :usage: Required :description: Right value to axis/plane specified by the `Origin` x-coordinate. .. dropdown:: :icon: multi-select :color: primary :animate: fade-in-slide-down .. py:data:: Type :type: string :value: Gaussian :usage: Required :description: Gaussian profile with the following definition: :math:`d + \prod_{i=0}^{d} a_i \exp \left( (b_i - x_i ) (\frac{1}{2\sigma^2} - x_i) \right)` .. py:data:: 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). .. py:data:: Center :type: Array(double) :value: :math:`[-\infty;\infty]` :usage: Required :description: Speficy :math:`\vec{b}`. .. py:data:: Sigma :type: Array(double) :value: :math:`[-\infty;\infty]` :usage: Required :description: Speficy :math:`\vec{\sigma}`. .. py:data:: Base :type: Array(double) :value: :math:`[-\infty;\infty]` :usage: Required :description: Speficy :math:`d`. .. py:data:: 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 :math:`\sqrt(2\pi) \sigma`. .. py:data:: Scale :type: Array(double) :value: :math:`[-\infty;\infty]` :usage: Optional if `Scaling` is set to `unscaled`. :default: :math:`\sqrt(2\pi) \sigma` :description: Scaling to use when `Scaling` is set to `scaled`. .. literalinclude:: ../../../../examples/inputs/rad/rad_2d_reaction_advection_diffusion.xml :language: xml :lines: 67-75 :caption: Gaussian initial conditions used in a Vertex-RAD input file. .. dropdown:: :icon: multi-select :color: primary :animate: fade-in-slide-down .. py:data:: Type :type: string :value: InverseGaussian :usage: Required :description: Gaussian profile with the following definition: :math:`\frac{1}{d + \prod_{i=0}^{d} a_i \exp \left( (b_i - x_i ) (\frac{1}{2\sigma^2} - x_i) \right)}` .. py:data:: 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). .. py:data:: Center :type: Array(double) :value: :math:`[-\infty;\infty]` :usage: Required :description: Speficy :math:`\vec{b}`. .. py:data:: Sigma :type: Array(double) :value: :math:`[-\infty;\infty]` :usage: Required :description: Speficy :math:`\vec{\sigma}`. .. py:data:: Base :type: Array(double) :value: :math:`[-\infty;\infty]` :usage: Required :description: Speficy :math:`d`. .. py:data:: 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 :math:`\sqrt(2\pi) \sigma`. .. py:data:: Scale :type: Array(double) :value: :math:`[-\infty;\infty]` :usage: Optional if `Scaling` is set to `unscaled`. :default: :math:`\sqrt(2\pi) \sigma` :description: Scaling to use when `Scaling` is set to `scaled`.