Boundary conditions
Boundary conditions for each mesh boundary should normally be set in the
Parameter File (.par), using the boundaryTypeMap parameter. This is used
within the VELOCITY, TEMPERATURE or SCALARXX sections to set the
boundary conditions of the respective components of the case.
Available Types
The potential values are summarised in the command line help function for
nekRS, parHelp.txt and below.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
Key Value(s) Description / Comment
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
boundaryTypeMap <bcType for ID 1>, <bcType for ID 1>, ... boundary type for each boundary ID
none no-op (internal or periodic)
interpolation neknek boundary (int)
assign int values in codedFixedValue
zeroValue velocity only (w, wall)
codedFixedValue user specified Dirichlet (v, t, inlet)
specify okl function codedFixedValueVelocity
or codedFixedValueScalar in udf
zeroGradient (I, o, O, insulated, outlet, outflow)
codedFixedGradient user specified scalar Neumann (f, flux)
specify okl function codedFixedGradientScalar in udf
zeroXValue/zeroGradient symmetry x-normal plane (slipx, symx)
zeroYValue/zeroGradient symmetry y-normal plane (slipy, symy)
zeroZValue/zeroGradient symmetry z-normal plane (slipz, symz)
zeroNValue/zeroGradient unaligned symmetry (slip, sym)
zeroYZValue/zeroGradient (onx)
zeroXZValue/zeroGradient (ony)
zeroXYValue/zeroGradient (onz)
zeroXValue/codedFixedGradient traction x-normal plane (tractionx, shlx)
specify okl function codedFixedGradientVelocity in udf
zeroYValue/codedFixedGradient traction y-normal plane (tractiony, shly)
specify okl function codedFixedGradientVelocity in udf
zeroZValue/codedFixedGradient traction z-normal plane (tractionz, shlz)
specify okl function codedFixedGradientVelocity in udf
zeroNValue/codedFixedGradient unaligned traction (traction, shl)
Tip
To setup some cases, you may need to use the boundaryIDMap parameter of
the MESH section to apply the boundaryTypeMap options to the correct
boundary IDs of the mesh (By default NekRS assumes that the boundaryIDs start
at 1). Below is an example where the four boundary conditions are
applied to the boundary IDs 389 (codeFixedValue), 231 (zeroGradient),
4 (zeroValue) and 23 (zeroValue).
[VELOCITY]
boundaryTypeMap = codedFixedValue, zeroGradient, zeroValue, zeroValue
[MESH]
boundaryIDMap = 389, 231, 4, 23
User Defined Value/Gradient
If a boundary condition requires a value setting rather than just a type, a
suitable function will need to be provided within the .udf file. The name of
the function used should be in the form of codedFixed + Value/Gradient
+ Velocity/Scalar/Mesh, E.G. codedFixedValueVelocity,
codedFixedGradientScalar and codedFixedValueMesh.
All of these functions are passed the bcData struct which has the following
parameters available:
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
normals |
|
|
tangential directions |
|
|
|
|
|
velocity |
|
|
|
|
|
interpolated velocity values |
|
|
|
|
|
|
|
|
|
|
|
interpolated scalar value |
|
|
|
|
|
properties |
|
|
Internal / Periodic
None is used when a internal boundary condition is required or a periodic boundary condition has been set as part of the mesh and it does not need to be considered as part of the standard processing of boundary conditions.
Perodicity is linked to the mesh connectivity and is handled by the meshing tool.