/[escript]/trunk/finley/test/python/convection.py
ViewVC logotype

Diff of /trunk/finley/test/python/convection.py

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

revision 1840 by ksteube, Thu Sep 25 23:11:13 2008 UTC revision 1841 by gross, Fri Oct 3 03:57:52 2008 UTC
# Line 66  T_END=0.1 Line 66  T_END=0.1
66  DT_OUT=T_END/500  DT_OUT=T_END/500
67  Dn_OUT=2  Dn_OUT=2
68  VERBOSE=True  VERBOSE=True
 SUPG=False  
69  create_restartfiles_every_step=10  create_restartfiles_every_step=10
70  if True:  if True:
71     # this is a simple linear Stokes model:     # this is a simple linear Stokes model:
# Line 183  x=dom.getX() Line 182  x=dom.getX()
182  #  #
183  #   set up heat problem:  #   set up heat problem:
184  #  #
185  heat=TemperatureCartesian(dom,theta=THETA,useSUPG=SUPG)  heat=TemperatureCartesian(dom,theta=THETA)
186  heat.setTolerance(TOL*extratol)  heat.setTolerance(TOL*extratol)
187    
188  fixed_T_at=whereZero(x[DIM-1])+whereZero(H-x[DIM-1])  fixed_T_at=whereZero(x[DIM-1])+whereZero(H-x[DIM-1])
 heat.setInitialTemperature(T)  
189  print "initial Temperature range ",inf(T),sup(T)  print "initial Temperature range ",inf(T),sup(T)
190    heat.setInitialTemperature(clip(T,0))
191  heat.setValue(rhocp=Scalar(1.,Function(dom)),k=Scalar(1.,Function(dom)),given_T_mask=fixed_T_at)  heat.setValue(rhocp=Scalar(1.,Function(dom)),k=Scalar(1.,Function(dom)),given_T_mask=fixed_T_at)
192  #  #
193  #   velocity constraints:  #   velocity constraints:
# Line 250  while t<T_END: Line 249  while t<T_END:
249      dt=max(DT_MIN,dt)      dt=max(DT_MIN,dt)
250      print n,". time step t=",t," step size ",dt      print n,". time step t=",t," step size ",dt
251      print "============== solve for T ========================"      print "============== solve for T ========================"
252      T=heat.solve(dt, verbose=VERBOSE)        T=heat.getSolution(dt, verbose=VERBOSE)
253      print "Temperature range ",inf(T),sup(T)      print "Temperature range ",inf(T),sup(T)
254      n+=1      n+=1
255      t+=dt      t+=dt

Legend:
Removed from v.1840  
changed lines
  Added in v.1841

  ViewVC Help
Powered by ViewVC 1.1.26