[13681] | 1 | import numpy
|
---|
| 2 | from model import *
|
---|
| 3 | from EnumDefinitions import *
|
---|
| 4 | from MatlabFuncs import *
|
---|
| 5 | from triangle import *
|
---|
| 6 | from setmask import *
|
---|
| 7 | from parameterize import *
|
---|
| 8 | from setflowequation import *
|
---|
| 9 | from solve import *
|
---|
| 10 |
|
---|
| 11 | md=triangle(model(),'../Exp/Square.exp',150000.)
|
---|
| 12 | md=setmask(md,'../Exp/SquareShelf.exp','')
|
---|
| 13 | md=parameterize(md,'../Par/SquareSheetShelf.py')
|
---|
| 14 | md.extrude(3,2.)
|
---|
| 15 | md=setflowequation(md,'pattyn','all')
|
---|
| 16 | md.cluster=generic('name',oshostname(),'np',3)
|
---|
| 17 | md.timestepping.time_step=0.
|
---|
| 18 | md.thermal.isenthalpy=1
|
---|
| 19 | md.initialization.waterfraction=numpy.zeros((md.mesh.numberofvertices,1))
|
---|
| 20 | md=solve(md,SteadystateSolutionEnum())
|
---|
| 21 |
|
---|
| 22 | #Fields and tolerances to track changes
|
---|
| 23 | field_names =['Vx','Vy','Vz','Vel','Pressure','Temperature','Water fraction','Enthalpy']
|
---|
| 24 | field_tolerances=[1e-09,1e-09,1e-09,1e-09,1e-13,1e-10,1e-10,1e-10]
|
---|
| 25 | field_values=[\
|
---|
| 26 | md.results['SteadystateSolution'][1]['Vx'],\
|
---|
| 27 | md.results['SteadystateSolution'][1]['Vy'],\
|
---|
| 28 | md.results['SteadystateSolution'][1]['Vz'],\
|
---|
| 29 | md.results['SteadystateSolution'][1]['Vel'],\
|
---|
| 30 | md.results['SteadystateSolution'][1]['Pressure'],\
|
---|
| 31 | md.results['SteadystateSolution'][1]['Temperature'],\
|
---|
| 32 | md.results['SteadystateSolution'][1]['Waterfraction'],\
|
---|
| 33 | md.results['SteadystateSolution'][1]['Enthalpy'],\
|
---|
| 34 | ]
|
---|