# Initial Condition

# 📝 Initial Condition Configuration

The Initial Condition defines the starting flow state for a simulation. Properly configured initial conditions can significantly improve convergence rates and stability, especially for complex flows. Flow360 allows specification of spatially varying initial conditions through mathematical expressions.


# 📋 Available Parameters

Parameter Description Unit
Type Type of initial condition specification
Rho Density expression non-dimensional
U X-velocity expression non-dimensional
V Y-velocity expression non-dimensional
W Z-velocity expression non-dimensional
P Pressure expression non-dimensional

# 🔍 Detailed Descriptions

# Type

The method used to specify the initial condition.

  • Options:
    • NavierStokesInitialCondition: Standard expression-based specification
    • NavierStokesModifiedRestartSolution: Modify a restart solution
  • Default: NavierStokesInitialCondition
  • Notes:
    • Standard expressions are most common for new simulations
    • Modified restart solutions allow patching specific regions of a restart solution

# Rho

Mathematical expression defining the initial density field.

  • Default: "rho" (freestream value from operating condition)
  • Example: "(x <= 0) ? (1.0) : (0.125)" (step function for shock tube)
  • Notes:
    • Expressions must be valid C expressions
    • Non-dimensional values (normalized by freestream)
    • Can use spatial coordinates (x, y, z) and mathematical functions
    • Fluid properties are taken from the operating condition

# U

Mathematical expression defining the initial x-velocity field.

  • Default: "u" (freestream value from operating condition)
  • Example: "0.0" (flow starts from rest)
  • Notes:
    • Non-dimensional values (normalized by freestream speed of sound)
    • Relative to the grid coordinates, not necessarily the flow direction
    • Commonly set to freestream values for external flows

# V

Mathematical expression defining the initial y-velocity field.

  • Default: "v" (freestream value from operating condition)
  • Example: "0.1*sin(10*x)" (sinusoidal disturbance)
  • Notes:
    • Non-dimensional values (normalized by freestream speed of sound)
    • Relative to the grid coordinates
    • Can specify flow angularity or disturbances

# W

Mathematical expression defining the initial z-velocity field.

  • Default: "w" (freestream value from operating condition)
  • Example: "0.0" (no initial z velocity)
  • Notes:
    • Non-dimensional values (normalized by freestream speed of sound)
    • Relative to the grid coordinates
    • Can specify swirl or sideslip conditions

# P

Mathematical expression defining the initial pressure field.

  • Default: "p" (freestream value from operating condition)
  • Example: "(x <= 0) ? (1 / 1.4) : (0.1 / 1.4)" (step function for shock tube)
  • Notes:
    • Non-dimensional values (normalized by freestream dynamic pressure)
    • Can specify pressure regions or gradients
    • Often kept at freestream value for external aerodynamics

# 💡 Tips

  • For external aerodynamics:

    • Using freestream conditions (the default) is usually sufficient
    • For faster convergence, initialize rotating zones with appropriate swirl velocities
  • For internal flows:

    • Consider initializing with approximate expected flow patterns
    • For complex geometries, start with low velocities to avoid initial instabilities
    • For rotating machinery, initializing with swirl can reduce initial transients
  • For transonic/supersonic flows:

    • Gradual ramp-up of Mach number can improve stability
    • Initialize shock regions with appropriate jump conditions if known
  • For restart-based initial conditions:

    • Use the modified restart solution type when you need to adjust specific regions
    • Useful for changing boundary conditions while preserving developed flow features
  • Expression language features:

    • Conditional expressions: (condition) ? (value_if_true) : (value_if_false)
    • Mathematical functions: sin, cos, exp, log, sqrt, etc.
    • Logical operators: &&, ||, !, <, >, ==, etc.
    • Constants: PI, etc.

#Frequently Asked Questions

  • How are initial conditions normalized in Flow360?

    Initial condition values are specified in non-dimensional form. Density is normalized by freestream density, velocities by freestream speed of sound, and pressure by freestream dynamic pressure. The actual dimensional values depend on the operating condition settings. Note that fluid properties such as viscosity and thermal conductivity are taken from the operating condition settings rather than the initial condition.

  • Can I specify different initial conditions in different regions?

    Yes, using conditional expressions based on coordinates. For example: "(x < 0) ? (1.0) : (0.5)" sets density to 1.0 where x < 0 and 0.5 elsewhere. You can use complex conditions with logical operators like && (AND) and || (OR).

  • Do I need to specify all five variables (rho, u, v, w, p)?

    If you don't specify a variable, it uses the default (freestream value). For most external aerodynamics, the defaults work well. For special cases like internal flows or compressible flows with shocks, you might want to specify some or all variables.

  • How do initial conditions affect convergence?

    Better initial conditions can significantly reduce convergence time. For steady-state problems, starting closer to the final solution means fewer iterations. For unsteady simulations, poor initial conditions can introduce non-physical transients that take time to dissipate.

  • What happens if my initial condition violates physical constraints?

    Initial conditions that create negative density or pressure can cause immediate simulation failure. The solver performs some basic checks, but it's the user's responsibility to ensure physically realistic initial states. In extreme cases, you might need to start with a simplified flow state and gradually work toward your target conditions.

  • How do I initialize a flow with rotation or swirl?

    For rotating or swirling flows, you can specify tangential velocities using expressions that depend on the radial position. For example, solid body rotation around the z-axis could use: "u": "-y * omega" and "v": "x * omega" where omega is the rotation rate. For rotating machinery, consider initializing rotating zones with appropriate swirl velocities.

  • What's the difference between NavierStokesInitialCondition and NavierStokesModifiedRestartSolution?

    NavierStokesInitialCondition is used for standard initialization of a new simulation. NavierStokesModifiedRestartSolution allows you to modify specific regions of a restart solution while preserving the rest, which is useful when changing boundary conditions or geometry details in an otherwise developed flow.