Wall fluxes

The bulk-flux boundary conditions BulkDrag, BulkSensibleHeatFlux, and BulkVaporFlux compute momentum, heat, and vapor fluxes through a wall from the wind tangential to it and the difference between the near-wall air and the wall state. They may be placed on any of the six boundaries of a bounded domain, so a closed box such as a laboratory cloud chamber, with a warm wet floor, a cold wet ceiling, and side walls at their own temperature and humidity, is described by the same conditions as a lower boundary:

using Breezeusing Breeze.BoundaryConditions: BulkDrag, BulkSensibleHeatFlux, BulkVaporFluxC = 6e-3T_floor, T_ceiling, T_wall = 299, 280, 285drag(T) = BulkDrag(coefficient=C, surface_temperature=T)heat(T) = BulkSensibleHeatFlux(coefficient=C, surface_temperature=T)vapor(T, ℋ) = BulkVaporFlux(coefficient=C, surface_temperature=T, surface_relative_humidity=ℋ)# Drag acts on the two momentum components tangential to each wallρu_bcs = FieldBoundaryConditions(bottom=drag(T_floor), top=drag(T_ceiling), south=drag(T_wall), north=drag(T_wall))ρθ_bcs = FieldBoundaryConditions(bottom=heat(T_floor), top=heat(T_ceiling),                                 west=heat(T_wall), east=heat(T_wall), south=heat(T_wall), north=heat(T_wall))ρqᵛ_bcs = FieldBoundaryConditions(bottom=vapor(T_floor, 1), top=vapor(T_ceiling, 1),                                  west=vapor(T_wall, 0.78), east=vapor(T_wall, 0.78),                                  south=vapor(T_wall, 0.78), north=vapor(T_wall, 0.78))ρqᵛ_bcs.top# outputFluxBoundaryCondition: BulkVaporFluxFunction(coefficient=0.006, gustiness=0)

On every wall the fluxes carry heat and vapor into the domain when the wall is warmer or moister than the adjacent air, and remove the tangential momentum. The wall state may be a number, a field, or a function of the non-Flat coordinates of the wall followed by the time, as for Oceananigans boundary conditions ((x, y, t) on the floor and ceiling, (y, z, t) on the west and east walls, (x, z, t) on the south and north walls), evaluated at the wall at every time step. The transfer coefficient may be a constant or a PolynomialCoefficient; its stability correction applies on the floor and ceiling (with the sign of the bulk Richardson number reversed under the ceiling) and is neutral on the vertical walls, along which buoyancy acts tangentially. The temporally filtered surface state of FilteredSurfaceVelocities is supported on the bottom boundary only.

Breeze.BoundaryConditions.BulkDrag — Function
BulkDrag(; direction=nothing, coefficient=1e-3, gustiness=0, surface_temperature=nothing)

Create a FluxBoundaryCondition for wall momentum drag, on any of the six boundaries.

See BulkDragFunction for details.

Examples

using Breezedrag = BulkDrag(coefficient=1e-3, gustiness=0.1)# outputFluxBoundaryCondition: BulkDragFunction(direction=Nothing, coefficient=0.001, gustiness=0.1)

Or with explicit direction, e.g., XDirection() for u:

using Oceananigans.Grids: XDirectionu_drag = BulkDrag(direction=XDirection(), coefficient=1e-3)ρu_bcs = FieldBoundaryConditions(bottom=u_drag)# outputOceananigans.FieldBoundaryConditions, with boundary conditions├── west: DefaultBoundaryCondition (FluxBoundaryCondition: Nothing)├── east: DefaultBoundaryCondition (FluxBoundaryCondition: Nothing)├── south: DefaultBoundaryCondition (FluxBoundaryCondition: Nothing)├── north: DefaultBoundaryCondition (FluxBoundaryCondition: Nothing)├── bottom: FluxBoundaryCondition: BulkDragFunction(direction=XDirection(), coefficient=0.001, gustiness=0)├── top: DefaultBoundaryCondition (FluxBoundaryCondition: Nothing)└── immersed: DefaultBoundaryCondition (FluxBoundaryCondition: Nothing)

and similarly for YDirection for v. The same condition may be placed on the walls of a closed box; the direction is inferred from the momentum component it is attached to:

drag = BulkDrag(coefficient=1e-3)ρv_bcs = FieldBoundaryConditions(west=drag, east=drag, bottom=drag, top=drag)# outputOceananigans.FieldBoundaryConditions, with boundary conditions├── west: FluxBoundaryCondition: BulkDragFunction(direction=Nothing, coefficient=0.001, gustiness=0)├── east: FluxBoundaryCondition: BulkDragFunction(direction=Nothing, coefficient=0.001, gustiness=0)├── south: DefaultBoundaryCondition (FluxBoundaryCondition: Nothing)├── north: DefaultBoundaryCondition (FluxBoundaryCondition: Nothing)├── bottom: FluxBoundaryCondition: BulkDragFunction(direction=Nothing, coefficient=0.001, gustiness=0)├── top: FluxBoundaryCondition: BulkDragFunction(direction=Nothing, coefficient=0.001, gustiness=0)└── immersed: DefaultBoundaryCondition (FluxBoundaryCondition: Nothing)
source
Breeze.BoundaryConditions.BulkSensibleHeatFlux — Function
BulkSensibleHeatFlux(; coefficient, gustiness=0, surface_temperature)

Create a FluxBoundaryCondition for wall sensible heat flux, on any of the six boundaries.

The bulk formula computes

\[J = -ρˢ Cᵀ |U| Δϕ\]

where $Δϕ$ depends on the thermodynamic formulation: $Δθ$ for potential temperature or $Δs$ for static energy. The formulation is set automatically during model construction.

See BulkSensibleHeatFluxFunction for details.

Example

using BreezeTˢ(x, y, t) = 290 + 2 * sign(cos(2π * x / 20e3))ρE_bc = BulkSensibleHeatFlux(coefficient = 1e-3,                             gustiness = 0.1,                             surface_temperature = Tˢ)# outputFluxBoundaryCondition: BulkSensibleHeatFluxFunction(coefficient=0.001, gustiness=0.1)
source
Breeze.BoundaryConditions.BulkVaporFlux — Function
BulkVaporFlux(; coefficient, surface_temperature, surface_relative_humidity=1,
                moisture_availability=nothing, gustiness=0)

Create a FluxBoundaryCondition for wall moisture flux, on any of the six boundaries.

The specific humidity of the air in contact with the wall is computed from surface_temperature and surface_relative_humidity (unity by default, a wet wall); moisture_availability is the fraction of the wall that is wet, 1 by default.

See BulkVaporFluxFunction for details.

Example

using BreezeTˢ(x, y, t) = 290 + 2 * sign(cos(2π * x / 20e3))moisture_bc = BulkVaporFlux(coefficient = 1e-3,                            gustiness = 0.1,                            surface_temperature = Tˢ)# outputFluxBoundaryCondition: BulkVaporFluxFunction(coefficient=0.001, gustiness=0.1)
source