Initial conditions describe all field variables at the beginning of the simulation.
They take the form of a spatial function. See tem_spatial_module for the definition of spatial functions. In their simplest form they can just be a constant value.
Usually, the variables of the field in the equation system need to be defined, but for nonlinear flow equations the primitive variables are required instead. Variables with multiple components need to be provided as individual spatial functions, and the names have an X, Y or Z appended to signify the respective directions.
An example initial condition with only constant values would look for flows as follows:
initial_condition = {
density = 1.0,
velocityX = 0.0,
velocityY = 0.0,
velocityZ = 0.0,
pressure = 1.0
}
The initial condition will be evaluated pointwise and then transformed to a modal representation in Legendre polynomials.
subroutine to load the initial conditions from a lua configuration file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(atl_cube_container_type), | intent(inout) | :: | cube_container |
Container which holds all cubic elements for the mesh. |
||
| type(atl_Equations_type), | intent(inout) | :: | equation |
Description of the equations to solve. |
||
| integer, | intent(in) | :: | prj_pos(tree%global%minLevel:tree%global%maxLevel) |
Levelwise position pointer for the projection method used for IC |
||
| type(ply_poly_project_type), | intent(inout) | :: | poly_proj_list(:) |
unique list for projection methods |
||
| type(flu_State), | intent(inout) | :: | conf |
Handle, providing access to the configuration script |
||
| character(len=*), | intent(in) | :: | LuaFile |
Name of Lua configuration file. |
||
| type(treelmesh_type), | intent(in) | :: | tree |
Tree representation of your mesh. |