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

Diff of /trunk/doc/user/darcyflux.tex

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

revision 3569 by gross, Thu Sep 1 02:42:36 2011 UTC revision 3629 by gross, Wed Oct 19 03:04:27 2011 UTC
# Line 94  for mesh size towards zero can be shown, Line 94  for mesh size towards zero can be shown,
94    
95    
96  \subsection{Functions}  \subsection{Functions}
97  \begin{classdesc}{DarcyFlow}{domain, \optional{w=1., \optional{solver=\member{DarcyFlow.EVAL},  \optional{  \begin{classdesc}{DarcyFlow}{domain, \optional{w=1., \optional{solver=\member{DarcyFlow.POST},  \optional{
98  useReduced=\True, \optional{ verbose=\True} } }}}  useReduced=\True, \optional{ verbose=\True} } }}}
99  opens the Darcy flux problem\index{Darcy flux} on the \Domain domain.  opens the Darcy flux problem\index{Darcy flux} on the \Domain domain.
100  Reduced approximations for pressure and flux are used if \var{useReduced} is set.  Reduced approximations for pressure and flux are used if \var{useReduced} is set.
# Line 158  on locations where \var{location_of_fixe Line 158  on locations where \var{location_of_fixe
158  Notice that \var{g} and \var{f} are used.  Notice that \var{g} and \var{f} are used.
159  \end{methoddesc}  \end{methoddesc}
160    
161    \begin{figure}
162    \centerline{\includegraphics[width=\figwidth]{darcy_result}}
163  %\subsection{Example: Gravity Flow}  \caption{Flux and pressure field of the Dary flow example.}
164  %later  \label{DIFFUSION FIG 1}
165    \end{figure}
166    
167    \subsection{Example: Gravity Flow}
168    The following script \file{darcy.py}\index{scripts!\file{darcy.py.py}}\index{Darcy flow}
169    which is available in the \ExampleDirectory illustrates the usage of the
170    \class{DarcyFlow} class:
171    \begin{python}
172       from esys.escript import *
173       from esys.escript.models import DarcyFlow
174       from esys.finley import Rectangle
175       from esys.weipa import saveVTK
176       mydomain = Rectangle(l0=2.,l1=1.,n0=40, n1=20)
177       x = mydomain.getX()
178       p_BC=whereZero(x[1]-1.)*wherePositive(x[0]-1.)
179       u_BC=(whereZero(x[0])+whereZero(x[0]-2.)) * [1.,0.] + \
180         (whereZero(x[1]) + whereZero(x[1]-1.)*whereNonPositive(x[0]-1.0)) * [0., 1.]
181       mypde = DarcyFlow(domain=mydomain)
182       mypde.setValue(g=[0., 2],
183                      location_of_fixed_pressure=p_BC,
184                      location_of_fixed_flux=u_BC,
185                      permeability=100.)
186    
187       u,p=mypde.solve(u0=x[1]*[0., -1.], p0=0)
188       saveVTK("u.vtu",flux=u, pressure=p)
189    \end{python}
190    In the example the pressure is fixed to the initial presure \var{p0} on the right half of the top face.
191    The normal flux is set on all other faces. The corresponding values for the flux are set by the initial value
192    \var{u0}.  

Legend:
Removed from v.3569  
changed lines
  Added in v.3629

  ViewVC Help
Powered by ViewVC 1.1.26