Boundary Conditions
Boundary conditions are specified in the form of a numbered list, where the order must match the boundary zones in the CGNS grid file:
The order of the boundary conditions (BC's) needs to be consistent with the order of BC's zones in the grid file. A list of BC zones in the grid file can be obtained using the tool unst_gridInfo.Available BC types are wall, wallfunction, symmetry, centerline, inlet, outlet, farfield, exact, nozzle and distributed. Each is explained below with their options.
Wall
Wall type boundaries can either impose no-slip or slip conditions, specified with the kind statement:
The wall BC is treated as adiabatic by default. You can change the
thermal behavior by either specifying a temperature (for isothermal wall) or a heat
transfer rate (for fixed heat transfer wall). The heat transfer rate qdot should be
given in [W/m^2] units. A positive qdot indicates energy being added to the domain (heating).
Conjugate fluid/solid heat conduction (solved in 1D rays in the wall normal direction, dicretized through the solid thickness) modeling can be activated through wall boundary conditions. This model needs wall material properties and thickness as inputs.
BC_1 {
type = wall
temperature = 300 # Used as initial condition
conjugate solid = Steel_ASTM_A572_Grade50.sol
# Number of points (uniformly distributed) in the solid ray
solid number of points = 300
solid thickness = 0.02
solid output stride = 10 # Output every 10th conjugate ray
}
The format of the conjugate solid material file is explained here.
Wall motion
By default a wall moves with the grid it belongs to: in a domain with rigid body motion the no-slip velocity is the local grid velocity, in a fixed domain it is zero. wall motion states the absolute motion of a wall that differs from its grid's:
BC_1 {type=wall; wall motion = stationary} # fixed in the inertial frame although its grid rotates
BC_6 {type=wall; wall motion = motion_1} # follows rigid body motion_1 although its grid is fixed
BC_7 {type=wall; wall velocity = [10, 0, 0]} # constant velocity (m/s, inertial frame); also "wall motion = velocity"
Options: grid (default), stationary (aliases none, fixed), motion_<k> (any rigid body motion block, rotation or translation, constant or sinusoidal), and velocity. axisymmetric (alias revolution) is still accepted for old input files and ignored with a warning: the wall moves with its grid. The prescribed motion sets the tangential wall velocity. The wall-normal velocity depends on the option:
gridandvelocity: the wall face moves with its grid (a blade, a hub or spinner turning with its zone, a translating belt), so its normal velocity is the grid's — the standard moving-wall condition.stationaryandmotion_<k>: the wall moves differently from its grid, which is only possible when the surface maps onto itself under the grid motion; the wall gets no normal velocity. The solver checks this at setup and prints a warning for a wall that is not a surface of revolution about the rotation axis, or, in a translating zone, not parallel to the translation: such a wall would let mass through its moving faces.
The setting applies to wall and wallfunction boundaries alike (the wall model sees the slip relative to the prescribed wall velocity).
Wallfunction
Wall function is an alternative wall boundary condition that applies a wall model:
The default behavior of the wall function is controlled through the wallfunction section in the input file. However you can customize the wall function type and roughness settings for each BC as:
Symmetry
Symmetry BC has no additional inputs.
Centerline
For axisymmetric simulations:
Please see grid transformation section for more details on how to set up an axisymmetric simulation.
Farfield
This is characteristics based inlet/outlet farfield condition for all speeds. If no options are given, it will use the reference conditions as farfield values.
You can also set the farfield conditions to be different than reference conditions:
You can specify either two of the thermodynamic quantities: pressure, temperature and density.
Inlet
Inlet is a flexible type that will activate the proper boundary condition based on what is specified. Several different inlet implementations are available as detailed below. Before specific details, here are some common inlet options that are shared:
BC_1 {
type=inlet;
# Mass fractions are only needed for multi-species simulations.
massfractions=[0.233, 0.767] # For 2 species
# For turbulence models
eddyviscosityratio=3.0;
# Optional sponge layers to dampen reflections
spongelayers=2;
}
Velocity inlet
If velocity is specified, velocity inlet BC is activated:
BC_1 {
type=inlet;
# Required
velocity=[100,0,0]; # m/s
# One of these options is required for subsonic inlet
density=1.225; # kg/m^3
#pressure=101325; # Pascal
#temperature=300; # Kelvin
}
A subsonic inflow takes four of its five characteristic waves from the boundary data (velocity and one
thermodynamic quantity); the fifth leaves the domain and brings the interior's \(p + \rho c\, u_n\), which
completes the boundary state. With temperature, that wave sets the static pressure.
Stagnation inlet
Stagnation conditions (total pressure/temperature) can be used as:
Mass flow inlet
BC_1 {
type=inlet;
mdot=0.1; # kg/(m^2.s) (positive for inflow)
# One of these options is required for subsonic inlet
density=1.225; # kg/m^3
#temperature=300; # Kelvin
# A supersonic inlet needs the full state
#pressure=101325; # Pascal, together with temperature
}
As for the velocity inlet, the wave leaving the domain completes the boundary state: with temperature it
sets the static pressure and, through the density, the velocity that carries the mass flux; with density it
sets the static pressure. A pressure alone is refused: that wave can call for an outflow at any given inlet
pressure.
Outlet
Outlet is a flexible type that will activate the proper boundary condition based on what is specified. Several different outlet implementations are available as detailed below.
BC_1 {
type=outlet;
# One of these options is required for subsonic outlet
pressure=101325; # Pascal
#temperature=300; # Kelvin
#density=1.225; # kg/m^3
# If none of the above options are specified,
# the outlet extrapolated everything from inside
# This is only valid for supersonic outlets
# Optional sponge layers to dampen reflections
spongelayers=2;
}
Additional controls are offered through the kind options:
# Handle reverse flow by damping
BC_1 {type=outlet; kind=dampreverse}
# Prevent reverse flow
BC_1 {type=outlet; kind=noreverse}
# Force supersonic outlet conditions
BC_1 {type=outlet; kind=forcesupersonic}
Mach outlet
You can set either fixed local or average Mach number as outlet conditions:
Exact
Applies an exact solution from the specified exact flow option:
Nozzle
The nozzle boundary condition is mainly used for launch simulations where the boundary condition is applied to the nozzle exit. It also comes with a few physics options to improve stability and control the output. A basic boundary condition can be specified via the following:
where the nozzle boundary condition takes an input file filename which has several supported file types datafiletype described below. Like the above boundary conditions, they are applied to a component on the triangulation specified by components. In a multispecies simulation, you must also specify ispecies which corresponds to the 0 based index of the mixture in the fluid section for which species the nozzle will eject.
A complete list of all the options is provided below, along with default options where applicable:
Main Options:
| Variable | Description |
|---|---|
| filename | (Required) The filename of the describing boundary condition file |
| datafiletype | (Required) The type of datafile. 0 is a steady (constant) ascii file. 1 is radially varying constant ascii file, 2 is unsteady but constant in space ascii file, 3 is unsteady radially varying binary, 4 is unsteady radially varying ascii file |
| ispecies | (Required for multispecies/multiphase) Specifies the component of mixture for the nozzle to eject. |
| nozzlecenter | (Optional) Specifies the coordinates of the nozzle center |
| nozzlenormal | (Optional) Specifies the normal for the boundary condition to be applied on |
| radiusdirection | (Optional) Unit vector in global coordinates used for projected-radius lookup: abs((x-nozzlecenter)·radiusdirection). When omitted, the default radial distance from nozzlecenter is used. Useful for planar/slot injection profiles. |
| asciilinetimestart | (Required) Only used for datafiletype=4. Specifies the line number to start reading the file. |
| asciilinetimestop | (Required) Only used for datafiletype=4. Specifies the line number to stop reading the file. |
| asciilinetimeskip | (Optional) Only used for datafiletype=4. Specifies the stride at which to read lines from the file. Default is 1. |
| asciilinereadspecies | (Optional) Only used for datafiletype=4. Bool for whether this file contains species information as well. Default is false. |
| numberofradialpoints | (Required) Only used for datafiletype=4. Specifies the number of radial points in the file. |
Note
The mixture state prescribed when asciilinereadspecies=true takes precedent over ispecies. In this case, ispecies is disregarded by the reader.
Ramp Options:
| Variable | Description |
|---|---|
| rampsteps | (Optional) Will linearly warmup the nozzle based on rampsteps number of timesteps by taking a linear combination of the reference Q and the user specified conditions in filename. Default is 0 (no step ramping). |
| rampnton | (Optional) The timestep number to turn the ramping on. Nozzle will be off prior to this timestep. (Only used with rampsteps). Default is -1. |
| ramptimestart | (Optional) If rampsteps is not turned on, the other ramping option is using simulation time. This is the same linear warmup between ramptimestart and ramptimestop. Before ramptimestart the nozzle is off if it is specified. Default is no time ramping. |
| ramptimestop | (Optional) The simulation end time to ramping. |
| timeshift | (Optional) Timeshift can be used to shift the nozzles in time relative to the simulation time. This is compatible with ramping. Default is 0. |
Note
One should only use (rampsteps and rampnton) or (ramptimestart and ramptimestop). They will not work in a combined fashion.*
Physics Options:
| Variable | Description |
|---|---|
| multiphaseequilibrium | (Optional) Only used in cartesian + multiphase. This computes multiphase equilibrium on the boundary condition. Default is false. |
| dostagnation | (Optional) Apply stagnation inlet boundary conditions. Not supported for multiphase. Default is false. |
| doautomaticsonicinlet | (Optional) Only used when dostagnation = false. If the boundary condition goes below subsonic speed, we get pressure from the interior. This keeps the velocity at the inlet >= mach 1. Not supported for multiphase. Default is false. |
| dothroatsonicinlet | (Optional) Only used when dostagnation = true. Forces the pressure to be sonic + 1%. Not supported for multiphase. Default is false. |
Projected Radius Option (radiusdirection)
By default, nozzle profile lookup uses the geometric radius from nozzlecenter.
When radiusdirection is provided, the lookup coordinate is projected onto that direction:
r_lookup = abs((x - nozzlecenter) · radiusdirection)
This enables planar/slot style injection profiles where variation is only along one direction.
Notes:
- radiusdirection is interpreted in global/cartesian coordinates.
- The input vector is normalized internally.
- A zero-length vector is invalid and will trigger an input error.
- If omitted, behavior remains the legacy radial-distance lookup.
Example slot-style setup (vary profile along y only):
BC_1 {
type = nozzle
datafiletype = 1
components = [1]
filename = nozzle_slot_profile.dat
ispecies = 0
nozzlecenter = [0.0, 0.0, 0.0] # Can be omitted. Solver will derive from geometry for each component
radiusdirection = [0.0, 1.0, 0.0]
}
ASCII Data Format
datafiletype = 0 or 1: steady, radially constant or varying, ascii file: radius(m) Pressure(Pa) Temperature(K) u_normal(m/s) u_radial(m/s)
datafiletype = 2: unsteady, radially constant, ascii file: time(s) Pressure(Pa) Temperature(K) u_normal(m/s) u_radial(m/s)
Info
Lines starting with # are omitted by the parser for datafiletype = 0, 1, 2.
datafiletype = 4: unsteady, radially varying, ascii file: line_number time(s) radius_x(m) radius_y(m) [radius_z(m)] Pressure(Pa) u_normal(m/s) u_radial(m/s) [u_azimuthal(m/s)] Temperature (m) [Species Mass Fractions]
Note
The format of datafiletype = 4 depends on the dimension of the configuration. The extra fields radius_z(m) and u_azimuthal(m/s) are required when running with 3D and must be omitted when running with 2D. Currently, the field u_azimuthal(m/s) is disregarded in the nozzle bc, however, it must still be present in the nozzle data file. Also, the fiels Species Mass Fractions are only present when asciilinereadspecies = true. Also, note that no comments are allowed in this file type format.
An example of a type-4 nozzle data base is shown below for the configuration asciilinetimestart = 0; asciilinetimestop = 30; asciilinetimeskip = 10; asciilinereadspecies = true:
0 -10000 0.000 0 0 10000 1000 0 0 1500 0. 0. 1. 0.
0 -10000 0.500 0 0 40000 1000 0 0 1500 0. 0. 1. 0.
0 -10000 1.000 0 0 80000 1000 0 0 1500 0. 0. 1. 0.
0 -10000 1.965 0 0 110000 1000 0 0 1500 0. 0. 1. 0.
10 1.000 0.000 0 0 10000 1000 0 0 1500 0. 0. 1. 0.
10 1.000 0.500 0 0 40000 1000 0 0 1500 0. 0. 1. 0.
10 1.000 1.000 0 0 80000 1000 0 0 1500 0. 0. 1. 0.
10 1.000 1.965 0 0 110000 1000 0 0 1500 0. 0. 1. 0.
20 10000 0.000 0 0 10000 1000 0 0 1500 0. 0. 1. 0.
20 10000 0.500 0 0 40000 1000 0 0 1500 0. 0. 1. 0.
20 10000 1.000 0 0 80000 1000 0 0 1500 0. 0. 1. 0.
20 10000 1.965 0 0 110000 1000 0 0 1500 0. 0. 1. 0.
30 20000 0.000 0 0 10000 1000 0 0 1500 0. 0. 1. 0.
30 20000 0.500 0 0 40000 1000 0 0 1500 0. 0. 1. 0.
30 20000 1.000 0 0 80000 1000 0 0 1500 0. 0. 1. 0.
30 20000 1.965 0 0 110000 1000 0 0 1500 0. 0. 1. 0.
Distributed
Distributed boundary conditions use externally-defined flow data that is mapped to boundary faces. It uses surface solution files typically sampled from a previous solution. Currently cgns format is supported.
BC_1 {
type=distributed;
# Required: File containing distributed BC data
filename=path/to/distributed_data.cgns;
# Optional: Transform coordinates from data file to simulation
scalecoords=[1.0,1.0,1.0]; # Scale coordinates [default=[1,1,1]]
translatecoords=[0.0,0.0,0.0]; # Translate coordinates [default=[0,0,0]]
rotatecoordsdeg=[0.0,0.0,0.0]; # Rotate coordinates in degrees [default=[0,0,0]]
# Optional: Transform velocities from data file to simulation
scalevelocity=[1.0,1.0,1.0]; # Scale velocity components [default=[1,1,1]]
translatevelocity=[0.0,0.0,0.0]; # Translate velocities [default=[0,0,0]]
rotatevelocitydeg=[0.0,0.0,0.0]; # Rotate velocities in degrees [default=[0,0,0]]
}
For unsteady distributed boundary conditions, use the following format:
BC_1 {
type=distributed;
isunsteady=true;
# Required: Time step range and format specification
ntlo=1000; # First time step to use
nthi=2000; # Last time step to use
ntskip=10; # Interval between time steps
numdigits=6; # Number of digits in filename formatting
prefix="data_"; # Prefix for filenames
suffix=".cgns"; # Suffix for filenames
# Optional: Transform specifications as in steady case
scalecoords=[1.0,1.0,1.0];
# ... other transform options
}
The distributed BC files should contain flow variables that are mapped to boundary faces using either nearest-point sampling or interpolation. For unsteady boundary conditions, the solver will interpolate between time steps as needed.
Note
Files for unsteady BCs are expected to follow the naming pattern: prefix + formatted_time_step + suffix For example: with prefix="data_", numdigits=6, suffix=".cgns", and time step 1000, the file would be "data_001000.cgns"
Warning
Distributed boundary conditions are computationally expensive and not supported when using GPU acceleration.