/[escript]/trunk/modellib/test/python/run_convection.py
ViewVC logotype

Diff of /trunk/modellib/test/python/run_convection.py

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

revision 819 by gross, Sun Aug 27 23:07:51 2006 UTC revision 820 by gross, Mon Aug 28 06:55:36 2006 UTC
# Line 29  except KeyError: Line 29  except KeyError:
29  dom=RectangularDomain()  dom=RectangularDomain()
30  dom.order=2  dom.order=2
31    
32    temp_val=InterpolateOverBox()
33    temp_val.domain=Link(dom,"domain")
34    temp_val.value_left_bottom_front=1.
35    temp_val.value_right_bottom_front=1.
36    temp_val.value_left_top_front=0.
37    temp_val.value_right_top_front=0.
38    temp_val.value_left_bottom_back=1.
39    temp_val.value_right_bottom_back=1.
40    temp_val.value_left_top_back=0.
41    temp_val.value_right_top_back=0.
42    
43  temp_constraints=ScalarConstrainer()  temp_constraints=ScalarConstrainer()
44  temp_constraints.domain=Link(dom)  temp_constraints.domain=Link(dom)
45  temp_constraints.top=1  temp_constraints.top=1
# Line 43  vel_constraints.bottom=[0,1,0] Line 54  vel_constraints.bottom=[0,1,0]
54  vel_constraints.front=[0,0,1]  vel_constraints.front=[0,0,1]
55  vel_constraints.back=[0,0,1]  vel_constraints.back=[0,0,1]
56    
   
 temp_val=InterpolateOverBox()  
 temp_val.domain=Link(dom,"domain")  
 temp_val.value_left_bottom_front=1.  
 temp_val.value_right_bottom_front=1.  
 temp_val.value_left_top_front=0.  
 temp_val.value_right_top_front=0.  
 temp_val.value_left_bottom_back=1.  
 temp_val.value_right_bottom_back=1.  
 temp_val.value_left_top_back=0.  
 temp_val.value_right_top_back=0.  
   
57  mat=SimpleEarthModel()  mat=SimpleEarthModel()
58  mat.density0=1.  mat.density0=1.
59  mat.viscocity0=1.  mat.viscocity0=1.
# Line 87  vel.rel_tol=1.e-6 Line 86  vel.rel_tol=1.e-6
86  temp.velocity=Link(vel,"velocity")  temp.velocity=Link(vel,"velocity")
87    
88  sq=Sequencer()  sq=Sequencer()
89  sq.t_end=0.005  sq.t_end=0.001
90    
91  vis=WriteVTK()  vis=WriteVTK()
92  vis.t=Link(sq)  vis.t=Link(sq)
93  vis.scalar=Link(temp,"temperature")  vis.scalar=Link(temp,"temperature")
94  vis.vector=Link(vel,"velocity")  vis.vector=Link(vel,"velocity")
95  vis.dt=0.0005  vis.dt=0.0001
96  vis.filename=WORKDIR+"/temp.xml"  vis.filename=WORKDIR+"/temp.xml"
97    
98  per=GaussianProfile()  per=GaussianProfile()
# Line 110  lc.f1=1. Line 109  lc.f1=1.
109  lc.v1=Link(temp_val,"out")  lc.v1=Link(temp_val,"out")
110  temp.temperature=Link(lc,"out")  temp.temperature=Link(lc,"out")
111    
112  s=Simulation([sq,dom,Simulation([vel],debug=True),temp,vis],debug=True)  s=Simulation([sq,dom,vel_constraints,temp_constraints,Simulation([vel],debug=True),temp,vis],debug=True)
113  s.writeXML()  s.writeXML()
114  s.run()  s.run()

Legend:
Removed from v.819  
changed lines
  Added in v.820

  ViewVC Help
Powered by ViewVC 1.1.26