Simulation of Fluid Flows - Technische Universität München · Simulation of Fluid Flows Zlatko...
Transcript of Simulation of Fluid Flows - Technische Universität München · Simulation of Fluid Flows Zlatko...
Simulation of Fluid Flows
Zlatko Petrovic
University of BelgradeFaculty of Mechanical Engineering
Bitola, October 5, 2005
Structure of the Lecture
I Physical Laws described by PDE-s’
I Discretization utilizing Finite difference methodI Two Simple Examples
I 2D compressible potential flow about airfoilI Driven cavity flow utilizing Navier-Stokes ekuation
Structure of the Lecture
I Physical Laws described by PDE-s’
I Discretization utilizing Finite difference methodI Two Simple Examples
I 2D compressible potential flow about airfoilI Driven cavity flow utilizing Navier-Stokes ekuation
Structure of the Lecture
I Physical Laws described by PDE-s’
I Discretization utilizing Finite difference methodI Two Simple Examples
I 2D compressible potential flow about airfoilI Driven cavity flow utilizing Navier-Stokes ekuation
Structure of the Lecture
I Physical Laws described by PDE-s’
I Discretization utilizing Finite difference methodI Two Simple Examples
I 2D compressible potential flow about airfoilI Driven cavity flow utilizing Navier-Stokes ekuation
Structure of the Lecture
I Physical Laws described by PDE-s’
I Discretization utilizing Finite difference methodI Two Simple Examples
I 2D compressible potential flow about airfoilI Driven cavity flow utilizing Navier-Stokes ekuation
Structure of the Lecture
I Physical Laws described by PDE-s’
I Discretization utilizing Finite difference methodI Two Simple Examples
I 2D compressible potential flow about airfoilI Driven cavity flow utilizing Navier-Stokes ekuation
Structure of the Lecture
I Physical Laws described by PDE-s’
I Discretization utilizing Finite difference methodI Two Simple Examples
I 2D compressible potential flow about airfoilI Driven cavity flow utilizing Navier-Stokes ekuation
Part I
Physical Laws
Physical Laws
Main Symbols
Basic Assumptions
Transport TheoremControl Mass and Control Volume
Governing EquationsConservation of MassNewton’s Second Law of MotionThe First Principle of ThermodynamicsDifferential FormStress Velocity RelationshipVolume ForcesEquation of StateConservative Form of PDE
Boundary Conditions
Main Symbols
I Pressure, density and temperature
p, %, T
I Velocity components
~V = u~ı+ v~+ w~k
I Normal and tangential stress
σ, τ
I Cartezian and curvilinear coordinates
(x , y , z), (ξ, η, ζ)
Main Symbols
I Pressure, density and temperature
p, %, T
I Velocity components
~V = u~ı+ v~+ w~k
I Normal and tangential stress
σ, τ
I Cartezian and curvilinear coordinates
(x , y , z), (ξ, η, ζ)
Main Symbols
I Pressure, density and temperature
p, %, T
I Velocity components
~V = u~ı+ v~+ w~k
I Normal and tangential stress
σ, τ
I Cartezian and curvilinear coordinates
(x , y , z), (ξ, η, ζ)
Main Symbols
I Pressure, density and temperature
p, %, T
I Velocity components
~V = u~ı+ v~+ w~k
I Normal and tangential stress
σ, τ
I Cartezian and curvilinear coordinates
(x , y , z), (ξ, η, ζ)
Basic Assumptions
I Fluid is continuous environment, thus the followingassumptions have sense:
lim∆A→0
~n ·∆~F∆A
= −p lim∆A→0
~t ·∆~F∆A
= τ lim∆V→0
∆m
∆V= %
I Thus, tools of Mathematical analysis can be applied!
I Fluid can be in equilibrium under arbitrary loads only when itis in motion.
Basic Assumptions
I Fluid is continuous environment, thus the followingassumptions have sense:
lim∆A→0
~n ·∆~F∆A
= −p lim∆A→0
~t ·∆~F∆A
= τ lim∆V→0
∆m
∆V= %
I Thus, tools of Mathematical analysis can be applied!
I Fluid can be in equilibrium under arbitrary loads only when itis in motion.
Basic Assumptions
I Fluid is continuous environment, thus the followingassumptions have sense:
lim∆A→0
~n ·∆~F∆A
= −p lim∆A→0
~t ·∆~F∆A
= τ lim∆V→0
∆m
∆V= %
I Thus, tools of Mathematical analysis can be applied!
I Fluid can be in equilibrium under arbitrary loads only when itis in motion.
Basic Assumptions
I Fluid is continuous environment, thus the followingassumptions have sense:
lim∆A→0
~n ·∆~F∆A
= −p lim∆A→0
~t ·∆~F∆A
= τ lim∆V→0
∆m
∆V= %
I Thus, tools of Mathematical analysis can be applied!
I Fluid can be in equilibrium under arbitrary loads only when itis in motion.
Basic Assumptions
I Fluid is continuous environment, thus the followingassumptions have sense:
lim∆A→0
~n ·∆~F∆A
= −p lim∆A→0
~t ·∆~F∆A
= τ lim∆V→0
∆m
∆V= %
I Thus, tools of Mathematical analysis can be applied!
I Fluid can be in equilibrium under arbitrary loads only when itis in motion.
Transport Theorem
I Control volume loose and gain various particles – physicallaws are not defined for such case!
I Physical laws are defined for control system having the sameparticles all the time! (ControlVolume.gif)
For any global system property B and property per unit massb = B/m it is valid:
dBdt
=
∫VCV
∂
∂t(%b) dV +
∮SCV
%b(~V − ~v
)· ~n dS
dBdt
=
∫VCV
∂
∂t(%b) + div
[%b(~V − ~v
)]dV
where ~v is the velocity of the system boundary!
Transport Theorem
I Control volume loose and gain various particles – physicallaws are not defined for such case!
I Physical laws are defined for control system having the sameparticles all the time! (ControlVolume.gif)
For any global system property B and property per unit massb = B/m it is valid:
dBdt
=
∫VCV
∂
∂t(%b) dV +
∮SCV
%b(~V − ~v
)· ~n dS
dBdt
=
∫VCV
∂
∂t(%b) + div
[%b(~V − ~v
)]dV
where ~v is the velocity of the system boundary!
Transport Theorem
I Control volume loose and gain various particles – physicallaws are not defined for such case!
I Physical laws are defined for control system having the sameparticles all the time! (ControlVolume.gif)
For any global system property B and property per unit massb = B/m it is valid:
dBdt
=
∫VCV
∂
∂t(%b) dV +
∮SCV
%b(~V − ~v
)· ~n dS
dBdt
=
∫VCV
∂
∂t(%b) + div
[%b(~V − ~v
)]dV
where ~v is the velocity of the system boundary!
Transport Theorem
I Control volume loose and gain various particles – physicallaws are not defined for such case!
I Physical laws are defined for control system having the sameparticles all the time! (ControlVolume.gif)
For any global system property B and property per unit massb = B/m it is valid:
dBdt
=
∫VCV
∂
∂t(%b) dV +
∮SCV
%b(~V − ~v
)· ~n dS
dBdt
=
∫VCV
∂
∂t(%b) + div
[%b(~V − ~v
)]dV
where ~v is the velocity of the system boundary!
Transport Theorem
I Control volume loose and gain various particles – physicallaws are not defined for such case!
I Physical laws are defined for control system having the sameparticles all the time! (ControlVolume.gif)
For any global system property B and property per unit massb = B/m it is valid:
dBdt
=
∫VCV
∂
∂t(%b) dV +
∮SCV
%b(~V − ~v
)· ~n dS
dBdt
=
∫VCV
∂
∂t(%b) + div
[%b(~V − ~v
)]dV
where ~v is the velocity of the system boundary!
Control Mass and Control Volume
At t = 0 control volume occupy the same space as control mass.Physical laws are derived for control mass.
Conservation of mass
dm
dt= 0
System property: B = m. Property per unit mass: b = m/m = 1.
dm
dt=
∫VCV
∂%
∂tdV +
∮SCV
%(~V − ~v
)· ~n dS = 0
or:dm
dt=
∫VCV
∂%
∂t+ div
[%(~V − ~v
)]dV = 0
Conservation of mass
dm
dt= 0
System property: B = m. Property per unit mass: b = m/m = 1.
dm
dt=
∫VCV
∂%
∂tdV +
∮SCV
%(~V − ~v
)· ~n dS = 0
or:dm
dt=
∫VCV
∂%
∂t+ div
[%(~V − ~v
)]dV = 0
Conservation of mass
dm
dt= 0
System property: B = m. Property per unit mass: b = m/m = 1.
dm
dt=
∫VCV
∂%
∂tdV +
∮SCV
%(~V − ~v
)· ~n dS = 0
or:dm
dt=
∫VCV
∂%
∂t+ div
[%(~V − ~v
)]dV = 0
Newton’s Second Law of Motion
d(m~V )
dt=∑
~F =∑
~FS +∑
~FV
System property: B = m~V . Property per unit mass:b = m~V /m = ~V .
d(m~V )
dt=
∫VCV
∂
∂t(%~V ) dV+
∮SCV
%~V(~V − ~v
)·~n dS =
∑~FS+
∑~FV
or: ∫VCV
∂
∂t(%~V ) + div
[%~V(~V − ~v
)]dV =
∑~FS +
∑~FV
where∑ ~FS are surface forces, and
∑ ~FV are volume forces
Newton’s Second Law of Motion
d(m~V )
dt=∑
~F =∑
~FS +∑
~FV
System property: B = m~V . Property per unit mass:b = m~V /m = ~V .
d(m~V )
dt=
∫VCV
∂
∂t(%~V ) dV+
∮SCV
%~V(~V − ~v
)·~n dS =
∑~FS+
∑~FV
or: ∫VCV
∂
∂t(%~V ) + div
[%~V(~V − ~v
)]dV =
∑~FS +
∑~FV
where∑ ~FS are surface forces, and
∑ ~FV are volume forces
Newton’s Second Law of Motion
d(m~V )
dt=∑
~F =∑
~FS +∑
~FV
System property: B = m~V . Property per unit mass:b = m~V /m = ~V .
d(m~V )
dt=
∫VCV
∂
∂t(%~V ) dV+
∮SCV
%~V(~V − ~v
)·~n dS =
∑~FS+
∑~FV
or: ∫VCV
∂
∂t(%~V ) + div
[%~V(~V − ~v
)]dV =
∑~FS +
∑~FV
where∑ ~FS are surface forces, and
∑ ~FV are volume forces
Newton’s Second Law of Motion
d(m~V )
dt=∑
~F =∑
~FS +∑
~FV
System property: B = m~V . Property per unit mass:b = m~V /m = ~V .
d(m~V )
dt=
∫VCV
∂
∂t(%~V ) dV+
∮SCV
%~V(~V − ~v
)·~n dS =
∑~FS+
∑~FV
or: ∫VCV
∂
∂t(%~V ) + div
[%~V(~V − ~v
)]dV =
∑~FS +
∑~FV
where∑ ~FS are surface forces, and
∑ ~FV are volume forces
The First Principle of Thermodynamics
Rate of change of the energy of the system is equal to the rate oftransfer of energy to the system!
dE
dt=
dQ
dt− dW
dt
System property: B = E . Property per unit mass: b = E/m = e.
dE
dt=
∫VCV
∂(% e)
∂tdV +
∮SCV
% e(~V − ~v
)· ~n dS = Q − W
∫VCV
∂(% e)
∂t+ div
[% e(~V − ~v
)]dV = Q − W
where:
e = eo +V 2
2+
p
%− ~g ·~r + · · · eo = CV T
The First Principle of Thermodynamics
Rate of change of the energy of the system is equal to the rate oftransfer of energy to the system!
dE
dt=
dQ
dt− dW
dt
System property: B = E . Property per unit mass: b = E/m = e.
dE
dt=
∫VCV
∂(% e)
∂tdV +
∮SCV
% e(~V − ~v
)· ~n dS = Q − W
∫VCV
∂(% e)
∂t+ div
[% e(~V − ~v
)]dV = Q − W
where:
e = eo +V 2
2+
p
%− ~g ·~r + · · · eo = CV T
The First Principle of Thermodynamics
Rate of change of the energy of the system is equal to the rate oftransfer of energy to the system!
dE
dt=
dQ
dt− dW
dt
System property: B = E . Property per unit mass: b = E/m = e.
dE
dt=
∫VCV
∂(% e)
∂tdV +
∮SCV
% e(~V − ~v
)· ~n dS = Q − W
∫VCV
∂(% e)
∂t+ div
[% e(~V − ~v
)]dV = Q − W
where:
e = eo +V 2
2+
p
%− ~g ·~r + · · · eo = CV T
The First Principle of Thermodynamics
Rate of change of the energy of the system is equal to the rate oftransfer of energy to the system!
dE
dt=
dQ
dt− dW
dt
System property: B = E . Property per unit mass: b = E/m = e.
dE
dt=
∫VCV
∂(% e)
∂tdV +
∮SCV
% e(~V − ~v
)· ~n dS = Q − W
∫VCV
∂(% e)
∂t+ div
[% e(~V − ~v
)]dV = Q − W
where:
e = eo +V 2
2+
p
%− ~g ·~r + · · · eo = CV T
The First Principle of Thermodynamics
Rate of change of the energy of the system is equal to the rate oftransfer of energy to the system!
dE
dt=
dQ
dt− dW
dt
System property: B = E . Property per unit mass: b = E/m = e.
dE
dt=
∫VCV
∂(% e)
∂tdV +
∮SCV
% e(~V − ~v
)· ~n dS = Q − W
∫VCV
∂(% e)
∂t+ div
[% e(~V − ~v
)]dV = Q − W
where:
e = eo +V 2
2+
p
%− ~g ·~r + · · · eo = CV T
Differential Form
Conservation of Mass
∂%
∂t+∂%u
∂x+∂%v
∂y+∂%w
∂z= 0
Momentum Equations
%Du
Dt=∂(−p + τxx)
∂x+∂τyx∂y
+∂τzx∂z
+ Sx
%Dv
Dt=∂τxy∂x
+∂(−p + τyy )
∂y+∂τzy∂z
+ Sy
%Dw
Dt=∂τxz∂x
+∂τyz∂y
+∂(−p + τzz)
∂y+ Sz
Differential Form
Conservation of Mass
∂%
∂t+∂%u
∂x+∂%v
∂y+∂%w
∂z= 0
Momentum Equations
%Du
Dt=∂(−p + τxx)
∂x+∂τyx∂y
+∂τzx∂z
+ Sx
%Dv
Dt=∂τxy∂x
+∂(−p + τyy )
∂y+∂τzy∂z
+ Sy
%Dw
Dt=∂τxz∂x
+∂τyz∂y
+∂(−p + τzz)
∂y+ Sz
Differential Form
Conservation of Mass
∂%
∂t+∂%u
∂x+∂%v
∂y+∂%w
∂z= 0
Momentum Equations
%Du
Dt=∂(−p + τxx)
∂x+∂τyx∂y
+∂τzx∂z
+ Sx
%Dv
Dt=∂τxy∂x
+∂(−p + τyy )
∂y+∂τzy∂z
+ Sy
%Dw
Dt=∂τxz∂x
+∂τyz∂y
+∂(−p + τzz)
∂y+ Sz
Differential Form
Conservation of Mass
∂%
∂t+∂%u
∂x+∂%v
∂y+∂%w
∂z= 0
Momentum Equations
%Du
Dt=∂(−p + τxx)
∂x+∂τyx∂y
+∂τzx∂z
+ Sx
%Dv
Dt=∂τxy∂x
+∂(−p + τyy )
∂y+∂τzy∂z
+ Sy
%Dw
Dt=∂τxz∂x
+∂τyz∂y
+∂(−p + τzz)
∂y+ Sz
Differential Form Energy Equations
%De
Dt= −∇(%~V ) +
∂(uτxx)
∂x+∂(uτyx)
∂y+∂(uτzx)
∂z+∂(vτxy )
∂x
+∂(vτyy )
∂y+∂(vτzy )
∂z+∂(wτxz)
∂x+∂(wτyz)
∂y+∂(wτzz)
∂z
+∇ · (κ∇T ) + SE
Mechanical Energy Equation
%D(V 2/2)
Dt= −~V · ∇p + u
(∂τxx∂x
+∂τyx∂y
+∂τzx∂z
)+
+v
(∂τxy∂x
+∂τyy∂y
+∂τzy∂z
)+ w
(∂τxz∂x
+∂τyz∂y
+∂τzz∂z
)+ ~V · ~S
Differential Form Energy Equations
%De
Dt= −∇(%~V ) +
∂(uτxx)
∂x+∂(uτyx)
∂y+∂(uτzx)
∂z+∂(vτxy )
∂x
+∂(vτyy )
∂y+∂(vτzy )
∂z+∂(wτxz)
∂x+∂(wτyz)
∂y+∂(wτzz)
∂z
+∇ · (κ∇T ) + SE
Mechanical Energy Equation
%D(V 2/2)
Dt= −~V · ∇p + u
(∂τxx∂x
+∂τyx∂y
+∂τzx∂z
)+
+v
(∂τxy∂x
+∂τyy∂y
+∂τzy∂z
)+ w
(∂τxz∂x
+∂τyz∂y
+∂τzz∂z
)+ ~V · ~S
Stress Velocity Relationship
This assumption (valid for certain fluids) reduces number ofunknowns: τxx τxy τxz
τyx τyy τyzτzx τzy τzz
= −µ
2∂u∂x
∂u∂y + ∂v
∂x∂u∂z + ∂w
∂x∂v∂x + ∂u
∂y 2∂v∂y
∂v∂z + ∂w
∂y∂w∂x + ∂u
∂z∂w∂y + ∂v
∂z 2∂w∂z
Volume Forces
I Gravitational Force (Sx = 0, Sy = 0, Sz = −%g).
I Force due to electric and magnetic fields.
I Inertial Force.
Volume Forces
I Gravitational Force (Sx = 0, Sy = 0, Sz = −%g).
I Force due to electric and magnetic fields.
I Inertial Force.
Volume Forces
I Gravitational Force (Sx = 0, Sy = 0, Sz = −%g).
I Force due to electric and magnetic fields.
I Inertial Force.
Equation of State
Under assumption of thermodynamic equilibrium we assume:
p = p(%,T ), eo = eo(%,T )
for perfect gas:.
p = %RT , eo = CV T
for isentropic flow:
p = p(%), p = po
(%
%o
)κ
for incompressible flow:
% = const. % = 1.225 [kg/m3] for air
Equation of State
Under assumption of thermodynamic equilibrium we assume:
p = p(%,T ), eo = eo(%,T )
for perfect gas:.
p = %RT , eo = CV T
for isentropic flow:
p = p(%), p = po
(%
%o
)κ
for incompressible flow:
% = const. % = 1.225 [kg/m3] for air
Equation of State
Under assumption of thermodynamic equilibrium we assume:
p = p(%,T ), eo = eo(%,T )
for perfect gas:.
p = %RT , eo = CV T
for isentropic flow:
p = p(%), p = po
(%
%o
)κ
for incompressible flow:
% = const. % = 1.225 [kg/m3] for air
Equation of State
Under assumption of thermodynamic equilibrium we assume:
p = p(%,T ), eo = eo(%,T )
for perfect gas:.
p = %RT , eo = CV T
for isentropic flow:
p = p(%), p = po
(%
%o
)κ
for incompressible flow:
% = const. % = 1.225 [kg/m3] for air
Conservative Form of PDE
Conservative form of governing equation is given as:
∂~Q
∂t+∂~E
∂x+∂~F
∂y+∂~G
∂z=∂~Ev
∂x+∂~Fv
∂y+∂~Gv
∂z
where:
~Q =
%%u%v%w%e
~E =
%u
%u2 + p%uv%uw
%ue + pu
~F =
%v%uv
%v2 + p%vw
%ve + pv
Conservative Form of PDE
Conservative form of governing equation is given as:
∂~Q
∂t+∂~E
∂x+∂~F
∂y+∂~G
∂z=∂~Ev
∂x+∂~Fv
∂y+∂~Gv
∂z
where:
~Q =
%%u%v%w%e
~E =
%u
%u2 + p%uv%uw
%ue + pu
~F =
%v%uv
%v2 + p%vw
%ve + pv
Conservative Form of PDE
Conservative form of governing equation is given as:
∂~Q
∂t+∂~E
∂x+∂~F
∂y+∂~G
∂z=∂~Ev
∂x+∂~Fv
∂y+∂~Gv
∂z
where:
~Q =
%%u%v%w%e
~E =
%u
%u2 + p%uv%uw
%ue + pu
~F =
%v%uv
%v2 + p%vw
%ve + pv
Conservative Form of PDE
Conservative form of governing equation is given as:
∂~Q
∂t+∂~E
∂x+∂~F
∂y+∂~G
∂z=∂~Ev
∂x+∂~Fv
∂y+∂~Gv
∂z
where:
~Q =
%%u%v%w%e
~E =
%u
%u2 + p%uv%uw
%ue + pu
~F =
%v%uv
%v2 + p%vw
%ve + pv
Conservative Form of PDE Continued
~G =
%w%uw%vw
%w2 + p%we + pw
~Ev =
0τxxτxyτxz
uτxx + vτxy + wτxz − qx
~Fv =
0τyxτyyτyz
uτyx + vτyy + wτyz − qy
Conservative Form of PDE Continued
~G =
%w%uw%vw
%w2 + p%we + pw
~Ev =
0τxxτxyτxz
uτxx + vτxy + wτxz − qx
~Fv =
0τyxτyyτyz
uτyx + vτyy + wτyz − qy
Conservative Form of PDE Continued
~G =
%w%uw%vw
%w2 + p%we + pw
~Ev =
0τxxτxyτxz
uτxx + vτxy + wτxz − qx
~Fv =
0τyxτyyτyz
uτyx + vτyy + wτyz − qy
Conservative Form of PDE Continued
~Gv =
0τwx
τwy
τwz
uτzx + vτzy + wτzz − qz
where:
~q = qz~ı+ qy~+ qz~k = κ∇T
Conservative Form of PDE Continued
~Gv =
0τwx
τwy
τwz
uτzx + vτzy + wτzz − qz
where:
~q = qz~ı+ qy~+ qz~k = κ∇T
Typical Boundary Conditions
I In contact with solid wall fluid particles have the same velocityas the wall itself – no-slip condition.
I If the plane of symmetry exist, velocity in the plane hasextreme value, while velocity normal to plane is zero –free-slip condition.
I inflow condition All components of the velocity must beknown, sometimes we estimate them by solving simplerproblem.
I outflow condition – there is no change of the velocitiesnormal to the boundary (exit).
I periodicity condition – flow parameters in correspondingpoints must match (have the same values).
Typical Boundary Conditions
I In contact with solid wall fluid particles have the same velocityas the wall itself – no-slip condition.
I If the plane of symmetry exist, velocity in the plane hasextreme value, while velocity normal to plane is zero –free-slip condition.
I inflow condition All components of the velocity must beknown, sometimes we estimate them by solving simplerproblem.
I outflow condition – there is no change of the velocitiesnormal to the boundary (exit).
I periodicity condition – flow parameters in correspondingpoints must match (have the same values).
Typical Boundary Conditions
I In contact with solid wall fluid particles have the same velocityas the wall itself – no-slip condition.
I If the plane of symmetry exist, velocity in the plane hasextreme value, while velocity normal to plane is zero –free-slip condition.
I inflow condition All components of the velocity must beknown, sometimes we estimate them by solving simplerproblem.
I outflow condition – there is no change of the velocitiesnormal to the boundary (exit).
I periodicity condition – flow parameters in correspondingpoints must match (have the same values).
Typical Boundary Conditions
I In contact with solid wall fluid particles have the same velocityas the wall itself – no-slip condition.
I If the plane of symmetry exist, velocity in the plane hasextreme value, while velocity normal to plane is zero –free-slip condition.
I inflow condition All components of the velocity must beknown, sometimes we estimate them by solving simplerproblem.
I outflow condition – there is no change of the velocitiesnormal to the boundary (exit).
I periodicity condition – flow parameters in correspondingpoints must match (have the same values).
Typical Boundary Conditions
I In contact with solid wall fluid particles have the same velocityas the wall itself – no-slip condition.
I If the plane of symmetry exist, velocity in the plane hasextreme value, while velocity normal to plane is zero –free-slip condition.
I inflow condition All components of the velocity must beknown, sometimes we estimate them by solving simplerproblem.
I outflow condition – there is no change of the velocitiesnormal to the boundary (exit).
I periodicity condition – flow parameters in correspondingpoints must match (have the same values).
Part II
Discretization
Discretization
Algorithm of FFS
Physical Models of Fluid Flow
Required Resources
Discretization TechniquesFDM – BasicsShort notationExplicit, Implicit, Consistency, StabilityConvergence
Algorithm of Fluid Flow Simulations
Physical Models of Fluid Flow
Required Computational Resources
Discretization Techniques
The most frequently utilized methods in engineering simulationsare:
I Finite Difference Method – FDM.
I Finite Element Method – FEM.
I Finite Volume Method – FVM.
In this lecture we explain here only the most simplest method, i.e.The Finite Difference Method!
Discretization Techniques
The most frequently utilized methods in engineering simulationsare:
I Finite Difference Method – FDM.
I Finite Element Method – FEM.
I Finite Volume Method – FVM.
In this lecture we explain here only the most simplest method, i.e.The Finite Difference Method!
Discretization Techniques
The most frequently utilized methods in engineering simulationsare:
I Finite Difference Method – FDM.
I Finite Element Method – FEM.
I Finite Volume Method – FVM.
In this lecture we explain here only the most simplest method, i.e.The Finite Difference Method!
Discretization Techniques
The most frequently utilized methods in engineering simulationsare:
I Finite Difference Method – FDM.
I Finite Element Method – FEM.
I Finite Volume Method – FVM.
In this lecture we explain here only the most simplest method, i.e.The Finite Difference Method!
Discretization Techniques
The most frequently utilized methods in engineering simulationsare:
I Finite Difference Method – FDM.
I Finite Element Method – FEM.
I Finite Volume Method – FVM.
In this lecture we explain here only the most simplest method, i.e.The Finite Difference Method!
FDM – BasicsMathematical definition of the first derivative:
∂u
∂x= lim
∆x→0
u(x + ∆x , y , z , t)− u(x , y , z , t)
∆x
From the infinitely many ways to approximate the first derivativewe show only three: Forward difference approximation:
∂u
∂x≈ u(x + ∆x , y , z , t)− u(x , y , z , t)
∆x+ O(∆x)
Backward difference approximation:
∂u
∂x≈ u(x , y , z , t)− u(x −∆x , y , z , t)
∆x+ O(∆x)
Centered difference approximation:
∂u
∂x≈ u(x + ∆x , y , z , t)− u(x −∆x , y , z , t)
2∆x+ O(∆x)2
forward.gif, backward.gif, centered.gif
FDM – BasicsFinite difference approximation:
∂u
∂x≈ u(x + ∆x , y , z , t)− u(x , y , z , t)
∆x
From the infinitely many ways to approximate the first derivativewe show only three: Forward difference approximation:
∂u
∂x≈ u(x + ∆x , y , z , t)− u(x , y , z , t)
∆x+ O(∆x)
Backward difference approximation:
∂u
∂x≈ u(x , y , z , t)− u(x −∆x , y , z , t)
∆x+ O(∆x)
Centered difference approximation:
∂u
∂x≈ u(x + ∆x , y , z , t)− u(x −∆x , y , z , t)
2∆x+ O(∆x)2
forward.gif, backward.gif, centered.gif
FDM – BasicsFinite difference approximation:
∂u
∂x≈ u(x + ∆x , y , z , t)− u(x , y , z , t)
∆x
From the infinitely many ways to approximate the first derivativewe show only three: Forward difference approximation:
∂u
∂x≈ u(x + ∆x , y , z , t)− u(x , y , z , t)
∆x+ O(∆x)
Backward difference approximation:
∂u
∂x≈ u(x , y , z , t)− u(x −∆x , y , z , t)
∆x+ O(∆x)
Centered difference approximation:
∂u
∂x≈ u(x + ∆x , y , z , t)− u(x −∆x , y , z , t)
2∆x+ O(∆x)2
forward.gif, backward.gif, centered.gif
FDM – BasicsFinite difference approximation:
∂u
∂x≈ u(x + ∆x , y , z , t)− u(x , y , z , t)
∆x
From the infinitely many ways to approximate the first derivativewe show only three: Forward difference approximation:
∂u
∂x≈ u(x + ∆x , y , z , t)− u(x , y , z , t)
∆x+ O(∆x)
Backward difference approximation:
∂u
∂x≈ u(x , y , z , t)− u(x −∆x , y , z , t)
∆x+ O(∆x)
Centered difference approximation:
∂u
∂x≈ u(x + ∆x , y , z , t)− u(x −∆x , y , z , t)
2∆x+ O(∆x)2
forward.gif, backward.gif, centered.gif
FDM – BasicsFinite difference approximation:
∂u
∂x≈ u(x + ∆x , y , z , t)− u(x , y , z , t)
∆x
From the infinitely many ways to approximate the first derivativewe show only three: Forward difference approximation:
∂u
∂x≈ u(x + ∆x , y , z , t)− u(x , y , z , t)
∆x+ O(∆x)
Backward difference approximation:
∂u
∂x≈ u(x , y , z , t)− u(x −∆x , y , z , t)
∆x+ O(∆x)
Centered difference approximation:
∂u
∂x≈ u(x + ∆x , y , z , t)− u(x −∆x , y , z , t)
2∆x+ O(∆x)2
forward.gif, backward.gif, centered.gif
FDM – BasicsFinite difference approximation:
∂u
∂x≈ u(x + ∆x , y , z , t)− u(x , y , z , t)
∆x
From the infinitely many ways to approximate the first derivativewe show only three: Forward difference approximation:
∂u
∂x≈ u(x + ∆x , y , z , t)− u(x , y , z , t)
∆x+ O(∆x)
Backward difference approximation:
∂u
∂x≈ u(x , y , z , t)− u(x −∆x , y , z , t)
∆x+ O(∆x)
Centered difference approximation:
∂u
∂x≈ u(x + ∆x , y , z , t)− u(x −∆x , y , z , t)
2∆x+ O(∆x)2
forward.gif, backward.gif, centered.gif
FDM – BasicsFinite difference approximation:
∂u
∂x≈ u(x + ∆x , y , z , t)− u(x , y , z , t)
∆x
From the infinitely many ways to approximate the first derivativewe show only three: Forward difference approximation:
∂u
∂x≈ u(x + ∆x , y , z , t)− u(x , y , z , t)
∆x+ O(∆x)
Backward difference approximation:
∂u
∂x≈ u(x , y , z , t)− u(x −∆x , y , z , t)
∆x+ O(∆x)
Centered difference approximation:
∂u
∂x≈ u(x + ∆x , y , z , t)− u(x −∆x , y , z , t)
2∆x+ O(∆x)2
forward.gif, backward.gif, centered.gif
Illustration
FDM – Basics Continued
Since the second derivative is the first derivative of the firstderivative:
∂2u
∂x2≈
∂u∂x (x + ∆x/2, y , z , t)− ∂u
∂x (x −∆x/2, y , z , t)
∆x
and:
∂2u
∂x2≈
u(x+∆x ,y ,z,t)−u(x ,y ,z,t)∆x − u(x ,y ,z,t)−u(x−∆x ,y ,z,t)
∆x
∆x
The second order derivative FD approximation is thus:
∂2u
∂x2≈ u(x + ∆x , y , z , t)− 2u(x , y , z , t) + u(x −∆x , y , z , t)
(∆x)2
FDM – Basics Continued
Since the second derivative is the first derivative of the firstderivative:
∂2u
∂x2≈
∂u∂x (x + ∆x/2, y , z , t)− ∂u
∂x (x −∆x/2, y , z , t)
∆x
and:
∂2u
∂x2≈
u(x+∆x ,y ,z,t)−u(x ,y ,z,t)∆x − u(x ,y ,z,t)−u(x−∆x ,y ,z,t)
∆x
∆x
The second order derivative FD approximation is thus:
∂2u
∂x2≈ u(x + ∆x , y , z , t)− 2u(x , y , z , t) + u(x −∆x , y , z , t)
(∆x)2
FDM – Basics Continued
Since the second derivative is the first derivative of the firstderivative:
∂2u
∂x2≈
∂u∂x (x + ∆x/2, y , z , t)− ∂u
∂x (x −∆x/2, y , z , t)
∆x
and:
∂2u
∂x2≈
u(x+∆x ,y ,z,t)−u(x ,y ,z,t)∆x − u(x ,y ,z,t)−u(x−∆x ,y ,z,t)
∆x
∆x
The second order derivative FD approximation is thus:
∂2u
∂x2≈ u(x + ∆x , y , z , t)− 2u(x , y , z , t) + u(x −∆x , y , z , t)
(∆x)2
Short notation
Short notation uni ,j ,k ≡ u(xi , yj , zk , tn)
For example:
∂u
∂t≈
un+1i − un
i
∆t≡ u(xi , tn + ∆t)− u(xi , tn)
∆t
and∂u
∂x≈
uni+1 − un
i−1
2∆x≡ u(xi + ∆x , tn)− u(xi , tN)
∆x
Replacing partial derivatives in PDE we convert the problem ofsolving PDE to problem of solution algebraic equation!
Short notation
Short notation uni ,j ,k ≡ u(xi , yj , zk , tn)
For example:
∂u
∂t≈
un+1i − un
i
∆t≡ u(xi , tn + ∆t)− u(xi , tn)
∆t
and∂u
∂x≈
uni+1 − un
i−1
2∆x≡ u(xi + ∆x , tn)− u(xi , tN)
∆x
Replacing partial derivatives in PDE we convert the problem ofsolving PDE to problem of solution algebraic equation!
Short notation
Short notation uni ,j ,k ≡ u(xi , yj , zk , tn)
For example:
∂u
∂t≈
un+1i − un
i
∆t≡ u(xi , tn + ∆t)− u(xi , tn)
∆t
and∂u
∂x≈
uni+1 − un
i−1
2∆x≡ u(xi + ∆x , tn)− u(xi , tN)
∆x
Replacing partial derivatives in PDE we convert the problem ofsolving PDE to problem of solution algebraic equation!
Short notation
Short notation uni ,j ,k ≡ u(xi , yj , zk , tn)
For example:
∂u
∂t≈
un+1i − un
i
∆t≡ u(xi , tn + ∆t)− u(xi , tn)
∆t
and∂u
∂x≈
uni+1 − un
i−1
2∆x≡ u(xi + ∆x , tn)− u(xi , tN)
∆x
Replacing partial derivatives in PDE we convert the problem ofsolving PDE to problem of solution algebraic equation!
Short notation
Short notation uni ,j ,k ≡ u(xi , yj , zk , tn)
For example:
∂u
∂t≈
un+1i − un
i
∆t≡ u(xi , tn + ∆t)− u(xi , tn)
∆t
and∂u
∂x≈
uni+1 − un
i−1
2∆x≡ u(xi + ∆x , tn)− u(xi , tN)
∆x
Replacing partial derivatives in PDE we convert the problem ofsolving PDE to problem of solution algebraic equation!
Short notation
Short notation uni ,j ,k ≡ u(xi , yj , zk , tn)
For example:
∂u
∂t≈
un+1i − un
i
∆t≡ u(xi , tn + ∆t)− u(xi , tn)
∆t
and∂u
∂x≈
uni+1 − un
i−1
2∆x≡ u(xi + ∆x , tn)− u(xi , tN)
∆x
Replacing partial derivatives in PDE we convert the problem ofsolving PDE to problem of solution algebraic equation!
Illustration of the short notation
FDM – Basics: explicit, implicit, consistency
Let’s approximate first order one-dimensional wave equation:
∂u
∂t=∂u
∂x
When derivatives are replaced with finite differences we get:
un+1i − un
i
∆t=
uni+1 − un
i−1
2∆xor:
un+1i − un
i
∆t=
un+1i+1 − un+1
i−1
2∆x
Left-hand side approximation is explicit, i.e. has only oneunknown! , while right-hand side approximation is implicit i.e. weneed to solve system of equations.Both approximations are consistent!
FDM – Basics: explicit, implicit, consistency
Let’s approximate first order one-dimensional wave equation:
∂u
∂t=∂u
∂x
When derivatives are replaced with finite differences we get:
un+1i − un
i
∆t=
uni+1 − un
i−1
2∆xor:
un+1i − un
i
∆t=
un+1i+1 − un+1
i−1
2∆x
Left-hand side approximation is explicit, i.e. has only oneunknown! , while right-hand side approximation is implicit i.e. weneed to solve system of equations.Both approximations are consistent!
FDM – Basics: explicit, implicit, consistency
Let’s approximate first order one-dimensional wave equation:
∂u
∂t=∂u
∂x
When derivatives are replaced with finite differences we get:
un+1i − un
i
∆t=
uni+1 − un
i−1
2∆xor:
un+1i − un
i
∆t=
un+1i+1 − un+1
i−1
2∆x
Left-hand side approximation is explicit, i.e. has only oneunknown! , while right-hand side approximation is implicit i.e. weneed to solve system of equations.Both approximations are consistent!
FDM – Basics: explicit, implicit, consistency
Let’s approximate first order one-dimensional wave equation:
∂u
∂t=∂u
∂x
When derivatives are replaced with finite differences we get:
un+1i − un
i
∆t=
uni+1 − un
i−1
2∆xor:
un+1i − un
i
∆t=
un+1i+1 − un+1
i−1
2∆x
Left-hand side approximation is explicit, i.e. has only oneunknown! , while right-hand side approximation is implicit i.e. weneed to solve system of equations.Both approximations are consistent!
FDM – Basics: explicit, implicit, consistency
Let’s approximate first order one-dimensional wave equation:
∂u
∂t=∂u
∂x
When derivatives are replaced with finite differences we get:
un+1i − un
i
∆t=
uni+1 − un
i−1
2∆xor:
un+1i − un
i
∆t=
un+1i+1 − un+1
i−1
2∆x
Left-hand side approximation is explicit, i.e. has only oneunknown! , while right-hand side approximation is implicit i.e. weneed to solve system of equations.Both approximations are consistent!
FDM – Basics: explicit, implicit, consistency
Let’s approximate first order one-dimensional wave equation:
∂u
∂t=∂u
∂x
When derivatives are replaced with finite differences we get:
un+1i − un
i
∆t=
uni+1 − un
i−1
2∆xor:
un+1i − un
i
∆t=
un+1i+1 − un+1
i−1
2∆x
Left-hand side approximation is explicit, i.e. has only oneunknown! , while right-hand side approximation is implicit i.e. weneed to solve system of equations.Both approximations are consistent!
FDM – Basics: stability
One of possible explicit finite difference approximation of the PDE:
∂u
∂t= α
∂2u
∂x2
Lets rearrange both approximations into form:
un+1i = un
i +c
2· (un
i+1 − uni−1), c =
∆t
∆x
un+1i = un
i + d · (uni−1 − 2un
i + uni+1), d =
α∆t
(∆x)2
Lets observe how error grows (dies out) for d = 0.49, andd = 0.52.Animations:dif0 49.avi, dif0 52.avi
FDM – Basics: stability
One of possible explicit finite difference approximation of the PDE:
is:un+1i − un
i
∆t= α
uni−1 − 2un
i + uni+1
(∆x)2
Lets rearrange both approximations into form:
un+1i = un
i +c
2· (un
i+1 − uni−1), c =
∆t
∆x
un+1i = un
i + d · (uni−1 − 2un
i + uni+1), d =
α∆t
(∆x)2
Lets observe how error grows (dies out) for d = 0.49, andd = 0.52.Animations:dif0 49.avi, dif0 52.avi
FDM – Basics: stability
One of possible explicit finite difference approximation of the PDE:
is:un+1i − un
i
∆t= α
uni−1 − 2un
i + uni+1
(∆x)2
Lets rearrange both approximations into form:
un+1i = un
i +c
2· (un
i+1 − uni−1), c =
∆t
∆x
un+1i = un
i + d · (uni−1 − 2un
i + uni+1), d =
α∆t
(∆x)2
Lets observe how error grows (dies out) for d = 0.49, andd = 0.52.Animations:dif0 49.avi, dif0 52.avi
FDM – Basics: stability
One of possible explicit finite difference approximation of the PDE:
is:un+1i − un
i
∆t= α
uni−1 − 2un
i + uni+1
(∆x)2
Lets rearrange both approximations into form:
un+1i = un
i +c
2· (un
i+1 − uni−1), c =
∆t
∆x
un+1i = un
i + d · (uni−1 − 2un
i + uni+1), d =
α∆t
(∆x)2
Lets observe how error grows (dies out) for d = 0.49, andd = 0.52.Animations:dif0 49.avi, dif0 52.avi
FDM – Basics: convergence
Finite difference scheme converges (according to Lax) if:
I Approximation is consistent!
I Approximation is stable!
FDM – Basics: convergence
Finite difference scheme converges (according to Lax) if:
I Approximation is consistent!
I Approximation is stable!
FDM – Basics: convergence
Finite difference scheme converges (according to Lax) if:
I Approximation is consistent!
I Approximation is stable!
Part III
Examples
Examples
Example 1Problem StatementBoundary ConditionsSolution ProcedureGrid GenerationMetrics of transformationApproximation of the PDESolution procedureTypical Result
Example 2Example 2, Problem StatementBoundary ConditionsApproximation of PDEsApproximation of BCsComputational ProcedureResults
Physical Models of Fluid Flow
Example 1 – Problem statement 1/2
Potential compressible two-dimensional flow is described byconservation of mass equation:
∂
∂x
(%∂φ
∂x
)+
∂
∂y
(%∂φ
∂y
)= 0
and relationship between speed and density:
%o
%=
(1 +
γ − 1
2M2
)1/(γ−1)
, M =V
a
where~V = u~ı+ v~, V =
√u2 + v2
and:
u =∂φ
∂x≡ φx , v =
∂φ
∂y≡ φy
Example 1 – Problem statement 1/2
Potential compressible two-dimensional flow is described byconservation of mass equation:
∂
∂x
(%∂φ
∂x
)+
∂
∂y
(%∂φ
∂y
)= 0
and relationship between speed and density:
%o
%=
(1 +
γ − 1
2M2
)1/(γ−1)
, M =V
a
where~V = u~ı+ v~, V =
√u2 + v2
and:
u =∂φ
∂x≡ φx , v =
∂φ
∂y≡ φy
Example 1 – Problem statement 1/2
Potential compressible two-dimensional flow is described byconservation of mass equation:
∂
∂x
(%∂φ
∂x
)+
∂
∂y
(%∂φ
∂y
)= 0
and relationship between speed and density:
%o
%=
(1 +
γ − 1
2M2
)1/(γ−1)
, M =V
a
where~V = u~ı+ v~, V =
√u2 + v2
and:
u =∂φ
∂x≡ φx , v =
∂φ
∂y≡ φy
Example 1 – Problem statement 1/2
Potential compressible two-dimensional flow is described byconservation of mass equation:
∂
∂x
(%∂φ
∂x
)+
∂
∂y
(%∂φ
∂y
)= 0
and relationship between speed and density:
%o
%=
(1 +
γ − 1
2M2
)1/(γ−1)
, M =V
a
where~V = u~ı+ v~, V =
√u2 + v2
and:
u =∂φ
∂x≡ φx , v =
∂φ
∂y≡ φy
Example 1 – Problem statement 2/2
Non-dimensionalizing with critical speed of sound doesn’t changethe first equation:
∂
∂x
(%∂φ
∂x
)+
∂
∂y
(%∂φ
∂y
)= 0
Here we used short notation for derivatives:
φx ≡∂φ
∂x, φy ≡
∂φ
∂y, φxx ≡
∂2φ
∂x2
Nondimensional velocities:
u∞a∗
= M
√γ + 1
2 + (γ − 1)M2cosα
v∞a∗
= M
√γ + 1
2 + (γ − 1)M2sinα
Density equation reduces to:
%
%o=
[1− γ − 1
γ + 1· (u∗2 + v∗2)
]1/(γ−1)
Example 1 – Problem statement 2/2
Non-dimensionalizing with critical speed of sound doesn’t changethe first equation:
(%φx)x + (%φy )y = 0
Here we used short notation for derivatives:
φx ≡∂φ
∂x, φy ≡
∂φ
∂y, φxx ≡
∂2φ
∂x2
Nondimensional velocities:
u∞a∗
= M
√γ + 1
2 + (γ − 1)M2cosα
v∞a∗
= M
√γ + 1
2 + (γ − 1)M2sinα
Density equation reduces to:
%
%o=
[1− γ − 1
γ + 1· (u∗2 + v∗2)
]1/(γ−1)
Example 1 – Problem statement 2/2
Non-dimensionalizing with critical speed of sound doesn’t changethe first equation:
(%φx)x + (%φy )y = 0
Here we used short notation for derivatives:
φx ≡∂φ
∂x, φy ≡
∂φ
∂y, φxx ≡
∂2φ
∂x2
Nondimensional velocities:
u∞a∗
= M
√γ + 1
2 + (γ − 1)M2cosα
v∞a∗
= M
√γ + 1
2 + (γ − 1)M2sinα
Density equation reduces to:
%
%o=
[1− γ − 1
γ + 1· (u∗2 + v∗2)
]1/(γ−1)
Example 1 – Problem statement 2/2
Non-dimensionalizing with critical speed of sound doesn’t changethe first equation:
(%φx)x + (%φy )y = 0
Here we used short notation for derivatives:
φx ≡∂φ
∂x, φy ≡
∂φ
∂y, φxx ≡
∂2φ
∂x2
Nondimensional velocities:
u∞a∗
= M
√γ + 1
2 + (γ − 1)M2cosα
v∞a∗
= M
√γ + 1
2 + (γ − 1)M2sinα
Density equation reduces to:
%
%o=
[1− γ − 1
γ + 1· (u∗2 + v∗2)
]1/(γ−1)
Example 1 – Problem statement 2/2
Non-dimensionalizing with critical speed of sound doesn’t changethe first equation:
(%φx)x + (%φy )y = 0
Here we used short notation for derivatives:
φx ≡∂φ
∂x, φy ≡
∂φ
∂y, φxx ≡
∂2φ
∂x2
Nondimensional velocities:
u∞a∗
= M
√γ + 1
2 + (γ − 1)M2cosα
v∞a∗
= M
√γ + 1
2 + (γ − 1)M2sinα
Density equation reduces to:
%
%o=
[1− γ − 1
γ + 1· (u∗2 + v∗2)
]1/(γ−1)
Boundary Conditions
Question of uniqueness
Any combination of these two flows satisfy all boundary conditions!Uniqueness is achieved by imposing Kutta-Joukowsky condition!
Question of uniqueness
Any combination of these two flows satisfy all boundary conditions!Uniqueness is achieved by imposing Kutta-Joukowsky condition!
Solution Procedure 1/2
Solution has the jump of the potential what is not desirableproperty, we can split the solution in two parts: one which willcorrectly describe jump and other which is continuous andsupplements the first part to the complete solution!
φ = ϕ+Γ
2πarctan
y
x= ϕ+ Γ · Φ
Solution Procedure 1/2
Solution has the jump of the potential what is not desirableproperty, we can split the solution in two parts: one which willcorrectly describe jump and other which is continuous andsupplements the first part to the complete solution!
φ = ϕ+Γ
2πarctan
y
x= ϕ+ Γ · Φ
Solution Procedure 2/2
Our governing equation now looks:
(%ϕx)x + (%ϕy )y = −(%Φx)x + (%Φy )y︸ ︷︷ ︸Γ·%·f (x ,y)
where f (x , y) is known over the physical region!Boundary conditions:
∂φ
∂n=∂ϕ+ Γ · Φ
∂n= 0, ⇒ ∂ϕ
∂n= −Γ · ∂Φ
∂n
ϕ = u∞ · x + v∞ · y , Φ =1
2πarctan
y
x
ϕ is continuous over cut!
Solution Procedure 2/2
Our governing equation now looks:
(%ϕx)x + (%ϕy )y = −(%Φx)x + (%Φy )y︸ ︷︷ ︸Γ·%·f (x ,y)
where f (x , y) is known over the physical region!Boundary conditions:
∂φ
∂n=∂ϕ+ Γ · Φ
∂n= 0, ⇒ ∂ϕ
∂n= −Γ · ∂Φ
∂n
ϕ = u∞ · x + v∞ · y , Φ =1
2πarctan
y
x
ϕ is continuous over cut!
Solution Procedure 2/2
Our governing equation now looks:
(%ϕx)x + (%ϕy )y = −(%Φx)x + (%Φy )y︸ ︷︷ ︸Γ·%·f (x ,y)
where f (x , y) is known over the physical region!Boundary conditions:
∂φ
∂n=∂ϕ+ Γ · Φ
∂n= 0, ⇒ ∂ϕ
∂n= −Γ · ∂Φ
∂n
ϕ = u∞ · x + v∞ · y , Φ =1
2πarctan
y
x
ϕ is continuous over cut!
Solution Procedure 2/2
Our governing equation now looks:
(%ϕx)x + (%ϕy )y = −(%Φx)x + (%Φy )y︸ ︷︷ ︸Γ·%·f (x ,y)
where f (x , y) is known over the physical region!Boundary conditions:
∂φ
∂n=∂ϕ+ Γ · Φ
∂n= 0, ⇒ ∂ϕ
∂n= −Γ · ∂Φ
∂n
ϕ = u∞ · x + v∞ · y , Φ =1
2πarctan
y
x
ϕ is continuous over cut!
Solution Procedure 2/2
Our governing equation now looks:
(%ϕx)x + (%ϕy )y = −(%Φx)x + (%Φy )y︸ ︷︷ ︸Γ·%·f (x ,y)
where f (x , y) is known over the physical region!Boundary conditions:
∂φ
∂n=∂ϕ+ Γ · Φ
∂n= 0, ⇒ ∂ϕ
∂n= −Γ · ∂Φ
∂n
ϕ = u∞ · x + v∞ · y , Φ =1
2πarctan
y
x
ϕ is continuous over cut!
Grid Generation
Closer look at physical space
Grid generation by solving PDEs
We describe the grid as relationship of the form
ξ = ξ(x , y), η = η(x , y)
Grids are generated by solving:
∇2ξ = 0 ⇒ axξξ + 2bxξη + cxηη = 0
∇2η = 0 ⇒ ayξξ + 2byξη + cyηη = 0
a = J2(x2η + y2
η )
b = −J2(xξxη + yξyη)
c = J2(x2ξ + y2
ξ )
J =1
xξyη − xηyξ
We need the guess for the coefficients a, b, and c (algebraic grid)
Grid generation by solving PDEs
We describe the grid as relationship of the form
ξ = ξ(x , y), η = η(x , y)
Grids are generated by solving:
∇2ξ = 0 ⇒ axξξ + 2bxξη + cxηη = 0
∇2η = 0 ⇒ ayξξ + 2byξη + cyηη = 0
a = J2(x2η + y2
η )
b = −J2(xξxη + yξyη)
c = J2(x2ξ + y2
ξ )
J =1
xξyη − xηyξ
We need the guess for the coefficients a, b, and c (algebraic grid)
Grid generation by solving PDEs
We describe the grid as relationship of the form
ξ = ξ(x , y), η = η(x , y)
Grids are generated by solving:
∇2ξ = 0 ⇒ axξξ + 2bxξη + cxηη = 0
∇2η = 0 ⇒ ayξξ + 2byξη + cyηη = 0
a = J2(x2η + y2
η )
b = −J2(xξxη + yξyη)
c = J2(x2ξ + y2
ξ )
J =1
xξyη − xηyξ
We need the guess for the coefficients a, b, and c (algebraic grid)
Metrics of transformation
In the computational space our PDE looks:(%U
J
)ξ
+
(%V
J
)η
= 0
together with
% =
[1− γ − 1
γ + 1(Uφξ + Vφη)
]1/(γ−1)
On the airfoil:
∂φ
∂n
∣∣∣∣η=const
=bφξ + cφη√
c= 0
So we need J, a, b, and c to approximate our PDE in thecomputational space!
Metrics of transformation
In the computational space our PDE looks:(%U
J
)ξ
+
(%V
J
)η
= 0
together with
% =
[1− γ − 1
γ + 1(Uφξ + Vφη)
]1/(γ−1)
On the airfoil:
∂φ
∂n
∣∣∣∣η=const
=bφξ + cφη√
c= 0
So we need J, a, b, and c to approximate our PDE in thecomputational space!
Metrics of transformation
In the computational space our PDE looks:(%U
J
)ξ
+
(%V
J
)η
= 0
together with
% =
[1− γ − 1
γ + 1(Uφξ + Vφη)
]1/(γ−1)
On the airfoil:
∂φ
∂n
∣∣∣∣η=const
=bφξ + cφη√
c= 0
So we need J, a, b, and c to approximate our PDE in thecomputational space!
Metrics of transformation
In the computational space our PDE looks:(%U
J
)ξ
+
(%V
J
)η
= 0
together with
% =
[1− γ − 1
γ + 1(Uφξ + Vφη)
]1/(γ−1)
On the airfoil:
∂φ
∂n
∣∣∣∣η=const
=bφξ + cφη√
c= 0
So we need J, a, b, and c to approximate our PDE in thecomputational space!
How these metrics look 1/4
How these metrics look 2/4
How these metrics look 3/4
How these metrics look 4/4
Approximation of the PDE 1/3
Our PDE at the point (i , j) in the computational space looks:(%U
J
)ξi,j
+
(%V
J
)ηi,j
= 0
where:U = aφξ + bφη, V = bφξ + cφη
Since φ = ϕ+ Γ · Φ:(%U
J
)ξi,j
+
(%V
J
)ηi,j
= −
(%U
J
)ξi,j
−
(%V
J
)ηi,j
= Γ·%i ,j ·f (ξ, η)i ,j
where now:
U = aϕξ + bϕη, V = bϕξ + cϕη
Approximation of the PDE 1/3
Our PDE at the point (i , j) in the computational space looks:(%U
J
)ξi,j
+
(%V
J
)ηi,j
= 0
where:U = aφξ + bφη, V = bφξ + cφη
Since φ = ϕ+ Γ · Φ:(%U
J
)ξi,j
+
(%V
J
)ηi,j
= −
(%U
J
)ξi,j
−
(%V
J
)ηi,j
= Γ·%i ,j ·f (ξ, η)i ,j
where now:
U = aϕξ + bϕη, V = bϕξ + cϕη
Approximation of the PDE 1/3
Our PDE at the point (i , j) in the computational space looks:(%U
J
)ξi,j
+
(%V
J
)ηi,j
= 0
where:U = aφξ + bφη, V = bφξ + cφη
Since φ = ϕ+ Γ · Φ:(%U
J
)ξi,j
+
(%V
J
)ηi,j
= −
(%U
J
)ξi,j
−
(%V
J
)ηi,j
= Γ·%i ,j ·f (ξ, η)i ,j
where now:
U = aϕξ + bϕη, V = bϕξ + cϕη
Approximation of the PDE 1/3
Our PDE at the point (i , j) in the computational space looks:(%U
J
)ξi,j
+
(%V
J
)ηi,j
= 0
where:U = aφξ + bφη, V = bφξ + cφη
Since φ = ϕ+ Γ · Φ:(%U
J
)ξi,j
+
(%V
J
)ηi,j
= −
(%U
J
)ξi,j
−
(%V
J
)ηi,j
= Γ·%i ,j ·f (ξ, η)i ,j
where now:
U = aϕξ + bϕη, V = bϕξ + cϕη
Approximation of the PDE 2/3
Approximating the former equation with the finite differences wehave:(%U
J
)i+1/2,j
−(%U
J
)i−1/2,j
+
(%V
J
)i ,j+1/2
−(%V
J
)i ,j−1/2
= Γ·%i ,j ·fi ,j
where:
Ui+1/2,j ≈ ai+1/2,j(ϕi+1,j − ϕi ,j) +
+bi+1/2,jϕi+1,j+1 + ϕi ,j+1 − ϕi+1,j−1 − ϕi ,j−1
4Ui−1/2,j ≈ ai−1/2,j(ϕi ,j − ϕi−1,j) +
+bi−1/2,jϕi−1,j+1 + ϕi ,j+1 − ϕi−1,j−1 − ϕi ,j−1
4
Approximation of the PDE 2/3
Approximating the former equation with the finite differences wehave:(%U
J
)i+1/2,j
−(%U
J
)i−1/2,j
+
(%V
J
)i ,j+1/2
−(%V
J
)i ,j−1/2
= Γ·%i ,j ·fi ,j
where:
Ui+1/2,j ≈ ai+1/2,j(ϕi+1,j − ϕi ,j) +
+bi+1/2,jϕi+1,j+1 + ϕi ,j+1 − ϕi+1,j−1 − ϕi ,j−1
4Ui−1/2,j ≈ ai−1/2,j(ϕi ,j − ϕi−1,j) +
+bi−1/2,jϕi−1,j+1 + ϕi ,j+1 − ϕi−1,j−1 − ϕi ,j−1
4
Approximation of the PDE 3/3
and also:
Vi ,j+1/2 ≈ bi ,j+1/2ϕi+1,j+1 + ϕi+1,j − ϕi−1,j+1 − ϕi−1,j
4+
+ci ,j+1/2 · (ϕi ,j+1 − ϕi ,j)
Vi ,j−1/2 ≈ bi ,j−1/2ϕi+1,j−1 + ϕi+1,j − ϕi−1,j−1 − ϕi−1,j
4+
+ci ,j−1/2 · (ϕi ,j − ϕi ,j−1)
After substituting all of this approximations we get the following:
Aϕk+1i ,j = L(ϕk) ⇒ ϕk+1
i ,j =1
AL(ϕk)
where:
A =(%
Ja)
i+1/2,j+(%
Ja)
i−1/2,j+(%
Jc)
i ,j+1/2+(%
Jc)
i ,j+1/2
Approximation of the PDE 3/3
and also:
Vi ,j+1/2 ≈ bi ,j+1/2ϕi+1,j+1 + ϕi+1,j − ϕi−1,j+1 − ϕi−1,j
4+
+ci ,j+1/2 · (ϕi ,j+1 − ϕi ,j)
Vi ,j−1/2 ≈ bi ,j−1/2ϕi+1,j−1 + ϕi+1,j − ϕi−1,j−1 − ϕi−1,j
4+
+ci ,j−1/2 · (ϕi ,j − ϕi ,j−1)
After substituting all of this approximations we get the following:
Aϕk+1i ,j = L(ϕk) ⇒ ϕk+1
i ,j =1
AL(ϕk)
where:
A =(%
Ja)
i+1/2,j+(%
Ja)
i−1/2,j+(%
Jc)
i ,j+1/2+(%
Jc)
i ,j+1/2
Approximation of the PDE 3/3
and also:
Vi ,j+1/2 ≈ bi ,j+1/2ϕi+1,j+1 + ϕi+1,j − ϕi−1,j+1 − ϕi−1,j
4+
+ci ,j+1/2 · (ϕi ,j+1 − ϕi ,j)
Vi ,j−1/2 ≈ bi ,j−1/2ϕi+1,j−1 + ϕi+1,j − ϕi−1,j−1 − ϕi−1,j
4+
+ci ,j−1/2 · (ϕi ,j − ϕi ,j−1)
After substituting all of this approximations we get the following:
Aϕk+1i ,j = L(ϕk) ⇒ ϕk+1
i ,j =1
AL(ϕk)
where:
A =(%
Ja)
i+1/2,j+(%
Ja)
i−1/2,j+(%
Jc)
i ,j+1/2+(%
Jc)
i ,j+1/2
Solution procedure 1/3
Subtract from both side of the equation:
ϕk+1i ,j =
1
AL(ϕk)
ϕki ,j , we will get the correction from iteration k to the iteration
k + 1
∆ϕki ,j = ϕk+1
i ,j − ϕki ,j = −ϕk
i ,j +LA
(ϕk)
let us now magnify the correction ω times:
ϕk+1i ,j = ϕk
i ,j + ω∆ϕki ,j = (1− ω)ϕk
i ,j +ω
AL(ϕk)
we got so called SOR procedure
Solution procedure 1/3
Subtract from both side of the equation:
ϕk+1i ,j =
1
AL(ϕk)
ϕki ,j , we will get the correction from iteration k to the iteration
k + 1
∆ϕki ,j = ϕk+1
i ,j − ϕki ,j = −ϕk
i ,j +LA
(ϕk)
let us now magnify the correction ω times:
ϕk+1i ,j = ϕk
i ,j + ω∆ϕki ,j = (1− ω)ϕk
i ,j +ω
AL(ϕk)
we got so called SOR procedure
Solution procedure 1/3
Subtract from both side of the equation:
ϕk+1i ,j =
1
AL(ϕk)
ϕki ,j , we will get the correction from iteration k to the iteration
k + 1
∆ϕki ,j = ϕk+1
i ,j − ϕki ,j = −ϕk
i ,j +LA
(ϕk)
let us now magnify the correction ω times:
ϕk+1i ,j = ϕk
i ,j + ω∆ϕki ,j = (1− ω)ϕk
i ,j +ω
AL(ϕk)
we got so called SOR procedure
Solution procedure 1/3
Subtract from both side of the equation:
ϕk+1i ,j =
1
AL(ϕk)
ϕki ,j , we will get the correction from iteration k to the iteration
k + 1
∆ϕki ,j = ϕk+1
i ,j − ϕki ,j = −ϕk
i ,j +LA
(ϕk)
let us now magnify the correction ω times:
ϕk+1i ,j = ϕk
i ,j + ω∆ϕki ,j = (1− ω)ϕk
i ,j +ω
AL(ϕk)
we got so called SOR procedure
Solution procedure 2/3
At the coordinate line j = 1 we do not have values correspondingto the j − 1, so
I On the cut use the fact that the points on the other side ofthe computational space are below (above) the current point
I On the airfoil we need to use one sided approximation:
∂(ϕ+ Γ · Φ)
∂n= 0, ⇒ ∂ϕ
∂n= −Γ · ∂Φ
∂n= Γ · γ(x , y)
where
Φ =1
2πarctan
y
x
Circulation is determined from
Γk+1 = Γk + δ(V∗ − V ∗)
Solution procedure 2/3
At the coordinate line j = 1 we do not have values correspondingto the j − 1, so
I On the cut use the fact that the points on the other side ofthe computational space are below (above) the current point
I On the airfoil we need to use one sided approximation:
∂(ϕ+ Γ · Φ)
∂n= 0, ⇒ ∂ϕ
∂n= −Γ · ∂Φ
∂n= Γ · γ(x , y)
where
Φ =1
2πarctan
y
x
Circulation is determined from
Γk+1 = Γk + δ(V∗ − V ∗)
Solution procedure 2/3
At the coordinate line j = 1 we do not have values correspondingto the j − 1, so
I On the cut use the fact that the points on the other side ofthe computational space are below (above) the current point
I On the airfoil we need to use one sided approximation:
∂(ϕ+ Γ · Φ)
∂n= 0, ⇒ ∂ϕ
∂n= −Γ · ∂Φ
∂n= Γ · γ(x , y)
where
Φ =1
2πarctan
y
x
Circulation is determined from
Γk+1 = Γk + δ(V∗ − V ∗)
Solution procedure 2/3
At the coordinate line j = 1 we do not have values correspondingto the j − 1, so
I On the cut use the fact that the points on the other side ofthe computational space are below (above) the current point
I On the airfoil we need to use one sided approximation:
∂(ϕ+ Γ · Φ)
∂n= 0, ⇒ ∂ϕ
∂n= −Γ · ∂Φ
∂n= Γ · γ(x , y)
where
Φ =1
2πarctan
y
x
Circulation is determined from
Γk+1 = Γk + δ(V∗ − V ∗)
Solution procedure 2/3
At the coordinate line j = 1 we do not have values correspondingto the j − 1, so
I On the cut use the fact that the points on the other side ofthe computational space are below (above) the current point
I On the airfoil we need to use one sided approximation:
∂(ϕ+ Γ · Φ)
∂n= 0, ⇒ ∂ϕ
∂n= −Γ · ∂Φ
∂n= Γ · γ(x , y)
where
Φ =1
2πarctan
y
x
Circulation is determined from
Γk+1 = Γk + δ(V∗ − V ∗)
Solution procedure 3/3
In the computational space normal derivative looks:
∂ϕ
∂n=
1√c
(bϕξ + cϕη) = Γ · γ(x , y)
On the airfoil
bi ,1ϕi+1,1 − ϕi−1,1
2+ci ,1
−3ϕi ,1 + 4ϕi ,2 − ϕi ,3
4= Γ·√ci ,j ·γ(xi ,1, yi ,1)
From the equation above we can express ϕi ,1 in order to obtainnew guess for the value of the velocity potential at the airfoilsurface!
Solution procedure 3/3
In the computational space normal derivative looks:
∂ϕ
∂n=
1√c
(bϕξ + cϕη) = Γ · γ(x , y)
On the airfoil
bi ,1ϕi+1,1 − ϕi−1,1
2+ci ,1
−3ϕi ,1 + 4ϕi ,2 − ϕi ,3
4= Γ·√ci ,j ·γ(xi ,1, yi ,1)
From the equation above we can express ϕi ,1 in order to obtainnew guess for the value of the velocity potential at the airfoilsurface!
Solution procedure 3/3
In the computational space normal derivative looks:
∂ϕ
∂n=
1√c
(bϕξ + cϕη) = Γ · γ(x , y)
On the airfoil
bi ,1ϕi+1,1 − ϕi−1,1
2+ci ,1
−3ϕi ,1 + 4ϕi ,2 − ϕi ,3
4= Γ·√ci ,j ·γ(xi ,1, yi ,1)
From the equation above we can express ϕi ,1 in order to obtainnew guess for the value of the velocity potential at the airfoilsurface!
Typical Result
Example 2, Problem Statement
Nondimensional form of 2D N-S Equations look:
∂Ω
∂t+ u
∂Ω
∂x+ v
∂Ω
∂y=
1
Re∞
(∂2Ω
∂x2+∂2Ω
∂y2
)∂2ψ
∂x2+∂2ψ
∂y2= −Ω, u =
∂ψ
∂y, v = −∂ψ
∂x
u, v are x- and y -component of the velocity; Ω = ∇× ~V isvorticity, ψ - stream function,t - time, and
Re∞ =uoL
ν, Ω =
ΩL
uo, ψ =
ψ
uoL
t = t · uo
L, x =
x
L, y =
y
L
Boundary Conditions
Along boundary ABCDψ =const., and derivatives ofthe ψ along boundary are zero.
Along AB:
ψ = 0
Ωi ,1 = −∂2ψ
∂x2− ∂2ψ
∂y2= −∂
2ψ
∂y2
u =∂ψ
∂y= 0, v = −∂ψ
∂x= 0
Along BC
ψ = 0
Ω(I , j) = −∂2ψ
∂x2
u =∂ψ
∂y= 0, v = −∂ψ
∂x= 0
Boundary Conditions
Along boundary ABCDψ =const., and derivatives ofthe ψ along boundary are zero.
Along AB:
ψ = 0
Ωi ,1 = −∂2ψ
∂x2− ∂2ψ
∂y2= −∂
2ψ
∂y2
u =∂ψ
∂y= 0, v = −∂ψ
∂x= 0
Along BC
ψ = 0
Ω(I , j) = −∂2ψ
∂x2
u =∂ψ
∂y= 0, v = −∂ψ
∂x= 0
Boundary Conditions
Along boundary ABCDψ =const., and derivatives ofthe ψ along boundary are zero.
Along AB:
ψ = 0
Ωi ,1 = −∂2ψ
∂x2− ∂2ψ
∂y2= −∂
2ψ
∂y2
u =∂ψ
∂y= 0, v = −∂ψ
∂x= 0
Along BC
ψ = 0
Ω(I , j) = −∂2ψ
∂x2
u =∂ψ
∂y= 0, v = −∂ψ
∂x= 0
Boundary Conditions Continued
Along CDψ = 0
Ωi ,J = −∂2ψ
∂y2
u =∂ψ
∂y= uo , v = −∂ψ
∂x= 0
Along DAψ = 0
Ω(1, j) = −∂2ψ
∂x2
u =∂ψ
∂y= 0, v = −∂ψ
∂x= 0
Boundary Conditions Continued
Along CDψ = 0
Ωi ,J = −∂2ψ
∂y2
u =∂ψ
∂y= uo , v = −∂ψ
∂x= 0
Along DAψ = 0
Ω(1, j) = −∂2ψ
∂x2
u =∂ψ
∂y= 0, v = −∂ψ
∂x= 0
Approximation of PDEs
Ωn+1i ,j − Ωn
i ,j
∆t+ un
i ,j
Ωni+1,j − Ωn
i−1,j
2∆x+ vn
i ,j
Ωni ,j+1 − Ωn
i ,j−1
2∆y=
=1
Re∞
[Ωn
i+1,j − 2Ωni ,j + Ωn
i−1,j
(∆x)2+
Ωni ,j+1 − 2Ωn
i ,j + Ωni ,j−1
(∆y)2
]
ψk+1i ,j =
(∆x)2Ωki ,j + ψk
i+1,j + ψki−1,j + β2
(ψk
i ,j+1 + ψki ,j−1
)2(1 + β2)
ψk+1i ,j = ωψk
i ,j + (1− ω)ψk+1i ,j
β =∆x
∆y, ui ,j =
ψi ,j+1 − ψi ,j−1
2∆y, vi ,j = −
ψi+1,j − ψi−1,j
2∆x
Approximation of PDEs
Ωn+1i ,j − Ωn
i ,j
∆t+ un
i ,j
Ωni+1,j − Ωn
i−1,j
2∆x+ vn
i ,j
Ωni ,j+1 − Ωn
i ,j−1
2∆y=
=1
Re∞
[Ωn
i+1,j − 2Ωni ,j + Ωn
i−1,j
(∆x)2+
Ωni ,j+1 − 2Ωn
i ,j + Ωni ,j−1
(∆y)2
]
ψk+1i ,j =
(∆x)2Ωki ,j + ψk
i+1,j + ψki−1,j + β2
(ψk
i ,j+1 + ψki ,j−1
)2(1 + β2)
ψk+1i ,j = ωψk
i ,j + (1− ω)ψk+1i ,j
β =∆x
∆y, ui ,j =
ψi ,j+1 − ψi ,j−1
2∆y, vi ,j = −
ψi+1,j − ψi−1,j
2∆x
Approximation of BCs
Along ABψi ,1 = 0
Taylor expansion gives
ψi ,2 = ψi ,1 +∂ψ
∂y
∣∣∣∣i ,1
∆y︸ ︷︷ ︸v=0
+∂2ψ
∂y2
∣∣∣∣i ,1
(∆y)2
2︸ ︷︷ ︸−Ωi,1
+ . . .
Ωi ,1 = 2 ·ψi ,1 − ψi ,2
(∆y)2= −2 ·
ψi ,2
(∆y)2
Similarly along BC and AD!
Approximation of BCs
Along ABψi ,1 = 0
Taylor expansion gives
ψi ,2 = ψi ,1 +∂ψ
∂y
∣∣∣∣i ,1
∆y︸ ︷︷ ︸v=0
+∂2ψ
∂y2
∣∣∣∣i ,1
(∆y)2
2︸ ︷︷ ︸−Ωi,1
+ . . .
Ωi ,1 = 2 ·ψi ,1 − ψi ,2
(∆y)2= −2 ·
ψi ,2
(∆y)2
Similarly along BC and AD!
Approximation of BCs Continued
Along BCψ(I , j) = 0
ΩI ,j = −2 ·ψI−1,j
(∆x)2
Along ADψ(1, j) = 0
Ω1,j = −2 ·ψ2,j
(∆x)2
Approximation of BCs Continued
Along BCψ(I , j) = 0
ΩI ,j = −2 ·ψI−1,j
(∆x)2
Along ADψ(1, j) = 0
Ω1,j = −2 ·ψ2,j
(∆x)2
Approximation of BCs Continued
Along CD we have to take into account that
u =∂ψ
∂y= uo
Taylor expansion:
ψJ−1,i = ψJ,i +∂ψ
∂y
∣∣∣∣J,i︸ ︷︷ ︸
uo
(−∆y) +∂2ψ
∂y2
∣∣∣∣J,i︸ ︷︷ ︸
−ΩJ,i
(∆y)2
2
from where:
ΩJ,i = −2ψJ−1,i
(∆y)2− 2 · uo
∆y
Approximation of BCs Continued
Along CD we have to take into account that
u =∂ψ
∂y= uo
Taylor expansion:
ψJ−1,i = ψJ,i +∂ψ
∂y
∣∣∣∣J,i︸ ︷︷ ︸
uo
(−∆y) +∂2ψ
∂y2
∣∣∣∣J,i︸ ︷︷ ︸
−ΩJ,i
(∆y)2
2
from where:
ΩJ,i = −2ψJ−1,i
(∆y)2− 2 · uo
∆y
Computational Procedure
1. Initialize all variables corresponding to t = 0
2. Calculate velocities inside the cavity
ui ,j =ψi ,j+1 − ψi ,j−1
2∆y
vi ,j =ψi−1,j − ψi+1,j
2∆x
3. Calculate vorticity over cavity:
Ωi ,j =vi+1,j − vi−1,j
2∆x−
ui ,j+1 − ui ,j−1
2∆y
Computational Procedure
1. Initialize all variables corresponding to t = 0
2. Calculate velocities inside the cavity
ui ,j =ψi ,j+1 − ψi ,j−1
2∆y
vi ,j =ψi−1,j − ψi+1,j
2∆x
3. Calculate vorticity over cavity:
Ωi ,j =vi+1,j − vi−1,j
2∆x−
ui ,j+1 − ui ,j−1
2∆y
Computational Procedure
1. Initialize all variables corresponding to t = 0
2. Calculate velocities inside the cavity
ui ,j =ψi ,j+1 − ψi ,j−1
2∆y
vi ,j =ψi−1,j − ψi+1,j
2∆x
3. Calculate vorticity over cavity:
Ωi ,j =vi+1,j − vi−1,j
2∆x−
ui ,j+1 − ui ,j−1
2∆y
Computational Procedure Continued
4. Calculate vorticities
Ωn+1i ,j − Ωn
i ,j
∆t+ un
i ,j
Ωni+1,j − Ωn
i−1,j
2∆x+ vn
i ,j
Ωni ,j+1 − Ωn
i ,j−1
2∆y=
=1
Re∞
[Ωn
i+1,j − 2Ωni ,j + Ωn
i−1,j
(∆x)2+
Ωni ,j+1 − 2Ωn
i ,j + Ωni ,j−1
(∆y)2
]5. Solve Poison’s equation
ψk+1i ,j =
(∆x)2Ωki ,j + ψk
i+1,j + ψki−1,j + β2
(ψk
i ,j+1 + ψki ,j−1
)2(1 + β2)
ψk+1i ,j = ωψk
i ,j + (1− ω)ψk+1i ,j
β =∆x
∆y, ui ,j =
ψi ,j+1 − ψi ,j−1
2∆y, vi ,j = −
ψi+1,j − ψi−1,j
2∆x
Computational Procedure Continued
4. Calculate vorticities
Ωn+1i ,j − Ωn
i ,j
∆t+ un
i ,j
Ωni+1,j − Ωn
i−1,j
2∆x+ vn
i ,j
Ωni ,j+1 − Ωn
i ,j−1
2∆y=
=1
Re∞
[Ωn
i+1,j − 2Ωni ,j + Ωn
i−1,j
(∆x)2+
Ωni ,j+1 − 2Ωn
i ,j + Ωni ,j−1
(∆y)2
]5. Solve Poison’s equation
ψk+1i ,j =
(∆x)2Ωki ,j + ψk
i+1,j + ψki−1,j + β2
(ψk
i ,j+1 + ψki ,j−1
)2(1 + β2)
ψk+1i ,j = ωψk
i ,j + (1− ω)ψk+1i ,j
β =∆x
∆y, ui ,j =
ψi ,j+1 − ψi ,j−1
2∆y, vi ,j = −
ψi+1,j − ψi−1,j
2∆x
Computational Procedure Continued
6. Update values of vorticity at the boundaries
Ωi ,1 = −2 ·ψi ,2
(∆y)2, ΩI ,j = −2 ·
ψI−1,j
(∆x)2
Ω1,j = −2 ·ψ2,j
(∆x)2, ΩJ,i = −2
ψJ−1,i
(∆y)2− 2 · uo
∆y
7. Calculate velocities
un+1i ,j =
ψn+1i ,j+1 − ψn+1
i ,j−1
2∆y
vn+1i ,j =
ψn+1i−1,j − ψn+1
i+1,j
2∆x
8. Check convergence
||un+1 − un|| < εu, ||vn+1 − vn|| < εv
Computational Procedure Continued
6. Update values of vorticity at the boundaries
Ωi ,1 = −2 ·ψi ,2
(∆y)2, ΩI ,j = −2 ·
ψI−1,j
(∆x)2
Ω1,j = −2 ·ψ2,j
(∆x)2, ΩJ,i = −2
ψJ−1,i
(∆y)2− 2 · uo
∆y
7. Calculate velocities
un+1i ,j =
ψn+1i ,j+1 − ψn+1
i ,j−1
2∆y
vn+1i ,j =
ψn+1i−1,j − ψn+1
i+1,j
2∆x
8. Check convergence
||un+1 − un|| < εu, ||vn+1 − vn|| < εv
Computational Procedure Continued
6. Update values of vorticity at the boundaries
Ωi ,1 = −2 ·ψi ,2
(∆y)2, ΩI ,j = −2 ·
ψI−1,j
(∆x)2
Ω1,j = −2 ·ψ2,j
(∆x)2, ΩJ,i = −2
ψJ−1,i
(∆y)2− 2 · uo
∆y
7. Calculate velocities
un+1i ,j =
ψn+1i ,j+1 − ψn+1
i ,j−1
2∆y
vn+1i ,j =
ψn+1i−1,j − ψn+1
i+1,j
2∆x
8. Check convergence
||un+1 − un|| < εu, ||vn+1 − vn|| < εv
ResultsContour plot ψ = cosnt, I = 41, J = 31, ν = 0.0025 m2/s.uo = 5m/s
Results
Results
Results
Results