/[escript]/trunk/esys2/doc/user/linearPDE.tex
ViewVC logotype

Diff of /trunk/esys2/doc/user/linearPDE.tex

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 106 by jgs, Fri Dec 17 07:43:12 2004 UTC revision 107 by jgs, Thu Jan 27 06:21:48 2005 UTC
# Line 5  Line 5 
5  \declaremodule{extension}{linearPDEs} \modulesynopsis{Linear partial pifferential equation handler}  \declaremodule{extension}{linearPDEs} \modulesynopsis{Linear partial pifferential equation handler}
6  The module \linearPDEsPack provides an interface to define and solve linear partial  The module \linearPDEsPack provides an interface to define and solve linear partial
7  differential equations within \escript. \linearPDEsPack does not provide any  differential equations within \escript. \linearPDEsPack does not provide any
8  solver capabilities in itself but hand the PDE over to  solver capabilities in itself but hands the PDE over to
9  the PDE solver library defined through the \Domain of the PDE.  the PDE solver library defined through the \Domain of the PDE.
10  The general interface is provided through the \LinearPDE class. The  The general interface is provided through the \LinearPDE class. The
11  \AdvectivePDE which is derived from the \LinearPDE class  \AdvectivePDE which is derived from the \LinearPDE class
# Line 21  for an unknown function $u$ on a given $ Line 21  for an unknown function $u$ on a given $
21  In the following $\Gamma$ denotes the boundary of the domain $\Omega$. $n$ denotes  In the following $\Gamma$ denotes the boundary of the domain $\Omega$. $n$ denotes
22  the outer normal field on $\Gamma$.  the outer normal field on $\Gamma$.
23    
24  A single PDE with a solution with a single component the linear PDE is defined in the  For a single PDE with a solution with a single component the linear PDE is defined in the
25  following form:  following form:
26  \begin{equation}\label{LINEARPDE.SINGLE.1}  \begin{equation}\label{LINEARPDE.SINGLE.1}
27  -(A\hackscore{jl} u\hackscore{,l}){,j}+(B\hackscore{j} u)\hackscore{,j}+C\hackscore{l} u\hackscore{,l}+D u =-X\hackscore{j,j}+Y \; .  -(A\hackscore{jl} u\hackscore{,l}){,j}+(B\hackscore{j} u)\hackscore{,j}+C\hackscore{l} u\hackscore{,l}+D u =-X\hackscore{j,j}+Y \; .
# Line 126  If the coefficient is not a \Data object Line 126  If the coefficient is not a \Data object
126  appropriate \FunctionSpace.  appropriate \FunctionSpace.
127  \end{methoddesc}  \end{methoddesc}
128    
129    \begin{methoddesc}[LinearPDE]{createCoefficient}{name}
130    facilitates the creation of a \Data object corresponding to coefficient of name
131    \var{name}. If \var{name} is not a valid name an exception is raised. The
132    returned \Data object is initialised to zero and is not set as a value of the
133    LinearPDE.
134    \end{methoddesc}
135    
136  \begin{methoddesc}[LinearPDE]{getCoefficient}{name}  \begin{methoddesc}[LinearPDE]{getCoefficient}{name}
137  return the value assigned to coefficient \var{name}. If \var{name} is not a valid name  return the value assigned to coefficient \var{name}. If \var{name} is not a valid name
138  an exception is raised.  an exception is raised.
# Line 135  an exception is raised. Line 142  an exception is raised.
142  resets all coefficients to their initialization values. This method is useful to call when trying to save memory  resets all coefficients to their initialization values. This method is useful to call when trying to save memory
143  as is releaces eqnerences to coefficients but keeping the differential operator.  as is releaces eqnerences to coefficients but keeping the differential operator.
144  \end{methoddesc}  \end{methoddesc}
145    \begin{methoddesc}[LinearPDE]{createNewCoefficient}{name}
146    returns a \Data object which has the \FunctionSpace and \Shape of coefficient \var{name}. The initial value is $0$.
147    \end{methoddesc}
148    
149  \begin{methoddesc}[LinearPDE]{getShapeOfCoefficient}{name}  \begin{methoddesc}[LinearPDE]{getShapeOfCoefficient}{name}
150  returns the shape of coefficient \var{name} even if no value has been assigned to it.  returns the shape of coefficient \var{name} even if no value has been assigned to it.
# Line 368  returns the residual when insering \var{ Line 378  returns the residual when insering \var{
378  \end{methoddesc}  \end{methoddesc}
379    
380  \section{\AdvectivePDE Class}  \section{\AdvectivePDE Class}
381  under construction  In cases of PDEs dominated by the advection terms $B$ and $C$ against the diffusion term $A$
382    up-winding has been used.
383    The \AdvectivePDE class applies upwinding to the advective terms, see \Ref{SUPG}.
384    To measure the dominance of the advective terms over the diffusive term $A$ the
385    Pelclet number is used \index{Pelclet number}. The are defined as
386    \begin{eqnarray}\label{LINEARPDE.Peclet.single}
387    P^{B}=\frac{h\|B\hackscore{:}\|}{2\|A\hackscore{::}\|}
388    \mbox{ and }
389    P^{C}=\frac{h\|C\hackscore{:}\|}{2\|A\hackscore{::}\|}
390    \end{eqnarray}
391    \begin{eqnarray}\label{LINEARPDE.Peclet.system}
392    P^{B}_{ik}=\frac{h\|B\hackscore{i:k}\|}{2\|A\hackscore{i:k:}\|}
393    \mbox{ and }
394    P^{C}_{ik}=\frac{h\|C\hackscore{ik:}\|}{2\|A\hackscore{i:k:}\|}
395    \end{eqnarray}
396    where $h$ is the local cell size and
397    \begin{eqnarray}\label{LINEARPDE.ADVECTIVE.1b}
398    \|C\hackscore{:}\|^2=C\hackscore{j}C\hackscore{j} \\
399    \|A\hackscore{::}\|^2=A\hackscore{jl}A\hackscore{jl} \\
400    \|C\hackscore{i:k}\|^2=C\hackscore{ijk}C\hackscore{ijk} \\
401    \|A\hackscore{i:k:}\|^2=A\hackscore{ijkl}A\hackscore{ijkl} \; .
402    \end{eqnarray}
403    From the Pelclet number the stabilization parameters $\Xi^{B}$ and $\Xi^{C}$ are calculated:
404    \begin{eqnarray}\label{LINEARPDE.Peclet.2}
405    \Xi^{B}=\frac{\xi(P^{B}) h}{\|B\hackscore{:}\|}
406    \mbox{ and }
407    \Xi^{C}=\frac{\xi(P^{C}) h}{\|C\hackscore{:}\|} \\
408    \mbox{ or }
409    \Xi^{B}\hackscore{ik}=\frac{\xi(P^{B}\hackscore{ik}) h}{\|B\hackscore{i:k}\|}
410    \mbox{ and }
411    \Xi^{C}\hackscore{ik}=\frac{\xi(P^{C}\hackscore{ik}) h}{\|C\hackscore{ik:}\|}
412    \end{eqnarray}
413    where $\xi$ is a suitable function of the Peclet number.
414    In the case of a single PDE the coefficient are up-dated in the following way:
415    \begin{eqnarray}\label{LINEARPDE.ADVECTIVE.1}
416    A\hackscore{jl} \leftarrow A\hackscore{jl} + \Xi^{B} B\hackscore{j} B\hackscore{l} + \Xi^{C} C\hackscore{j} C\hackscore{l} \\
417    B\hackscore{j} \leftarrow B\hackscore{j} + \Xi^{C} C\hackscore{j} D \\
418    C\hackscore{j} \leftarrow C\hackscore{j} + \Xi^{B} B\hackscore{j} D \\
419    X\hackscore{j} \leftarrow X\hackscore{j} + (Xi^{B} B\hackscore{j} + \Xi^{C} C\hackscore{j}) Y \\
420    \end{eqnarray}
421    Similar for the case of a systems of PDEs:
422    \begin{eqnarray}\label{LINEARPDE.ADVECTIVE.SYSTEM}
423    A\hackscore{ijkl} \leftarrow A\hackscore{ijl} + \Xi^{B}\hackscore{ik} B\hackscore{ijk} B\hackscore{ilk} +
424                                                    \Xi^{C}\hackscore{ik} C\hackscore{ikj} C\hackscore{ikl} \\
425    B\hackscore{ijk} \leftarrow B\hackscore{ijk} + \Xi^{C}\hackscore{ij} C\hackscore{ikj} D\hackscore{ik} \\
426    C\hackscore{ikl} \leftarrow C\hackscore{ikl} + \Xi^{B}\hackscore{ik} B\hackscore{ilk} D\hackscore{ik} \\
427    X\hackscore{ij} \leftarrow X\hackscore{ij} + (Xi^{B}\hackscore{ik} B\hackscore{ij} + \Xi^{C}\hackscore{ik} C\hackscore{ij}) Y\hackscore{i} \\
428    \end{eqnarray}
429    Using upwinding in this form, introduces an additonal error which is proprtional to the cell size $h$
430    but with the intension to stabilize the solution.
431    
432    \begin{classdesc}{AdvectivePDE}{domain,numEquations=0,numSolutions=0,xi=AdvectivePDE.ELMAN_RAMAGE}
433    opens a linear, steady, second order PDE on the \Domain \var{domain}. \var{numEquations}
434    and \var{numSolutions} gives the number of equations and the number of solutiopn components.
435    If \var{numEquations} and \var{numSolutions} is non-positive, the number of equations
436    and the number solutions, respectively, stay undefined until a coefficient is
437    defined. \var{xi} defines a function which returns for any given  Preclet number $P\ge 0$ the
438    $\xi$-value used to define the stabilization parameters $\Xi^{B}$ and $\Xi^{C}$.
439    \AdvectivePDE is derived from \LinearPDE.
440    \end{classdesc}
441    
442    \begin{memberdesc}[AdvectivePDE]{SIMPLIFIED_BROOKS_HUGHES}{}
443    Predefined function to set a values for $\xi$ from a Preclet number $P$.
444    This function uses the method suggested in \Ref{SUPG1}
445    where $\xi(P)$ is given by
446    \begin{equation}\label{LINEARPDE.ADVECTIVE.1d}
447    \xi(P)=coth(P)-\frac{1}{P} \;.
448    \end{equation}
449    As the evaluation of $coth$ is expensive we are using the approximation:
450    The function $\xi$ is approximated by
451    \begin{equation}\label{LINEARPDE.ADVECTIVE.23}
452    \xi(P)=
453    \left\{
454    \begin{array}{lc}
455    \frac{P}{6} & P<3 \\
456    \frac{1}{2} & \mbox{otherwise}
457    \end{array}
458    \right.
459    \end{equation}
460    \end{memberdesc}
461    
462    \begin{memberdesc}[AdvectivePDE]{ELMAN_RAMAGE}{}
463    Predefined function to set a values for $\xi$ from a Preclet number $P$.
464    This function uses the method suggested in \Ref{SUPG2}
465    where $\xi(P)$ is given by
466    \begin{equation}\label{LINEARPDE.ADVECTIVE.23b}
467    \xi(P)=
468    \left\{
469    \begin{array}{lc}
470    0  & P<1 \\
471    \frac{1}{2}(1-\frac{1}{P}) & \mbox{otherwise}
472    \end{array}
473    \right.
474    \end{equation}
475    \end{memberdesc}
476    
477    
478  \section{The \Poisson Class}  \section{The \Poisson Class}
479    

Legend:
Removed from v.106  
changed lines
  Added in v.107

  ViewVC Help
Powered by ViewVC 1.1.26