## General

#### How do I simulate an atmospheric boundary layer in CFX?

• FAQ
Participant

The atmospheric boundary layer (ABL) is the lowest part of the atmosphere and its behavior is directly influenced by its contact with a planetary surface. Sometimes for simulations at different boundaries we need to account effect of ABL. The CCL below can be used to set an atmospheric boundary layer wind or pressure profile on an inlet, outlet or opening.
# Explanation of expressions
# ==========================
#
# Glossary of names
# â€”â€”â€”â€”â€”â€“
#
# â€”â€”â€”â€”â€”â€“
# wind profile section # â€”â€”â€”â€”â€”â€“ # ReferenceHeight = reference height above ground # ReferenceSpeed = velocity at reference height # groundRougness = ground aerodynamic roughness # example values # open sea 0.005 [m] # open terrain 0.05 [m] # forest or suberbs 0.5 [m]
# city centre 2 [m]
# ak = Von Karmen constant
# uStar = friction velocity
# zgrnd = height of the ground
# zprof = height above ground
# speed = wind speed as a function of height
# windAngle = wind angle (measured from the x axis) # uWind = x component of wind speed # vWind = y component of wind speed # wWind = z component of wind speed # cmu = k-epsilon turbulence model constant # teWind = wind turbulent kinetic energy # edWind = wind turbulent eddy dissipation
# sandGrainRoughness = sand grain roughness height of the ground
# â€”â€”â€”â€”â€”â€“
# buoyancy section
# â€”â€”â€”â€”â€”â€“
# Wair â€“ molecular weight of air
# tamb â€“ ambient temperature
# refP â€“ reference pressure
# denref â€“ reference density
# â€”â€”â€”â€”â€”â€“
# pressure profile section
# â€”â€”â€”â€”â€”â€“
# Pground â€“ absoulte pressure at the ground
# zRefBuoy â€“ buoyancy reference height
# the buoyancy reference location should be set consistently on the domain models form
# isoScaleHeight â€“ atmospheric scale height
# Patmos â€“ vertical profile of absolute pressure
# Popening â€“ The pressure to set on a vertical opening
#
LIBRARY:
CEL:
EXPRESSIONS:
ReferenceHeight = 10.0 [m]
ReferenceSpeed = 5.0 [m s^-1] groundRougness = 2 [m] ak = 0.41 cmu = 0.09 zgrnd = 0 [m] windAngle = 60 [deg] uStar = ak*ReferenceSpeed/loge(ReferenceHeight/groundRougness) zprof = max(groundRougness,z-zgrnd) speed = uStar*loge(zprof/groundRougness)/ak uWind = speed*cos(windAngle)
vWind = speed*sin(windAngle)
wWind = 0.0 [m/s]
teWind = (uStar^2)/sqrt(cmu)
edWind = (uStar^3)/(ak*zprof)
sandGrainRoughness = groundRougness*exp(8.48*ak)
Wair = 28.96 [kg/kmol]
denref = Wair * refP/(R*tamb)
refP = 1 [atm]
tamb = 25 [C]
zGround = zgrnd
Pground = refP
zRefBuoy = zgrnd
isoScaleHeight = R*tamb/(Wair*g)
Patmos = Pground*exp(-(z-zGround)/isoScaleHeight)
Popening = Patmos-refP+denref*g*(z-zRefBuoy)
END
END
END
#
# Example to set the rougness on the ground
#
#FLOW: Flow Analysis 1
# DOMAIN: Domain 1
#
# BOUNDARY: Ground
# Boundary Type = WALL
# Location = ground
# BOUNDARY CONDITIONS:
# HEAT TRANSFER:
# END
# MASS AND MOMENTUM:
# Option = No Slip Wall
# END
# WALL ROUGHNESS:
# Option = Rough Wall
# Sand Grain Roughness Height = sandGrainRoughness
# END
# END
# END
#
# END
#END
#
# Example settings for downtream opening boundaries and upstream wind inlets
# Could also set the windinlet on all sides for cylindrical domains â€“ may be an a good idea to leave the top as an opening pressure boundary to help with mass conservation
#
#
#FLOW: Flow Analysis 1
# DOMAIN: Domain 1
#
# BOUNDARY: WindInlet
# Boundary Type = INLET
# Location = south,west
# BOUNDARY CONDITIONS:
# FLOW REGIME:
# Option = Subsonic
# END
# HEAT TRANSFER:
# Option = Static Temperature
# Static Temperature = tamb
# END
# MASS AND MOMENTUM:
# Option = Cartesian Velocity Components
# U = uWind
# V = vWind
# W = wWind
# END
# TURBULENCE:
# Epsilon = edWind
# Option = k and Epsilon
# k = teWind
# END
# END
# END
#
# BOUNDARY: DownstreamOpening
# Boundary Type = OPENING
# Location = north,east
# BOUNDARY CONDITIONS:
# FLOW DIRECTION:
# Option = Normal to Boundary Condition
# END
# FLOW REGIME:
# Option = Subsonic
# END
# HEAT TRANSFER:
# Opening Temperature = tamb
# Option = Opening Temperature
# END
# MASS AND MOMENTUM:
# Option = Opening Pressure and Direction
# Relative Pressure = Popening
# END
# TURBULENCE:
# Option = Medium Intensity and Eddy Viscosity Ratio
# END
# END
# END
# # END
#END