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

revision 1514 by artak, Wed Apr 9 03:20:00 2008 UTC revision 1515 by ksteube, Thu Apr 17 23:36:31 2008 UTC
# Line 31  if solver!='PCG': Line 31  if solver!='PCG':
31  else:  else:
32   extratol=1   extratol=1
33
34  DIM=2  DIM=3
35  H=1.  H=1.
36  L=4*H  L=4*H
37  THETA=0.5  THETA=0.5
# Line 152  for d in range(DIM): Line 152  for d in range(DIM):
152  while t<T_END:  while t<T_END:
153      v_last=v*1      v_last=v*1
154      print "============== solve for v ========================"      print "============== solve for v ========================"
155      viscosity=exp(A*(1./(1+T.interpolate(Function(dom)))-2./3.))      viscosity=exp(A*(1./(1+T.interpolate(Function(dom)))-1./2.))
156      print "viscosity range :", inf(viscosity), sup(viscosity)      print "viscosity range :", inf(viscosity), sup(viscosity)
158      #v,p=sp.solve(v,p,show_details=VERBOSE, verbose=True,max_iter=500,solver='PCG')      #v,p=sp.solve(v,p,show_details=VERBOSE, verbose=True,max_iter=500,solver='PCG')
# Line 164  while t<T_END: Line 164  while t<T_END:
164           print "range %d-velocity"%d,inf(v[d]),sup(v[d])           print "range %d-velocity"%d,inf(v[d]),sup(v[d])
165
166      if t>=t_out:      if t>=t_out:
167        saveVTK("state.%d.vtu"%n_out,T=T,v=v,p=p)        saveVTK("state.%d.vtu"%n_out,T=T,v=v)
168        print "visualization file %d for time step %e generated."%(n_out,t)        print "visualization file %d for time step %e generated."%(n_out,t)
169        n_out+=1        n_out+=1
170        t_out+=DT_OUT        t_out+=DT_OUT

Legend:
 Removed from v.1514 changed lines Added in v.1515