Setting Initial Conditions
Initial conditions are set for a continuum. They can be set with constant values, field function values, or tabular data values.
Initial conditions can also be set for a particular region.
To specify the method to use for setting an initial condition:
- Under the Initial Conditions node, select the node for the relevant condition.
- In the Properties window, click the drop-down list corresponding to the Method property.

This action permits the selection of one of the following:
- Constant
- Field Function
- Table (iteration)
- Table (r)
- Table (time)
- Table (x,y,z)
- User Code
Using Constant Values
Generally, most initial conditions are specified as constants.
This value is entered as either a scalar or vector value, depending on the specific initial condition.

Using Field Function Values
Field functions are useful for specifying initial conditions that are not constant values.
For instance, if you initialized the velocity in the L-shaped duct that is shown schematically below:
An initial velocity of 0 m/s is acceptable. Although, a better initial condition would be 1 m/s in the x-direction in the first part of the duct and 1 m/s in the -y direction after the bend. To set up this scenario, use a vector field function which could be defined as follows:
[($$Centroid[0] < 5) ? 1 : 0, ($$Centroid[0] < 5) ? 0 : -1, 0]
Suppose that this field function was named Initial Velocity. This field function would then be selected in the list corresponding to the Vector function property in the Properties window.

Although the above example was for a vector value, and thus required a vector field function, the process would be identical for scalar values using scalar field functions.
Take care to use a field function that is likely to be initialized before being used. For instance, problems are likely to occur if you initialize pressure in terms of velocity, since it is not clear that velocity is available at the time that pressure is initialized.
Using Tabular Data Values
Tabular data sets are useful for transferring the data from one solution to use as an initial condition for another solution.
Since the tabular data file format is not compact, this method is not a suitable method of data transfer between large simulations. However, this method is effective for transferring a coarse-mesh solution to a finer mesh.
If you were to do the following:
- Extract a tabular data set containing pressure from a previous simulation.
- Export the data set to a file called initialData.
- Read the tabular data file in the current simulation.
- Assign the name of this tabular data set to the Table property in the Properties window of the table node (Table (iteration) in the following screenshot) under Pressure.
Then the field in the tabular data corresponding to pressure would also be assigned to the Data property.

The tabular data set is not partitioned for a parallel case which means that the entire data set is loaded into each parallel process that is allocated to the simulation. This process could result in memory overflow, as multiple copies of the data set are created. For this reason, initialization using tables is not recommended for parallel runs.