[19049] | 1 | #Test Name: SquareShelfTranForcePos2d
|
---|
[21759] | 2 | import numpy as np
|
---|
[13580] | 3 | from model import *
|
---|
[21759] | 4 | from socket import gethostname
|
---|
[13580] | 5 | from triangle import *
|
---|
| 6 | from setmask import *
|
---|
| 7 | from parameterize import *
|
---|
| 8 | from setflowequation import *
|
---|
| 9 | from solve import *
|
---|
| 10 |
|
---|
[21759] | 11 |
|
---|
[13580] | 12 | md=triangle(model(),'../Exp/Square.exp',150000.)
|
---|
| 13 | md=setmask(md,'all','')
|
---|
| 14 | md=parameterize(md,'../Par/SquareShelf.py')
|
---|
[15565] | 15 | md=setflowequation(md,'SSA','all')
|
---|
[21759] | 16 | md.cluster=generic('name',gethostname(),'np',3)
|
---|
[13580] | 17 |
|
---|
| 18 | md.timestepping.time_step=1.
|
---|
| 19 | md.settings.output_frequency=1
|
---|
| 20 | md.timestepping.final_time=4.
|
---|
| 21 |
|
---|
| 22 | #Set up transient
|
---|
[21759] | 23 | smb=np.ones((md.mesh.numberofvertices))*3.6
|
---|
| 24 | smb=np.vstack((smb,smb*2.)).T
|
---|
[13580] | 25 |
|
---|
[21759] | 26 | md.smb.mass_balance=np.vstack((smb,[1.5,3.]))
|
---|
[14021] | 27 | md.transient.isthermal=False
|
---|
[13580] | 28 |
|
---|
[21056] | 29 | md=solve(md,'Transient')
|
---|
[13580] | 30 |
|
---|
| 31 | #Fields and tolerances to track changes
|
---|
[21759] | 32 | field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1',
|
---|
| 33 | 'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2',
|
---|
| 34 | 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3',
|
---|
| 35 | 'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4']
|
---|
| 36 | field_tolerances=[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 | 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10]
|
---|
| 40 | field_values=[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]
|
---|