Reference Settings

Reference state

Keyword

Required

Default

Valid values

‘reference’

No

‘IC_1’

“IC_?” where ? is an integer.

# set reference state to IC_1
'reference' : 'IC_1',

Sets the Initial Condition which provides the reference quantities when non-dimensionalisation is applied to force reporting. “IC_?” must be a valid initial conditions dictionary defined in the parameters file

Initial State

Keyword

Required

Default

Valid values

‘name’

No

‘IC_1’

“IC_?” where ? is an integer.

‘func’

No

An (optional) initial conditions function.

# set initital state to IC_1
"initial": {
  "name": "IC_1"
}

Sets which block Initial Condition block will be used to provide initial flow field conditions for the simulation. If ‘func’ is provided it will be used to provide the initial flow field variables on a cell-by-cell basis.

Note

If the ‘initial’ entry is missing then the conditions default to the reference state.

Scale mesh

Keyword

Required

Default

Valid values

‘scale’

No

[1,1,1]

[scaleX,scaleY,scaleZ] : Any list of positive floats with length 3

Before being loaded in to the solver, the mesh’s [x,y,z] location data is multiplied by this vector.

Example usage:

# Scale from mm to metres
'scale' : [0.001,0.001,0.001]
# Scale from inches to metres
'scale' : [0.0254,0.0254,0.0254]
# Scale the mesh to be 10 times larger in y axis
'scale' : [1,10,1]

Note

The ‘scale’ parameter applies to the mesh only - not interpolated surface outputs etc. (see Tab x)

Mesh Transform Function

As an alternative to passing a fixed scaling factor the ‘mesh transform function’ parameter accepts a function. This can be used to apply an arbitrary transform to the mesh. A simple example is given below:

def my_mesh_transform(**kwargs):
    x = list(kwargs["coord"])

    x[2] = x[2] - 0.5

    return {"coord": tuple(x)}

"mesh transform function": my_mesh_transform

Partitioner

Keyword

Required

Default

Valid values

‘partitioner’

No

‘metis’

[‘metis’]. The name of the partitioner to use.

The ‘metis’ partitioner is used to split the computational mesh up so that the job can be run in parallel. Other partitioners will be added in future code releases

Restart

Keyword

Required

Default

Valid values

‘restart’

No

False

True/False

‘restart casename’

No

Optionally supply the name of a case to restart from that case, if not supplied then the current casename will be used..

‘interpolate restart’

No

False

True/False: True to interpolate restart results from a different mesh.

‘restart meshname’

No

False

The name of the mesh to interpolate the restart from.

‘solution smooth cycles’

No

0

Number of Laplace smoothing cycles to smooth initial mapped solution

Restart allows you to load a solution from a previous run and continue the solver from that point. By default the solver will look for a <casename>_results.h5 file to load the restart, this can be overridden with the ‘restart casename’ parameter.

The default restart assumes that the same mesh is used. Alternatively, a solution from another mesh can be mapped on to a new mesh using the ‘interpolate restart’ parameter.

Example usage:

# Restart from previous solution
'restart' : True,
# Load solution from case name 'my_case'
'restart casename' : 'my_case',
# Restart from previous solution on a different mesh
"interpolate restart": True,
# Interpolate restart from "different_mesh.h5"
"restart meshname": "different_mesh",
# Do not smooth initial solution
"solution smooth cycles": 0,

Advanced Restart

It is possible to restart the SA-neg solver from results generated using the Menter SST solver and vice versa, however by default the turbulence field(s) are reset to zero. An approximate initial solution for the SA-neg model can be generated from Menter-SST results by adding the key

# Generate approximate initial field for SA-neg
'approximate sa from sst results' : True,

Safe Mode

Keyword

Required

Default

Valid values

‘safe’

No

False

True/False

Safe mode turns on extra checks and provides diagnosis in the case of solver stability issues

Example usage:

# Enable safe mode
'safe' : True,