boundary
This section describes the input file definition used to prescribe boundary conditions in TOSCA. TOSCA expects a file for each solved field,
where boundary and initial conditions are specified. Pressure boundary conditions are not required, as they are always of the Neumann type except when
periodicity is present. Therefore, boundary conditions are expected for U (velocity) and nut (turbulent viscosity) fields, as well as for T (potential temperature),
when this is activated in the control.dat file.
Specifically, TOSCA expects to find U
, nut
and T
(if applicable) files, inside a directory named boundary
. Within each file, boundary conditions
have to be specified for each side of the domain. These are identified as kLeft
, kRight
, jLeft
, jRight
, iLeft
and iRight
. In addition,
the keyword internalField
has to be specified, which sets the type of initial condition for each of these fields. An example of a boundary/U
file is given below:
# TOSCA Input file - U boundary conditions
# ----------------------------------------
internalField spreadInflow
iLeft periodic
iRight periodic
jLeft noSlip
jRight slip
kLeft fixedValue (5.0 0.0 0.0)
kRight zeroGradient
In addition to common boundary conditions, which are available at all boundaries, TOSCA also features some special boundary conditions, which are only available on specific boundaries. These are used for specific simulations, the user is suggested to consider such constraint when designing and setting up a TOSCA case.
Boundary Conditions
The boundary conditions available in TOSCA are summarized in the following table. The table also specifies the fields for which a given boundary condition is available, together with their entry type and description.
BC type |
entry type |
description |
|
scalar or vector |
Available for |
|
scalar |
Available for |
|
none |
Available for |
|
none |
Available for |
|
none |
Available for |
|
none |
Available for |
|
dictionary |
Available only for |
|
dictionary |
Available only for |
|
dictionary |
Available for |
The last three boundary conditions listed in the previous table are not available on all patches. On the one hand, the
velocityWallFunction
and thetaWallFunction
, used to prescribe wall models, are not available on kLeft
and kRight
boundaries,
plus at additional boundaries, depending on the wall model type, as detailed below. On the
other hand, the inletFunction
type, used to prescribe special inlet boundary conditions for inlet velocity, temperature and turbulent
viscosity, is only available on the kLeft
patch. The user should keep this constraint in mind when setting up a TOSCA case.
Wall Functions
The velocityWallFunction
applies the Shumann wall model, used for ABL flows, or the Cabot wall model, used for wall surfaces, to the velocoty field.
In the Shumann model, the modeled wall shear stress is directly enforced in the stress term of the momentum equations, while a constant normal gradient condition
is applied to the velocity. In order to avoid double counting at the wall when using this condition (the wall shear
stress should be entirely and only modeled), the turbulent viscosity at the wall should be set to zero in the
boundary/nut
file. Entries for velocity wall functions are summarized in the folllwing table:
WF type |
name |
description |
-1 |
Cabot wall model |
Available at velocityWallFunction
{
type -1
kRough 0.003 // equivalent roughness length
}
|
-3 |
Shumann wall model |
Available at velocityWallFunction
{
type -3
kRough 0.003 // equivalent roughness length
gammaM 4.9 // Shumann model constant
kappa 0.4 // von Karman constant
thetaRef 300.0 // reference potential
// temperature in Kelvin
uStarEval averaged // for laterally homogeneous
// flows (e.g. ABL), otherwise
// set to 'localized' (e.g.
// wind farm flows)
}
|
The thetaWallFunction
is used to select different formulations of the Shumann wall model for potential temperature.
In particular, the modeled heat flux is directly enforced in the stress term of the potential temperature equations,
while a zero normal gradient condition is applied to the temperature field. In order to avoid double counting at the wall when using this condition,
the turbulent viscosity at the wall should be set to zero in the boundary/nut
file.
Entries for temperature wall functions are summarized in the folllwing table:
WF type |
name |
description |
-3 |
Shumann wall model, standard. |
Only available at thetaWallFunction
{
type -3
kRough 0.003 // equivalent roughness length
gammaM 4.9 // Shumann model constant
gammaH 7.8 // Shumann model constant
alphaH 1.0 // Shumann model constant
kappa 0.4 // von Karman constant
thetaRef 300.0 // reference potential
// temperature in Kelvin
uStarEval averaged // for laterally homogeneous
// flows (e.g. ABL), otherwise
// set to 'localized' (e.g.
// wind farm flows)
heatingRate -0.00014 // K/s
}
|
-2 |
Shumann wall model, with specified heat flux. |
Only available at thetaWallFunction
{
type -2
qWall 0.003 // wall heat flux in J/m2
}
|
-4 |
Shumann wall model, with specified time history of surface temperature and Obhukhov length. |
Only available at thetaWallFunction
{
type -4
kRough 0.003 // equivalent roughness length
gammaM 4.9 // Shumann model constant
gammaH 7.8 // Shumann model constant
alphaH 1.0 // Shumann model constant
kappa 0.4 // von Karman constant
// temperature in Kelvin
uStarEval averaged // for laterally homogeneous
// flows (e.g. ABL), otherwise
// set to 'localized' (e.g.
// wind farm flows)
}
Look up tables of time (s), surface temperature (K), and Obhukhov length (m),
stored in |
Inlet Functions
The inletFunction
boundary condition has several different types, each corresponding to a different inlet boundary
condition. These are summarized in the following table:
IF type |
name |
description |
1 |
power law profile |
Power law velocity profile \(\mathbf{U}= \mathbf{U}_\text{ref}\left(z/H_\text{ref}\right) ^\alpha\), with \(\alpha=0.107027\). Usage: inletFunction
{
type 1
Uref vector
Href scalar
uPrimeRMS scalar
}
|
2 |
logarithmic profile |
Logarithmic velocity profile \(\mathbf{U}= u*/0.4\ln(z/z_0)\mathbf{e}_U\). \(\mathbf{U}\) is constant above the inversion height \(H\) and equal to \(\mathbf{U}(H)\). Usage: inletFunction
{
type 2
directionU vector
hInversion scalar
frictionU scalar
kRough scalar
}
|
3 |
unsteady mapped inflow |
Maps 2D planes contained in Usage: inletFunction
{
type 3
n1Inflow integer
n2Inflow integer
n1Periods integer
n2Periods integer
n1Merge bool
}
|
4 |
unsteady interpolated inflow |
Same as type 3, but data is interpolated, hence the 2D plane mesh and inlet mesh can be different. Spanwise shift of the inflow data is also available by setting a lateral shift velocity. Note that this velocity is not added to the flow velocity, but rather data are shifted with this constant lateral velocity. Usage: inletFunction
{
type 4
n1Inflow integer
n2Inflow integer
n1Periods integer
n2Periods integer
n1Merge bool
n2Shift bool
shiftSpeed scalar
sourceType string
cellWidth1 integer
cellWidth2 integer
}
|
5 |
Nieuwstadt (1983) model |
Applies the Nieuwstadt (1983) model. This is more sophisticated than the logarithmic profile, as it also contains wind veer. The wind profile is rotated such that the prescribed direction is imposed at the prescribed reference height. Usage: inletFunction
{
type 5
directionU vector
hInversion scalar
hReference scalar
frictionU scalar
kRough scalar
latitude scalar
}
|
6 |
sinusoidally varying i-th component |
Uniform inflow, where the spanwise component varies sinusoidally with given amplitude and frequency. Useful to test turbine yaw controllers. Usage: inletFunction
{
type 6
Uref vector
amplitude scalar
periods scalar
}
|
The different entries required in the inletFunction
dictionary for each function type are detailed below:
entry |
entry type |
description |
type 1 - power law profile |
||
|
vector |
reference velocity in m/s |
|
scalar |
height where \(\mathbf{U}= \mathbf{U}_\text{ref}\) in m |
|
scalar |
isotropic fluctuation value in m/s |
type 2 - logarithmic profile |
||
|
vector |
velocity direction (will be normalized) |
|
scalar |
inversion height in m |
|
scalar |
friction velocity in m/s |
|
scalar |
equivalent roughness length in m |
type 3 - unsteady mapped inflow |
||
|
integer |
number of points in direction 1 (j for kLeft patch) |
|
integer |
number of points in direction 2 (i for kLeft patch) |
|
integer |
number of points in direction 1 for tiling (if target is larger data is extrapolated) |
|
integer |
number of points in direction 2 for tiling (if target is larger data is extrapolated) |
|
bool |
average top cell values from 2D planes and merge within 10 top cells. Useful to make the geostrophic region steady, removing e.g. inertial oscillations. |
type 4 - unsteady interpolated inflow |
||
|
integer |
number of points in direction 1 (j for kLeft patch) |
|
integer |
number of points in direction 2 (i for kLeft patch) |
|
integer |
number of periods in direction 1 for tiling. If target is larger data is extrapolated. |
|
integer |
number of periods in direction 2 for tiling. If target is larger data is extrapolated. |
|
bool |
if set to 1 averages top-most cell from 2D planes and merges it with the unsteady data smoothly within the 10 top-most cells of the target mesh. It ensures that the extrapolated data is precisely steady. |
|
bool |
spanwise shift of inflow data |
|
scalar |
spanwise shift velocity in m/s |
|
string |
uniform (requires next two entries) or grading (requires the mesh file used in
the simulation that generated the 2D planes, renamed |
|
integer |
inflow mesh cell width in direction 1 if |
|
integer |
inflow mesh cell width in direction 2 if |
type 5 - Nieuwstadt (1983) model |
||
|
vector |
velocity direction (will be normalized) |
|
scalar |
inversion height in m |
|
scalar |
reference height in m at which the wind has the provided direction |
|
scalar |
friction velocity in m/s |
|
scalar |
equivalent roughness length in m |
|
scalar |
latitude in degrees |
type 6 - sinusoidally varying i-th component |
||
|
vector |
reference velocity in m/s |
|
scalar |
amplitude of the spanwise velocity oscillation in m/s |
|
scalar |
number of periods contained in the domain length along the i curvilinear direction |
As an example, a logarithmic profile on the kLeft
patch is prescribed as follows
kLeft inletFunction { type 2 // type 2 is logarithmic profile directionU (1.0 0.0 0.0) // velocity is along the x direction hInversion 500 // ABL height is 500 m frictionU 0.5 // friction velocity is 0.5 m/s kRough 0.001 // equivalent roughness lenght is 0.001 m }
Initial Condition
The initial field is finally prescribed after the internalField
keyword within each boundary condition file. Initial conditions
available within TOSCA are summarized in the following table:
initial condition type |
description |
|
Available for Usage: uniform
{
value vector or scalar
perturbations bool
}
|
|
Available for |
|
Sets initial log profile for |
|
Copies the flow from the |
|
Only available for Usage: linear
{
tRef scalar
tLapse scalar
}
|