/[escript]/trunk/esys2/escript/test/python/temperaturemodel.py
ViewVC logotype

Contents of /trunk/esys2/escript/test/python/temperaturemodel.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 122 - (show annotations)
Thu Jun 9 05:38:05 2005 UTC (14 years, 7 months ago) by jgs
File MIME type: text/x-python
File size: 1211 byte(s)
Merge of development branch back to main trunk on 2005-06-09

1 # $Id$
2 import numarray
3 from esys.modelframe import Link,Simulation,ExplicitSimulation
4 from esys.visualization import WriteVTK
5 from esys.materials import SimpleMaterialTable
6 from esys.geometry import RectangularDomain,ScalarConstrainer
7 from esys.input import InterpolatedTimeProfile,GausseanProfile
8 from esys.temperature import TemperatureDiffusion
9
10 dom=RectangularDomain()
11 constraints=ScalarConstrainer()
12 constraints.domain=Link(dom)
13 constraints.top=1
14 constraints.bottom=1
15
16 mt=SimpleMaterialTable()
17
18 pf=InterpolatedTimeProfile()
19 pf.t=[0.,0.25,0.5,0.75]
20 pf.values=[0.,1.,1.,0.]
21
22 q=GausseanProfile()
23 q.domain=Link(dom)
24 q.width=0.05
25 q.x_c=numarray.array([0.5,0.5,0.5])
26 q.r=0.01
27 q.A=Link(pf,"out")
28
29 tt=TemperatureDiffusion()
30 tt.domain=Link(dom)
31 tt.tend=1.
32 tt.dt=0.1
33 tt.temperature=0.
34 tt.density=Link(mt)
35 tt.c_p=Link(mt)
36 tt.thermal_permabilty=Link(mt)
37 tt.reference_temperature=0.
38 tt.radiation_coefficient=Link(mt)
39 tt.thermal_source=Link(q,"out")
40 tt.location_fixed_temperature=Link(constraints,"location_of_constraint")
41 tt.implicit=True
42
43 vis=WriteVTK()
44 vis.scalar=Link(tt,"temperature")
45
46 s=ExplicitSimulation([dom,constraints,pf,q,Simulation([mt,tt],debug=True),vis],debug=True)
47 s.writeXML()
48 s.run()

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26