0% found this document useful (0 votes)
250 views

Calculators

This document provides calculators and equations for fluid mechanics calculations, with disclaimers about their accuracy. It includes: 1. An inflation layer calculator that estimates the height of the first cell from the wall using Reynolds number, skin friction coefficient, and wall shear stress equations. It suggests validating the estimate with CFD. 2. A growth ratio calculator that determines the ratio between consecutive cell heights to fully cover the boundary layer thickness with a specified number of inflation layers using geometric series equations. 3. Calculators for inlet turbulence conditions, particle settling velocity, and humidity are also listed but not described. The document emphasizes that the calculators are for educational purposes only and should not be relied upon for engineering

Uploaded by

Imran Rasheed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
250 views

Calculators

This document provides calculators and equations for fluid mechanics calculations, with disclaimers about their accuracy. It includes: 1. An inflation layer calculator that estimates the height of the first cell from the wall using Reynolds number, skin friction coefficient, and wall shear stress equations. It suggests validating the estimate with CFD. 2. A growth ratio calculator that determines the ratio between consecutive cell heights to fully cover the boundary layer thickness with a specified number of inflation layers using geometric series equations. 3. Calculators for inlet turbulence conditions, particle settling velocity, and humidity are also listed but not described. The document emphasizes that the calculators are for educational purposes only and should not be relied upon for engineering

Uploaded by

Imran Rasheed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Fluid Mechanics 101

Calculators & Tools

Dr. Aidan Wimshurst


Fluid Mechanics 101

Contents
1 Disclaimer 3

2 Inflation Layer Calculator 4

3 Inlet Turbulence Conditions Calculator 8

4 Particle Settling Velocity Calculator 9

5 Humidity Calculator 10

Dr. Aidan Wimshurst 2


Fluid Mechanics 101

1 Disclaimer
Before using these calculators, it should be emphasised that unverified sources of information
on the internet should not be trusted or relied upon. The calculators themselves and equations
provided in this document have not been verified or checked and are likely to contain errors.
If you want to use the calculators or methods in this document yourself, you should check the
original sources and equations themselves and implement them yourself in your own work. At
which point, you must follow the appropriate verification and validation processes provided by
your company, institution or establishment.
The calculators and equations provided here only provide an indication of how such a
calculation could be carried out by an engineer. The equations and their implementation in
the calculators should never be relied upon under any circumstances and are likely to contain
errors.
Furthermore, the equations, calculators and methodology provided in this document are
for educational and demonstrative purposes only. They should not be used to analyse, design,
accredit or validate real scientific / engineering / mathematical structures and flow systems.
For such applications, appropriate trained, qualified and accredited (SQEP) engineers / scien-
tists should be consulted along with the appropriate documentation and engineering standards.
Fluid Mechanics 101 and Dr. Aidan Wimshurst are not accountable or liable in any form for
the use of misuse of the information contained in this document and calculator beyond the
specific educational and demonstrative purposes for which it was intended.
Never rely on unverified sources of information on the internet (this document in particu-
lar)! They are likely to contain errors.

Dr. Aidan Wimshurst 3


Fluid Mechanics 101

2 Inflation Layer Calculator


First Cell Height
Start by calculating the flow Reynolds number (Re).
ρUL
Re = (1)
µ
where ρ is the fluid density, U is the freestream velocity, L is the characteristic length of the
geometry and µ is the dynamic viscosity. An empirical correlation for fully developed turbulent
flow over a flat plate is then used to estimate the skin friction coefficient (cf ):

cf = [2 log10 (Re) − 0.65]−2.3 (2)

This particular correlation has been taken from Schlichting (1979) for fully turbulent flow
with Re < 109 . This correlation could be replaced with any other empirical correlation for
turbulent flow over a flat plate. However, as this calculator is only used as an estimate, small
differences arising from the choice of correlation do not matter significantly.
Having computed the skin friction coefficient, the wall shear stress (τw ) is calculated.
1
τw = ρU 2 cf (3)
2
The friction velocity (uτ ) can then be computed from the wall shear stress:
s
τw
uτ = (4)
ρ

Finally, the equation for y + can be rearranged to give the height of the wall adjacent cell
centroid from the wall (yp ):
ρyp uτ
y+ = (5)
µ
y +µ
yp = (6)
uτ ρ
The distance of the cell centroid from the wall is given by yp while the height of the cell (yH )
is double yp .
yH = 2yp (7)
Most mesh generators give the user control over the node spacing normal to the wall. Hence,
the overall size of the cell (yH ) is a more useful output from this calculator, as the size of the
cell is equal to the node spacing. yH can be used directly in the mesh generator.
Having created an initial mesh, an initial CFD analysis should be carried out with this
mesh. The first cell height calculated with this calculator is only an estimate and will need
to be updated using information from this initial CFD analysis. For example, if you were
targetting y + = 1 and the initial CFD analysis showed y + = 2.2, then you would need to
reduce your cell height by a factor of ∼ 2.2 for your real calculations.
The first cell height calculated with this calculator is only an estimate because the equation
for the skin friction coefficient is an empirical correlation for a specific flow scenario (turbulent
flow over a flat plate without an applied pressure gradient). Real CFD calculations which use
a different geometry are likely to have a similar skin friction coefficient to a flat plate, but not
the same. Hence, the calculator can only be an estimate at best.

Dr. Aidan Wimshurst 4


Fluid Mechanics 101

Growth Ratio
In addition to calculating the size of the first cell (yH ), most mesh generators require a growth
ratio (r ) to be specified normal to the wall. This allows the layers to inflate (grow) normal
the wall.
When constructing the mesh, it is conventional in CFD to aim for a number of cells
through the thickness of the boundary layer. For aerodynamic flows using Reynolds-averaged
Navier-Stokes (RANS) turbulence modelling, CFD engineers often aim for 5 - 30 inflation
layers (N = 5 − 30) through the thickness of the boundary layer. We can use this criteria to
calculate a maximum growth ratio normal to the wall.
Start by using empirical correlations to estimate the boundary layer thickness δ99 . If the
flow is laminar, then the Blasius solution gives:
4.91L
δ99 = √ Re < 5 × 105 (8)
ReL
Conversely, if the flow is turbulent then an alternative correlation is used:
0.38L
δ99 = 1/5
Re > 5 × 105 (9)
ReL

This correlation has been taken from Cengel & Cimbala (2006, Section 10.6).
The next stage in the calculation is to calculate the total thickness of the inflation layers
(yT ), for a given number of layers N and growth ratio r . We can then match this to the
boundary layer thickness δ99 to allow the inflation layers to cover the boundary layer thickness.
The growth ratio r is the ratio between the height of two consecutive cells. As the cells
get larger as we move away from the wall r > 1. We can write the total thickness of the first
two inflation layers as:
yT = yH + yH r (10)
Using the same logic, the total thickness of the first three inflation layers is:

yT = yH + yH r + yH r 2 (11)

It follows that the total thickness of N inflation layers is:

yT = yH + yH r + yH r 2 + yH r 3 + ... + yH r N−1 (12)

This can be written concisely with summation notation:


N−1
yH r k
X
yT = (13)
k=0

This is the formula of a geometric series. It is convenient to re-write the geometric series
using the identity:
N−1
1 − rN
yH r k = yH
X
(14)
k=0 1 − r
You can find this identity on Wikipedia or in any mathematics textbook. Hence, the total
height of the inflation layers is:
1 − rN
!
yT = yH (15)
1−r

Dr. Aidan Wimshurst 5


Fluid Mechanics 101

We would like the total height of the inflation layers to be equal to (or greater than) the
thickness of the boundary layer δ99 .
1 − rN
!
δ99 = yH (16)
1−r
It is difficult to solve this equation directly for the required growth ratio r . A numerical
solution is more straightforward. Start by rearranging the equation.
! !
N δ99 δ99
r −r + −1 =0 (17)
yH yH
The growth ratio which results in an error of f (r ) = 0, is the growth ratio that has the total
height of the inflation layers equal the boundary layer thickness. Hence, we can use a root
finding algorithm to solve the equation:
f (r ) = 0 (18)
In the authors experience, the Newton-Raphson iteration is an effective and reliable algorithm
for solving this equation. Starting with an initial guess r0 = 5 (found to be effective in the
author’s experience for this problem), the growth ratio can be updated with the following
equation:
f (ri )
ri+1 = ri − (19)
∂f
(ri )
∂r
Where the function f (ri ) and the gradient ∂f /∂r (ri ) are:
! !
δ99 δ99
f (ri ) = riN − ri + −1 (20)
yH yH
∂f δ99
(ri ) = NriN−1 − (21)
∂r yH
Once the root finding algorithm has converged, the solution (r ) is the maximum growth ratio
that will result in the inflation layers being equal to the boundary layer thickness. In reality,
the user will normally specify a growth ratio less than this, to ensure that the boundary layer
thickness is within the inflation layers.

Final Layer Thickness


When applying inflation layers, it is desirable that the transition from the final inflation layer to
the freestream mesh does not lead to a significant change in cell volume. This is particularly
important for Large Eddy Simulation (LES), as the sub-grid viscosity is proportional to the cell
volume. Hence, sudden changes in cell volume result in sudden changes in sub-grid viscosity,
which can lead to inaccuracies and instability.
To make an assessment of the change in cell volume from the inflation layers to the
freestream mesh, a simple approach is to compare the thickness of the final inflation layer
with the length scale of the freestream mesh. The final layer thickness is:
yFinal = yH r N−1 (22)
This calculation is carried out at the end, as it requires the growth ratio r (which was com-
puted in the previous section).

Dr. Aidan Wimshurst 6


Fluid Mechanics 101

Mesh Quality
It should be emphasised that these criteria alone (first cell height, growth ratio, final
layer height) are not sufficient to determine if a mesh is suitable for CFD analysis. The
user will also need to check the mesh quality metrics and overall level of resolution in regions of
high gradient, to ensure that the mesh is sufficient. These criteria will vary on a case-by-case
basis and should be considered carefully by the user.

References
1. H. Schlichting and K. Gersten Boundary-layer Theory, ISBN 0-07-055334-3, 7th Edition,
1979.

2. Y. Cengel and J. Cimbala Fluid Mechanics : Fundamentals and Applications, ISBN


0–07–247236–7, McGraw-Hill Education, 2006.

3. Wikipedia, Geometric Series, Accessed 2021.

Dr. Aidan Wimshurst 7


Fluid Mechanics 101

3 Inlet Turbulence Conditions Calculator


Start by calculating the turbulent kinetic energy (k) from the turbulence intensity (I) and the
inlet velocity (U):
3
k = U 2I 2 (23)
2
Next the user needs to specify the length scale (l) of the turbulence at the inlet. For an
internal pipe flow, this is usually ∼ 10% of the pipe diameter. For external flows the length-
scale is likely to be significantly different and an appropriate value should be chose carefully,
depending on the ambient conditions.

Using the turbulent length-scale (l), the turbulent dissipation rate () is calculated next.
Cµ = 0.09 is a model coefficient of the k −  and k − ω turbulence models.

k 3/2
 = Cµ (24)
l
From the definition of the specific dissipation rate, ω is calculated next.

ω= (25)
Cµ k

Finally, the kinematic viscosity is computed:


k
νt = (26)
ω

Dr. Aidan Wimshurst 8


Fluid Mechanics 101

4 Particle Settling Velocity Calculator


Start with an initial guess for the settling velocity of the particle (U), by taking Stokes solution
for the terminal settling velocity of a spherical particle falling in a viscous fluid.

gD 2
U= (ρp − ρf ) (27)
18µ

where g is the acceleration due to gravity (9.81 m/s2 ), D is the diameter of the particle, µ
is the dynamic viscosity of the fluid, ρp is the density of the particle and ρf is the density of
the fluid.

However, Stokes solution is only valid for Re < 1. Hence, evaluate the particle Reynolds
number (Re) next:
ρUD
Re = (28)
µ
With the particle Reynolds number, we can evaluate the actual drag coefficient of the particle
using the Schiller-Naumann empirical model.

 24(1 + 0.15Re 0.687 ) Re < 1000
Re
CD = (29)
0.44 Re > 1000

Now that the drag coefficient has been calculated, an updated guess can be made for the
particle settling velocity. To simplify the iteration process, define a drag function f :
CD Re
f = (30)
24
With the drag function computed, update the settling velocity using a modified form of Stokes
solution:
gD 2
U= (ρp − ρf ) (31)
18µf
Now continue to iterate, by calculating the particle Reynolds number, the drag function and
the settling velocity until converged. Use under-relaxation for stability.

Dr. Aidan Wimshurst 9


Fluid Mechanics 101

5 Humidity Calculator
Start by calculating the saturated vapour pressure (Pg ) using the Arden-Buck equation. Note
that the temperature (T ) is in ◦ C (not Kelvin) and the calculated vapour pressure is in kPa.
 h   i
0.61121 exp 18.678 − T ∗ T
234.5   T +257.14 i
T > 0◦ C
Pg = h (32)
0.61121 exp 23.036 − T ∗
333.7
T
T +279.82
T < 0◦ C
Now calculate the partial pressure of the water vapour (PH20 ) in the air-water vapour mixture,
by rearranging the definition of the relative humidity (φ):
PH20
φ= (33)
Pg
PH20 = φPg (34)
Next, calculate the specific humidity (ω), which is defined as the ratio of the mass of water-
vapour to the mass of dry air:
mH20
ω= (35)
mair
!
MH20 PH20
ω= (36)
MAir P − PH20
NOTE: This equation can be derived by applying the ideal gas law to the dry air and water
vapour individually. (V ) is the gas volume, (RAir ) is the specific gas constant for air, (RU ) is
the universal gas constant and (MAir ) is the molar mass of air.
PAir V = mAir RAir T (37)
PH20 V = mH20 RH20 T (38)
mH20
ω= (39)
mAir
RAir PH20
ω= (40)
RH20 PAir
(RU /MAir )PH20
ω= (41)
(RU /MH20 )PAir
Apply Dalton’s Law of partial pressures:
P = PAir + PAir (42)
!
MH20 PH20
ω= (43)
MAir P − PH20
Finally, compute the absolute humidity (ϕ) from the specific humidity. The absolute humidity
is defined as the mass of water vapour per unit mass of air-water vapour mixture.
mH20
ϕ= (44)
mAir + mH20
mH20 /mAir
ϕ= (45)
1 + mH20 /mAir
ω
ϕ= (46)
1+ω
The mass-fraction of water vapour (YH20 ) in the CFD computations is equivalent to the
absolute humidity. Apply this at the inlet to the CFD computations:
YH20 = ϕ (47)

Dr. Aidan Wimshurst 10


Fluid Mechanics 101

References
1. Buck, A. L. (1981), ’New equations for computing vapor pressure and enhancement
factor, J. Appl. Meteorol., 20: 1527–1532

2. Buck, A. L. (2012), Model CR-1A Hygrometer with autofill operating manual, Buck
Research Instruments, LLC.

Dr. Aidan Wimshurst 11

You might also like