/[escript]/trunk/doc/examples/usersguide/fluid.py
ViewVC logotype

Diff of /trunk/doc/examples/usersguide/fluid.py

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

revision 3891 by caltinay, Wed Feb 1 06:16:25 2012 UTC revision 3892 by jfenwick, Tue Apr 10 08:57:23 2012 UTC
# Line 61  solution.setTolerance(tolerance) Line 61  solution.setTolerance(tolerance)
61    
62  while t <= t_end:  while t <= t_end:
63    
64    print " ----- Time step = %s -----"%( t )    print(" ----- Time step = %s -----"%( t ))
65    print "Time = %s seconds"%( time )      print("Time = %s seconds"%( time ))  
66    
67    solution.initialize(fixed_u_mask=boundary_cond,eta=eta,f=Y)    solution.initialize(fixed_u_mask=boundary_cond,eta=eta,f=Y)
68    velocity,pressure=solution.solve(velocity,pressure,max_iter=max_iter,verbose=verbose,usePCG=True)    velocity,pressure=solution.solve(velocity,pressure,max_iter=max_iter,verbose=verbose,usePCG=True)
69        
70    print "Max velocity =", Lsup(velocity), "m/s"    print("Max velocity =", Lsup(velocity), "m/s")
71        
72    #Courant condition    #Courant condition
73    dt=0.4*h/(Lsup(velocity))    dt=0.4*h/(Lsup(velocity))
74    print "dt", dt    print("dt", dt)
75        
76    #displace the mesh    #displace the mesh
77    displacement = velocity * dt    displacement = velocity * dt

Legend:
Removed from v.3891  
changed lines
  Added in v.3892

  ViewVC Help
Powered by ViewVC 1.1.26