Beruflich Dokumente
Kultur Dokumente
Flowsquare is a two-dimensional Computational Fluid Dynamics (CFD) software for unsteady, non-
reactive, reactive and subsonic/supersonic flows. The aim of this software is to provide a handy CFD
environment so that more people can get to know what CFD is like and simulate flows for their
educational and/or academic interests. This documentation includes theoretical and numerical
aspects of the software, which are basis of the parameters in grid.txt. Although flow simulations can
be carried out without understanding them, the users are recommended to read this documentation.
u i 0, (1) In the second step (time integration), the
t x i
pressure term is included so that the mass
and the equation for momentum: conservation is taken into account in the
second time integration:
u j uiu j p *
t xi
(2) t
u j
x j
. (5)
p ij
g j ,
x j xi By calculating divergence of Eq. (5), the
Poissons equation for the correction pressure
where u i is the velocity component in i-
p * is as:
direction (m/s), is the mixture density
(kg/m3), p is the pressure (Pa), g i is the 2 p 1
external force in i-direction due to buoyancy
x j
u j *
t
d . ,
t
(6)
x i2
(m/s2). The viscous term ij is written as:
where t is the time step and d , a user
2 u k u u j defined parameter, is typically unity. Once the
ij ij i , (3)
x k
3 x j x i corrected pressure field in obtained by solving
Eq. (6), the corrected velocity in the next time
where is the dynamic viscosity (kg/(m s)) step is computed from Eq. (5) as:
and ij is the Kronecker delta. Note that the
Flowsquare 4.0 Users Guide (2013)
2 / 10
Flowsquare 4.0 Users Guide (2013)
Ta n
c k exp T (1 c) c , (13)
T
3 / 10
Flowsquare 4.0 Users Guide (2013)
term c when local scalar boundary 8 and 9); for above F ,O , the transport
condition is used (see Sec. 4.5.4). equations of sY F and YO are written as:
4 / 10
Flowsquare 4.0 Users Guide (2013)
5 / 10
Flowsquare 4.0 Users Guide (2013)
3. Subsonic/supersonic flows u v
2
u u p uv
In high speed flows, the viscous term in the q , F ,G 2 .
v uv v p
momentum transport equation (Eq. 2) may be
E ( E p)u ( E p )v
negligible:
(33)
p
t
u j
xi
u i u j
x j
. (29) They are solved (also with Eq 31) for fully-
compressible subsonic/ supersonic (inviscid)
This equation is a nonlinear hyperbolic flows.
equation, which is often used for simulations
4. Numerical methods
of waves. Also, since a fluid velocity is so large,
incompressible flow assumption is no longer In Flowsquare ver 4, there are a variety of
valid; energy conservation needs to be taken choices of numerical methods. Each method
into account. Assuming inviscid fluids (or has pros and cons, and they need to be
conditions), the energy conservation equation considered for the choice. In this section,
is written as: these methods are summarised.
E
( E p)u i 0 , (30) 4.1. Differentiations
t x i
Spatial differentiations are computed on a
where E is the total energy per unit volume uniform mesh (cell). The 1st derivative of f
(J/m3). The total energy is related with the in i direction at a location j is computed using
kinetic energy as: one of following methods ( 1 i N , N is the
number of grid points in i direction).
E e 0.5u i u i . (31)
4.1.1. 2nd order central finite difference
Here, e is the internal energy per unit mass
(J/kg) expressed as e p /( 1) for ideal f
gas, where ( c p / c v ) is the adiabatic index x ( f j 1 f j 1 ) /( 2xi ) , (34)
i j
(heat capacity ratio; approx. 1.4 for most of
gases, and this value is used in the software). f
( f 1 f 2 ) / x i , (35)
The static pressure is calculated in every time x
i 1
step as: p E 0.5u i u i . The set of Eqs.
R
cv f
( f N f N 1 ) / x i . (36)
(1), (2) and (3) is called Euler equations and x
i N
often written in vector form as:
4.1.2. 4th order central finite difference
q F G
0, (32)
t x y f
x ( f j 2 8 f j 1 8 f j 1 fi 2 ) /(12xi )
i j
where
(36)
f 25 f1 48 f 2 36 f3 16 f 4 3 f5
x 12xi
i 1
(37)
6 / 10
Flowsquare 4.0 Users Guide (2013)
This is first order forward method and is where 2 denotes the Laplace operator. If
numerically unstable. second order central differentiation is applied
to above equation, the discrete form is:
4.2.2. Lax-Wendroff method (=2nd order
midpoint method) i 1, j 2 i , j i 1, j
7 / 10
Flowsquare 4.0 Users Guide (2013)
8 / 10
Flowsquare 4.0 Users Guide (2013)
9 / 10
Flowsquare 4.0 Users Guide (2013)
i 1 n wave
v rnd cos
N x 1 2 n 1
j 1 n wave
sin
M
N x 1 2 n 1
up
n 0 i 1 n wave
,(61)
v rnd sin
N x 1 2 n 1
j 1 n wave
cos
N x 1 2 n 1
10 / 10