/[escript]/trunk/doc/user/Models.tex
ViewVC logotype

Contents of /trunk/doc/user/Models.tex

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2651 - (show annotations)
Mon Sep 7 03:39:45 2009 UTC (11 years, 5 months ago) by jfenwick
File MIME type: application/x-tex
File size: 30277 byte(s)
Fixed latex compile error.
Fixed some overful hboxes

1
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %
4 % Copyright (c) 2003-2009 by University of Queensland
5 % Earth Systems Science Computational Center (ESSCC)
6 % http://www.uq.edu.au/esscc
7 %
8 % Primary Business: Queensland, Australia
9 % Licensed under the Open Software License version 3.0
10 % http://www.opensource.org/licenses/osl-3.0.php
11 %
12 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13
14
15 \chapter{Models}
16 \label{MODELS CHAPTER}
17
18 The following sections give a breif overview of the model classes and their corresponding methods.
19
20 \section{Stokes Problem}
21 The velocity \index{velocity} field $v$ and pressure $p$ of an incompressible fluid \index{incompressible fluid} is given as the solution of the Stokes problem\index{Stokes problem}
22 \begin{equation}\label{Stokes 1}
23 -\left(\eta(v\hackscore{i,j}+ v\hackscore{i,j})\right)\hackscore{,j}+p\hackscore{,i}=f\hackscore{i}-\sigma\hackscore{ij,j}
24 \end{equation}
25 where $\eta$ is the viscosity, $F\hackscore{i}$ defines an internal force \index{force, internal} and $\sigma\hackscore{ij}$ is an intial stress \index{stress, initial}. We assume an incompressible media:
26 \begin{equation}\label{Stokes 2}
27 -v\hackscore{i,i}=0
28 \end{equation}
29 Natural boundary conditions are taken in the form
30 \begin{equation}\label{Stokes Boundary}
31 \left(\eta(v\hackscore{i,j}+ v\hackscore{i,j})\right)n\hackscore{j}-n\hackscore{i}p=s\hackscore{i}+\sigma\hackscore{ij} n\hackscore{j}
32 \end{equation}
33 which can be overwritten by constraints of the form
34 \begin{equation}\label{Stokes Boundary0}
35 v\hackscore{i}(x)=v^D\hackscore{i}(x)
36 \end{equation}
37 at some locations $x$ at the boundary of the domain. The index $i$ may depend on the location $x$ on the boundary.
38 $v^D$ is a given function on the domain.
39
40 \subsection{Solution Method \label{STOKES SOLVE}}
41 In block form equation equations~\ref{Stokes 1} and~\ref{Stokes 2} takes the form of a saddle point problem
42 \index{saddle point problem}
43 \begin{equation}
44 \left[ \begin{array}{cc}
45 A & B^{*} \\
46 B & 0 \\
47 \end{array} \right]
48 \left[ \begin{array}{c}
49 v \\
50 p \\
51 \end{array} \right]
52 =\left[ \begin{array}{c}
53 G \\
54 0 \\
55 \end{array} \right]
56 \label{SADDLEPOINT}
57 \end{equation}
58 where $A$ is coercive, self-adjoint linear operator in a suitable Hilbert space, $B$ is the $(-1) \cdot$ divergence operator and $B^{*}$ is it adjoint operator (=gradient operator). For more details on the mathematics see references \cite{AAMIRBERKYAN2008,MBENZI2005}.
59 We use iterative techniques to solve this problem. To make sure that the incomressibilty condition holds
60 with sufficient accuracy we check for
61 \begin{equation}
62 \|v\hackscore{k,k}\| \hackscore \le \epsilon
63 \|\sqrt{v\hackscore{j,k}v\hackscore{j,k}}\|
64 \label{STOKES STOP}
65 \end{equation}
66 where $\epsilon$ is the desired relative accuracy and
67 \begin{equation}
68 \|p\|^2= \int\hackscore{\Omega} p^2 \; dx
69 \label{PRESSURE NORM}
70 \end{equation}
71 defines the $L^2$-norm. We use the Uzawa scheme \index{Uzawa scheme} to solve the problem.
72
73 In fact the first equation in~\ref{SADDLEPOINT} gives for a known pressure
74 \begin{equation}
75 v=A^{-1}(G-B^{*}p)
76 \label{V CALC}
77 \end{equation}
78 which is inserted into the second equation leading to
79 \begin{equation}
80 S p = B A^{-1} G
81 \end{equation}
82 with the Schur complement \index{Schur complement} $S=BA^{-1}B^{*}$. This problem can be solved iteratively
83 with the preconditioner $\hat{S}$ defined as $q=\hat{S}^{-1}p$ by solving
84 \begin{equation} \label{P PREC}
85 \frac{1}{\eta}q = p
86 \end{equation}
87 see~\cite{ELMAN} for more details. Note that the residual for the current approximation $p$ is given as
88 \begin{equation}
89 r=B A^{-1} (G - B^* p) = Bv
90 \end{equation}
91 where $v$ is given by~\ref{V CALC}.
92
93 If one uses the generalized minimal residual method (GMRES) \index{generalized minimal residual method!GMRES}
94 the method is directly applied to the preconditioned system
95 \begin{equation}
96 \hat{S}^{-1} S p = \hat{S}^{-1} B A^{-1} G
97 \end{equation}
98 We use the norm
99 \begin{equation}
100 \|p\|\hackscore{GMRES} = \|\hat{S} p \|
101 \end{equation}
102 Notice that for the residual $\hat{r}=\hat{S}^{-1} r$ one has
103 \begin{equation}
104 \
105 \end{equation}
106 If $p^{0}$ provides an initial guess for the pressure we use~\ref{V CALC} to get a first initial guess for the
107 velocity $v^{0}$ which we use to set an absolute tolerance $ATOL =\epsilon \|\sqrt{v^{0}\hackscore{j,k}v^{0}\hackscore{j,k}}\|$.
108 The GMRES is terminated when
109 \begin{equation}
110 \|\hat{r}\|\hackscore{GMRES} \le ATOL
111 \end{equation}
112 Notice that $\|\hat{r}\|\hackscore{GMRES}= \|r \| = \|Bv\| = \|v\hackscore{k,k}\|$ so we we can expect that
113 the target stopping criterion~\ref{STOKES STOP} is fullfilled. However, if $v$ is very different from the
114 initial choice of $v^{0}$ the value of $ATOL$ is corrected and GMRES is restarted with a new tolerance. For time dependend problems this apprach works well as value for $p$ form a previous time step provides a good initial guess.
115
116 Alternatively, as $S$ is symmetric and positive definite one can apply the preconditioned conjugate gradient method (PCG) \index{preconditioned conjugate gradient method!PCG}. PCG use the norm
117 \begin{equation}
118 \|r\|\hackscore{PCG}^2 = \int\hackscore{\Omega} r \hat{S}^{-1}r \; dx = \int\hackscore{\Omega} \eta r^2 \; dx
119 \end{equation}
120 To take the extra factor $\eta$ into consideration when checking the stopping criterion we use the following
121 definition for $ATOL$:
122 \begin{equation}
123 ATOL = \epsilon \frac{\|\sqrt{v^{0}\hackscore{j,k}v^{0}\hackscore{j,k}}\| }{\|v^{0}\hackscore{k,k}\|}
124 \|v^{0}\hackscore{k,k}\|\hackscore{PCG}
125 \end{equation}
126
127
128
129 \subsection{Functions}
130
131 \begin{classdesc}{StokesProblemCartesian}{domain\optional{, adaptSubTolerance=\True}}
132 opens the Stokes problem\index{Stokes problem} on the \Domain domain. The approximation
133 order needs to be two.
134 If \var{adaptSubTolerance} is \True
135 the tolerances for all subproblems are set automatically.
136 \end{classdesc}
137
138 \begin{methoddesc}[StokesProblemCartesian]{initialize}{\optional{f=Data(), \optional{fixed_u_mask=Data(), \optional{eta=1, \optional{surface_stress=Data(), \optional{stress=Data()}}}}}}
139 assigns values to the model parameters. In any call all values must be set.
140 \var{f} defines the external force $f$, \var{eta} the viscosity $\eta$,
141 \var{surface_stress} the surface stress $s$ and \var{stress} the initial stress $\sigma$.
142 The locations and compontents where the velocity is fixed are set by
143 the values of \var{fixed_u_mask}. The method will try to cast the given values to appropriate
144 \Data class objects.
145 \end{methoddesc}
146
147 \begin{methoddesc}[StokesProblemCartesian]{solve}{v,p
148 \optional{, max_iter=100 \optional{, verbose=False \optional{, usePCG=True }}}}
149 solves the problem and return approximations for velocity and pressure.
150 The arguments \var{v} and \var{p} define initial guess. The values of \var{v} marked
151 by \var{fixed_u_mask} remain unchanged.
152 If \var{usePCG} is set to \True
153 reconditioned conjugate gradient method (PCG) \index{preconditioned conjugate gradient method!PCG} scheme is used. Otherwise the problem is solved generalized minimal residual method (GMRES) \index{generalized minimal residual method!GMRES}. In most cases
154 the PCG scheme is more efficient.
155 \var{max_iter} defines the maximum number of iteration steps.
156
157 If \var{verbose} is set to \True informations on the progress of of the solver are printed.
158 \end{methoddesc}
159
160
161 \begin{methoddesc}[StokesProblemCartesian]{setTolerance}{\optional{tolerance=1.e-4}}
162 sets the tolerance in an appropriate norm relative to the right hand side. The tolerance must be non-negative and less than 1.
163 \end{methoddesc}
164 \begin{methoddesc}[StokesProblemCartesian]{getTolerance}{}
165 returns the current relative tolerance.
166 \end{methoddesc}
167 \begin{methoddesc}[StokesProblemCartesian]{setAbsoluteTolerance}{\optional{tolerance=0.}}
168 sets the absolute tolerance for the error in the relevant norm. The tolerance must be non-negative. Typically the
169 absolute talerance is set to 0.
170 \end{methoddesc}
171
172 \begin{methoddesc}[StokesProblemCartesian]{getAbsoluteTolerance}{}
173 sreturns the current absolute tolerance.
174 \end{methoddesc}
175
176 \begin{methoddesc}[StokesProblemCartesian]{getSolverOptionsVelocity}{}
177 returns the solver options used solve the equations~(\ref{V CALC}) for velocity.
178 \end{methoddesc}
179
180 \begin{methoddesc}[StokesProblemCartesian]{getSolverOptionsPressure}{}
181 returns the solver options used solve the equation~(\ref{P PREC}) for pressure.
182 \end{methoddesc}
183
184 \begin{methoddesc}[StokesProblemCartesian]{getSolverOptionsDiv}{}
185 set the solver options for solving the equation to project the divergence of the velocity onto the function space of pressure.
186 \end{methoddesc}
187
188
189 \subsection{Example: Lit Driven Cavity}
190 The following script \file{lit\hackscore driven\hackscore cavity.py}
191 \index{scripts!\file{helmholtz.py}} which is available in the \ExampleDirectory
192 illustrates the usage of the \class{StokesProblemCartesian} class to solve
193 the lit driven cavity problem:
194 \begin{python}
195 from esys.escript import *
196 from esys.finley import Rectangle
197 from esys.escript.models import StokesProblemCartesian
198 NE=25
199 dom = Rectangle(NE,NE,order=2)
200 x = dom.getX()
201 sc=StokesProblemCartesian(dom)
202 mask= (whereZero(x[0])*[1.,0]+whereZero(x[0]-1))*[1.,0] + \
203 (whereZero(x[1])*[0.,1.]+whereZero(x[1]-1))*[1.,1]
204 sc.initialize(eta=.1, fixed_u_mask= mask)
205 v=Vector(0.,Solution(dom))
206 v[0]+=whereZero(x[1]-1.)
207 p=Scalar(0.,ReducedSolution(dom))
208 v,p=sc.solve(v,p, verbose=True)
209 saveVTK("u.xml",velocity=v,pressure=p)
210 \end{python}
211
212 \section{Darcy Flux}
213 We want to calculate the velocity $u$ and pressure $p$ on a domain $\Omega$ solving
214 the Darcy flux problem \index{Darcy flux}\index{Darcy flow}
215 \begin{equation}\label{DARCY PROBLEM}
216 \begin{array}{rcl}
217 u\hackscore{i} + \kappa\hackscore{ij} p\hackscore{,j} & = & g\hackscore{i} \\
218 u\hackscore{k,k} & = & f
219 \end{array}
220 \end{equation}
221 with the boundary conditions
222 \begin{equation}\label{DARCY BOUNDARY}
223 \begin{array}{rcl}
224 u\hackscore{i} \; n\hackscore{i} = u^{N}\hackscore{i} \; n\hackscore{i} & \mbox{ on } & \Gamma\hackscore{N} \\
225 p = p^{D} & \mbox{ on } & \Gamma\hackscore{D} \\
226 \end{array}
227 \end{equation}
228 where $\Gamma\hackscore{N}$ and $\Gamma\hackscore{D}$ are a partition of the boundary of $\Omega$ with $\Gamma\hackscore{D}$ non empty, $n\hackscore{i}$ is the outer normal field of the boundary of $\Omega$, $u^{N}\hackscore{i}$ and $p^{D}$ are given functions on $\Omega$, $g\hackscore{i}$ and $f$ are given source terms and $\kappa\hackscore{ij}$ is the given permability. We assume that $\kappa\hackscore{ij}$ is symmetric (which is not really required) and positive definite, i.e there are positive constants $\alpha\hackscore{0}$ and $\alpha\hackscore{1}$ wich are independent from the location in $\Omega$ such that
229 \begin{equation}
230 \alpha\hackscore{0} \; x\hackscore{i} x\hackscore{i} \le \kappa\hackscore{ij} x\hackscore{i} x\hackscore{j} \le \alpha\hackscore{1} \; x\hackscore{i} x\hackscore{i}
231 \end{equation}
232 for all $x\hackscore{i}$.
233
234
235 \subsection{Solution Method \label{DARCY SOLVE}}
236 In practical applications it is an advantage to calculate the pressure $p$ as a correction of a 'static' pressure $p^{ref}$ which is the solution of
237 \begin{equation}
238 -(\kappa\hackscore{ki}\kappa\hackscore{kj} p\hackscore{,j}^{ref})\hackscore{,i} = - (\kappa\hackscore{ki} (g\hackscore{k}- u^{N}\hackscore{k}))\hackscore{,i}
239 \mbox{ with }
240 p^{ref} = p^{D} \mbox{ on } \Gamma\hackscore{D}
241 \end{equation}
242 With setting $u \leftarrow u-u^{N}$ and $p \leftarrow p-p^{ref}$ and
243 \begin{equation}
244 \begin{array}{rcl}
245 g\hackscore{i} & \leftarrow & g\hackscore{i} - u^{N}\hackscore{i} - \kappa\hackscore{ij} p^{ref}\hackscore{,j }\\
246 f & \leftarrow & f - u^{N}\hackscore{k,k}
247 \end{array}
248 \end{equation}
249 we can assume that $u^{N}\hackscore{i} \; n\hackscore{i}=0$ and
250 $p^{D}=0$.
251 We set
252 \begin{equation}
253 V = \{ q \in H^{1}(\Omega) : q=0 \mbox{ on } \Gamma\hackscore{D} \}
254 \end{equation}
255 and
256 \begin{equation}
257 W = \{ v \in (L^2(\Omega))^{d} : v\hackscore{k,k} \in L^2(\Omega) \mbox{ and } u\hackscore{i} \; n\hackscore{i} =0 \mbox{ on } \Gamma\hackscore{N} \}
258 \end{equation}
259 and define the operator $Q: V \rightarrow (L^2(\Omega))^{d}$ defined by
260 \begin{equation}
261 (Qp)\hackscore{i} = \kappa\hackscore{ij} p\hackscore{,j}
262 \end{equation}
263 and the operator $D: W \rightarrow L^2(\Omega)$ defined by
264 \begin{equation}
265 Dv = v\hackscore{k,k}
266 \end{equation}
267 In operator notation the Darcy problem~\ref{DARCY PROBLEM} is written in the form
268 \begin{equation}
269 \begin{array}{rcl}
270 u + Qp & = & g \\
271 Du & = & f
272 \end{array}
273 \end{equation}
274 We solve this equation by minimising the functional
275 \begin{equation}
276 J(u,p):=\|u + Qp - g\|^2\hackscore{0} + \|Du-f\|\hackscore{0}^2
277 \end{equation}
278 over $W \times V$ where $\|.\|\hackscore{0}$ denotes the norm in $L^2(\Omega)$. A simple calculation shows that
279 one has to solve
280 \begin{equation}
281 ( v + Qq , u + Qp - g) + (Dv,Du-f) =0
282 \end{equation}
283 for all $v\in W$ and $q \in V$.which translates back into operator notation
284 \begin{equation}
285 \begin{array}{rcl}
286 (I+D^*D)u + Qp & = & D^*f + g \\
287 Q^*u + Q^*Q p & = & Q^*g \\
288 \end{array}
289 \end{equation}
290 where $D^*$ and $Q^*$ denote the adjoint operators.
291 In~\cite{LEASTSQUARESFEM1994} it has been shown that this problem is continuous and coercive in $W \times V$ and therefore has a unique solution. Also standart FEM methods can be used for discretization. It is also possible
292 to solve the problem is coupled form, however this approach leads in some cases to a very ill-conditioned stiffness matrix in particular in the case of a very small or large permability ($\alpha\hackscore{1} \ll 1$ or $\alpha\hackscore{0} \gg 1$)
293
294 The approach we are taking is to eliminate the velocity $u$ from the problem. Assuming that $p$ is known we have
295 \begin{equation}\label{DARCY V FORM}
296 v= (I+D^*D)^{-1} (D^*f + g - Qp)
297 \end{equation}
298 (notice that $(I+D^*D)$ is coercive in $W$) which is inserted into the second equation
299 \begin{equation}
300 Q^* (I+D^*D)^{-1} (D^*f + g - Qp) + Q^* Q p = Q^*g
301 \end{equation}
302 which is
303 \begin{equation}
304 Q^* ( I - (I+D^*D)^{-1} ) Q p = Q^* (g-(I+D^*D)^{-1} (D^*f + g) )
305 \end{equation}
306 We use the PCG \index{linear solver!PCG}\index{PCG} method to solve this. The residual $r$ ($\in V^*$) is given as
307 \begin{equation}
308 \begin{array}{rcl}
309 r & = & Q^* \left( g -(I+D^*D)^{-1} (D^*f + g) - Qp + (I+D^*D)^{-1}Q p \right)\\
310 & =& Q^* \left( g- Qp - (I+D^*D)^{-1} (D^*f + g - Qp) \right) \\
311 & =& Q^* \left( g - Qp - v \right)
312 \end{array}
313 \end{equation}
314 So in a partical implementation we use $\hat{r}=g-Qp-v$ to represent the residual.
315 The evaluation of the iteration operator for a given $p$ is then
316 returning $Qp+v$ where $v$ is the solution of
317 \begin{equation}\label{UPDATE W}
318 (I+D^*D)v = Qp
319 \end{equation}
320 We use $(Q^*Q)^{-1}$ as a preconditioner for the iteration operator $Q^* ( I - (I+D^*D)^{-1} ) Q$. So the application of the preconditioner to $\hat{r}$ representing the residual is given by solving
321 implemented by solving
322 \begin{equation}\label{UPDATE P}
323 Q^*Q q = Q^*\hat{r}
324 \end{equation}
325 The residual norm used in the PCG is given as
326 \begin{equation}\label{DARCY R NORM}
327 \|r\|\hackscore{PCG}^2 = \int r \cdot (Q^*Q)^{-1} r \; dx =\int \hat{r} \cdot Q (Q^*Q)^{-1} Q^* \hat{r} \; dx \approx
328 \|\hat{r}\|\hackscore{0}^2
329 \end{equation}
330 The iteration is terminated if
331 \begin{equation}\label{DARCY STOP}
332 \|r\|\hackscore{PCG} \le \mbox{ATOL}
333 \end{equation}
334 where we set
335 \begin{equation}\label{DARCY ATOL DEF}
336 \mbox{ATOL} = \mbox{atol} + \mbox{rtol} \cdot \left(\frac{1}{\|v\|\hackscore{0}} + \frac{1}{\|Qp\|\hackscore{0}} \right)^{-1}
337 \end{equation}
338 where rtol is a given relative tolerance and $\mbox{atol}$ is a given absolute tolerance (typically $=0$).
339 Notice that if $Qp$ and $v$ both are zero, the pair $(0,p)$ is a solution.
340 The problem is that ATOL is depending on the solution $p$ (and $v$ calculated form~\ref{DARCY V FORM}). In partcice one use the initial guess for $p$
341 to get a first value for ATOL. If the stopping crierion is met in the PCG iteration, a new $v$ is calculated from the current pressure approximation and ATOL is recalculated. If \ref{DARCY STOP} is still fullfilled the calculation is terminated and $(v,p)$ is returned. Otherwise PCG is restarted with a new ATOL.
342
343 \subsection{Functions}
344 \begin{classdesc}{DarcyFlow}{domain \optional{, adaptSubTolerance=\True}}
345 opens the Darcy flux problem\index{Darcy flux} on the \Domain domain.
346 If \var{adaptSubTolerance} is set to \True,
347 the relative tolerances for solving~(\ref{DARCY V FORM}),~(\ref{UPDATE W})
348 and~(\ref{UPDATE P}) are set automatically.
349 \end{classdesc}
350
351 \begin{methoddesc}[DarcyFlow]{setValue}{\optional{f=None, \optional{g=None, \optional{location_of_fixed_pressure=None, \optional{location_of_fixed_flux=None,
352 \\\optional{permeability=None}}}}}}
353 assigns values to the model parameters. Values can be assigned using various calls - in particular
354 in a time dependend problem only values that change over time needs to be reset. The permability can be defined as scalar (isotropic), a vector (orthotropic) or a matrix (anisotropic).
355 \var{f} and \var{g} are the corresponding parameters in~\ref{DARCY PROBLEM}.
356 The locations and compontents where the flux is prescribed are set by positive values in
357 \var{location_of_fixed_flux}.
358 The locations where the pressure is prescribed are set by
359 by positive values of \var{location_of_fixed_pressure}.
360 The values of the pressure and flux are defined by the initial guess.
361 Notice that at any point on the boundary of the domain the pressure or the normal component of
362 the flux must be defined. There must be at least one point where the pressure is prescribed.
363 The method will try to cast the given values to appropriate
364 \Data class objects.
365 \end{methoddesc}
366
367 \begin{methoddesc}[DarcyFlow]{setTolerance}{\optional{rtol=1e-4}}
368 sets the relative tolerance \mbox{rtol} in \ref{DARCY ATOL DEF}.
369 \end{methoddesc}
370
371 \begin{methoddesc}[DarcyFlow]{setAbsoluteTolerance}{\optional{atol=0.}}
372 sets the absolute tolerance \mbox{atol} in \ref{DARCY ATOL DEF}.
373 \end{methoddesc}
374
375 \begin{methoddesc}[DarcyFlow]{getSolverOptionsFlux}{}
376 Returns the solver options used to solve the flux problems~(\ref{DARCY V FORM}) and~(\ref{UPDATE W}). Use the returned \SolverOptions object to control the solution algorithms. If the adaption of subtolerance is choosen, the tolerance will
377 be overwritten before the solver is called.
378 \end{methoddesc}
379
380 \begin{methoddesc}[DarcyFlow]{getSolverOptionsPressure}{}
381 Returns the solver options used to solve the pressure problems~(\ref{UPDATE P}).
382 Use the returned \SolverOptions object to control the solution algorithms. If the adaption of subtolerance is choosen, the tolerance will
383 be overwritten before the solver is called.
384 \end{methoddesc}
385
386 \begin{methoddesc}[DarcyFlow]{solve}{u0,p0, \optional{max_iter=100, \optional{verbose=False}}}
387 solves the problem. and returns approximations for the flux $v$ and the pressure $p$.
388 \var{u0} and \var{p0} define initial guess for flux and pressure. Values marked
389 by positive values \var{location_of_fixed_flux} and \var{location_of_fixed_pressure}, respectively, are kept unchanged. \var{max_iter} sets the maximum number of iterations steps allowed for solving the coupled problem.
390 \end{methoddesc}
391
392
393 \subsection{Example: Gravity Flow}
394 later
395
396 %\input{levelsetmodel}
397
398
399
400 \section{Isotropic Kelvin Material \label{IKM}}
401 As proposed by Kelvin~\cite{Muhlhaus2005} material strain $D\hackscore{ij}=\frac{1}{2}(v\hackscore{i,j}+v\hackscore{j,i})$ can be decomposed into
402 an elastic part $D\hackscore{ij}^{el}$ and visco-plastic part $D\hackscore{ij}^{vp}$:
403 \begin{equation}\label{IKM-EQU-2}
404 D\hackscore{ij}=D\hackscore{ij}^{el}+D\hackscore{ij}^{vp}
405 \end{equation}
406 with the elastic strain given as
407 \begin{equation}\label{IKM-EQU-3}
408 D\hackscore{ij}^{el'}=\frac{1}{2 \mu} \dot{\sigma}\hackscore{ij}'
409 \end{equation}
410 where $\sigma'\hackscore{ij}$ is the deviatoric stress (Notice that $\sigma'\hackscore{ii}=0$).
411 If the material is composed by materials $q$ the visco-plastic strain can be decomposed as
412 \begin{equation}\label{IKM-EQU-4}
413 D\hackscore{ij}^{vp'}=\sum\hackscore{q} D\hackscore{ij}^{q'}
414 \end{equation}
415 where $D\hackscore{ij}^{q}$ is the strain in material $q$ given as
416 \begin{equation}\label{IKM-EQU-5}
417 D\hackscore{ij}^{q'}=\frac{1}{2 \eta^{q}} \sigma'\hackscore{ij}
418 \end{equation}
419 where $\eta^{q}$ is the viscosity of material $q$. We assume the following
420 betwee the the strain in material $q$
421 \begin{equation}\label{IKM-EQU-5b}
422 \eta^{q}=\eta^{q}\hackscore{N} \left(\frac{\tau}{\tau\hackscore{t}^q}\right)^{1-n^{q}}
423 \mbox{ with } \tau=\sqrt{\frac{1}{2}\sigma'\hackscore{ij} \sigma'\hackscore{ij}}
424 \end{equation}
425 for a given power law coefficients $n^{q}\ge1$ and transition stresses $\tau\hackscore{t}^q$, see~\cite{Muhlhaus2005}.
426 Notice that $n^{q}=1$ gives a constant viscosity.
427 After inserting equation~\ref{IKM-EQU-5} into equation \ref{IKM-EQU-4} one gets:
428 \begin{equation}\label{IKM-EQU-6}
429 D\hackscore{ij}'^{vp}=\frac{1}{2 \eta^{vp}} \sigma'\hackscore{ij} \mbox{ with } \frac{1}{\eta^{vp}} = \sum\hackscore{q} \frac{1}{\eta^{q}} \;.
430 \end{equation}
431 and finally with~\ref{IKM-EQU-2}
432 \begin{equation}\label{IKM-EQU-2bb}
433 D\hackscore{ij}'=\frac{1}{2 \eta^{vp}} \sigma'\hackscore{ij}+\frac{1}{2 \mu} \dot{\sigma}\hackscore{ij}'
434 \end{equation}
435 The total stress $\tau$ needs to fullfill the yield condition \index{yield condition}
436 \begin{equation}\label{IKM-EQU-8c}
437 \tau \le \tau\hackscore{Y} + \beta \; p
438 \end{equation}
439 with the Drucker-Prager \index{Druck-Prager} cohesion factor \index{cohesion factor} $\tau\hackscore{Y}$, Drucker-Prager friction $\beta$ and total pressure $p$.
440 The deviatoric stress needs to fullfill the equilibrion equation
441 \begin{equation}\label{IKM-EQU-1}
442 -\sigma'\hackscore{ij,j}+p\hackscore{,i}=F\hackscore{i}
443 \end{equation}
444 where $F\hackscore{j}$ is a given external fource. We assume an incompressible media:
445 \begin{equation}\label{IKM-EQU-2bbb}
446 -v\hackscore{i,i}=0
447 \end{equation}
448 Natural boundary conditions are taken in the form
449 \begin{equation}\label{IKM-EQU-Boundary}
450 \sigma'\hackscore{ij}n\hackscore{j}-n\hackscore{i}p=f
451 \end{equation}
452 which can be overwritten by a constraint
453 \begin{equation}\label{IKM-EQU-Boundary0}
454 v\hackscore{i}(x)=0
455 \end{equation}
456 where the index $i$ may depend on the location $x$ on the bondary.
457
458 \subsection{Solution Method \label{IKM-SOLVE}}
459 By using a first order finite difference approximation wit step size $dt>0$~\ref{IKM-EQU-3} get the form
460 \begin{equation}\label{IKM-EQU-3b}
461 \dot{\sigma}\hackscore{ij}=\frac{1}{dt } \left( \sigma\hackscore{ij} - \sigma\hackscore{ij}^{-} \right)
462 \end{equation}
463 and
464 \begin{equation}\label{IKM-EQU-2b}
465 D\hackscore{ij}'=\left(\frac{1}{2 \eta^{vp}} + \frac{1}{2 \mu dt}\right) \sigma\hackscore{ij}'-\frac{1}{2 \mu dt } \sigma\hackscore{ij}^{-'}
466 \end{equation}
467 where $\sigma\hackscore{ij}^{-}$ is the stress at the precious time step. With
468 \begin{equation}\label{IKM-EQU-2c}
469 \dot{\gamma} = \sqrt{ 2 \left( D\hackscore{ij}' +
470 \frac{1}{ 2 \mu \; dt} \sigma\hackscore{ij}^{-'}\right)^2}
471 \end{equation}
472 we have
473 \begin{equation}
474 \tau = \eta\hackscore{eff} \cdot \dot{\gamma}
475 \end{equation}
476 where
477 \begin{equation}
478 \eta\hackscore{eff}= min( \left(\frac{1}{\mu \; dt}+\frac{1}{\eta^{vp}}\right)^{-1}
479 , \eta\hackscore{max}) \mbox{ with }
480 \eta\hackscore{max} = \left\{
481 \begin{array}{rcl}
482 \frac{\tau\hackscore{Y} + \beta \; p}{\dot{\gamma}} & & \dot{\gamma}>0 \\
483 &\mbox{ if } \\
484 \infty & & \mbox{otherwise}
485 \end{array}
486 \right.
487 \end{equation}
488 The upper bound $\eta\hackscore{max}$ makes sure that yield condtion~\ref{IKM-EQU-8c} holds. With this setting the eqaution \ref{IKM-EQU-2b} takes the form
489 \begin{equation}\label{IKM-EQU-10}
490 \sigma\hackscore{ij}' = 2 \eta\hackscore{eff} \left( D\hackscore{ij}' +
491 \frac{1}{ 2 \mu \; dt} \sigma\hackscore{ij}^{'-}\right)
492 \end{equation}
493 After inserting~\ref{IKM-EQU-10} into~\ref{IKM-EQU-1} we get
494 \begin{equation}\label{IKM-EQU-1ib}
495 -\left(\eta\hackscore{eff} (v\hackscore{i,j}+ v\hackscore{i,j})
496 \right)\hackscore{,j}+p\hackscore{,i}=F\hackscore{i}+
497 \left(\frac{\eta\hackscore{eff}}{\mu dt } \sigma\hackscore{ij}^{'-} \right)\hackscore{,j}
498 \end{equation}
499 Combining this with the incomressibilty condition~\ref{IKM-EQU-2} we need to solve a
500 Stokes problem as discussed in section~\ref{STOKES SOLVE} in each time step.
501
502 If we set
503 \begin{equation}\label{IKM-EQU-44}
504 \frac{1}{\eta(\tau)}= \frac{1}{\mu \; dt}+\frac{1}{\eta^{vp}}
505 \end{equation}
506 we need to solve the nonlinear problem
507 \begin{equation}
508 \eta\hackscore{eff} - min(\eta( \dot{\gamma} \cdot \eta\hackscore{eff})
509 , \eta\hackscore{max}) =0
510 \end{equation}
511 We use the Newton-Raphson Scheme \index{Newton-Raphson scheme} to solve this problem
512 \begin{equation}\label{IKM-EQU-45}
513 \eta\hackscore{eff}^{(n+1)} = \min(\eta\hackscore{max},
514 \eta\hackscore{eff}^{(n)} -
515 \frac{\eta\hackscore{eff}^{(n)} - \eta( \tau^{(n)}) }
516 {1-\dot{\gamma} \cdot \eta'( \tau^{(n)} )} )
517 =\min(\eta\hackscore{max},
518 \frac{\eta( \tau^{(n)}) -\tau^{(n)} \cdot \eta'( \tau^{(n)} ) }
519 {1-\dot{\gamma} \cdot \eta'( \tau^{(n)} )} )
520 \end{equation}
521 where $\eta'$ denotes the derivative of $\eta$ with respect of $\tau$
522 and $\tau^{(n)} = \dot{\gamma} \cdot \eta\hackscore{eff}^{(n)}$.
523
524 Looking at the evaluation of $\eta$ in~\ref{IKM-EQU-44} it makes sense formulate
525 the iteration~\ref{IKM-EQU-45} using $\Theta=\eta^{-1}$.
526 In fact we have
527 \begin{equation}
528 \eta' = - \frac{\Theta'}{\Theta^2}
529 \mbox{ with }
530 \Theta' = \sum\hackscore{q} \left(\frac{1}{\eta^{q}} \right)'
531 \label{IKM iteration 7}
532 \end{equation}
533 As
534 \begin{equation}\label{IKM-EQU-47}
535 \left(\frac{1}{\eta^{q}} \right)'
536 = \frac{n^{q}-1}{\eta^{q}\hackscore{N}} \cdot \frac{\tau^{n^{q}-2}}{(\tau\hackscore{t}^q)^{n^{q}-1}}
537 = \frac{n^{q}-1}{\eta^{q}}\cdot\frac{1}{\tau}
538 \end{equation}
539 we have
540 \begin{equation}\label{IKM-EQU-48}
541 \Theta' = \frac{1}{\tau} \omega \mbox{ with } \omega = \sum\hackscore{q}\frac{n^{q}-1}{\eta^{q}}
542 \end{equation}
543 which leads to
544 \begin{equation}\label{IKM-EQU-49}
545 \eta\hackscore{eff}^{(n+1)} = \min(\eta\hackscore{max},
546 \eta\hackscore{eff}^{(n)}
547 \frac{\Theta^{(n)} + \omega^{(n)} }
548 {\eta\hackscore{eff}^{(n)} \Theta^{(n)^2}+\omega^{(n)} })
549 \end{equation}
550
551
552 \subsection{Functions}
553
554 \begin{classdesc}{IncompressibleIsotropicFlowCartesian}{
555 domain
556 \optional{, stress=0
557 \optional{, v=0
558 \optional{, p=0
559 \optional{, t=0
560 \optional{, numMaterials=1
561 \optional{, verbose=True
562 \optional{, adaptSubTolerance=True
563 }}}}}}}}
564 opens an incompressible, isotropic flow problem in Cartesian cooridninates
565 on the domain \var{domain}.
566 \var{stress},
567 \var{v},
568 \var{p}, and
569 \var{t} set the initial deviatoric stress, velocity, pressure and time.
570 \var{numMaterials} specifies the number of materials used in the power law
571 model. Some progress information are printed if \var{verbose} is set to
572 \True. If \var{adaptSubTolerance} is equal to True the tolerances for subproblems are set automatically.
573 \end{classdesc}
574
575 \begin{methoddesc}[IncompressibleIsotropicFlowCartesian]{getDomain}{}
576 returns the domain.
577 \end{methoddesc}
578
579 \begin{methoddesc}[IncompressibleIsotropicFlowCartesian]{getTime}{}
580 Returns current time.
581 \end{methoddesc}
582
583 \begin{methoddesc}[IncompressibleIsotropicFlowCartesian]{getStress}{}
584 Returns current stress.
585 \end{methoddesc}
586
587 \begin{methoddesc}[IncompressibleIsotropicFlowCartesian]{getDeviatoricStress}{}
588 Returns current deviatoric stress.
589 \end{methoddesc}
590
591 \begin{methoddesc}[IncompressibleIsotropicFlowCartesian]{getPressure}{}
592 Returns current pressure.
593 \end{methoddesc}
594
595 \begin{methoddesc}[IncompressibleIsotropicFlowCartesian]{getVelocity}{}
596 Returns current velocity.
597 \end{methoddesc}
598
599 \begin{methoddesc}[IncompressibleIsotropicFlowCartesian]{getDeviatoricStrain}{}
600 Returns deviatoric strain of current velocity
601 \end{methoddesc}
602
603 \begin{methoddesc}[IncompressibleIsotropicFlowCartesian]{getTau}{}
604 Returns current second invariant of deviatoric stress
605 \end{methoddesc}
606
607 \begin{methoddesc}[IncompressibleIsotropicFlowCartesian]{getGammaDot}{}
608 Returns current second invariant of deviatoric strain
609 \end{methoddesc}
610
611
612 \begin{methoddesc}[IncompressibleIsotropicFlowCartesian]{setTolerance}{tol=1.e-4}
613 Sets the tolerance used to terminate the iteration on a time step.
614 \end{methoddesc}
615
616 \begin{methoddesc}[IncompressibleIsotropicFlowCartesian]{setFlowTolerance}{tol=1.e-4}
617 Sets the relative tolerance for the incompressible solver, see \class{StokesProblemCartesian} for details.
618 \end{methoddesc}
619
620 \begin{methoddesc}[IncompressibleIsotropicFlowCartesian]{setElasticShearModulus}{mu=None}
621 Sets the elastic shear modulus $\mu$. If \var{mu} is set to None (default) elasticity is not applied.
622 \end{methoddesc}
623
624 \begin{methoddesc}[IncompressibleIsotropicFlowCartesian]{setEtaTolerance=}{rtol=1.e-8}
625 sets the relative tolerance for the effectice viscosity. Iteration on a time step is completed if the realtive of the effective viscosity is less than \var{rtol}.
626 \end{methoddesc}
627
628 \begin{methoddesc}[IncompressibleIsotropicFlowCartesian]{setDruckerPragerLaw}
629 {\optional{tau_Y=None, \optional{friction=None}}}
630 Sets the parameters $\tau\hackscore{Y}$ and $\beta$ for the Drucker-Prager model in condition~\ref{IKM-EQU-8c}. If \var{tau_Y} is set to None (default) Drucker-Prager
631 condition is not applied.
632 \end{methoddesc}
633
634 \begin{methoddesc}[IncompressibleIsotropicFlowCartesian]{setElasticShearModulus}{mu=None}
635 Sets the elastic shear modulus $\mu$. If \var{mu} is set to None (default) elasticity is not applied.
636 \end{methoddesc}
637
638
639 \begin{methoddesc}[IncompressibleIsotropicFlowCartesian]{setPowerLaws}{eta_N, tau_t, power}
640 Sets the parameters of the power-law for all materials as defined in
641 equation~\ref{IKM-EQU-5b}.
642 \var{eta_N} is the list of viscosities $\eta^{q}\hackscore{N}$,
643 \var{tau_t} is the list of reference stresses $\tau\hackscore{t}^q$,
644 and \var{power} is the list of power law coefficients $n^{q}$.
645 \end{methoddesc}
646
647
648 \begin{methoddesc}[IncompressibleIsotropicFlowCartesian]{update}{dt
649 \optional{, iter_max=100
650 \optional{, inner_iter_max=20
651 }}}
652 Updates stress, velocity and pressure for time increment \var{dt}.
653 where \var{iter_max} is the maximum number of iteration steps on a time step to
654 update the effective viscosity and \var{inner_iter_max} is the maximum
655 number of itertion steps in the incompressible solver.
656 \end{methoddesc}
657
658 \subsection{Example}
659 later
660
661 \input{faultsystem}
662
663 % \section{Drucker Prager Model}

  ViewVC Help
Powered by ViewVC 1.1.26