1 c ************************************************************************
3 c Macros to define
the equations
for the line solver
5 c This file is included by insLineSolveNew.bf
7 c In 2
d the momentum equations are:
9 c u.t +
u.grad(
u) + p.x =
Dx( 2*vp*
u.x ) + Dy( vp*
u.y ) + Dy( vp*
v.x )
12 c ************************************************************************
14 ! The next include file defines conservative approximations to coefficent matrices
18 c ===================================================================================
19 c VP: incompressible Navier Stokes with
a visco-plastic model
20 c *** rectangular
grid version ***
23 c====================================================================================
24 #beginMacro fillEquationsRectangularGridVP(dir)
26 if( use4thOrderAD.eq.1 )then
27 write(*,*)
'insLineSolve: 4th order diss not finished'
31 !
set default values
for no 2nd
order artificial diffusion:
45 defineArtificialDiffusionCoefficients(2,
dir,
R,)
48 ! Get
the nonlinear viscosity at nearby points:
54 ! getViscoPlasticViscosityCoefficient(
nuzmz,
i1 ,
i2-1,
i3,2,rectangular)
55 ! getViscoPlasticViscosityCoefficient(
numzz,
i1-1,
i2 ,
i3,2,rectangular)
56 ! getViscoPlasticViscosityCoefficient(
nuzzz,
i1 ,
i2 ,
i3,2,rectangular)
57 ! getViscoPlasticViscosityCoefficient(
nupzz,
i1+1,
i2 ,
i3,2,rectangular)
58 ! getViscoPlasticViscosityCoefficient(
nuzpz,
i1 ,
i2+1,
i3,2,rectangular)
70 if( computeMatrix.eq.1 )then
74 bm(
i1,
i2,
i3)= dtScale/dt(
i1,
i2,
i3) +cdDiag + 2.*(nu0ph+nu0mh)*dxvsqi(0)+(nu1ph+nu1mh)*dxvsqi(1)
78 bm(
i1,
i2,
i3)= dtScale/dt(
i1,
i2,
i3) +cdDiag + (nu0ph+nu0mh)*dxvsqi(0)+2.*(nu1ph+nu1mh)*dxvsqi(1)
86 bm(
i1,
i2,
i3)= dtScale/dt(
i1,
i2,
i3) +cdDiag + 2.*(nu0ph+nu0mh)*dxvsqi(0)+(nu1ph+nu1mh)*dxvsqi(1)
90 bm(
i1,
i2,
i3)= dtScale/dt(
i1,
i2,
i3) +cdDiag + (nu0ph+nu0mh)*dxvsqi(0)+2.*(nu1ph+nu1mh)*dxvsqi(1)
116 if( computeRHS.eq.1 )then
119 ! remove
dir=0 implicit terms:
138 ! remove
dir=1 implicit terms:
168 if( computeRHS.eq.1 )then
180 stop 888 ! unexpected value
for nd
186 c ===================================================================================
187 c VP: incompressible Navier Stokes with
a visco-plastic model
188 c *** curvilinear
grid version ***
191 c====================================================================================
192 #beginMacro fillEquationsCurvilinearGridVP(
dir)
194 if( use4thOrderAD.eq.1 )then
195 write(*,*)
'insLineSolve: 4th order diss not finished'
199 ! write(*,
'(" -- fill tridiagonal matrix curvlinear VP --")')
201 ! set default values
for no 2nd
order artificial diffusion:
215 defineArtificialDiffusionCoefficients(2,
dir,C,)
218 ! Get
the nonlinear viscosity at nearby points:
224 ! Evaluate
the nonlinear viscosity
225 ! getViscoPlasticViscosityCoefficient(
nuzmz,
i1 ,
i2-1,
i3,2,curvilinear)
226 ! getViscoPlasticViscosityCoefficient(
numzz,
i1-1,
i2 ,
i3,2,curvilinear)
227 ! getViscoPlasticViscosityCoefficient(
nuzzz,
i1 ,
i2 ,
i3,2,curvilinear)
228 ! getViscoPlasticViscosityCoefficient(
nupzz,
i1+1,
i2 ,
i3,2,curvilinear)
229 ! getViscoPlasticViscosityCoefficient(
nuzpz,
i1 ,
i2+1,
i3,2,curvilinear)
234 ! evaluate
the jacobian at nearby points:
235 ajzmz = ajac2d(
i1 ,
i2-1,
i3)
236 ajmzz = ajac2d(
i1-1,
i2 ,
i3)
237 ajzzz = ajac2d(
i1 ,
i2 ,
i3)
238 ajpzz = ajac2d(
i1+1,
i2 ,
i3)
239 ajzpz = ajac2d(
i1 ,
i2+1,
i3)
242 !
Dx( 2*nu*
u.
x ) + Dy( nu*
u.
y )
243 getCoeffForDxADxPlusDyBDy(au, 2.*
nuzmz,2.*
numzz,2.*
nuzzz,2.*
nupzz,2.*
nuzpz,
nuzmz,
numzz,
nuzzz,
nupzz,
nuzpz )
250 ! 2.
Dx( nu*
v.
x ) + Dy( 2*nu*
v.
y )
251 getCoeffForDxADxPlusDyBDy(av,
nuzmz,
numzz,
nuzzz,
nupzz,
nuzpz, 2.*
nuzmz,2.*
numzz,2.*
nuzzz,2.*
nupzz,2.*
nuzpz )
257 if( computeMatrix.eq.1 )then
261 dr0i = 1./(ajzzz*dr(0)**2)
262 dr1i = 1./(ajzzz*dr(1)**2)
267 am(
i1,
i2,
i3)= -t1 -cdm - au11mh*dr0i
268 bm(
i1,
i2,
i3)= dtScale/dt(
i1,
i2,
i3) +cdDiag + (au11ph+au11mh)*dr0i +(au22ph+au22mh)*dr1i
269 cm(
i1,
i2,
i3)= t1 -cdp - au11ph*dr0i
271 am(
i1,
i2,
i3)= -t1 -cdm - av11mh*dr0i
272 bm(
i1,
i2,
i3)= dtScale/dt(
i1,
i2,
i3) +cdDiag + (av11ph+av11mh)*dr0i +(av22ph+av22mh)*dr1i
273 cm(
i1,
i2,
i3)= t1 -cdp - av11ph*dr0i
279 am(
i1,
i2,
i3)= -t1 -cdm - au22mh*dr1i
280 bm(
i1,
i2,
i3)= dtScale/dt(
i1,
i2,
i3) +cdDiag + (au11ph+au11mh)*dr0i +(au22ph+au22mh)*dr1i
281 cm(
i1,
i2,
i3)= t1 -cdp - au22ph*dr1i
283 am(
i1,
i2,
i3)= -t1 -cdm - av22mh*dr1i
284 bm(
i1,
i2,
i3)= dtScale/dt(
i1,
i2,
i3) +cdDiag + (av11ph+av11mh)*dr0i +(av22ph+av22mh)*dr1i
285 cm(
i1,
i2,
i3)= t1 -cdp - av22ph*dr1i
295 !
residual(
i1,
i2,
i3,
uc)=
f(
i1,
i2,
i3,
uc)-
u(
i1,
i2,
i3,
uc)*ux2c(
uc)-
u(
i1,
i2,
i3,
vc)*uy2c(
uc)-ux2c(
pc)\
298 ! + ( au11ph*(
u(
i1+1,
i2,
i3,
uc)-
u(
i1,
i2,
i3,
uc)) - au11mh*(
u(
i1,
i2,
i3,
uc)-
u(
i1-1,
i2,
i3,
uc)) )/dr(0)**2\
299 ! + ( au22ph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3,
uc))-bv12mzz*(
u(
i1-1,
i2+1,
i3,
uc)-
u(
i1-1,
i2-1,
i3,
uc)))/(4.*dr(0)*dr(1))\
389 + (bv21zpz*(
u(
i1+1,
i2+1,
i3,
uc)-
u(
i1-1,
i2+1,
i3,
uc))-bv21zmz*(
u(
i1+1,
i2-1,
i3,
uc)-
u(
i1-1,
i2-1,
i3,
uc)))/(4.*dr(0)*dr(1))\
404 if( computeRHS.eq.1 )then
416 stop 888 ! unexpected value
for nd
424 c==================================================================================
425 c Residual Computation
for VP: incompressible Navier Stokes with
a visco-plastic model
428 c
GRIDTYPE: rectangular, curvilinear
429 c====================================================================================
430 #beginMacro computeResidualVP(
GRIDTYPE)
432 ! write(*,
'("new: computeResidualVP, use2ndOrderAD=",i2)')
use2ndOrderAD
434 if( use4thOrderAD.eq.1 )then
435 write(*,*)
'insLineSolve: computeResidualVP: 4th order diss not finished'
447 ! Get
the nonlinear viscosity at nearby points:
453 ! Evaluate
the nonlinear viscosity
"nu"
469 residual(
i1,
i2,
i3,
uc)=
f(
i1,
i2,
i3,
uc)-
u(
i1,
i2,
i3,
uc)*
ux2(
uc)-
u(
i1,
i2,
i3,
vc)*
uy2(
uc)-
ux2(
pc)\
476 residual(
i1,
i2,
i3,
vc)=
f(
i1,
i2,
i3,
vc)-
u(
i1,
i2,
i3,
uc)*
ux2(
vc)-
u(
i1,
i2,
i3,
vc)*
uy2(
vc)-
uy2(
pc)\
489 residual(
i1,
i2,
i3,
tc)=
f(
i1,
i2,
i3,
tc)-
u(
i1,
i2,
i3,
uc)*
ux2(
tc)-
u(
i1,
i2,
i3,
vc)*
uy2(
tc)+kThermal*lap2d2(
tc)
490 ! --- artificial dissipation
for T: do this
for now:
493 else if( use4thOrderAD.eq.1 )then
494 ! compute adc2,
adc4:
495 getDerivativesAndDissipation(2,2,
GRIDTYPE)
501 ! ************ VP curvilinear case ********************
503 ! evaluate
the jacobian at nearby points:
504 ajzmz = ajac2d(
i1 ,
i2-1,
i3)
505 aj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
i2-1,
i3,
vc)-
u(
i1-1,
i2-1,
i3,
vc)))/(4.*dr(0)*dr(1))\
548 + (
b11ph*(
u(
i1+1,
i2,
i3,
uc)-
u(
i1,
i2,
i3,
uc)) -
b11mh*(
u(
i1,
i2,
i3,
uc)-
u(
i1-1,
i2,
i3,
uc)) )/dr(0)**2\
549 + ( b22ph*(
u(
i1,
i2+1,
i3,
uc)-
u(
i1,
i2,
i3,
uc)) - b22mh*(
u(
i1,
i2,
i3,
uc)-
u(
i1,
i2-1,
i3,
uc)) )/dr(1)**2\
550 + (b12pzz*(
u(
i1+1,
i2+1,
i3,
uc)-
u(
i1+1,
i2-1,
i3,
uc))-b12mzz*(
u(
i1-1,
i2+1,
i3,
uc)-
u(
i1-1,
i2-1,
i3,
uc)))/(4.*dr(0)*dr(1))\
551 + (b21zpz*(
u(
i1+1,
i2+1,
i3,
uc)-
u(
i1-1,
i2+1,
i3,
uc))-b21zmz*(
u(
i1+1,
i2-1,
i3,
uc)-
u(
i1-1,
i2-1,
i3,
uc)))/(4.*dr(0)*dr(1))\
560 residual(
i1,
i2,
i3,
tc)=
f(
i1,
i2,
i3,
tc)-
u(
i1,
i2,
i3,
uc)*ux2c(
tc)-
u(
i1,
i2,
i3,
vc)*uy2c(
tc)+kThermal*lap2d2c(
tc)
561 ! --- artificial dissipation
for T: do this
for now:
564 else if( use4thOrderAD.eq.1 )then
565 ! compute adc2,
adc4:
566 getDerivativesAndDissipation(2,2,
GRIDTYPE)
581 stop 888 ! unexpected value
for nd