1 | #Test Name: SquareShelfTranForcePos2d
|
---|
2 | import numpy
|
---|
3 | from model import *
|
---|
4 | from triangle import *
|
---|
5 | from setmask import *
|
---|
6 | from parameterize import *
|
---|
7 | from setflowequation import *
|
---|
8 | from solve import *
|
---|
9 | from MatlabFuncs import *
|
---|
10 |
|
---|
11 | md=triangle(model(),'../Exp/Square.exp',150000.)
|
---|
12 | md=setmask(md,'all','')
|
---|
13 | md=parameterize(md,'../Par/SquareShelf.py')
|
---|
14 | md=setflowequation(md,'SSA','all')
|
---|
15 | md.cluster=generic('name',oshostname(),'np',3)
|
---|
16 |
|
---|
17 | md.timestepping.time_step=1.
|
---|
18 | md.settings.output_frequency=1
|
---|
19 | md.timestepping.final_time=4.
|
---|
20 |
|
---|
21 | #Set up transient
|
---|
22 | smb=numpy.ones((md.mesh.numberofvertices,1))*3.6
|
---|
23 | smb=numpy.hstack((smb,smb*2.))
|
---|
24 |
|
---|
25 | md.smb.mass_balance=numpy.vstack((smb,[1.5,3.]))
|
---|
26 | md.transient.isthermal=False
|
---|
27 |
|
---|
28 | md=solve(md,'Transient')
|
---|
29 |
|
---|
30 | #Fields and tolerances to track changes
|
---|
31 | field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', \
|
---|
32 | 'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', \
|
---|
33 | 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', \
|
---|
34 | 'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4']
|
---|
35 | field_tolerances=[1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\
|
---|
36 | 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\
|
---|
37 | 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\
|
---|
38 | 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10]
|
---|
39 | field_values=[\
|
---|
40 | md.results.TransientSolution[0].Vx,\
|
---|
41 | md.results.TransientSolution[0].Vy,\
|
---|
42 | md.results.TransientSolution[0].Vel,\
|
---|
43 | md.results.TransientSolution[0].Pressure,\
|
---|
44 | md.results.TransientSolution[0].Base,\
|
---|
45 | md.results.TransientSolution[0].Surface,\
|
---|
46 | md.results.TransientSolution[0].Thickness,\
|
---|
47 | md.results.TransientSolution[0].SmbMassBalance,\
|
---|
48 | md.results.TransientSolution[1].Vx,\
|
---|
49 | md.results.TransientSolution[1].Vy,\
|
---|
50 | md.results.TransientSolution[1].Vel,\
|
---|
51 | md.results.TransientSolution[1].Pressure,\
|
---|
52 | md.results.TransientSolution[1].Base,\
|
---|
53 | md.results.TransientSolution[1].Surface,\
|
---|
54 | md.results.TransientSolution[1].Thickness,\
|
---|
55 | md.results.TransientSolution[1].SmbMassBalance,\
|
---|
56 | md.results.TransientSolution[2].Vx,\
|
---|
57 | md.results.TransientSolution[2].Vy,\
|
---|
58 | md.results.TransientSolution[2].Vel,\
|
---|
59 | md.results.TransientSolution[2].Pressure,\
|
---|
60 | md.results.TransientSolution[2].Base,\
|
---|
61 | md.results.TransientSolution[2].Surface,\
|
---|
62 | md.results.TransientSolution[2].Thickness,\
|
---|
63 | md.results.TransientSolution[2].SmbMassBalance,\
|
---|
64 | md.results.TransientSolution[3].Vx,\
|
---|
65 | md.results.TransientSolution[3].Vy,\
|
---|
66 | md.results.TransientSolution[3].Vel,\
|
---|
67 | md.results.TransientSolution[3].Pressure,\
|
---|
68 | md.results.TransientSolution[3].Base,\
|
---|
69 | md.results.TransientSolution[3].Surface,\
|
---|
70 | md.results.TransientSolution[3].Thickness,\
|
---|
71 | md.results.TransientSolution[3].SmbMassBalance,\
|
---|
72 | ]
|
---|