Discretized constitutive equation White Metzner

advertisement
• Žitný BC project for Glasgow
students 2015 (frozen since
September 2015)
RZ10
Metzner White
convergent/divergent
Gauss planar channel flow
GAČR = kolagen
Motto: It is a big mistake for teachers that they do not
ask students about their dreams and ideas before
creative genes of pure-minded students came under
the tutelage of tutors. And an even bigger mistake is
when the students afraid to talk about their crazy
ideas.
1
History of project
The idea, how to determine the relaxation time of viscoelastic fluid by comparing the
pressure drop at elongation and compression flows in a converging/diverging slot, think
about everyone after reading the first book about rheology. The problem is in a technical
realization of viscoelastic stresses measurement along a channel with a variable cross
section: Possible solution was to use the concept of groove strain-gauge sensors for
measuring the axial pressure profile in the annular gap of existing extrusion rheometer
(the development of these sensors was implemented from the beginning of the
seventies). The first practical experiments (convergent/divergent gap between the
cylindrical tube with attached sensors and internal double-cone pin) were up in the early
nineties. Relevant results were summarized in Pavlovec thesis (theoretical solution
assuming the analytic velocity profiles corresponding to a power fluid flow and numerical
solutions of viscoelastic fluid type Metzner White) and in thesis by Zeleny (experiment
with collagen and a double-cone pin - certain differences in pressure losses in the
convergent/divergent slit were recorded). Mr. Pavlovec was an excellent student, but its
thesis has not been completed (Fortran programs did not converged and the result was
reduced to extremely simplified 1D analysis). The problem is simply too complicated for
single student without sufficient background.
And that is the true goal of this presentation: to prepare a groundwork for english
speaking students from Glasgow.
2
History of project
Previous presentation RZ8 was almost duplicated thesis of Pavlovec, programmed in MATLAB with certain
exemptions in differencing (but basic simplification consisting in using the power law velocity profile, was
preserved). Although solutions converge, the results raise some doubts, especially the occurrence of strange
peaks of calculated pressures in the axis of the channel and also the unexpected effect of elasticity: Pressure
loss in the convergent section was lower than in the divergent section (see following sheet No. 13). Independent
solutions and programming performed by student (Mr. Frouz) reportedly received identical results (presented at
the Students Conference). Still, I'd be very happy if he could express his findings in the form of diagrams on a
slide 13, so that a consensus was evident.
The following diagram is a visualization of what's happening with a loaded fiber. According to this concept
the normal stress on the wall should be lower than during the stretching of the fiber during its compression.
But it is at odds with the results of the model (see sheet 7).
Stretched fiber
Compressed fiber
Equilibrium fiber
This visualization is perhaps misleading (it say that the normal stress in the zone of elongation is less than in the
compression zone), because the de-facto ignores the influence of time. I will be grateful to anyone who offers a
better interpretation of what was really going on polymer fibers.
3
History of project
discussion of simplifying assumptions (assumed velocity profile not affected by elastic forces)
RZ8 model assuming linear cross-sectional profile of convergent/divergent slots along with the assumption of a
power law velocity profile actually result to a discontinuity of elongation rate (positive constant rate of elongation in
the convergent zone while a constant negative rate in the divergent zone). The discontinuity and weak singularity at
the transition may cause unrealistic peak pressures and inaccuracies axial profile of normal stresses.
These fundamental shortcomings could be eliminated using the model described in this presentation. The axial
cross-sectional profile channel (and therefore the rate of elongation) is a smooth function (Gaussian curve), and the
velocity field is calculated (based on the concept of the current function and vorticity). Technically speaking, the
manufacture of the walls with the Gaussian profile should be no problem (using rapid prototyping - the geometry of
the channel varies exchanging inserts, which must anyway be of non-conductive plastic which is then glued strips
electrodes). The disadvantage is the computational complexity of relationships and the possibility of an error
(because in this presentation are reported in respect of each field checked Kontroloval:
....
xxxxx ..).
Solution flow of viscoelastic fluid in a convergent / divergent slot can also be simulated by existing commercial
software (Polyflow ANSYS) and OpenFOAM. These project can be alternatively solved by other Glasgow
students. The ideal would be a comparison of approaches - it is a matter of debate.
4
Literature
Crochet M.J., Davies A.R., Walters K.: Numerical simulation of non-Newtonian flow.
Elsevier 1984
Pavlovec J.: Výtlačný reometr pro viskoelastické kapaliny. Dipl.práce, ČVUT FS, 1991
Anderson J.D.: Computational Fluid Dynamics. McGraw Hill, Inc., N.Y., 1995
Owens R.G., Phillips T.N.: Computational Rheology. Imperial College Press, London
2002
Additional papers
Davidson et al. Velocity and stress fields of polymeric liquids flowing in a periodically constricted channel. J. Non-Newtonian Fluid
Mech. 49 (1993)
Baird D.G. First normal stress difference measurements…., J. Non-Newtonian Fluid Mech. 148 (2008)
Baaijens F. Mixed FEM for viscoelastic flow analysis, a review. J. Non-Newtonian Fluid Mech. 79 (1998)
James D.F., Chandler G.M.,Armour S.J. : A converging channel rheometer for the measurement of extensional viscosity. Elsevier
1998 (mam jen papirovou kopii bez bibl.udaju)
James D.F., Chandler G.M., Armour S.J. : Measurement of the extensional viscosity of M1 in a converging channel rheometer. J.
Non-Newtonian Fluid Mech. 35 (1990)
Han Chang Dae: Measurement of the rheological properties of polymer melts with slit rheometer I.Homopolymer systems. J.Applied
Polymer Science, 15 (1971)
Davies J.M. et al: Theory for normal stresses in slits and capillaries. J. Phys. D. : Appl.Phys, Vol.6 (1973), 2259-2266
Cogswell F.N. Converging flow of polymer melts in extrusion dies. Polymer Engngr. and Sci. (1972)
Cogswell F.N. Converging flow and stretching flow a compilation. J. Non-Newtonian Fluid Mech. Vol.4 (1978), 23-38
Binding D.M. An approximate analysis for contraction and converging flows. J. Non-Newtonian Fluid Mech. Vol.27 (1988), 173-189
5
Diploma work J.Pavlovec: Výtlačný reometr pro viskoelastické kapaliny. 1991
Only INFO old presentation RZ8 (skip)
Adviser R.Žitný, oponent M.Houška
Convergent section with
positive elongation
Divergent section
compression of fibers
Constitutive model UCM (upper convective Maxwell) modification White-Metzner
𝜇 𝐼𝐼
𝜏𝑖𝑗 +
𝐺
𝜕𝜏𝑖𝑗 𝜕𝑢𝑖
𝜕𝑢𝑗
𝑢𝑘
−
𝜏 −
𝜏
= 𝜇 𝐼𝐼
𝜕𝑥𝑘 𝜕𝑥𝑘 𝑘𝑗 𝜕𝑥𝑘 𝑖𝑘
Relaxation
time
𝜕𝑢𝑖 𝜕𝑢𝑗
+
𝜕𝑥𝑗 𝜕𝑥𝑖
Viscosity
6
Vague idea of Maxwellian model (maxwell.xlsx)
Vague because it does not specify the nature of the stress  (imagine that it
is for example an elongation stress in the direction of flow). The model
considers a linear change in velocity u and strain rate  along a channel.
𝜏 + 𝜆 𝑢0 + Δ𝑢 ∙ 𝑥
u0
du
g0
dg
sig0
lam
dx
mju
1
0.1
1
0.2
10
0.005
0.01
10
𝑑𝜏
= 𝜇 𝛾0 + Δ𝛾 ∙ 𝑥
𝑑𝑥
𝜆=
𝜇
𝐺
Only INFO old presentation RZ8 (skip)
relaxation time [s]
Particular solution
𝜇
𝜏𝑃 =
𝛾 + 𝜆 𝛾0 Δ𝑢 − 𝑢0 Δ𝛾 + Δ𝛾𝑥
1 + 𝜆∆𝑢 0
General solution
𝜇
1
𝑢0
𝜏=
𝛾 + 𝜆 𝛾0 Δ𝑢 − 𝑢0 Δ𝛾 + Δ𝛾𝑥 + 𝑐 ∙ 𝑒𝑥𝑝 −
ln(𝑥 + )
1 + 𝜆∆𝑢 0
𝜆∆𝑢
∆𝑢

5
Effect of relaxation time  increase to axial stress
profile  (, 2, 5)
Weissenberg number (elasticity number) 𝑊 =
= relaxation time * rate of deformation
7
 𝑢
=
 𝐺ℎ
Pavlovec : dimensionless parameters
Transformation into an orthogonal coordinate system
Kontroloval:FROUZ
Frouz
Kontroloval
Only INFO old presentation RZ8 (skip)
H
H
LI
L
L
LI
L
L
x
𝑥 − 𝑥0
=
∆𝐿
𝑦
𝑦
𝑦
𝜂=
=
=
𝑥−𝑥
ℎ(𝑥) 𝐻0 1 + 𝛽
𝐻0 1 + 𝛽 ∆𝐿 0
Inlet section
𝑥0 = 0, ∆𝐿 = 𝐿𝐼
𝛽 = 0, 𝐻0 = 𝐻
Convergent section
𝑥0 = 𝐿𝐼 , ∆𝐿 = 𝐿
∆𝐻
𝛽=−
,𝐻 = 𝐻
𝐻0 0
Transformation of derivatives
𝜕𝐹 𝜕𝐹 𝜕 𝜕𝐹 𝜕
1 𝜕𝐹
 𝜕𝐹
=
+
=
−
𝜕𝑥 𝜕 𝜕𝑥 𝜕 𝜕𝑥 𝐿 𝜕
1 +  𝜕
Divergent section
𝑥0 = 𝐿 + 𝐿𝐼 , ∆𝐿 = 𝐿
∆𝐻
𝛽=
, 𝐻 = 𝐻 − ∆𝐻
𝐻0 0
𝜕𝐹 𝜕𝐹 𝜕 𝜕𝐹 𝜕
1
𝜕𝐹
1
𝜕𝐹
=
+
=
=
𝜕𝑦 𝜕 𝜕𝑦 𝜕 𝜕𝑦 𝐻0 1 +  𝜕 𝐿 1 +  𝜕
8
Power law approximation of velocities
Kontroloval FROUZ
Only INFO old presentation RZ8 (skip)
Axial velocity
𝑢𝑚
𝑢𝑥 =
(1 − 1 − 2𝜂
1 + 𝛽𝜉
𝑢𝑚
𝑢𝑥 =
1 − 2𝜂 − 1
1 + 𝛽𝜉
𝑢𝑚 =
𝑛+1
𝑛 ), 0.5
𝑛+1
𝑛
,  > 0.5
𝑉 2𝑛 + 1
𝐻0 𝑛 + 1
Transversal component (satisfying continuity equation
𝜀𝛽𝑢𝑚
𝑢𝑦 =
𝜂(1 − 1 − 2𝜂
1 + 𝛽𝜉
𝜀𝛽𝑢𝑚
𝑢𝑦 =
𝜂(1 − 2𝜂 − 1
1 + 𝛽𝜉
𝜀=
𝜕𝑢𝑥 𝜕𝑢𝑦
+
= 0)
𝜕𝑥
𝜕𝑦
𝑛+1
𝑛 ), 0.5
𝑛+1
𝑛 ), 
> 0.5
𝐻0
∆𝐿
9
Power law approximation of viscosity
Kontroloval FROUZ
Only INFO old presentation RZ8 (skip)
Viscosity as a power function of the second invariant
𝜇 𝐼𝐼 = 𝐾
𝜕𝑢𝑥
2
𝜕𝑥
2
𝜕𝑢𝑦
+2
𝜕𝑦
2
𝜕𝑢𝑥 𝜕𝑢𝑦
+
+
𝜕𝑦
𝜕𝑥
2
𝑛−1
Rate of deformation in the dimensionless coordinates (0,1), (0,1)
𝜕𝑢𝑥
1 𝜕𝑢𝑥
 𝜕𝑢𝑥
=
−
𝜕𝑥
𝐿 𝜕
1 +  𝜕
𝜕𝑢𝑥
1
𝜕𝑢𝑥
=
𝜕𝑦
𝐿 1 +  𝜕
𝜕𝑢𝑦
1 𝜕𝑢𝑦
 𝜕𝑢𝑦
=
−
𝜕𝑥
𝐿 𝜕
1 +  𝜕
𝜕𝑢𝑦
𝜕𝑢𝑦
1
=
𝜕𝑦
𝐿 1 +  𝜕
10
Constitutive equation White Metzner
𝑥𝑥 = −𝑝 + 𝑥𝑥
𝑦𝑦 = −𝑝 + 𝑦𝑦
𝑥𝑦 = 𝑥𝑦
𝜏𝑥𝑥 +
𝜇 𝐼𝐼
𝐺
𝜇 𝐼𝐼
𝜏𝑦𝑦 +
𝐺
𝜏𝑥𝑦 +
𝜇 𝐼𝐼
𝐺
𝑢𝑥
Kontroloval FROUZ
Only INFO old presentation RZ8 (skip)
An important conclusion: the lower flat plate is yy = 0, which
means that the pressure sensor measures the isotropic pressure p
𝜕𝜏𝑥𝑥
𝜕𝜏𝑥𝑥
𝜕𝑢𝑥
𝜕𝑢𝑥
𝜕𝑢𝑥
+ 𝑢𝑦
−2
𝜏𝑥𝑥 − 2
𝜏𝑥𝑦 = 2𝜇 𝐼𝐼
𝜕𝑥
𝜕𝑦
𝜕𝑥
𝜕𝑦
𝜕𝑥
𝜕𝜏𝑦𝑦
𝜕𝜏𝑦𝑦
𝜕𝑢𝑦
𝜕𝑢𝑦
𝜕𝑢𝑦
𝑢𝑥
+ 𝑢𝑦
−2
𝜏 −2
𝜏
= 2𝜇 𝐼𝐼
𝜕𝑥
𝜕𝑦
𝜕𝑥 𝑥𝑦
𝜕𝑦 𝑦𝑦
𝜕𝑦
𝑢𝑥
𝜕𝜏𝑥𝑦
𝜕𝜏𝑥𝑦 𝜕𝑢𝑦
𝜕𝑢𝑥
+ 𝑢𝑦
−
𝜏𝑥𝑥 −
𝜏
= 𝜇 𝐼𝐼
𝜕𝑥
𝜕𝑦
𝜕𝑥
𝜕𝑦 𝑦𝑦
𝜕𝑢𝑥 𝜕𝑢𝑦
+
𝜕𝑦
𝜕𝑥
11
Pressure distribution by integration Cauchy equations from left. Results
7
0
G=150
x 10
diff=-0.16817 Vdot=0.000375
white-metzner
figure(1)
Only%main
INFO
old presentation
RZ8 (skip)
clear
all;
plot(x(1:ig2),pp(1:ig2))
% white metzner - velocities
% rychlosti ux(1:nx,1:ny),uy(1:nx,1:ny),
% derivace duxdksi(1:nx,1:ny), duxdeta(1:nx,1:ny), duydksi(1:nx,1:ny),
duydeta(1:nx,1:ny)
% duxdx(1:nx,1:ny), duxdy(1:nx,1:ny), duydy(1:nx,1:ny), duydx(1:nx,1:ny)
% viskozity mju(1:nx,1:ny)
% beta, dl, h0, n, vdot, K G koeficient konzistence a modul G
-0.5
-1
p [Pa]
-1.5
-2
-2.5
-3
-3.5
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
x [m]
PRESSURE
160
140
120
x
100
80
60
40
20
Peek pressure on the axis of the channel is about an
approximation error
5
10
15
20
y
25
30
K=100;
n=0.5;
nx=59;
ny=37;
dl=0.2;
h=0.005;
h0=h;
dh=0.004;
um=0.1;
vdot=um*h0*(n+1)/(2*n+1)
G=5000
beta=0;
uxy;
for i=1:nx
pp(i)=pav(i);
x(i)=(i-1)*dl/(nx-1);
end
beta=-dh/h0;
uxy;
ig=nx;
ig0=ig;
for i=2:nx
ig=ig+1;
pp(ig)=pav(i);
x(ig)=(ig-1)*dl/(nx-1);
end
ig1=ig;
h0=h-dh;
beta=dh/h0;
uxy;
for i=2:nx
ig=ig+1;
pp(ig)=pav(i);
x(ig)=(ig-1)*dl/(nx-1);
end
ig2=ig;
hold on
plot(x(ig0),pp(ig0),'ro')
plot(x(ig1),pp(ig1),'ro')
plot(x(ig2),pp(ig2),'ro')
d1=pp(ig0)-pp(ig1);
d2=pp(ig1)-pp(ig2);
drel=(d1-d2)/max(abs(d1),abs(d2));
disp(sprintf('dp conv=%0.5g dp div=%0.5g
dif=%0.5g',d1,d2,drel));
title(sprintf('G=%0.5g diff=%0.5g Vdot=%0.3g',G,drel,vdot))
xlabel('x [m]')
ylabel('p [Pa]')
12
Axial pressure profiles p(x)
7
0
G=110
x 10
7
diff=-0.246 Vdot=0.000375
0
-0.5
𝑊=
(n=0.5, K=100, V=0.000375 m2/s)
G=150
x 10
7
diff=-0.16817 Vdot=0.000375
0
-0.5
-0.5
G=200
x 10
𝐾𝑢 2000
=
𝐺ℎ
𝐺
diff=-0.11166 Vdot=0.000375
Commented presentation RZ8
The graphs show what happens when you grow modulus G (resp. While reducing the relaxation time). Small values
-1
-1
-1
G represent great influence elasticity (pressure gradient in the convergent gap is then smaller than the divergent)
-1.5
-1.5
-2
p [Pa]
p [Pa]
p [Pa]
-1.5
-2
-2
W=10
W=18
-2.5
-2.5
-2.5
-3
-3
-3
-3.5
0
0.1
0.2
0.3
0.4
0.5
0.6
-3.5
0.7
0
0.1
0.2
0.3
x [m]
7
0.5
0.6
7
diff=0.00025101 Vdot=0.000375
0
W=4
-1
G=1000
x 10
0
W=2
-2
-2.5
-2.5
-3
-3
0.3
0.4
x [m]
0.3
0.5
0.6
0.7
0.4
G=5000
x 10
0.5
0.6
0.7
diff=0.071136 Vdot=0.000375
W=0.4
-1
-1.5
p [Pa]
p [Pa]
-2
0.2
0.2
-0.5
-1.5
0.1
0.1
7
diff=0.03977 Vdot=0.000375
-1
-1.5
0
0
x [m]
-0.5
-0.5
-3.5
-3.5
0.7
p [Pa]
0
G=500
x 10
0.4
x [m]
-3.5
-2
G-2.5= 5000 negligible elasticity, different
pressures
are error of approximation
-3
-3.5
0
0.1
0.2
0.3
0.4
x [m]
0.5
0.6
0.7
0
0.1
0.2
0.3
0.4
x [m]
0.5
13
0.6
0.7
Stream function, vorticity, elastic stresses

𝑢=
𝜕
𝜕𝑦
𝜕
𝑣=−
𝜕𝑥

=
𝜕𝑣 𝜕𝑢
−
𝜕𝑥 𝜕𝑦
s
𝜏𝑥𝑥
𝜕𝑢
= 𝑠𝑥𝑥 + 2𝜇
𝜕𝑥
14
Stream function, vorticity, elastic stresses
Geometry
Approximate profiles u,v, ,  for power law fluid
iteration
Elastic stresses sxx, syy, sxy (hyperbolic MW)
Poisson equation for 
Nodal velocities and viscosity. BC for 
Poisson equation for 
This is rather complicated project
probably too difficult for batchelor or
even diploma work.
However it can be significantly
simplified by skiping the solution of
flow , (assuming only velocity
approximation) and neglecting
viscosity variation.
Poisson equation for pressure p
15
Gaussian axial profile of gap
The reason for choosing the smooth profile of the upper walls: the exclusion of the weak singularity at a
sharp edge between converging and diverging axial channel crossection
-3
6
x 10
5
y
Physical domain
4
3
2
1
0
x
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
Transformation of coordinates (x,y) (x,y)
and metric coefficients
0.4
𝜕 𝜕 𝜕 𝜕 2  𝜕 2 
𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑥𝜕𝑦 𝜕𝑥2

necessary for transformation of first and
second order derivatives
i,j+1
i,j
i,j-1
Computational domain

16
Gaussian axial profile of gap
Metric coefficients of first derivatives
Dimensionless geometric parameters
𝐿
𝐿
ℎ
𝐸  = exp(−2 1 −  2 )
= 𝐻𝑘
= 𝑘
=𝐻

-3
6
x 10
5
4
H
3
y
𝜕
>0
𝜕𝑥
2
1
0
0
0.05
0.1
𝜕
<0
𝜕𝑥
=1
h
x
Lk
𝜕𝜉
1
=
𝜕𝑥
𝐿𝑘
Kontroloval Zitny
0.15
=0
0.2
0.25
0.3
0.35
0.4
Ld
𝜕 2𝐸2 (1 − )(1 − 𝜅)
=
𝜕𝑥
(1 − (1 − )𝐸) 𝐿𝑘
Transformation from computational domain (0,2) (0,1)
to physical domain x(0,Lk+Ld), y(0,H)
𝑥 = 𝐿𝑘 
𝑦 = 𝐻(1 − (1 − )𝐸)
𝜕
1
=
𝜕𝑦
1 − (1 − )𝐸 𝐻

17
Gaussian axial profile of gap
Kontroloval: zitny
Metric coefficients of second derivatives
Because  depends upon x only linearly the second derivatives of  are zero
𝜕2𝜉
=0
𝜕𝑥 2
𝜕2𝜉
=0
𝜕𝑦 2
𝜕2𝜉
=0
𝜕𝑥𝜕𝑦
Only two derivatives of transversal coordinate  are nonzero
𝜕2𝜂
=0
𝜕𝑦 2
𝜕2
2𝐸𝜆2 1 − 𝜅 
= 2
(2𝜆2 1 − 𝜉
2
𝜕𝑥
𝐿𝑘 1 − 1 − 𝜅 𝐸
𝜕2
2𝐸2 (1 − )(1 − 𝜅)
=
𝜕𝑥𝜕𝑦
1 − 1 −  𝐸 2 𝐻𝐿𝑘
2
1+ 1−𝜅 𝐸
− 1)
1− 1−𝜅 𝐸
Ověřeno numerickými diferencemi




18
INIT calculation of metric coefficients
geometry
INIT
Approximate profiles u,v, , 
for power law fluid
Geometrie h, H, Lk, Ld, , Nx, Ny
iteration
Elastic stress sxx, syy, sxy
(hyperbolic MW)
ksi=linspace(0,2,nx);
eta=linspace(0,1,ny);
Poisson equation for 
Velocities, µ , BC for 
Poisson equation for 
i=1,2..Nx
J=1,2..Ny
𝑦𝑖, 𝑗 = 𝐻(1 − (1 − )𝐸)
𝜕
2𝐸2 (1 − )(1 − 𝜅)
|𝑖 , 𝑗 =
𝜕𝑥
(1 − (1 − )𝐸) 𝐿𝑘
𝜕2
| =
𝜕𝑥 2 𝑖 , 𝑗
2𝐸𝜆2 1 − 𝜅 
𝐿2𝑘 1 − 1 − 𝜅 𝐸
(2𝜆2
Poisson equation for pressure p
𝑥𝑖 = 𝐿𝑘 
𝜕
1
|𝑖 , 𝑗 =
𝜕𝑦
1 − (1 − )𝐸 𝐻
21+ 1−𝜅 𝐸
1−𝜉
− 1)
1− 1−𝜅 𝐸
𝜕2
2𝐸2 (1 − )(1 − 𝜅)
|𝑖 , 𝑗 =
𝜕𝑥𝜕𝑦
1 − 1 −  𝐸 2 𝐿𝑘 𝐻
19
INIT.m calculation of coefficients (MATLAB)
clearvars
Matrices defined at INIT
um=0.1;n=0.5;K=100;
x(nx), y(nx,ny) kartézské souřadnice
H=0.005;h=0.001;Lk=0.2;Ls=0.2;delta=0.1;
ksi(nx),eta(ny) výpočtová doména
lambda=Lk/delta;
dksidx(nx,ny),detadx(nx,ny),detady(nx,ny)
/x, /x,
kappa=h/H;
detadxdy(nx,ny),detadxdx(nx,ny)
2/xy, 2/x2,
nx=201;
gxx(nx,ny),…gx(nx,ny)
ny=41;
ksi=linspace(0,2,nx);
Matrices defined later
eta=linspace(0,1,ny);
psi(nx,ny), omega(nx,ny)
x=Lk*ksi;
u(nx,ny),v(nx,ny),dudx(nx,ny),dudy(nx,ny),dvdx(nx,ny),dvdy(nx,by)
for j=1:ny
mju(nx,ny),dmjudx(nx,ny), dmjudy(nx,ny), dmjudxdy(nx,ny), , /x, /y,
for i=1:nx
Approximation for power law fluid
E=exp(-(Lk/delta)^2*(ksi(i)-1)^2);
y(i,j)=eta(j)*H*(1-(1-kappa)*E);
psin(nx,ny), omegan(nx,ny)
end
un(nx,ny),vn(nx,ny),dudxn(nx,ny),dudyn(nx,ny),dvdxn(nx,ny),dvdyn(nx,by)
end
mjun(nx,ny),dmjudxn(nx,ny), dmjudyn(nx,ny), dmjudxdyn(nx,ny),
%derivace transformaci
Stresses
for i=1:nx
sxx(nx,ny), syy(nx,ny), sxy(nx,ny),
E=exp(-(lambda*(ksi(i)-1))^2);
for j=1:ny
k1=1-(1-kappa)*E;
dksidx(i,j)=1/Lk;
detadx(i,j)=eta(j)*(1-kappa)*E*2*lambda^2*(1-ksi(i))/(k1*Lk);
detady(i,j)=1/(k1*H);
detadxdy(i,j)=(1-kappa)*2*lambda^2*(1-ksi(i))*E/(H*Lk*k1^2);
detadxdx(i,j)=2*lambda^2*eta(j)*(1-kappa)*E/(Lk^2*k1)*(2*lambda^2*(1-ksi(i))^2*(1+(1-kappa)*E)/k1-1);
gxx(i,j)=dksidx(i,j)^2; gyy(i,j)=detadx(i,j)^2+detady(i,j)^2; gxy(i,j)=2*detadx(i,j)*dksidx(i,j); gx(i,j)=detadxdx(i,j);
end
end
%figure(2)
%surf(eta,ksi,detadx)
%title('deta/dx')
geometry
Approximate profiles u,v, , 
for power law fluid
iteration
Elastic stress sxx, syy, sxy
(hyperbolic MW)
Poisson equation for 
Velocities, µ , BC for 
Poisson equation for 
Poisson equation for pressure p
Transformation of derivatives of quantity F (e.g. , , sxx, syy, sxy)
Kontroloval: zitny
Transformation of first derivative
𝜕𝐹 𝜕𝐹 𝜕𝜉 𝜕𝐹 𝜕𝜂
=
+
𝜕𝑥 𝜕𝜉 𝜕𝑥 𝜕𝜂 𝜕𝑥
𝜕𝐹 𝜕𝐹 𝜕𝜂
=
𝜕𝑦 𝜕𝜂 𝜕𝑦
Transformation of second derivatives (derivation is a bit lengthy)
𝜕 2 𝐹 𝜕𝐹 𝜕 2 𝜂 𝜕 2 𝐹 𝜕𝜉 2 𝜕 2 𝐹 𝜕𝜂 2
𝜕 2 𝐹 𝜕𝜂 𝜕𝜉
=
+
( ) + 2 ( ) +2
𝜕𝑥 2 𝜕𝜂 𝜕𝑥 2 𝜕𝜉 2 𝜕𝑥
𝜕𝜂 𝜕𝑥
𝜕𝜉𝜕𝜂 𝜕𝑥 𝜕𝑥
𝜕 2 𝐹 𝜕 2 𝐹 𝜕𝜂 2
=
( )
𝜕𝑦 2 𝜕𝜂2 𝜕𝑦
𝜕2𝐹
𝜕 2 𝐹 𝜕𝜂 𝜕𝜂 𝜕𝐹 𝜕 2 
𝜕 2 𝐹 𝜕𝜂 𝜕𝜉
=
+
+
𝜕𝑥𝜕𝑦 𝜕𝜂2 𝜕𝑦 𝜕𝑥 𝜕𝜂 𝜕𝑥𝜕𝑦 𝜕𝜉𝜕𝜂 𝜕𝑦 𝜕𝑥
𝜕2𝐹
𝜕 𝜕𝐹 𝜕𝜂
𝜕 2 𝐹 𝜕𝜂 𝜕𝐹 𝜕 2 
𝜕 2 𝐹 𝜕𝜉 𝜕 2 𝐹 𝜕 𝜕𝜂 𝜕𝐹 𝜕 2 
=
=
+
=(
+ 2 ) +
𝜕𝑥𝜕𝑦 𝜕𝑥 𝜕𝜂 𝜕𝑦 𝜕𝑥𝜕 𝜕𝑦 𝜕𝜂 𝜕𝑥𝜕𝑦
𝜕𝜕 𝜕𝑥
𝜕 𝜕𝑥 𝜕𝑦 𝜕𝜂 𝜕𝑥𝜕𝑦
... it would be possible to express the transformation of derivatives also in the reverse direction, but usually we
do not need this
21
Cauchy equations with consideration of inertia forces
(𝑢
Kontroloval: zitny
𝜕𝑢
𝜕𝑢
𝜕𝑝 𝜕𝜏𝑥𝑥 𝜕𝜏𝑥𝑦
+𝑣 )=−
+
+
𝜕𝑥
𝜕𝑦
𝜕𝑥
𝜕𝑥
𝜕𝑦
𝜕𝑣
𝜕𝑣
𝜕𝑝 𝜕𝜏𝑥𝑦 𝜕𝜏𝑦𝑦
(𝑢
+𝑣 )= −
+
+
𝜕𝑥
𝜕𝑦
𝜕𝑦
𝜕𝑥
𝜕𝑦
Elimination of pressure by introducing the vorticity  =
𝜕𝑣 𝜕𝑢
−
𝜕𝑥 𝜕𝑦
and using the continuity equation
The result is the transport equation of vorticity (right side resultant stress). At zero Re (creeping flow, 0) the
left side is zero and vorticity disappears from this equation.
𝜕
𝜕
2
2
2
(𝑢
+𝑣 )=
(𝜏 − 𝜏𝑥𝑥 ) + ( 2 − 2 ) 𝜏𝑥𝑦
𝜕𝑥
𝜕𝑦
𝜕𝑥𝑦 𝑦𝑦
𝜕𝑥
𝜕𝑦
Fulfill the continuity equation by introducing the current function
𝜕
𝑢=
𝜕𝑦
𝜕
𝑣=−
𝜕𝑥
2  2 
− = 2 + 2
𝜕𝑥
𝜕𝑦
22
Initial conditions - stream function (for a power law fluid)
geometry
Stream function (,)
x 10
Approximate profiles u,v, , 
for power law fluid
-4
4
iteration
3
Elastic stress sxx, syy, sxy
(hyperbolic MW)
2
Poisson equation for 
1
0
2
1.5
Velocities, µ , BC for 
1
0.8
1
0.6
0.4
0.5
0
Poisson equation for 
0.2
0
Velocity components u,v (,)
Poisson equation for pressure p
v [m/s]
x 10
-3
0.5
6
0.4
4
0.3
0.2
2
0.1
0
0
2
-2
1.5
1
0.8
1
0.6
-4
1
0.4
0.5
0
0.2
0
-6
2
0.5
1.5
1
0.5
0
0
Velocities calculated in this way satisfy continuity equation and correspond to the steady creeping flow of
power law fluid (without elastic effects). It is assumed that these initial conditions can be applied also as
boundary conditions at inlet and outlet (far from the disturbance of throat).
23
Initial conditions - stream function (for a power law fluid)
Section corresponding to the distance from the
entrance =x/Lk
Kontroloval: zitny
𝐻 = 𝐻 1 − 1 −  𝑒 −
2
1−
2
= 𝐻(1 − 1 −  𝐸)
𝜕𝐻
𝐸
2
= 2𝐻 (1 − )( − 1)
𝜕𝑥
𝐿𝑘
Stream function (um is maximum velocity for the gap thickness H). It holds umH=umH .
𝐻 2𝑦
𝑛
2𝑦
2𝑦 2𝑛+1
 𝑥, 𝑦 = 𝑢𝑚 ( −
(1 − 𝑠𝑖𝑔𝑛(1 − )|1 −
| 𝑛 ))
2 𝐻 2𝑛 + 1
𝐻
𝐻
Corresponding velocity components
2𝑛+1
𝐻
𝑛
  = 𝑢𝑚 (2 −
(1 − 𝑠𝑖𝑔𝑛(1 − 2)|1 − 2| 𝑛 ))
2
2𝑛 + 1
𝜕 𝑢𝑚 𝐻
2𝑦 𝑛+1
𝑢 𝑥, 𝑦 =
=
(1 − |1 −
| 𝑛 )
𝜕𝑦
𝐻
𝐻
𝜕
𝐻
𝑣 𝑥, 𝑦 = −
= −2𝑢𝑚
𝜕𝑥
𝐻
2
𝐻 𝑦
2𝑦 𝑛+1
(1 − ) (1 − )(1 − |1 −
| 𝑛 )
𝐻 𝐿𝑘
𝐻
24
Initial conditions – vorticity (for a power law fluid)
Vorticity
𝜕𝑣 𝜕𝑢
=
−
𝜕𝑥 𝜕𝑦
Auxilliary variables
corresponds to the direction
anti-clockwise
𝑍 =1−
𝐻 𝐻
𝐹=
( − 1)(1 − 𝑍
𝐻 𝐻
𝐻 = 𝐻 1 − 1 −  𝑒 −
2
1−
2
= 𝐻(1 − 1 −  𝐸)
𝜕𝐻
𝐸
2
= 2𝐻 (1 − )( − 1)
𝜕𝑥
𝐿𝑘
2𝑦
𝐻
𝑛+1
𝑛 )
Kontroloval: zitny
𝜕𝐹
𝐻
𝐻
= 2 ((1 − 2 )(1 − 𝑍
𝜕𝐻 𝐻
𝐻

𝑛+1
𝑛 )
dudy-num
𝐻
𝑛+1
− 𝑠𝑖𝑔𝑛 𝑍 ( − 1)
𝑍
𝐻
𝑛
1
𝑛
1−𝑍 )
OMEGA
3000
4000
2000
1000
2000
0
1
𝜕𝑢 𝜕 2  2𝑢𝑚 𝐻 𝑛 + 1
=
=
(
)𝑠𝑖𝑔𝑛(𝑍)|𝑍|𝑛
𝜕𝑦 𝜕𝑦 2
𝐻 2
𝑛
-1000
0
-2000
-2000
-3000
2
dvdx-num
1.5
1
0.8
1
0.6
0.4
0.5
0
0.8
-4000
2
1.5
0.2
0
1
0.8
1
0.6
0.4
0.5
𝜕𝑣
𝜕2
2𝑢𝑚 2 𝑦 𝜕𝐹 𝜕𝐻
𝐾
=− 2 =−
(
1− − )
𝜕𝑥
𝜕𝑥
𝐿𝑘
𝜕𝐻 𝜕𝑥
𝐿𝑘
0.6
0
0.2
0
Verified by three methods: analytically, direct
numerical difference and differential
transformed derivatives (it took me few days to
match the threee procedures
0.4
0.2
0
-0.2
2
1.5
1
0.8
1
0.6
0.4
0.5
0
0.2
0
25
Initial conditions – viscosity (for a power law fluid)
Auxilliary variables
𝑍 =1−
𝜕𝑢
𝜕2
𝐻
=
= −2𝑢𝑚
𝜕𝑥 𝜕𝑥𝜕𝑦
𝐻
2
𝜕𝑣
𝜕2
𝐻
=−
= −2𝑢𝑚
𝜕𝑦
𝜕𝑥𝜕𝑦
𝐻
2
𝜕𝑢
𝜕𝑥
2
𝜇 𝐼𝐼 = 𝐾
2
2𝑦
𝐻
Kontroloval: zitny
𝐻 = 𝐻 1 − 1 −  𝑒 −
2
−1
(1 − )𝐸
(1 − 𝑍
𝐿𝑘
𝑛+1
𝑛
𝑛+1
+
𝑠𝑖𝑔𝑛 𝑍 𝑍
𝑛
1
𝑛
1−
2
= 𝐻(1 − 1 −  𝐸)
1−𝑍 )
Verified numerically
𝐻 1 − 
(1 − )
(1 − 𝑍
𝐻
𝐿𝑘
+2
𝜕𝑣
𝜕𝑦
2
+
𝜕𝑢 𝜕𝑣
+
𝜕𝑦 𝜕𝑥
𝑛+1
𝑛
2
Analytical expressions for first derivatives are too
complicated and will be approximated numerically
𝑛+1
+
𝑠𝑖𝑔𝑛 𝑍 𝑍
𝑛
1
𝑛
1−𝑍 )
𝑛−1
Dangerous peeks correspond to regions
with smal velocity gradients (this is
disadvantage of power law model)
𝜕µ 𝜕µ 𝜕 𝜕µ 𝜕 µ𝐸 − µ𝑊 𝜕 µ𝑁 − µ𝑆 𝜕
=
+

+
𝜕𝑥 𝜕 𝜕𝑥 𝜕 𝜕𝑥
2ℎ𝑥 𝜕𝑥
2ℎ𝑦 𝜕𝑥
𝜕µ 𝜕µ 𝜕 µ𝑁 − µ𝑆 𝜕
=

𝜕𝑦 𝜕 𝜕𝑦
2ℎ𝑦 𝜕𝑦
26
Initial conditions – POWER.m (MATLAB code 1/2)
geometry
Velocities, stream function, vorticity, viscosity for power law fluids
Approximate profiles u,v, , 
for power law fluid
iteration
Elastic stress sxx, syy, sxy
(hyperbolic MW)
for i=1:nx
Ek=exp(-lambda^2*(1-ksi(i))^2);
Hk=H*(1-(1-kappa)*Ek);
for j=1:ny
Z=1-2*y(i,j)/Hk;
HK=H/Hk;
psi(i,j)=um*H/2*(1-Z-n/(2*n+1)*(1-sign(Z)*abs(Z)^((2*n+1)/n)));
u(i,j)=um*H/Hk*(1-abs(Z)^((n+1)/n));
v(i,j)=-2*um*(lambda*H/Hk)^2*(1-Hk/H)*(1-ksi(i))*y(i,j)/Lk*(1-abs(Z)^((n+1)/n));
dudy(i,j)=2*um*H/Hk^2*(n+1)/n*sign(Z)*abs(Z)^(1/n);
F=(HK^2-HK)*(1-abs(Z)^((n+1)/n));
dHkdx=2*H*lambda^2*(1-kappa)*(ksi(i)-1)*Ek/Lk;
dFdHk=H/Hk^2*((-2*HK+1)*(1-abs(Z)^((n+1)/n))-sign(Z)*(HK-1)*(n+1)/n*abs(Z)^(1/n)*(1-Z));
dvdx(i,j)=-2*um*lambda^2*y(i,j)/Lk*(dFdHk*dHkdx*(1-ksi(i))-F/Lk);
omega(i,j)=dvdx(i,j)-dudy(i,j);
dudx(i,j)=-2*um*(HK*lambda)^2*(1-kappa)*(ksi(i)-1)*Ek/Lk*(1-abs(Z)^((n+1)/n)+sign(Z)*(n+1)/n*abs(Z)^(1/n)*(1-Z));
dvdy(i,j)=-2*um*(HK*lambda)^2*(1-1/HK)*(1-ksi(i))/Lk*(1-abs(Z)^((n+1)/n)+sign(Z)*(n+1)/n*abs(Z)^(1/n)*(1-Z));
mju(i,j)=K*(2*dudx(i,j)^2+2*dvdy(i,j)^2+(dudy(i,j)+dvdx(i,j))^2)^((n-1)/2);
end
end
Poisson equation for 
Velocities, µ , BC for 
Poisson equation for 
Poisson equation for pressure p
27
Initial conditions – POWER.m (MATLAB code 2/2)
geometry
Approximation of viscosity derivatives
Approximate profiles u,v, , 
for power law fluid
iteration
Elastic stress sxx, syy, sxy
(hyperbolic MW)
dmjudx(1:nx,1:ny)=0; dmjudy(1:nx,1:ny)=0;
for i=2:nx-1
for j=2:ny-1
dmjudx(i,j)=(mju(i+1,j)-mju(i-1,j))/(2*hx)*dksidx(i,j)+(mju(i,j+1)-mju(i,j-1))/(2*hy)*detadx(i,j);
dmjudy(i,j)=(mju(i,j+1)-mju(i,j-1))/(2*hy)*detady(i,j);
end
end
for i=1:nx
dmjudx(i,1)=dmjudx(i,2);
dmjudx(i,ny)=dmjudx(i,ny-1);
end
for j=1:ny
dmjudx(1,j)=dmjudx(2,j);
dmjudx(nx,j)=dmjudx(nx-1,j);
end
Poisson equation for 
Velocities, µ , BC for 
Poisson equation for 
Poisson equation for pressure p
% copy matrices
psin=psi; omegan=omega; un=u; vn=v;
dudxn=dudx; dudyn=dudy; dvdxn=dvdx; dvdyn=dvdy;
mjun=mju; dmjudxn=dmjudx(nx,ny); dmjudyn=dmjudy;
28
PSI Transformation of stream function into computational domain
Kontroloval: zitny
2  2 
+
= −
𝜕𝑥 2 𝜕𝑦 2
Poisson equation for stream function
can be transformed into computational
domain using previously calculated metric
coefficients
𝜕 2 𝜓 𝜕 2 𝜕 2 𝜓
( ) + 2
𝜕𝜉 2 𝜕𝑥
𝜕
𝜕
𝜕𝑥
2
𝜕
+
𝜕𝑦
2
𝜕 2 𝜓 𝜕 𝜕 𝜕 𝜕 2 
+2
+
= −
𝜕 𝜕𝑥 𝜕𝑥 𝜕 𝜕𝑥 2
𝜕2𝜓
𝜕2𝜓
𝜕2𝜓
𝜕
𝑔 + 2 𝑔𝑦𝑦 +
𝑔 +
𝑔 = −
𝜕𝜉 2 𝑥𝑥
𝜕
𝜕 𝑥𝑦 𝜕 𝑥
𝑔𝑥𝑥
𝜕
= ( )2
𝜕𝑥
𝜕
𝑔𝑦𝑦 =
𝜕𝑥
2
𝜕
+
𝜕𝑦
2
𝜕 𝜕
𝑔𝑥𝑦 = 2
𝜕𝑥 𝜕𝑥
𝜕2
𝑔𝑥 = 2
𝜕𝑥
29
PSI Discretization of stream function
Kontroloval: xxxxxx

=1
i,j+1
i,j
i,j-1
=0
=1
=0
hy

=2
hx
𝜕2𝜓
𝜕2𝜓
𝜕2𝜓
𝜕
𝑔 + 2 𝑔𝑦𝑦 +
𝑔 +
𝑔 = −
𝜕𝜉 2 𝑥𝑥
𝜕
𝜕 𝑥𝑦 𝜕 𝑥
𝑔𝑦𝑦
𝑔𝑥𝑥

−
2
+

+
𝑖−1,𝑗
𝑖,𝑗
𝑖+1,𝑗
2
2 𝑖,𝑗−1 − 2𝑖,𝑗 + 𝑖,𝑗+1
ℎ𝑥
ℎ𝑦
𝑔𝑥𝑦
𝑔𝑥
+

+ 𝑖−1,𝑗−1 − 𝑖−1,𝑗+1 − 𝑖+1,𝑗−1 +

− 𝑖,𝑗−1 = −𝑖𝑗
4ℎ𝑥 ℎ𝑦 𝑖+1,𝑗+1
2ℎ𝑦 𝑖,𝑗+1
30
PSI by alternation direction implicit method (ADI) Time evolution approximation
geometry
Approximate profiles u,v, , 
for power law fluid
PSI
iter=1,2,…
i=2..Nx-1
Sweep of tridiagonal system for  in
horizontal direction (only smoothing)
This horizontal sweep
doesn’t work correctly.
Maybe because  is almost
independent on 
iteration
Elastic stress sxx, syy, sxy
(hyperbolic MW)
Poisson equation for 
Velocities, µ , BC for 
Poisson equation for 
Poisson equation for pressure p
i=2..Nx-1
Sweep of tridiagonal system for 
in vertical direction (sections i)
Norm of difference new-old and
repetition the PSI loop
31
PSI Discretization of stream function (time marching)
gxx … coefficients were calculated during INIT.m
1 − 
2 1 2 
=+
+
𝑡1
𝜕𝑥 2 𝜕𝑦 2
𝑔𝑥𝑥
𝜕 2
𝜕
= ( ) 𝑔𝑦𝑦 =
𝜕𝑥
𝜕𝑥
Kontroloval: xxxxxx
2
𝜕
+
𝜕𝑦
2
𝜕 𝜕
𝑔𝑥𝑦 = 2
𝜕𝑥 𝜕𝑥
𝜕2
𝑔𝑥 = 2
𝜕𝑥
2 − 1
2 1 2 2
=+
+
𝑡2
𝜕𝑥 2
𝜕𝑦 2
-implicit (horizontal lines) This part (-implicit step) does not work at tests
1𝑖𝑗
𝑡1
It was substituted by a simple filter, see the source code
𝑖𝑗 𝑔𝑦𝑦
𝑔𝑥𝑥
𝑔𝑥𝑥 1
𝑔𝑥𝑥
1
+
2

−

=
+ 2 𝑖,𝑗−1 − 2𝑖,𝑗 + 𝑖,𝑗+1
𝑖,𝑗
𝑖+1,𝑗
2
2
2
𝑡
ℎ𝑥
ℎ𝑥
ℎ𝑥
ℎ𝑦
1
𝑔𝑥
𝑖+1,𝑗+1 + 𝑖−1,𝑗−1 − 𝑖−1,𝑗+1 − 𝑖+1,𝑗−1 +

− 𝑖,𝑗−1 + 𝑖𝑗
2ℎ𝑦 𝑖,𝑗+1
− 1𝑖−1,𝑗
𝑔𝑥𝑦
+
4ℎ𝑥 ℎ𝑦
-implicit (vertical lines)
2𝑖𝑗
𝑔𝑦𝑦
𝑔𝑦𝑦 2
𝑔𝑦𝑦
𝑔𝑥
𝑔𝑥
2
−  𝑖,𝑗−1
−
+ 2 2  𝑖,𝑗 −
+
2𝑖,𝑗+1
2
2
𝑡2
2ℎ𝑦
2ℎ𝑦
ℎ𝑦
ℎ𝑦
ℎ𝑦
1𝑖𝑗 𝑔𝑥𝑥
𝑔𝑥𝑦
1
1
1
=
+ 2  𝑖−1,𝑗 − 2 𝑖,𝑗 +  𝑖+1,𝑗 +
1𝑖+1,𝑗+1 + 𝑖−1,𝑗−1 − 𝑖−1,𝑗+1 − 𝑖+1,𝑗−1 + 𝑖𝑗
𝑡2 ℎ𝑥
4ℎ𝑥 ℎ𝑦
32
PSI Discretization of stream function PSIE.m (MATLAB)
Kontroloval: xxxxxx
Estimated
dt2=(H/ny)^2*1e3; dt1=(Lk/nx)^2*1e3;
psiold=psi;
time step
for iter=1:20
% horizontal lines (only smoothing)
for j=2:ny-1
aa(1)=0;bb(1)=1;cc(1)=0;dd(1)=psi(1,j); aa(nx)=0;bb(nx)=1;cc(nx)=0;dd(nx)=psi(nx,j);
for i=2:nx-1
aa(i)=-gxx(i,j)/hx^2;
bb(i)=1/dt1+2*gxx(i,j)/hx^2;
cc(i)=-gxx(i,j)/hx^2;
dd(i)=psi(i,j)/dt1;
end
Soution of
psi(1:nx,j)=tridag(aa,bb,cc,dd,nx);
end
tridiagonal system
% vertical lines
by factorization
for i=2:nx-1
aa(1)=0;bb(1)=1;cc(1)=0;dd(1)=psi(i,1); aa(ny)=0;bb(ny)=1;cc(ny)=0;dd(ny)=psi(i,ny);
for j=2:ny-1
aa(j)=-gyy(i,j)/hy^2+gx(i,j)/(2*hy);
bb(j)=1/dt2+2*gyy(i,j)/hy^2;
cc(j)=-gyy(i,j)/hy^2-gx(i,j)/(2*hy);
ddxx=gxx(i,j)/hx^2*(psi(i-1,j)-2*psi(i,j)+psi(i+1,j));
ddxy=gxy(i,j)/(4*hx*hy)*(psi(i+1,j+1)+psi(i-1,j-1)-psi(i-1,j+1)-psi(i+1,j-1));
dd(j)=psi(i,j)/dt2+ddxx+ddxy+ddomega;
end
psi(i,:)=tridag(aa,bb,cc,dd,ny);
end
% norm of differences
sum=0;
for i=1:nx
for j=1:ny
sum=sum+abs(psi(i,j)-psiold(i,j));
end
end
sdev=sum/(nx*ny)/psiw;
disp(sprintf(' iter=%d relsum=%.5g',iter,sdev))
if sdev<0.00001
break
end
end
function u = tridag(a,b,c,r,n)
bet=b(1);
u(1)=r(1)/bet;
for j=2:n
gam(j)=c(j-1)/bet;
bet=b(j)-a(j)*gam(j);
u(j)=(r(j)-a(j)*u(j-1))/bet;
end
for j=n-1:-1:1
u(j)=u(j)-gam(j+1)*u(j+1);
end
ddomega=omega(i,j);
33
Post processing (velocities, viscosities, BC for vorticity) UVMBC.m
for i=2:nx-1
geometry
for j=2:ny-1
Approximate profiles u,v, , 
v(i,j)=-(psi(i+1,j)-psi(i-1,j))/(2*hx)*dksidx(i,j)-(psi(i,j+1)-psi(i,j-1))/(2*hy)*detadx(i,j);
for power law fluid
u(i,j)=(psi(i,j+1)-psi(i,j-1))/(2*hy)*detady(i,j);
end
iteration
end
Elastic stress sxx, syy, sxy
for i=2:nx-1
(hyperbolic MW)
for j=2:ny-1
Poisson equation for 
dudx(i,j)=(u(i+1,j)-u(i-1,j))/(2*hx)*dksidx(i,j)+(u(i,j+1)-u(i,j-1))/(2*hy)*detadx(i,j);
dudy(i,j)=(u(i,j+1)-u(i,j-1))/(2*hy)*detady(i,j);
dvdx(i,j)=(v(i+1,j)-v(i-1,j))/(2*hx)*dksidx(i,j)+(v(i,j+1)-v(i,j-1))/(2*hy)*detadx(i,j);
dvdy(i,j)=(v(i,j+1)-v(i,j-1))/(2*hy)*detady(i,j);
Velocities, µ , BC for 
end
end
Poisson equation for 
for i=2:nx-1
for j=2:ny-1
mju(i,j)=K*(2*dudx(i,j)^2+2*dvdy(i,j)^2+(dudy(i,j)+dvdx(i,j))^2)^((n-1)/2);
end
Poisson equation for pressure p
end
for i=2:nx-1
for j=2:ny-1
dmjudx(i,j)=(mju(i+1,j)-mju(i-1,j))/(2*hx)*dksidx(i,j)+(mju(i,j+1)-mju(i,j-1))/(2*hy)*detadx(i,j);
dmjudy(i,j)=(mju(i,j+1)-mju(i,j-1))/(2*hy)*detady(i,j);
end
end
for i=1:nx
dmjudx(i,1)=dmjudx(i,2); dmjudx(i,ny)=dmjudx(i,ny-1);
end
for j=1:ny
dmjudx(1,j)=dmjudx(2,j); dmjudx(nx,j)=dmjudx(nx-1,j);
end
rlx=0.5;
for i=1:nx
omega(i,1)=omega(i,1)*(1-rlx)+rlx*2*psi(i,2)/hy^2*detady(i,1)^2;
omega(i,ny)=omega(i,ny)*(1-rlx)+rlx*2*(psi(i,ny-1)-psiw)/hy^2*(detadx(i,ny)^2+detady(i,ny)^2;
end
34
Decomposition extrastress on the elastic and viscous component
Kontroloval: zitny
Decomposition viscous stress tensor for purely viscous component (described by model GNF - Generalised
Newtonian Fluid) and the elastic component sij is apparently purposeless, but has the advantage that it leads
to an equation in which the vorticity  dominates even at zero Re.
𝜕𝑢
𝜏𝑥𝑥 = 𝑠𝑥𝑥 + 2𝜇
𝜕𝑥
𝜕𝑣
𝜕𝑢
𝜏𝑦𝑦 = 𝑠𝑦𝑦 + 2𝜇
= 𝑠𝑦𝑦 − 2𝜇
𝜕𝑦
𝜕𝑥
𝜏𝑥𝑦
𝜕𝑢 𝜕𝑣
= 𝑠𝑥𝑦 + 𝜇( + )
𝜕𝑦 𝜕𝑥
It is only an approximation
of the corresponding
constant viscosity
Transport equations for vorticity (right side of the resultant elastic strain). From a purely hyperbolic transport
equation is zero Re turned out nice for elliptic equations  (LAD - LAplacian Driven)
𝜕
𝜕
2 𝜔 2 𝜔
2
2
2
 𝑢
+𝑣
−µ
+
=
𝑠 − 𝑠𝑥𝑥 +
−
𝑠
𝜕𝑥
𝜕𝑦
𝜕𝑥 2 𝜕𝑦 2
𝜕𝑥𝑦 𝑦𝑦
𝜕𝑥 2 𝜕𝑦 2 𝑥𝑦
For comparison
𝜕
𝜕
 𝑢
+𝑣
𝜕𝑥
𝜕𝑦
2
2
2
=
(𝜏 − 𝜏𝑥𝑥 ) + ( 2 − 2 ) 𝜏𝑥𝑦
𝜕𝑥𝑦 𝑦𝑦
𝜕𝑥
𝜕𝑦
35
Kontroloval:
Decomposition extrastress on the elastic and viscous component (variable
µ9zitny
The variable viscosity (non-zero first and second derivatives of viscosity). In addition Laplacian vorticity there
appears a number of terms (partial derivatives of velocity)
2
2
2
𝜏 − 𝜏𝑥𝑥 +
−
𝜏
𝜕𝑥𝑦 𝑦𝑦
𝜕𝑥 2 𝜕𝑦 2 𝑥𝑦
2
2
2
2  2 
=
𝑠 − 𝑠𝑥𝑥 +
−
𝑠 +
+
𝜕𝑥𝑦 𝑦𝑦
𝜕𝑥 2 𝜕𝑦 2 𝑥𝑦
𝜕𝑥 2 𝜕𝑦 2
𝜕 𝜕
𝜕 𝜕
2  𝜕𝑣
2  2 
+2
+2
+4
+
−
𝜕𝑥 𝜕𝑥
𝜕𝑦 𝜕𝑦
𝜕𝑥𝑦 𝜕𝑦
𝜕𝑥 2 𝜕𝑦 2
𝜕𝑣 𝜕𝑢
+
𝜕𝑥 𝜕𝑦
Neglecting second derivatives of viscosity (even the first derivatives are highly discontinuous and could be
causing problems during solution)
𝜕 𝜕
𝜕 𝜕
2 𝜔 2 𝜔
2
2
2
(𝑢 − 2 )
+ (𝑣 − 2 )
−µ
+
=
𝑠 − 𝑠𝑥𝑥 +
−
𝑠
𝜕𝑥 𝜕𝑥
𝜕𝑦 𝜕𝑦
𝜕𝑥 2 𝜕𝑦 2
𝜕𝑥𝑦 𝑦𝑦
𝜕𝑥 2 𝜕𝑦 2 𝑥𝑦
36
Transformation vorticity into computational domain
Kontroloval: zitny
Transport equation for vorticity (variable viscosity)
𝜕 2  𝜕
−µ
𝜕𝜉 2 𝜕𝑥
2
𝜕2
+ 2
𝜕
𝜕
𝜕𝑥
2
𝜕
+
𝜕𝑦
2
𝜕 2  𝜕 𝜕
+2
+
𝜕 𝜕𝑥 𝜕𝑥
𝜕
𝜕µ 𝜕 𝜕
𝜕2
𝜕µ 𝜕
𝜕µ 𝜕
+
(𝑢 − 2 )
+
−µ 2 + (𝑣 − 2 )
+ (𝑢 − 2 )
𝜕
𝜕𝑥 𝜕𝑥 𝜕
𝜕𝑥
𝜕𝑦 𝜕𝑦
𝜕𝑥 𝜕𝑥
𝜕 2 𝑠𝑦𝑦 − 𝑠𝑥𝑥 𝜕 𝜕 𝜕𝑠𝑦𝑦 − 𝑠𝑥𝑥 𝜕 2  𝜕 2 𝑠𝑦𝑦 − 𝑠𝑥𝑥 𝜕 𝜕 𝜕𝑠𝑥𝑦 𝜕 2 
=
+
+
+
𝜕2
𝜕𝑦 𝜕𝑥
𝜕
𝜕𝑥𝑦
𝜕
𝜕𝑦 𝜕𝑥
𝜕 𝜕𝑥 2
𝜕 2 𝑠𝑥𝑦 𝜕 2 𝜕 2 𝑠𝑥𝑦 𝜕 2
𝜕 2 𝑠𝑥𝑦 𝜕 𝜕 𝜕 2 𝑠𝑥𝑦 𝜕 2
+
( ) +
( ) +2
−
( )
𝜕2 𝜕𝑥
𝜕2 𝜕𝑥
𝜕 𝜕𝑥 𝜕𝑥
𝜕2 𝜕𝑦
𝜕µ 𝜕
𝑣𝑥 = (𝑢 − 2 )
𝜕𝑥 𝜕𝑥
𝐷
 𝐷𝑡 material derivative of
streamline
𝜕2
𝜕µ 𝜕
𝜕µ 𝜕
𝜕2
𝐷
𝜕µ 𝜕 𝜕µ 𝜕
𝑣𝑦 = −µ 2 + 𝑣 − 2
+ 𝑢 − 2
= −µ 2 + 
− 2(
+
)
𝜕𝑥
𝜕𝑦 𝜕𝑦
𝜕𝑥 𝜕𝑥
𝜕𝑥
𝐷𝑡
𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑦
𝜕2
𝜕2
𝜕2
𝜕
𝜕
µ
𝑔 +
𝑔 +
𝑔
+
𝑣 +
𝑣
𝜕𝜉 2 𝑥𝑥 𝜕2 𝑦𝑦 𝜕 𝑥𝑦
𝜕 𝑥 𝜕 𝑦
𝜕 2 𝑠𝑦𝑦 − 𝑠𝑥𝑥
𝜕𝑠𝑦𝑦 − 𝑠𝑥𝑥
𝜕 2 𝑠𝑦𝑦 − 𝑠𝑥𝑥
𝜕𝑠𝑥𝑦
𝜕 2 𝑠𝑥𝑦
𝜕 2 𝑠𝑥𝑦
𝜕 2 𝑠𝑥𝑦
𝜕 2 𝑠𝑥𝑦
=
𝑞1 +
𝑞2 +
𝑞3 +
𝑞 +
𝑞 +
𝑞 +
𝑞 −
𝑞
𝜕2
𝜕
𝜕
𝜕 4
𝜕2 5
𝜕2 6 𝜕 7
𝜕2 8
37
Discretized vorticity – central differences
Kontroloval: xxxxxx
𝜕2
𝜕2
𝜕2
𝜕
𝜕
−µ
𝑔 +
𝑔 +
𝑔
+
𝑣 +
𝑣
𝜕𝜉 2 𝑥𝑥 𝜕2 𝑦𝑦 𝜕 𝑥𝑦
𝜕 𝑥 𝜕 𝑦
𝜕 2 𝑠𝑦𝑦 − 𝑠𝑥𝑥
𝜕𝑠𝑦𝑦 − 𝑠𝑥𝑥
𝜕 2 𝑠𝑦𝑦 − 𝑠𝑥𝑥
𝜕𝑠𝑥𝑦
𝜕 2 𝑠𝑥𝑦
𝜕 2 𝑠𝑥𝑦
𝜕 2 𝑠𝑥𝑦
𝜕 2 𝑠𝑥𝑦
=
𝑞1 +
𝑞2 +
𝑞3 +
𝑞 +
𝑞 +
𝑞 +
𝑞 −
𝑞
𝜕2
𝜕
𝜕
𝜕 4
𝜕2 5
𝜕2 6 𝜕 7
𝜕2 8
𝑔𝑦𝑦
𝑔𝑥𝑦
𝑔𝑥𝑥
µ
𝑖−1,𝑗 − 2𝑖,𝑗 + 𝑖+1,𝑗 + 2 𝑖,𝑗−1 − 2𝑖,𝑗 + 𝑖,𝑗+1 +

+ 𝑖−1,𝑗−1 − 𝑖−1,𝑗+1 − 𝑖+1,𝑗−1
4ℎ𝑥 ℎ𝑦 𝑖+1,𝑗+1
ℎ𝑥2
ℎ𝑦
𝑣𝑦
𝑣𝑥
+
(𝑖+1,𝑗 − 𝑖−1,𝑗 ) +
(
− 𝑖,𝑗−1 ) = 𝐺𝑖𝑗
2ℎ𝑥
2ℎ𝑦 𝑖,𝑗+1
Right hand size Gij is nonzero only for nozero stresses
𝐺𝑖𝑗
𝑞1
𝑞2
= 2 𝑠𝑦𝑦 − 𝑠𝑥𝑥 𝑖,𝑗+1 − 2 𝑠𝑦𝑦 − 𝑠𝑥𝑥 𝑖,𝑗 + 𝑠𝑦𝑦 − 𝑠𝑥𝑥 𝑖,𝑗−1 +
𝑠𝑦𝑦 − 𝑠𝑥𝑥 𝑖,𝑗+1 − 𝑠𝑦𝑦 − 𝑠𝑥𝑥
2ℎ𝑦
ℎ𝑦
𝑞3
+
𝑠𝑦𝑦 − 𝑠𝑥𝑥 𝑖+1,𝑗+1 + 𝑠𝑦𝑦 − 𝑠𝑥𝑥 𝑖−1,𝑗−1 − 𝑠𝑦𝑦 − 𝑠𝑥𝑥 𝑖+1,𝑗−1 − 𝑠𝑦𝑦 − 𝑠𝑥𝑥 𝑖−1,𝑗+1
4ℎ𝑥 ℎ𝑦
𝑞4
𝑞5
𝑞6 − 𝑞8
+
𝑠𝑥𝑦𝑖,𝑗+1 − 𝑠𝑥𝑦𝑖,𝑗−1 + 2 𝑠𝑥𝑦𝑖+1,𝑗 − 2𝑠𝑥𝑦𝑖,𝑗 + 𝑠𝑥𝑦𝑖−1,𝑗 +
𝑠𝑥𝑦𝑖,𝑗+1 − 2𝑠𝑥𝑦𝑖,𝑗 + 𝑠𝑥𝑦𝑖,𝑗−1
2ℎ𝑦
ℎ𝑥
ℎ𝑦2
𝑞7
+
𝑠
+ 𝑠𝑥𝑦𝑖−1,𝑗−1 − 𝑠𝑥𝑦𝑖−1,𝑗+1 − 𝑠𝑥𝑦𝑖+1,𝑗−1
4ℎ𝑥 ℎ𝑦 𝑥𝑦𝑖+1,𝑗+1
𝑖,𝑗−1
38
Discretised vorticity – upwind dif. at dominated convective transport
Kontroloval: xxxxxx
𝜕2
𝜕2
𝜕2
𝜕
𝜕
µ
𝑔 +
𝑔 +
𝑔
+
𝑣 +
𝑣
𝜕𝜉 2 𝑥𝑥 𝜕2 𝑦𝑦 𝜕 𝑥𝑦
𝜕 𝑥 𝜕 𝑦
𝜕 2 𝑠𝑦𝑦 − 𝑠𝑥𝑥
𝜕𝑠𝑦𝑦 − 𝑠𝑥𝑥
𝜕 2 𝑠𝑦𝑦 − 𝑠𝑥𝑥
𝜕𝑠𝑥𝑦
𝜕 2 𝑠𝑥𝑦
𝜕 2 𝑠𝑥𝑦
𝜕 2 𝑠𝑥𝑦
𝜕 2 𝑠𝑥𝑦
=
𝑞1 +
𝑞2 +
𝑞3 +
𝑞 +
𝑞 +
𝑞 +
𝑞 −
𝑞
𝜕2
𝜕
𝜕
𝜕 4
𝜕2 5
𝜕2 6 𝜕 7
𝜕2 8
Interpretation of these velocity components is not immediately apparent (may be negative)
𝜕µ 𝜕
𝑣𝑥 = (𝑢 − 2 )
𝜕𝑥 𝜕𝑥
𝜕2
𝜕µ 𝜕
𝜕µ 𝜕
𝑣𝑦 = µ 2 + (𝑣 − 2 )
+ (𝑢 − 2 )
𝜕𝑥
𝜕𝑦 𝜕𝑦
𝜕𝑥 𝜕𝑥
𝑔𝑦𝑦
𝑔𝑥𝑦
𝑔𝑥𝑥

−
2
+

+

−
2
+

+
𝑖+1,𝑗+1 + 𝑖−1,𝑗−1 − 𝑖−1,𝑗+1 − 𝑖+1,𝑗−1
𝑖−1,𝑗
𝑖,𝑗
𝑖+1,𝑗
𝑖,𝑗−1
𝑖,𝑗
𝑖,𝑗+1
2
2
4ℎ
ℎ
ℎ𝑥
ℎ𝑦
𝑥 𝑦
µ
+
𝑣𝑦 + 𝑣𝑦
𝑣𝑦 − 𝑣𝑦
𝑣𝑥 + 𝑣𝑥
𝑣𝑥 − 𝑣𝑥
(𝑖,𝑗 − 𝑖−1,𝑗 ) +
(𝑖+1,𝑗 − 𝑖,𝑗 ) +
(𝑖,𝑗 − 𝑖,𝑗−1 ) +
(𝑖,𝑗+1 − 𝑖,𝑗 ) = 𝐺𝑖𝑗
2ℎ𝑥
2ℎ𝑥
2ℎ𝑦
2ℎ𝑦
Comparing the size of the convective and diffusive member
𝜕 2  𝜕 2
𝜕 𝜕 2 
𝜕
(
)
+
⋯
+
µ
+
𝑢
+⋯
𝜕𝜉 2 𝜕𝑥
𝜕
𝜕𝑥 2
𝜕𝑥
39
Boundary conditions – vorticity
Kontroloval: xxxxxx
The boundary conditions for vorticity resulting from the requirement of zero velocity on the wall u = v = 0 =0, 1
𝜕 𝜕
𝜕 𝜕 1 𝜕 2𝐸2 (1 − )(1 − 𝜅)
𝑢=𝑣=0
=
=0
=
+
=0
𝜕𝑥 𝜕𝑦
𝜕𝑥 𝜕 𝐿𝑘 𝜕 (1 − (1 − )𝐸) 𝐿𝑘
𝜕 𝜕
1
=
=0
𝜕𝑦 𝜕 (1 − (1 − )𝐸) 𝐻
It follows from these equations that the first partial derivative must be zero in physical and computational plane. In the
computational plane complete quadratic polynomial will replace the stream function around a node on the wall

2 + 𝑎 2 + 𝑎 

=
𝑎
+
𝑎

+
𝑎

+
𝑎

0
1
2
3
4
5
i,j=Ny
=1
Six polynomial coefficients should ensure 4 values in
hy
nodes and two conditions of zero derivatives at point
i,Ny-1
i,Ny. Coefficients of coordinates  are zero.

=0
i,j=1
=0
=2
𝑖,𝑁𝑦−1 − 𝑤
() = 𝑤 +
(1 − )2
=1 Gaussian wall
2
ℎ𝑦
𝑖,2 2
()
=
=0 plain wall
2 
ℎ𝑦
40
Boundary conditions – vorticity
Kontroloval: xxxxxx
Substituting the definition of a polynomial we get a strong vorticity boundary condition at Gaussian wall
geometry
𝜕2𝜓
𝑤 = − 2
𝜕
𝜕
𝜕𝑥
2
2
𝜕
+
𝜕𝑦
𝑖,𝑁𝑦−1 − 𝑤 2𝐸2 1 −  1 − 𝜅
=2
(
1 − 1 −  𝐸 𝐿𝑘
ℎ𝑦2
2
+
1
Approximate profiles u,v, , 
for power law fluid
2)
1− 1− 𝐸 𝐻
iteration
Elastic stress sxx, syy, sxy
(hyperbolic MW)
Strong boundary condition at the bottom wall
𝜕2𝜓
𝑤 = − 2
𝜕
𝜕
𝜕𝑥
2
2
𝜕
+
𝜕𝑦
𝑖,2
=2 2
ℎ𝑦
Poisson equation for 
Velocities, µ , BC for 
1
1− 1− 𝐸 𝐻
Poisson equation for 
2
Boundary conditions for ,  at input and output expect stabilized velocity profile
Poisson equation for pressure p
-3
6
x 10
𝐻 ∗ = 𝐻(1 − 1 −  𝑒 − )
2
5
4
3
5
=1
y
2
1
0
0
0.05
0.1
x
0.15
0.2
x 10
)
-3
4.5
=0
0.25
0.3
0.35
0.4
where um is the maximum velocity in the flow channel
axis (width H) corresponding to a power law fluid flow
index n
4
3.5
3
y [m]
H
Velocity profile at inlet (for y<H*/2)
2𝑦
𝑢 𝑦 = 𝑢𝑚 (1 − 1 − ∗
𝐻
𝑛+1
𝑛
2.5
2
1.5
1
0.5
0
0
0.02
0.04
0.06
u
41
0.08
0.1
Boundary conditions – stream function and vorticity
𝐻 ∗ = 𝐻(1 − 1 −  𝑒 − )
2
Boundary conditions for ,  at inlet and outlet with gap thickness
𝐻 2𝑦
𝑛
2𝑦
2𝑦 2𝑛+1
 𝑦 = 𝑢𝑚 ( ∗ −
(1 − 𝑠𝑖𝑔𝑛(1 − ∗ )|1 − ∗ | 𝑛 ))
2 𝐻
2𝑛 + 1
𝐻
𝐻
Stream function at inlet
Overall flowrate
𝑛+1
𝑤 =
𝑢 𝐻
2𝑛 + 1 𝑚
-3
5
4.5
4.5
4
4
3.5
3.5
3
3
y [m]
y [m]
x 10
is the boundary condition for  at upper wall (w=0 at bottom wall)
1
𝜕𝑢
𝑛 + 1 2𝑢𝑚 2𝑦
𝑛
=−
=−
( − 1)
𝜕𝑦
𝑛 𝐻∗ 𝐻∗
Vorticity at inlet and outlet
5
2.5
2
1.5
1.5
1
1
0.5
0.5
0
1
2
3
psi
4
5
6
x 10
-4
x 10
Approximation valid only
for fully developed
velocity profile
-3
2.5
2
0
Kontroloval: xxxxxx
0
-140
-120
-100
-80
-60
omega
-40
-20
0
42
Iterative solution of  OMG.m
geometry
Approximate profiles u,v, , 
for power law fluid
iteration
Elastic stress sxx, syy, sxy
(hyperbolic MW)
OMG
Poisson equation for 
Velocities, µ , BC for 
Nodal velocities and boundary
conditions for ()
i=2..Nx-1
Poisson equation for 
Poisson equation for pressure p
Solution of tridiagonal systém
for  in vertical direction i.
(upwind)
43
Iterative solution of  (OMG.m)
Previously derived transport by pseudovelocities and implementation of upwind
𝜕µ 𝜕
𝜕2
𝜕µ 𝜕
𝜕µ 𝜕
𝑣𝑥 = (𝑢 − 2 )
𝑣𝑦 = µ 2 + (𝑣 − 2 )
+ (𝑢 − 2 )
𝜕𝑥 𝜕𝑥
𝜕𝑥
𝜕𝑦 𝜕𝑦
𝜕𝑥 𝜕𝑥
𝑣𝑥 + 𝑣𝑥
𝑣𝑥 − 𝑣𝑥
𝑣𝑦 + 𝑣𝑦
𝑣𝑦 − 𝑣𝑦
𝑉𝑥𝑝 =
𝑉𝑥𝑚 =
𝑉𝑦𝑝 =
𝑉𝑦𝑚 =
2µℎ𝑥
2µℎ𝑥
2µℎ𝑦
2µℎ𝑦
In a similar way like solution of stream function we separate discretized algebraic equations for vorticity to the
time marching solution consisting in horizontal sweep (time step dt1) and vertical sweep (time step dt2).
2𝑖,𝑗
1𝑖𝑗 𝑔𝑥𝑥
𝑔𝑦𝑦
𝑔
𝑔
1
𝑦𝑦
𝑦𝑦
+ 2 2 − 𝑉𝑦𝑝 + 𝑉𝑦𝑚 − 2𝑖,𝑗−1
− 𝑉𝑦𝑝 − 2𝑖,𝑗+1
+ 𝑉𝑦𝑚 =
+
𝑖−1,𝑗 − 2𝑖,𝑗 + 𝑖+1,𝑗
2
𝑡2
𝑡2 ℎ𝑥2
ℎ𝑦
ℎ𝑦
ℎ𝑦2
𝑔𝑥𝑦
𝐺𝑖𝑗
+𝑉𝑥𝑝 𝑖,𝑗 − 𝑖−1,𝑗 + 𝑉𝑥𝑚 𝑖+1,𝑗 − 𝑖,𝑗 +

+ 𝑖−1,𝑗−1 − 𝑖−1,𝑗+1 − 𝑖+1,𝑗−1 −
4ℎ𝑥 ℎ𝑦 𝑖+1,𝑗+1

𝜕 𝜕
𝑞1 =
𝜕𝑦 𝜕𝑥
𝜕2
𝑞2 =
𝜕𝑥𝑦
𝜕 𝜕
𝑞3 =
𝜕𝑦 𝜕𝑥
𝜕2
𝑞4 = 2
𝜕𝑥
𝑞5 = (
𝜕 2
)
𝜕𝑥
𝑞6 = (
𝜕 2
)
𝜕𝑥
𝑞7 = 2
𝜕 𝜕
𝜕𝑥 𝜕𝑥
𝑞8 = (
𝐺𝑖𝑗
𝑞1
𝑞2
= 2 𝑠𝑦𝑦 − 𝑠𝑥𝑥
− 2 𝑠𝑦𝑦 − 𝑠𝑥𝑥
+ 𝑠𝑦𝑦 − 𝑠𝑥𝑥
+
𝑠𝑦𝑦 − 𝑠𝑥𝑥
− 𝑠𝑦𝑦 − 𝑠𝑥𝑥
𝑖,𝑗+1
𝑖,𝑗
𝑖,𝑗−1
𝑖,𝑗+1
𝑖,𝑗−1
2ℎ𝑦
ℎ𝑦
𝑞3
𝑞4
+
𝑠𝑦𝑦 − 𝑠𝑥𝑥
+ 𝑠𝑦𝑦 − 𝑠𝑥𝑥
− 𝑠𝑦𝑦 − 𝑠𝑥𝑥
− 𝑠𝑦𝑦 − 𝑠𝑥𝑥
+
𝑠
− 𝑠𝑥𝑦𝑖,𝑗−1
𝑖+1,𝑗+1
𝑖−1,𝑗−1
𝑖+1,𝑗−1
𝑖−1,𝑗+1
4ℎ𝑥 ℎ𝑦
2ℎ𝑦 𝑥𝑦𝑖,𝑗+1
𝑞5
𝑞6 − 𝑞8
𝑞7
+ 2 𝑠𝑥𝑦𝑖+1,𝑗 − 2𝑠𝑥𝑦𝑖,𝑗 + 𝑠𝑥𝑦𝑖−1,𝑗 +
𝑠
−
2𝑠
+
𝑠
+
𝑠
+ 𝑠𝑥𝑦𝑖−1,𝑗−1 − 𝑠𝑥𝑦𝑖−1,𝑗+1 − 𝑠𝑥𝑦𝑖+1,𝑗−1
𝑥𝑦𝑖,𝑗+1
𝑥𝑦𝑖,𝑗
𝑥𝑦𝑖,𝑗−1
4ℎ𝑥 ℎ𝑦 𝑥𝑦𝑖+1,𝑗+1
ℎ𝑥
ℎ𝑦2
44
𝜕 2
)
𝜕𝑦
Iterative solution of  OMG.m
%vorticity
omegaold=omega;
for iter=1:20
%vertical sweep
for i=2:nx-1
aa(1)=0;bb(1)=1;cc(1)=0;dd(1)=omega(i,1); aa(ny)=0;bb(ny)=1;cc(ny)=0;dd(ny)=omega(i,ny);
for j=2:ny-1
vx=(rho*u(i,j)-2*dmjudx(i,j))*dksidx(i,j);
vy=(rho*v(i,j)-2*dmjudy(i,j))*detady(i,j)+mju(i,j)*detadxdx(i,j);
Vxp=(vx+abs(vx))/(2*mju(i,j)*hx);
Vxn=(vx-abs(vx))/(2*mju(i,j)*hx);
Vyp=(vy+abs(vy))/(2*mju(i,j)*hy);
Vym=(vy-abs(vy))/(2*mju(i,j)*hy);
G1=q1(i,j)/hy^2*(syy(i,j+1)-sxx(i,j+1)-2*(syy(i,j)-sxx(i,j))+syy(i,j-1)-sxx(i,j-1));
G2=q2(i,j)/(2*hy)*(syy(i,j+1)-sxx(i,j+1)-syy(i,j-1)+sxx(i,j-1));
G3=q3(i,j)/(4*hx*hy)*(syy(i+1,j+1)-sxx(i+1,j+1)+syy(i-1,j-1)-sxx(i-1,j-1)-syy(i+1,j-1)+sxx(i+1,j-1)-syy(i-1,j+1)+syy(i-1,j+1));
G4=q4(i,j)/(2*hy)*(sxy(i,j+1)-sxy(i,j-1));
G5=q5(i,j)/hx^2*(sxy(i+1,j)-2*sxy(i,j)+sxy(i-1,j));
G6=(q6(i,j)-q8(i,j))/hy^2*(sxy(i,j+1)-sxy(i,j)+sxy(i,j-1));
G7=q7(i,j)/(4*hx*hy)*(sxy(i+1,j+1)+sxy(i-1,j-1)-sxy(i-1,j+1)-sxy(i+1,jk-1));
Gij=G1+G2+G3+G4+G5+G6+G7;
aa(j)=-gyy(i,j)/hy^2+Vyp;
cc(j)=-gyy(i,j)/hy^2-Vym;
bb(j)=1/dt2+2*gyy(i,j)/hy^2-Vyp+Vym;
dd1=omega(i,j)/dt2+gxx(i,j)/hx^2*(omega(i-1,j)-2*omega(i,j)+omega(i+1,j));
dd2=Vxp*(omega(i,j)-omega(i-2,j))+Vxm*(omega(i+1,j)-omega(i,j));
dd3=gxy(i,j)/(4*hx*hy)*(omega(i+1,j+1)+omega(i-1,j-1)-omega(i+1,j-1)-omega(i-1,j+1));
dd(j)=dd1+dd2+dd3-Gij/mju(i,j);
end
omega(i,:)=tridag(aa,bb,cc,dd,ny);
end
sum=0;
for i=1:nx
for j=1:ny
sum=sum+abs(omega(i,j)-omegaold(i,j));
end
end
sdev=sum/(nx*ny)/psiw; disp(sprintf(' iter=%d relsum=%.5g',iter,sdev))
if sdev<0.00001
break
end
end
45
Constitutive equations White Metzner.
Geometry
Approximate profiles u,v, ,  for power law fluid
iteration
Elastic stress sxx, syy, sxy (hyperbolické MW)
When you skip these three
sections (iterative refinement of
the stream function and vorticity)
will result Pavlovec approximation
of the solution, but for a smooth
Gaussian gap profile.
Poisson equation for 
Nodal velocities and viscosity. BC for 
Poisson equation for 
Poisson equation for pressure p
46
Constitutive equation White Metzner.
Kontroloval: xxxxxx
2
𝑠𝑥𝑥
2𝜇 𝜕𝑢
𝜇
𝜕𝑠𝑥𝑥
𝜕𝑠𝑥𝑥
2𝜇 𝜕𝑢
2𝜇2 𝜕 2 𝑢
𝜕2𝑣
𝜕𝑢
1−
+
𝑢
+𝑣
=
𝑠𝑥𝑦 −
(𝑢 2 − 𝑣 2 − 2
𝐺 𝜕𝑥
𝐺
𝜕𝑥
𝜕𝑦
𝐺 𝜕𝑦
𝐺
𝜕𝑥
𝜕𝑦
𝜕𝑥
2
𝑠𝑦𝑦
𝜕𝑠𝑦𝑦
𝜕𝑠𝑦𝑦
2𝜇 𝜕𝑢
𝜇
2𝜇 𝜕𝑣
2𝜇2 𝜕 2 𝑢
𝜕2𝑣
𝜕𝑣
1+
+
𝑢
+𝑣
=
𝑠𝑥𝑦 +
(𝑢 2 − 𝑣 2 + 2
𝐺 𝜕𝑥
𝐺
𝜕𝑥
𝜕𝑦
𝐺 𝜕𝑥
𝐺
𝜕𝑥
𝜕𝑦
𝜕𝑦
𝜕𝑢
−
𝜕𝑦
2
𝜕𝑣
+
𝜕𝑥
2
−
𝜕𝑢 𝜕𝑣
)
𝜕𝑦 𝜕𝑥
+
𝜕𝑢 𝜕𝑣
)
𝜕𝑦 𝜕𝑥
𝜕𝑠𝑥𝑦
𝜕𝑠𝑥𝑦
𝜇
𝜇 𝜕𝑣
𝜕𝑢
𝜇2
𝜕2𝑣 𝜕2𝑣
𝜕2𝑢 𝜕2𝑢
𝜕𝑢 𝜕𝑣
𝜕𝑢 𝜕𝑣
𝑠𝑥𝑦 +
𝑢
+𝑣
=
𝑠 +
𝑠
− (𝑢
−
+𝑣
−
−2
−2
)
𝐺
𝜕𝑥
𝜕𝑦
𝐺 𝜕𝑥 𝑥𝑥 𝜕𝑦 𝑦𝑦
𝐺
𝜕𝑥 2 𝜕𝑦 2
𝜕𝑦 2 𝜕𝑥 2
𝜕𝑥 𝜕𝑥
𝜕𝑦 𝜕𝑦
𝜕𝑣 𝜕𝑣 𝜕𝑢
= −2 ( − )
𝜕𝑦 𝜕𝑥 𝜕𝑦
47
Kontroloval: xxxxxx
Constitutive equation White Metzner. Boundary conditions (BC) at wall.
For upper curved wall
𝑠𝑥𝑥
𝑠𝑦𝑦
𝑠𝑥𝑦
2𝜇 𝜕𝑢
2𝜇 𝜕𝑢
2𝜇2
𝜕𝑢
1−
=
𝑠𝑥𝑦 +
(2
𝐺 𝜕𝑥
𝐺 𝜕𝑦
𝐺
𝜕𝑥
2
2𝜇 𝜕𝑢
2𝜇 𝜕𝑣
2𝜇2
𝜕𝑣
1+
=
𝑠 +
(2
𝐺 𝜕𝑥
𝐺 𝜕𝑥 𝑥𝑦
𝐺
𝜕𝑦
2
𝜕𝑢
+
𝜕𝑦
2
𝜕𝑣
+
𝜕𝑥
2
+
𝜕𝑢 𝜕𝑣
)
𝜕𝑦 𝜕𝑥
System of 3 linear algebraic
equations for 3 unknowns
𝜕𝑢 𝜕𝑣
+
)
𝜕𝑦 𝜕𝑥
2𝜇2 𝜕𝑢
𝜇 𝜕𝑣
𝜕𝑢
𝜕𝑣 𝜕𝑢
=
𝑠𝑥𝑥 +
𝑠𝑦𝑦 +
( − )
𝐺 𝜕𝑥
𝜕𝑦
𝐺 𝜕𝑥 𝜕𝑥 𝜕𝑦
2𝜇 𝜕𝑢
1−
𝐺 𝜕𝑥
0
−
𝜇 𝜕𝑣
𝐺 𝜕𝑥
0
2𝜇 𝜕𝑢
1+
𝐺 𝜕𝑥
𝜇 𝜕𝑢
−
𝐺 𝜕𝑦
2𝜇 𝜕𝑢
−
𝐺 𝜕𝑦
2𝜇 𝜕𝑣
−
𝐺 𝜕𝑥
1
𝑠𝑥𝑥
𝑠𝑦𝑦 =
𝑠𝑥𝑦
2𝜇 2
𝜕𝑢
(2
𝐺
𝜕𝑥
2
2
𝜕𝑢
+
𝜕𝑦
2
+
𝜕𝑢 𝜕𝑣
)
𝜕𝑦 𝜕𝑥
2
2𝜇 2
𝜕𝑣
𝜕𝑣
𝜕𝑢 𝜕𝑣
(2
+
+
)
𝐺
𝜕𝑦
𝜕𝑥
𝜕𝑦 𝜕𝑥
2𝜇 2 𝜕𝑢 𝜕𝑣 𝜕𝑢
( − )
𝐺 𝜕𝑥 𝜕𝑥 𝜕𝑦
For bottom (planar) wall
𝑠𝑥𝑥
2𝜇2 𝜕𝑢
=
𝐺 𝜕𝑦
𝑠𝑦𝑦 = 0
2
At wall with transducers is
syy=0 and yy =0.
It offers the possibility to integrate WM
hyperbolic equations from left to right and
bottom to top
𝑠𝑥𝑦 = 0
48
Transformation of constitutive equations White Metzner.
𝑠𝑥𝑥 1 −
Kontroloval: xxxxxx
2𝜇 𝜕𝑢 𝜕𝜉 𝜕𝑢 𝜕𝜂
𝜇
𝜕𝑠𝑥𝑥 𝜕𝜉 𝜕𝑠𝑥𝑥 𝜕𝜂
𝜕𝑠𝑥𝑥 𝜕𝜂
2𝜇 𝜕𝑢 𝜕𝜂
(
+
) +
𝑢(
+
) +𝑣
=
𝑠
𝐺 𝜕𝜉 𝜕𝑥 𝜕𝜂 𝜕𝑥
𝐺
𝜕𝜉 𝜕𝑥
𝜕𝜂 𝜕𝑥
𝜕 𝜕𝑦
𝐺 𝜕𝜂 𝜕𝑦 𝑥𝑦
2
2
2𝜇2
𝜕𝑢 𝜕 2 𝜂 𝜕 2 𝑢 𝜕𝜉
𝜕 2 𝑢 𝜕𝜂
𝜕 2 𝑢 𝜕𝜂 𝜕𝜉
𝜕 2 𝑣 𝜕𝜂
−
(𝑢(
+
+ 2
+2
)−𝑣 2
𝐺
𝜕𝜂 𝜕𝑥 2 𝜕𝜉 2 𝜕𝑥
𝜕𝜂 𝜕𝑥
𝜕𝜉𝜕𝜂 𝜕𝑥 𝜕𝑥
𝜕𝜂 𝜕𝑦
2
2
𝜕𝑢 𝜕𝜉 𝜕𝑢 𝜕𝜂
𝜕𝑢 𝜕𝜂
𝜕𝑢 𝜕𝜂 𝜕𝑣 𝜕𝜉 𝜕𝑣 𝜕𝜂
−2
+
−
−
(
+
))
𝜕𝜉 𝜕𝑥 𝜕𝜂 𝜕𝑥
𝜕𝜂 𝜕𝑦
𝜕𝜂 𝜕𝑦 𝜕𝜉 𝜕𝑥 𝜕𝜂 𝜕𝑥
𝑠𝑦𝑦 1 +
2
𝜕𝑠𝑦𝑦 𝜕𝜉 𝜕𝑠𝑦𝑦 𝜕𝜂
𝜕𝑠𝑦𝑦 𝜕𝜂
2𝜇 𝜕𝑢 𝜕𝜉 𝜕𝑢 𝜕𝜂
𝜇
2𝜇 𝜕𝑢 𝜕𝜂
(
+
) +
𝑢(
+
) +𝑣
=
𝑠
𝐺 𝜕𝜉 𝜕𝑥 𝜕𝜂 𝜕𝑥
𝐺
𝜕𝜉 𝜕𝑥
𝜕𝜂 𝜕𝑥
𝜕 𝜕𝑦
𝐺 𝜕𝜂 𝜕𝑦 𝑥𝑦
2
2
2𝜇2
𝜕𝑢 𝜕 2 𝜂 𝜕 2 𝑢 𝜕𝜉
𝜕 2 𝑢 𝜕𝜂
𝜕 2 𝑢 𝜕𝜂 𝜕𝜉
𝜕 2 𝑣 𝜕𝜂
+
(𝑢(
+
+ 2
+2
)−𝑣 2
𝐺
𝜕𝜂 𝜕𝑥 2 𝜕𝜉 2 𝜕𝑥
𝜕𝜂 𝜕𝑥
𝜕𝜉𝜕𝜂 𝜕𝑥 𝜕𝑥
𝜕𝜂 𝜕𝑦
2
2
𝜕𝑢 𝜕𝜉 𝜕𝑢 𝜕𝜂
𝜕𝑢 𝜕𝜉 𝜕𝑢 𝜕𝜂
𝜕𝑢 𝜕𝜂 𝜕𝑣 𝜕𝜉 𝜕𝑣 𝜕𝜂
+2
+
+
+
+
(
+
))
𝜕𝜉 𝜕𝑥 𝜕𝜂 𝜕𝑥
𝜕𝜉 𝜕𝑥 𝜕𝜂 𝜕𝑥
𝜕𝜂 𝜕𝑦 𝜕𝜉 𝜕𝑥 𝜕𝜂 𝜕𝑥
2
𝜕𝑠𝑥𝑦 𝜕𝜉 𝜕𝑠𝑥𝑦 𝜕
𝜇
𝜕𝑠𝑥𝑦 𝜕𝜂
𝜇 𝜕𝑣 𝜕𝜉 𝜕𝑣 𝜕𝜂
𝜕𝑢 𝜕𝜂
𝑠𝑥𝑦 +
𝑢(
+
)+𝑣
=
(
+
)𝑠 +
𝑠
𝐺
𝜕 𝜕𝑥
𝜕 𝜕𝑥
𝜕𝜂 𝜕𝑦
𝐺 𝜕𝜉 𝜕𝑥 𝜕𝜂 𝜕𝑥 𝑥𝑥 𝜕𝜂 𝜕𝑦 𝑦𝑦
𝜇2
𝜕𝑣 𝜕 2 𝜂 𝜕 2 𝑣 𝜕𝜉
− (𝑢
+
𝐺
𝜕𝜂 𝜕𝑥 2 𝜕𝜉 2 𝜕𝑥
𝜕 2 𝑢 𝜕𝜂 2 𝜕𝑢 𝜕 2 𝜂 𝜕 2 𝑢 𝜕𝜉
+𝑣
( ) −
−
𝜕𝜂2 𝜕𝑦
𝜕𝜂 𝜕𝑥 2 𝜕𝜉 2 𝜕𝑥
2
2
𝜕 2 𝑣 𝜕𝜂
+ 2
𝜕𝜂 𝜕𝑥
𝜕 2 𝑢 𝜕𝜂
− 2
𝜕𝜂 𝜕𝑥
2
2
𝜕 2 𝑣 𝜕𝜂 𝜕𝜉 𝜕 2 𝑣 𝜕𝜂
+2
−
𝜕𝜉𝜕𝜂 𝜕𝑥 𝜕𝑥 𝜕𝜂2 𝜕𝑦
2
𝜕 2 𝑢 𝜕𝜂 𝜕𝜉
𝜕𝑣 𝜕𝜂 𝜕𝑣 𝜕𝜉 𝜕𝑣 𝜕𝜂 𝜕𝑢 𝜕𝜂
−2
−2
(
+
−
))
𝜕𝜉𝜕𝜂 𝜕𝑥 𝜕𝑥
𝜕𝜂 𝜕𝑦 𝜕𝜉 𝜕𝑥 𝜕𝜂 𝜕𝑥 𝜕𝜂 𝜕𝑦
49
Transformation of constitutive equations White Metzner (auxilliary variables)
𝑠𝑥𝑥
𝑠𝑦𝑦
Kontroloval: xxxxxx
2𝜇 𝜕𝑢 𝜕𝜉 𝜕𝑢 𝜕𝜂
𝐴=
(
+
)
𝐺 𝜕𝜉 𝜕𝑥 𝜕𝜂 𝜕𝑥
𝜇 𝜕𝑠𝑥𝑥 𝜕𝜉 𝜕𝑠𝑥𝑥 𝜕𝜂
𝜕𝜂
2𝜇 𝜕𝑢 𝜕𝜂
1−𝐴 +
𝑢
+
(𝑢
+𝑣 ) =
𝑠 − 𝑄𝑥𝑥
𝐺 𝜕𝜉 𝜕𝑥
𝜕𝜂
𝜕𝑥
𝜕𝑦
𝐺 𝜕𝜂 𝜕𝑦 𝑥𝑦
Interpretation as
material derivative
𝜇 𝜕𝑠𝑦𝑦 𝜕𝜉 𝜕𝑠𝑦𝑦 𝜕𝜂
𝜕𝜂
2𝜇 𝜕𝑢 𝜕𝜂
1+𝐴 +
𝑢
+
(𝑢
+𝑣 ) =
𝑠 + 𝑄𝑦𝑦
𝐺 𝜕𝜉 𝜕𝑥
𝜕𝜂
𝜕𝑥
𝜕𝑦
𝐺 𝜕𝜂 𝜕𝑦 𝑥𝑦
𝐷
𝜕𝜂
𝜕𝜂
=𝑢
+𝑣
𝐷𝑡
𝜕𝑥
𝜕𝑦
(corresponding to motion of fluid
particle along =konst)
𝜇 𝜕𝑠𝑥𝑦 𝜕𝜉 𝜕𝑠𝑥𝑦 𝜕
𝜕𝜂
𝜇 𝜕𝑣 𝜕𝜉 𝜕𝑣 𝜕𝜂
𝜕𝑢 𝜕𝜂
𝑠𝑥𝑦 +
𝑢
+
(𝑢
+𝑣 ) =
(
+
)𝑠𝑥𝑥 +
𝑠
− 𝑄𝑥𝑦
𝐺 𝜕 𝜕𝑥
𝜕
𝜕𝑥
𝜕𝑦
𝐺 𝜕𝜉 𝜕𝑥 𝜕𝜂 𝜕𝑥
𝜕𝜂 𝜕𝑦 𝑦𝑦
2𝜇2
𝜕𝑢 𝜕 2 𝜂 𝜕 2 𝑢 𝜕𝜉
=
(𝑢(
+
𝐺
𝜕𝜂 𝜕𝑥 2 𝜕𝜉 2 𝜕𝑥
2
2𝜇2
𝜕𝑢 𝜕 2 𝜂 𝜕 2 𝑢 𝜕𝜉
𝑄𝑦𝑦 =
(𝑢(
+
𝐺
𝜕𝜂 𝜕𝑥 2 𝜕𝜉 2 𝜕𝑥
2
𝜇2
𝜕𝑣 𝜕 2 𝜂 𝜕 2 𝑣 𝜕𝜉
𝑄𝑥𝑦 = (𝑢
+
𝐺
𝜕𝜂 𝜕𝑥 2 𝜕𝜉 2 𝜕𝑥
2
𝑄𝑥𝑥
𝜕 2 𝑢 𝜕𝜂
+ 2
𝜕𝜂 𝜕𝑥
2
𝜕 2 𝑢 𝜕𝜂
+ 2
𝜕𝜂 𝜕𝑥
2
𝜕 2 𝑣 𝜕𝜂
+ 2
𝜕𝜂 𝜕𝑥
2
𝜕 2 𝑢 𝜕𝜂 𝜕𝜉
𝜕 2 𝑣 𝜕𝜂
+2
)−𝑣 2
𝜕𝜉𝜕𝜂 𝜕𝑥 𝜕𝑥
𝜕𝜂 𝜕𝑦
2
𝜕 2 𝑢 𝜕𝜂 𝜕𝜉
𝜕 2 𝑣 𝜕𝜂
+2
)−𝑣 2
𝜕𝜉𝜕𝜂 𝜕𝑥 𝜕𝑥
𝜕𝜂 𝜕𝑦
2
2
𝜕𝑢 𝜕𝜉 𝜕𝑢 𝜕𝜂
−2
+
𝜕𝜉 𝜕𝑥 𝜕𝜂 𝜕𝑥
2
𝜕𝑢 𝜕𝜉 𝜕𝑢 𝜕𝜂
+2
+
𝜕𝜉 𝜕𝑥 𝜕𝜂 𝜕𝑥
2
𝜕 2 𝑣 𝜕𝜂 𝜕𝜉 𝜕 2 𝑣 𝜕𝜂
𝜕 2 𝑢 𝜕𝜂
+2
−
+𝑣
𝜕𝜉𝜕𝜂 𝜕𝑥 𝜕𝑥 𝜕𝜂2 𝜕𝑦
𝜕𝜂2 𝜕𝑦
𝜕𝑣 𝜕𝜂 𝜕𝑣 𝜕𝜉 𝜕𝑣 𝜕𝜂 𝜕𝑢 𝜕𝜂
−2
(
+
−
))
𝜕𝜂 𝜕𝑦 𝜕𝜉 𝜕𝑥 𝜕𝜂 𝜕𝑥 𝜕𝜂 𝜕𝑦
2
𝜕𝑢 𝜕𝜂
−
𝜕𝜂 𝜕𝑦
2
−
𝜕𝑢 𝜕𝜂 𝜕𝑣 𝜕𝜉 𝜕𝑣 𝜕𝜂
(
+
))
𝜕𝜂 𝜕𝑦 𝜕𝜉 𝜕𝑥 𝜕𝜂 𝜕𝑥
𝜕𝑢 𝜕𝜉 𝜕𝑢 𝜕𝜂
+
+
𝜕𝜉 𝜕𝑥 𝜕𝜂 𝜕𝑥
𝜕𝑢 𝜕 2 𝜂 𝜕 2 𝑢 𝜕𝜉
−
−
𝜕𝜂 𝜕𝑥 2 𝜕𝜉 2 𝜕𝑥
2
2
+
𝜕𝑢 𝜕𝜂 𝜕𝑣 𝜕𝜉 𝜕𝑣 𝜕𝜂
(
+
))
𝜕𝜂 𝜕𝑦 𝜕𝜉 𝜕𝑥 𝜕𝜂 𝜕𝑥
𝜕 2 𝑢 𝜕𝜂
− 2
𝜕𝜂 𝜕𝑥
2
𝜕 2 𝑢 𝜕𝜂 𝜕𝜉
−2
𝜕𝜉𝜕𝜂 𝜕𝑥 𝜕𝑥
50
Discretized constitutive equation White Metzner (UP direction)
geometry

=1
=0
Kontroloval: xxxxxx
i-1,j
i,j
𝑠𝑥𝑥 𝑖,1 =
hy

i,j-1
=0
i,j=1
=2
2𝜇
𝐺
2
𝜕𝑢
𝜕𝑦
2
Approximate profiles u,v, , 
for power law fluid
iteration
Elastic stress sxx, syy, sxy
(hyperbolic MW)
𝑠𝑦𝑦 𝑖,1 = 0
Poisson equation for 
Velocities, µ , BC for 
𝑠𝑥𝑦 𝑖,1 = 0
Poisson equation for 
Poisson equation for pressure p
𝑠𝑥𝑥 𝑖,𝑗
𝜇 𝑠𝑥𝑥 𝑖,𝑗 − 𝑠𝑥𝑥 𝑖−1,𝑗 𝜕𝜉 𝑠𝑥𝑥 𝑖,𝑗 − 𝑠𝑥𝑥 𝑖,𝑗−1 𝜕𝜂
𝜕𝜂
2𝜇 𝜕𝑢 𝜕𝜂
1−𝐴 +
𝑢
+
(𝑢
+𝑣 ) =
𝑠
− 𝑄𝑥𝑥
𝐺
ℎ𝑥
𝜕𝑥
ℎ𝑦
𝜕𝑥
𝜕𝑦
𝐺 𝜕𝜂 𝜕𝑦 𝑥𝑦 𝑖,𝑗
𝑠𝑦𝑦 𝑖, 𝑗
𝜇 𝑠𝑦𝑦 𝑖,𝑗 − 𝑠𝑦𝑦 𝑖−1,𝑗 𝜕𝜉 𝑠𝑦𝑦 𝑖,𝑗 − 𝑠𝑦𝑦 𝑖,𝑗−1 𝜕𝜂
𝜕𝜂
2𝜇 𝜕𝑢 𝜕𝜂
1+𝐴 +
𝑢
+
(𝑢
+𝑣 ) =
𝑠
+ 𝑄𝑦𝑦
𝐺
ℎ𝑥
𝜕𝑥
ℎ𝑦
𝜕𝑥
𝜕𝑦
𝐺 𝜕𝜂 𝜕𝑦 𝑥𝑦 𝑖,𝑗
𝜇 𝑠𝑥𝑦 𝑖,𝑗 − 𝑠𝑥𝑦 𝑖−1,𝑗 𝜕𝜉 𝑠𝑥𝑦 𝑖,𝑗 − 𝑠𝑥𝑦 𝑖,𝑗−1 𝜕
𝜕𝜂
𝜇 𝜕𝑣 𝜕𝜉 𝜕𝑣 𝜕𝜂
𝜕𝑢 𝜕𝜂
𝑠𝑥𝑦 𝑖,𝑗 +
𝑢
+
(𝑢
+𝑣 ) =
(
+
)𝑠
+
𝑠
− 𝑄𝑥𝑦
𝐺
ℎ𝑥
𝜕𝑥
ℎ𝑦
𝜕𝑥
𝜕𝑦
𝐺 𝜕𝜉 𝜕𝑥 𝜕𝜂 𝜕𝑥 𝑥𝑥 𝑖,𝑗 𝜕𝜂 𝜕𝑦 𝑦𝑦 𝑖,𝑗
51
Discretized constitutive equation White Metzner (UP direction).
Kontroloval: xxxxxx
Resulting system of algebraic equations for three stresses at point i,j evaluated from
stresses at left and from bottom
𝜇 𝑢 𝜕 𝑢 𝜕 𝑣 𝜕
1−𝐴+ (
+
+
)
𝐺 ℎ𝑥 𝜕𝑥 ℎ𝑦 𝜕𝑥 ℎ𝑦 𝜕𝑦
0
=
𝜇
𝐺
𝜇
𝐺
𝜇
𝐺
𝜇 𝜕𝑣 𝜕𝜉 𝜕𝑣 𝜕𝜂
− (
+
)
𝐺 𝜕𝜉 𝜕𝑥 𝜕𝜂 𝜕𝑥
𝑠𝑥𝑥 𝑖−1,𝑗 𝜕𝜉 𝑠𝑥𝑥 𝑖,𝑗−1 𝜕𝜂
𝑢
+
(𝑢
ℎ𝑥
𝜕𝑥
ℎ𝑦
𝜕𝑥
𝑠𝑦𝑦 𝑖−1,𝑗 𝜕𝜉 𝑠𝑦𝑦 𝑖,𝑗−1 𝜕𝜂
𝑢
+
(𝑢
ℎ𝑥
𝜕𝑥
ℎ𝑦
𝜕𝑥
𝑠𝑥𝑦 𝑖−1,𝑗 𝜕𝜉 𝑠𝑥𝑦 𝑖,𝑗−1 𝜕𝜂
𝑢
+
(𝑢
ℎ𝑥
𝜕𝑥
ℎ𝑦
𝜕𝑥
2𝜇 𝜕𝑢 𝜕𝜂
0
−
𝐺 𝜕𝜂 𝜕𝑦
𝜇 𝑢 𝜕 𝑢 𝜕 𝑣 𝜕
2𝜇 𝜕𝑢 𝜕𝜂
1+𝐴+ (
+
+
)
−
𝐺 ℎ𝑥 𝜕𝑥 ℎ𝑦 𝜕𝑥 ℎ𝑦 𝜕𝑦
𝐺 𝜕𝜂 𝜕𝑦
𝜇 𝜕𝑢 𝜕𝜂
𝜇 𝑢 𝜕 𝑢 𝜕 𝑣 𝜕
−
1+ (
+
+
)
𝐺 𝜕𝜂 𝜕𝑦
𝐺 ℎ𝑥 𝜕𝑥 ℎ𝑦 𝜕𝑥 ℎ𝑦 𝜕𝑦
𝜕𝜂
+ 𝑣 ) − 𝑄𝑥𝑥
𝜕𝑦
𝜕𝜂
+ 𝑣 ) − 𝑄𝑦𝑦
𝜕𝑦
𝜕𝜂
+ 𝑣 ) − 𝑄𝑥𝑦
𝜕𝑦
𝑠𝑥𝑥 , 𝑖𝑗
𝑠𝑦𝑦 , 𝑖𝑗
𝑠𝑥𝑦 , 𝑖𝑗
52
Discretized constitutive equation White Metzner (DOWN direction)
geometry

=1
i-1,j
=0
Kontroloval: xxxxxx
=0
i,j+1
i,j
i,j=1
𝑠𝑥𝑥 𝑖,1 =
hy

=2
2𝜇
𝐺
2
𝜕𝑢
𝜕𝑦
2
Approximate profiles u,v, , 
for power law fluid
iteration
Elastic stress sxx, syy, sxy
(hyperbolic MW)
𝑠𝑦𝑦 𝑖,1 = 0
Poisson equation for 
Velocities, µ , BC for 
𝑠𝑥𝑦 𝑖,1 = 0
Poisson equation for 
Poisson equation for pressure p
𝑠𝑥𝑥 𝑖,𝑗
𝜇 𝑠𝑥𝑥 𝑖,𝑗 − 𝑠𝑥𝑥 𝑖−1,𝑗 𝜕𝜉 𝑠𝑥𝑥 𝑖,𝑗+1 − 𝑠𝑥𝑥 𝑖,𝑗 𝜕𝜂
𝜕𝜂
2𝜇 𝜕𝑢 𝜕𝜂
1−𝐴 +
𝑢
+
(𝑢
+𝑣 ) =
𝑠
− 𝑄𝑥𝑥
𝐺
ℎ𝑥
𝜕𝑥
ℎ𝑦
𝜕𝑥
𝜕𝑦
𝐺 𝜕𝜂 𝜕𝑦 𝑥𝑦 𝑖,𝑗
𝑠𝑦𝑦 𝑖, 𝑗
𝜇 𝑠𝑦𝑦 𝑖,𝑗 − 𝑠𝑦𝑦 𝑖−1,𝑗 𝜕𝜉 𝑠𝑦𝑦 𝑖,𝑗+1 − 𝑠𝑦𝑦 𝑖,𝑗 𝜕𝜂
𝜕𝜂
2𝜇 𝜕𝑢 𝜕𝜂
1+𝐴 +
𝑢
+
(𝑢
+𝑣 ) =
𝑠
+ 𝑄𝑦𝑦
𝐺
ℎ𝑥
𝜕𝑥
ℎ𝑦
𝜕𝑥
𝜕𝑦
𝐺 𝜕𝜂 𝜕𝑦 𝑥𝑦 𝑖,𝑗
𝜇 𝑠𝑥𝑦 𝑖,𝑗 − 𝑠𝑥𝑦 𝑖−1,𝑗 𝜕𝜉 𝑠𝑥𝑦 𝑖,𝑗+1 − 𝑠𝑥𝑦 𝑖,𝑗 𝜕
𝜕𝜂
𝜇 𝜕𝑣 𝜕𝜉 𝜕𝑣 𝜕𝜂
𝜕𝑢 𝜕𝜂
𝑠𝑥𝑦 𝑖,𝑗 +
𝑢
+
(𝑢
+𝑣 ) =
(
+
)𝑠
+
𝑠
− 𝑄𝑥𝑦
𝐺
ℎ𝑥
𝜕𝑥
ℎ𝑦
𝜕𝑥
𝜕𝑦
𝐺 𝜕𝜉 𝜕𝑥 𝜕𝜂 𝜕𝑥 𝑥𝑥 𝑖,𝑗 𝜕𝜂 𝜕𝑦 𝑦𝑦 𝑖,𝑗
53
Discretized constitutive equation White Metzner (DOWN direction).
Kontroloval: xxxxxx
Resulting system of algebraic equations for three stresses at point i,j evaluated from
stresses at left and top
1−𝐴+
𝜇 𝑢 𝜕 𝑢 𝜕 𝑣 𝜕
(
−
−
)
𝐺 ℎ𝑥 𝜕𝑥 ℎ𝑦 𝜕𝑥 ℎ𝑦 𝜕𝑦
0
=
𝜇
𝐺
𝜇
𝐺
𝜇
𝐺
𝜇 𝜕𝑣 𝜕𝜉 𝜕𝑣 𝜕𝜂
− (
+
)
𝐺 𝜕𝜉 𝜕𝑥 𝜕𝜂 𝜕𝑥
𝑠𝑥𝑥 𝑖−1,𝑗 𝜕𝜉 𝑠𝑥𝑥 𝑖,𝑗+1 𝜕𝜂
𝑢
−
(𝑢
ℎ𝑥
𝜕𝑥
ℎ𝑦
𝜕𝑥
𝑠𝑦𝑦 𝑖−1,𝑗 𝜕𝜉 𝑠𝑦𝑦 𝑖,𝑗+1 𝜕𝜂
𝑢
−
(𝑢
ℎ𝑥
𝜕𝑥
ℎ𝑦
𝜕𝑥
𝑠𝑥𝑦 𝑖−1,𝑗 𝜕𝜉 𝑠𝑥𝑦 𝑖,𝑗+1 𝜕𝜂
𝑢
−
(𝑢
ℎ𝑥
𝜕𝑥
ℎ𝑦
𝜕𝑥
2𝜇 𝜕𝑢 𝜕𝜂
𝐺 𝜕𝜂 𝜕𝑦
𝜇 𝑢 𝜕 𝑢 𝜕 𝑣 𝜕
2𝜇 𝜕𝑢 𝜕𝜂
1+𝐴+ (
−
−
)
−
𝐺 ℎ𝑥 𝜕𝑥 ℎ𝑦 𝜕𝑥 ℎ𝑦 𝜕𝑦
𝐺 𝜕𝜂 𝜕𝑦
𝜇 𝜕𝑢 𝜕𝜂
𝜇 𝑢 𝜕 𝑢 𝜕 𝑣 𝜕
−
1+ (
−
−
)
𝐺 𝜕𝜂 𝜕𝑦
𝐺 ℎ𝑥 𝜕𝑥 ℎ𝑦 𝜕𝑥 ℎ𝑦 𝜕𝑦
𝜕𝜂
+ 𝑣 ) − 𝑄𝑥𝑥
𝜕𝑦
𝜕𝜂
+ 𝑣 ) − 𝑄𝑦𝑦
𝜕𝑦
𝜕𝜂
+ 𝑣 ) − 𝑄𝑥𝑦
𝜕𝑦
0
−
𝑠𝑥𝑥 , 𝑖𝑗
𝑠𝑦𝑦 , 𝑖𝑗
𝑠𝑥𝑦 , 𝑖𝑗
54
Kontroloval: xxxxxx
Discretized constitutive equation White Metzner (iterative threediagonal)

2𝜇 𝜕𝑢
1−
𝐺 𝜕𝑥
0
=1
i-1,j
=0
=0
𝑠𝑥𝑥 𝑖,𝑗 1 − 𝐴 +
𝑠𝑦𝑦 𝑖, 𝑗
i,j+1
i,j
i,j-1
i,j=1
hy
−
𝜇 𝜕𝑣
𝐺 𝜕𝑥
0
2𝜇 𝜕𝑢
1+
𝐺 𝜕𝑥
𝜇 𝜕𝑢
−
𝐺 𝜕𝑦

=2
𝑠𝑥𝑥 𝑖,1
2𝜇 𝜕𝑢
−
𝐺 𝜕𝑦
2𝜇 𝜕𝑣
−
𝐺 𝜕𝑥
𝑠𝑥𝑥𝑖,𝑛𝑦
𝑠𝑦𝑦 𝑖, 𝑛𝑦 =
𝑠𝑥𝑦𝑖,𝑛𝑦
1
2𝜇2 𝜕𝑢
=
𝐺 𝜕𝑦
2𝜇 2
𝜕𝑢
(2
𝐺
𝜕𝑥
2
2
𝜕𝑢
+
𝜕𝑦
2
+
𝜕𝑢 𝜕𝑣
)
𝜕𝑦 𝜕𝑥
2
2𝜇 2
𝜕𝑣
𝜕𝑣
𝜕𝑢 𝜕𝑣
(2
+
+
)
𝐺
𝜕𝑦
𝜕𝑥
𝜕𝑦 𝜕𝑥
2𝜇 2 𝜕𝑢 𝜕𝑣 𝜕𝑢
( − )
𝐺 𝜕𝑥 𝜕𝑥 𝜕𝑦
2
𝑠𝑦𝑦 𝑖,1 = 0
𝑠𝑥𝑦 𝑖,1 = 0
𝜇 𝑠𝑥𝑥 𝑖,𝑗 − 𝑠𝑥𝑥 𝑖−1,𝑗 𝜕𝜉 𝑠𝑥𝑥 𝑖,𝑗+1 − 𝑠𝑥𝑥 𝑖,𝑗−1 𝜕𝜂
𝜕𝜂
2𝜇 𝜕𝑢 𝜕𝜂
𝑢
+
(𝑢
+𝑣 ) =
𝑠
− 𝑄𝑥𝑥
𝐺
ℎ𝑥
𝜕𝑥
2ℎ𝑦
𝜕𝑥
𝜕𝑦
𝐺 𝜕𝜂 𝜕𝑦 𝑥𝑦 𝑖,𝑗
𝜇 𝑠𝑦𝑦 𝑖,𝑗 − 𝑠𝑦𝑦 𝑖−1,𝑗 𝜕𝜉 𝑠𝑦𝑦 𝑖,𝑗+1 − 𝑠𝑦𝑦 𝑖,𝑗−1 𝜕𝜂
𝜕𝜂
2𝜇 𝜕𝑢 𝜕𝜂
1+𝐴 +
𝑢
+
(𝑢
+𝑣 ) =
𝑠
+ 𝑄𝑦𝑦
𝐺
ℎ𝑥
𝜕𝑥
2ℎ𝑦
𝜕𝑥
𝜕𝑦
𝐺 𝜕𝜂 𝜕𝑦 𝑥𝑦 𝑖,𝑗
𝜇 𝑠𝑥𝑦 𝑖,𝑗 − 𝑠𝑥𝑦 𝑖−1,𝑗 𝜕𝜉 𝑠𝑥𝑦 𝑖,𝑗+1 − 𝑠𝑥𝑦 𝑖,𝑗−1 𝜕
𝜕𝜂
𝜇 𝜕𝑣 𝜕𝜉 𝜕𝑣 𝜕𝜂
𝜕𝑢 𝜕𝜂
𝑠𝑥𝑦 𝑖,𝑗 +
𝑢
+
(𝑢
+𝑣 ) =
(
+
)𝑠
+
𝑠
− 𝑄𝑥𝑦
𝐺
ℎ𝑥
𝜕𝑥
2ℎ𝑦
𝜕𝑥
𝜕𝑦
𝐺 𝜕𝜉 𝜕𝑥 𝜕𝜂 𝜕𝑥 𝑥𝑥 𝑖,𝑗 𝜕𝜂 𝜕𝑦 𝑦𝑦 𝑖,𝑗
55
Kontroloval: xxxxxx
Discretized constitutive equation White Metzner (iterative threediagonal)
Diagonal (vector bb)
WM
BC for sxx, syy, sxy
i=2,3,…,nx
Low diagonal (vector aa)
Upper diagonal (vector cc)
𝜇 𝑢 𝜕𝜉
𝜇
𝜕𝜂
𝜕𝜂
𝜇
𝜕𝜂
𝜕𝜂
− 𝑠𝑥𝑥 𝑖,𝑗−1
𝑢
+𝑣
+ 𝑠𝑥𝑥 𝑖,𝑗+1
𝑢
+𝑣
𝐺 ℎ𝑥 𝜕𝑥
2𝐺ℎ𝑦
𝜕𝑥
𝜕𝑦
2𝐺ℎ𝑦
𝜕𝑥
𝜕𝑦
𝜇
𝜕𝜉 2𝜇 𝜕𝑢 𝜕𝜂
=
𝑠𝑥𝑥 𝑖−1,𝑗 𝑢
+
𝑠
− 𝑄𝑥𝑥
𝐺ℎ𝑥
𝜕𝑥 𝐺 𝜕𝜂 𝜕𝑦 𝑥𝑦 𝑖,𝑗
𝑠𝑥𝑥 𝑖,𝑗 1 − 𝐴 +
iteration
stress sxx (3diagonal solver)
stress syy (3diagonal solver)
stress sxy (3diagonal solver)
𝜇 𝑢 𝜕𝜉
𝜇
𝜕𝜂
𝜕𝜂
𝜇
𝜕𝜂
𝜕𝜂
− 𝑠𝑦𝑦 𝑖,𝑗−1
𝑢
+𝑣
+ 𝑠𝑦𝑦 𝑖,𝑗+1
𝑢
+𝑣
𝐺 ℎ𝑥 𝜕𝑥
2𝐺ℎ𝑦
𝜕𝑥
𝜕𝑦
2𝐺ℎ𝑦
𝜕𝑥
𝜕𝑦
𝜇
𝜕𝜉 2𝜇 𝜕𝑢 𝜕𝜂
=
𝑠
𝑢
+
𝑠
− 𝑄𝑦𝑦
𝐺ℎ𝑥 𝑦𝑦 𝑖−1,𝑗 𝜕𝑥 𝐺 𝜕𝜂 𝜕𝑦 𝑥𝑦 𝑖,𝑗
𝑠𝑦𝑦 𝑖,𝑗 1 + 𝐴 +
I section
𝜇 𝑢 𝜕𝜉
𝜇
𝜕𝜂
𝜕𝜂
𝜇
𝜕𝜂
𝜕𝜂
𝑠𝑥𝑦 𝑖,𝑗 1 +
− 𝑠𝑥𝑦 𝑖,𝑗−1
𝑢
+𝑣
+ 𝑠𝑥𝑦 𝑖,𝑗+1
𝑢
+𝑣
𝐺 ℎ𝑥 𝜕𝑥
2𝐺ℎ𝑦
𝜕𝑥
𝜕𝑦
2𝐺ℎ𝑦
𝜕𝑥
𝜕𝑦
𝜇
𝜕𝜉 𝜇 𝜕𝑣 𝜕𝜉 𝜕𝑣 𝜕𝜂
𝜕𝑢 𝜕𝜂
=
𝑠
𝑢
+
(
+
)𝑠
+
𝑠
− 𝑄𝑥𝑦
𝐺ℎ𝑥 𝑥𝑦 𝑖−1,𝑗 𝜕𝑥 𝐺 𝜕𝜉 𝜕𝑥 𝜕𝜂 𝜕𝑥 𝑥𝑥 𝑖,𝑗 𝜕𝜂 𝜕𝑦 𝑦𝑦 𝑖,𝑗
56
Discretized constitutive equation White Metzner MW.m (Matlab)
Kontroloval: xxxxxx
Resulting system of algebraic equations for three stresses at point i,j evaluated from stresses at left and from bottom
57
Poisson equation for pressure
(𝑢
𝜕𝑢
𝜕𝑢
𝜕𝑝 𝜕𝜏𝑥𝑥 𝜕𝜏𝑥𝑦
+𝑣 )=−
+
+
𝜕𝑥
𝜕𝑦
𝜕𝑥
𝜕𝑥
𝜕𝑦
Kontroloval: xxxxxx
geometry
Approximate profiles u,v, , 
for power law fluid
iteration
𝜕𝑣
𝜕𝑣
𝜕𝑝 𝜕𝜏𝑥𝑦 𝜕𝜏𝑦𝑦
(𝑢
+𝑣 )= −
+
+
𝜕𝑥
𝜕𝑦
𝜕𝑦
𝜕𝑥
𝜕𝑦
𝜕2𝑝 𝜕2𝑝
𝜕𝑢 𝜕𝑢
𝜕2𝑢
𝜕2𝑣
𝜕𝑣 𝜕𝑢
𝜕2𝑢
𝜕 2 𝑣 𝜕𝑣 𝜕𝑣
+
+
+𝑢 2+𝑣 2+2
+𝑣
+𝑢
+
𝜕𝑥 2 𝜕𝑦 2
𝜕𝑥 𝜕𝑥
𝜕𝑥
𝜕𝑦
𝜕𝑥 𝜕𝑦
𝜕𝑥𝑦
𝜕𝑥𝑦 𝜕𝑦 𝜕𝑦
𝜕 2 𝑥𝑦
𝜕2𝑝 𝜕2𝑝
𝜕𝑣 𝜕𝑢 𝜕𝑣 𝜕𝑢
𝜕 2 𝑥𝑥 𝜕 2 𝑦𝑦
= 2 + 2 + 2
−
=
+
+2
𝜕𝑥
𝜕𝑦
𝜕𝑥 𝜕𝑦 𝜕𝑦 𝜕𝑥
𝜕𝑥 2
𝜕𝑦 2
𝜕𝑥𝜕𝑦
Elastic stress sxx, syy, sxy
(hyperbolic MW)
Poisson equation for 
Velocities, µ , BC for 
Poisson equation for 
Poisson equation for pressure p
Decomposition to elastic and viscous components
𝜕 2 𝑥𝑥 𝜕 2 𝑠𝑥𝑥
𝜕3𝑢
𝜕µ 𝜕 2 𝑢
𝜕 2 µ 𝜕𝑢
=
+ 2µ 3 + 4
+2 2
𝜕𝑥 2
𝜕𝑥 2
𝜕𝑥
𝜕𝑥 𝜕𝑥 2
𝜕𝑥 𝜕𝑥
𝜕 2 𝑦𝑦 𝜕 2 𝑠𝑦𝑦
𝜕3𝑣
𝜕µ 𝜕 2 𝑣
𝜕 2 µ 𝜕𝑣
=
+ 2µ 3 + 4
+2 2
𝜕𝑦 2
𝜕𝑦 2
𝜕𝑦
𝜕𝑦 𝜕𝑦 2
𝜕𝑦 𝜕𝑦
𝜕 2 𝑥𝑦 𝜕 2 𝑠𝑥𝑦
𝜕3𝑢
𝜕3𝑣
𝜕µ 𝜕 2 𝑢 𝜕 2 𝑣
𝜕µ 𝜕 2 𝑣
𝜕2𝑢
𝜕 2 µ 𝜕𝑢 𝜕𝑣
=
+µ
+
+
+
+
+
+
+
𝜕𝑥𝜕𝑦
𝜕𝑥𝜕𝑦
𝜕𝑥𝜕𝑦 2 𝜕𝑦𝜕𝑥 2
𝜕𝑦 𝜕𝑥𝜕𝑦 𝜕𝑥 2
𝜕𝑥 𝜕𝑥𝜕𝑦 𝜕𝑦 2
𝜕𝑥𝜕𝑦 𝜕𝑦 𝜕𝑥
58
Poisson equation for pressure
Kontroloval: xxxxxx
For constant viscosity
𝜕 2 𝑥𝑦 𝜕 2 𝑠𝑥𝑥 𝜕 2 𝑠𝑦𝑦
𝜕 2 𝑠𝑥𝑦
𝜕 2 𝑥𝑥 𝜕 2 𝑦𝑦
𝜕3𝑢
𝜕3𝑣
𝜕3𝑢
𝜕3𝑣
+
+2
=
+
+2
+ µ(2 3 + 2 3 + 2
+2
)
𝜕𝑥 2
𝜕𝑦 2
𝜕𝑥𝜕𝑦
𝜕𝑥 2
𝜕𝑦 2
𝜕𝑥𝜕𝑦
𝜕𝑥
𝜕𝑦
𝜕𝑥𝜕𝑦 2
𝜕𝑦𝜕𝑥 2
A sum of all the members in the viscosity coefficient is
zero, therefore, the viscosity does not directly affect the
relationship between the pressure and the elastic tension
𝜕3𝑢
𝜕3𝑣
𝜕3𝑢
𝜕3𝑣
2 3+2 3+2
+2
=0
𝜕𝑥
𝜕𝑦
𝜕𝑥𝜕𝑦 2
𝜕𝑦𝜕𝑥 2
𝜕 2 𝑠𝑥𝑦
𝜕2𝑝 𝜕2𝑝
𝜕𝑣 𝜕𝑢 𝜕𝑣 𝜕𝑢
𝜕 2 𝑠𝑥𝑥 𝜕 2 𝑠𝑦𝑦
+
+ 2
−
=
+
+2
𝜕𝑥 2 𝜕𝑦 2
𝜕𝑥 𝜕𝑦 𝜕𝑦 𝜕𝑥
𝜕𝑥 2
𝜕𝑦 2
𝜕𝑥𝜕𝑦
For variable viscosity the relationship between the pressure and the elastic tension appear
𝜕 2 𝑠𝑥𝑦
𝜕2𝑝 𝜕2𝑝
𝜕𝑣 𝜕𝑢 𝜕𝑣 𝜕𝑢
𝜕 2 𝑠𝑥𝑥 𝜕 2 𝑠𝑦𝑦
+
+ 2
−
=
+
+2
+
𝜕𝑥 2 𝜕𝑦 2
𝜕𝑥 𝜕𝑦 𝜕𝑦 𝜕𝑥
𝜕𝑥 2
𝜕𝑦 2
𝜕𝑥𝜕𝑦
𝜕 𝜕 𝜕 𝜕
𝜕 2 µ 𝜕𝑢 𝜕𝑣
𝜕 2 µ 𝜕𝑢 𝜕 2 µ 𝜕𝑣
2(
−
+
+
+ 2
+
)
𝜕𝑥 𝜕𝑦 𝜕𝑦 𝜕𝑥 𝜕𝑥𝜕𝑦 𝜕𝑦 𝜕𝑥
𝜕𝑥 𝜕𝑥 𝜕𝑦 2 𝜕𝑦
59
Poisson equation for pressure. Boundary conditions
Kontroloval: xxxxxx
The equation for pressure distribution is elliptic equation of second order, and in each point of the border is
necessary to prescribe exactly one boundary condition: Either directly pressure (at least in one point, because
the pressure field in an incompressible liquid is defined up to an arbitrary constant) or the normal derivative of
the pressure (Neuman boundary condition of the second kind). At the inlet, where we assume the absence of
elastic effects can be fixed e.g. zero pressure over the cross section (p = 0). The solid wall (u = v = 0) is
required to enter a pressure gradient, starting from the Cauchy equilibrium equations
𝜕𝑝 𝜕𝜏𝑥𝑥 𝜕𝜏𝑥𝑦 𝜕𝑠𝑥𝑥 𝜕𝑠𝑥𝑦
𝜕2𝑢 𝜕2𝑢
𝜕2𝑣
𝜕 𝜕𝑢 𝜕 𝜕𝑢 𝜕𝑣
=
+
=
+
+ (2 2 + 2 +
)+2
+
( + )
𝜕𝑥
𝜕𝑥
𝜕𝑦
𝜕𝑥
𝜕𝑦
𝜕𝑥
𝜕𝑦
𝜕𝑥𝜕𝑦
𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑦 𝜕𝑥
𝜕𝑝
=
𝜕𝑥
𝜕𝑠𝑥𝑥 𝜕𝑠𝑥𝑦
𝜕
𝜕 𝜕𝑢 𝜕 𝜕𝑢 𝜕𝑣
+
−
+2
+
( + )
𝜕𝑥
𝜕𝑦
𝜕𝑦
𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑦 𝜕𝑥
𝜕𝑝 𝜕𝜏𝑦𝑦 𝜕𝜏𝑥𝑦 𝜕𝑠𝑦𝑦 𝜕𝑠𝑥𝑦
𝜕2𝑣 𝜕2𝑣
𝜕2𝑢
𝜕 𝜕𝑣 𝜕 𝜕𝑢 𝜕𝑣
=
+
=
+
+ 2 2 + 2+
+2
+
( + )
𝜕𝑦
𝜕𝑦
𝜕𝑥
𝜕𝑦
𝜕𝑥
𝜕𝑦
𝜕𝑥
𝜕𝑥𝜕𝑦
𝜕𝑦 𝜕𝑦 𝜕𝑥 𝜕𝑦 𝜕𝑥
𝜕𝑝
=
𝜕𝑦
𝜕𝑠𝑦𝑦 𝜕𝑠𝑥𝑦
𝜕
𝜕 𝜕𝑣 𝜕 𝜕𝑢 𝜕𝑣
+
−
+2
+
( + )
𝜕𝑦
𝜕𝑥
𝜕𝑥
𝜕𝑦 𝜕𝑦 𝜕𝑥 𝜕𝑦 𝜕𝑥
60
Download