1 c *****************************************
2 c ** Macros
for the Visco-plastic
Model ***
3 c *****************************************
5 c **
NOTE: you should also change viscoPlasticMacrosCpp.h
if you change
this file ***
7 c ===============================================================
8 c Here is effective strain rate (plus
a small value)
9 c sqrt( (2/3)*eDot_ij eDot_ij ) + epsVP
10 c Also define
the derivatives of
the square of
the effective strain rate
12 c ===============================================================
13 #defineMacro strainRate2d() (sqrt( (2./3.)*( u0x**2 + v0y**2 + .5*( u0y + v0x )**2 ) )+epsVP)
15 #defineMacro strainRate2dSqx() \
16 ( (2./3.)*( 2.*u0x*u0xx + 2.*v0y*v0xy + ( u0y + v0x )*( u0xy+v0xx ) ) )
17 #defineMacro strainRate2dSqy() \
18 ( (2./3.)*( 2.*u0x*u0xy + 2.*v0y*v0yy + ( u0y + v0x )*( u0yy+v0xy ) ) )
20 #defineMacro strainRate2dSqxx() \
21 ( (2./3.)*( 2.*(u0xx*u0xx+u0x*u0xxx) + 2.*(v0xy*v0xy+v0y*v0xxy) \
22 + ( u0xy + v0xx )*( u0xy+v0xx ) + ( u0y + v0x )*( u0xxy+v0xxx ) ) )
24 #defineMacro strainRate2dSqxy() \
25 ( (2./3.)*( 2.*(u0xy*u0xx+u0x*u0xxy) + 2.*(v0yy*v0xy+v0y*v0xyy) \
26 + ( u0yy + v0xy )*( u0xy+v0xx ) + ( u0y + v0x )*( u0xyy+v0xxy ) ) )
28 #defineMacro strainRate2dSqyy() \
29 ( (2./3.)*( 2.*(u0xy*u0xy+u0x*u0xyy) + 2.*(v0yy*v0yy+v0y*v0yyy) \
30 + ( u0yy + v0xy )*( u0yy+v0xy ) + ( u0y + v0x )*( u0yyy+v0xyy ) ) )
32 c =====================================================================================
33 c Here is
the coefficient of viscosity
for the visco plastic model
35 c esr = effective strain rate = || (2/3)*eDot_ij ||
37 c
nuT = etaVP + (yieldStressVP/esr)*(1.-exp(-exponentVP*esr))
39 c =====================================================================================
40 #beginMacro getViscoPlasticViscosity(
nuT,esr)
42 exp0 = exp(-exponentVP*esr)
43 nuT = (etaVP + (yieldStressVP/esr)*(1.-exp0))
47 c =====================================================================================
48 c Here is
the coefficient of viscosity
for the visco plastic model and its first
derivative
49 c esr = effective strain rate = || (2/3)*eDot_ij ||
51 c
nuT = etaVP + (yieldStressVP/esr)*(1.-exp(-exponentVP*esr))
53 c
nuTd =
D( nuT )/
D( esr**2) =
D( nuT )/
D( esr ) * ( 1 / (2*esr ) )
54 c =====================================================================================
55 #beginMacro getViscoPlasticViscosityAndFirstDerivative(esr)
57 getViscoPlasticViscosity(nuT,esr)
58 nuTd = .5*( (-1./esr)*(1.-exp0) + exponentVP*exp0 )*(yieldStressVP/esr**2)
62 #beginMacro getViscoPlasticViscosityAndTwoDerivative(esr)
64 getViscoPlasticViscosityAndFirstDerivative(esr)
65 ! nuTdd= .25*( 3./(esr**2)*(1.-exp0) -2./(esr)*exponentVP*exp0 + exponentVP**2*exp0 )*(yieldStressVP/esr**2)
66 nuTdd= .25*( 3./(esr**2)*(1.-exp0) -3./(esr)*exponentVP*exp0 - exponentVP**2*exp0 )*(yieldStressVP/esr**3)
71 c =============================================================================
72 c Evaluate
the coefficients of
the visco-plastic model
75 c ============================================================================
76 #beginMacro getViscoPlasticCoefficients(DIM)
86 getViscoPlasticViscosityAndFirstDerivative(eDotNorm)
93 !
this needs to be finished
110 c ============================================================================
111 c Define
the visco-plastic viscosity and first derivatives
113 c ============================================================================
114 #beginMacro getViscoPlasticViscosityAndFirstDerivatives(DIM)
130 getViscoPlasticViscosityAndFirstDerivative(eDotNorm)
132 nuTx =
nuTd*strainRate2dSqx()
133 nuTy =
nuTd*strainRate2dSqy()
150 c ============================================================================
151 c Define
the visco-plastic viscosity and first two derivatives
153 c ============================================================================
154 #beginMacro defineVP_Derivatives(DIM)
173 ! still need to define 3
d 3rd derivatives
186 getViscoPlasticViscosityAndTwoDerivative(eDotNorm)
188 eDotNormSqx =strainRate2dSqx()
189 eDotNormSqy =strainRate2dSqy()
190 eDotNormSqxx=strainRate2dSqxx()
191 eDotNormSqxy=strainRate2dSqxy()
192 eDotNormSqyy=strainRate2dSqyy()
194 nuTx=
nuTd*eDotNormSqx
195 nuTy=
nuTd*eDotNormSqy
196 nuTxx=
nuTd*eDotNormSqxx + nuTdd*eDotNormSqx**2
197 nuTxy=
nuTd*eDotNormSqxy + nuTdd*eDotNormSqx*eDotNormSqy
198 nuTyy=
nuTd*eDotNormSqyy + nuTdd*eDotNormSqy**2