可以看到 OpenFOAM 官方練習檔案有一個檔案 叫做 windAroundBuildings
在資料夾 $FOAM_TUTORIALS/incompressible/simpleFoam
,這是一個很棒的範例模擬都市流場模擬,可惜 simpleFOAM 並沒有考慮到能量方程式。溫度場影響往往在都市風場佔很大的影響,Boussinesq假設使得求解穩定,因此使用 solver buoyantBoussinesqSimpleFoam
重新模擬,平行計算技巧使用在 snappyHexMesh
以及 buoyantBoussinesqSimpleFoam
。 結果產生在位於斯圖加特的計算中心的 HPC cluster 上計算,且收斂至穩態。模型使用 mapBox 資料庫,3d data 位於熟悉的台北信義區,豪不意外中間高聳建築為101。
Finding an existing meteorological modelling system is a way to determine which solver in OpenFOAM is suitable. The PALM model system is one of them for atmospheric and oceanic boundary layer flows. Brief, The model can be utilised to dynamically solve the N-S Equation, the first law of thermodynamics. In turbulent flow, LER and RANS are also included in the model.
In section 2.1 in the article, "Overview of the PALM model system 6.0" [Björn Maronga et al.]. The Boussinesq-approximated form is one of the default approximates. The Boussinesq approximated typical utilize to reduce the requirements and the degree of non-linearity for making the solver be more stable. However, there are some limitations to the approximation. For the air, the Boussinesq approximation is supported where the
For solveing the N-S Eq and contunity equation. SIMPLE and PISO are often used for stead-state flows and transient flows, respectively. As a result, the The the solver with SIMPLE algorithm are been chosen.
Following procedure use to brief introducting of solving governing equations.
The continuity equation,
$$
\nabla \cdot {U} = 0
$$
, and incompressible N-S quation
$$
{U} \cdot \nabla {U} -\nabla \cdot (\nu \nabla {U} )= -\nabla p
$$ where
Convert the momentum equation to the general equation form (semi-discretized form of the momentum equations).
$$
M {U} = -\nabla p
$$ 1
where
The matrix
$H = AU - MU$
$AU = H - \nabla p$ $U = A^{-1} H - A^{-1} \nabla p \longrightarrow (III)$
$\nabla \cdot U = \nabla \cdot [ A^{-1} H -A^{-1} \nabla p ]$ => continuity Eq.$0 = \nabla \cdot [ A^{-1} H -A^{-1} \nabla p ]$
Poisson equation got for pressure $$ \nabla \cdot (A^{-1}\nabla p) = \nabla \cdot (A^{-1} H) \longrightarrow (II) $$
Fot the solution process, firstly solve the semi-decretize form of momentum equation for the velocity field.
Use the pressure field to correct the velocity field so that it satisfies the continuity equation.
For the velocity field now un-satisfing the momentum equations, repeat the cycle.
where, the E represtents the energy. The tubulence scalar (
the velocity field uses a first boundary, Dirichlet boundary condition, is employed the inlet velocity is a constat 10 m/s (36 km /min).
The pressure boundary condition is total_pressure
which is second boundary condition making the solver more stable.
In this boundary condition, a static pressure at the patch,
$p_p = p_0 - \frac{1}{2} |u|^2$
The turbulence intensity needs to be estimated for the inlet boundary condition. Typically the high-turbulence case, such as high-speed flow inside complex geometries like heat-exchangers, the
B.C. | Parameter |
---|---|
|
U |
totalPressure p0 = 0; | P |
fixedValue = epsilonInlet | epsilon |
fixedValue = 1.5 | k |
Calculated; Val = 0 | nut |
calculated; Val = 0 | alpha |
zeroGradient | T |
the velocity field still uses a first boundary, noSlip
boundary condition. The pressure boundary condition is total_pressure
for p
. Additionally, fixedFluxPressure
for p_rgh
which is second boundary condition have easy to convergence.
B.C. | Parameter |
---|---|
pressureInletOutletVelocity ; Val = (0, 0, 0) |
U |
totalPressure ;p0 = 0; |
P |
totalPressure ;p0 = 0; Val = 0; |
p_rgh |
inletOutlet ;inletVal = epsilonInlet |
epsilon |
inletOutlet ;inletVal = 1.5 |
k |
Calculated ; Val = 0 |
nut |
calculated ; Val = 0 |
alpha |
zeroGradient |
T |
the velocity field uses a no-slip boundary condition on the ground and buildings.
$u_i = 0, i = 1~3$
The pressure boundary condition are employied zeroGradient.
$\partial p/\partial x_i, i = 1~3$
For hydrostatic pressure in OpenFOAM such as buoyant and multiphase cases.
The hydrostatic pressure, p_rgh
, substitutes, the pressure
It is defined as
In the example of the buoyant case in OpenFOAM, the fixedFluxPressure
boundary condition for p_rgh
usually is employed. Additionally, some articles on CFD online claim that fixedFluxPressure
is more stable and has better convergence. This boundary condition sets the pressure gradient to the provided value such that the flux on the boundary is specified by the velocity boundary condition. On the other hand, when the value is zero, the boundary condition is used for pressure zeroGradient
, but where the body forces accrue, the condition is adjusted accordingly.
The boundary condition, kqRWallFunctiont
, for k turbulente kinetic energy. The boundary condition, nutkWallFunction
, for nut.
For the boundary condition for alphatJayatillekeWallFunction
is employed, and all parameters use the default. such as turbulent prandtl number, prt = 0.86. The latest but not least is the temperature, ' T`, is constant, being 303.15k.
B.C. | Parameter |
---|---|
noSlip |
U |
zeroGradient |
P |
fixedFluxPressure ; Val = 0 |
p_rgh |
epsilonWallFunction ; Value = epsilonInlet |
epsilon |
kqRWallFunctiont |
k |
nutkWallFunction ; Val = 0 |
nut |
alphatJayatillekeWallFunction ; prt = 0.85 |
alpha |
T = 300.15 | T |
There are symmerty plan boundary condition.
Internal Field | Parameter |
---|---|
0, 0, 0 | U |
0 | P |
epsilonInlet |
epsilon |
$kInlet | k |
0 | nut |
0 | alpha |
293.15 | T |
T = 300.15 | T |
-
solver: buoyantBoussinesqSimpleFoa
-
time schemes: steadyState
-
turbulence : RAS: RNGkEpsilon
-
gradient schemes: grad(U), grad(p)
-
divergence schemes: div(phi,U)
- laplacian schemes: laplacian(nuEff,U), laplacian((1|A(U)),p)
-
Divergence schemes
- div(phi, epsiolon) bounded Gauss linearUpwind grad(epsilon)
- div(phi, U) bounded Gauss linearUpwindV grad(U);
- div((nuEff*dev2(T(grad(U)))) bounded Gauss linear;
- div(phi, k) bounded Gauss linearUpwind grad(k);
- div(phi, T) bounded Gauss linearUpwind default;
-
Gradient schemes - cellLimited leastsquares 1;