1 | #Test Name: SquareShelfStressSSA2dDamage
|
---|
2 | import numpy
|
---|
3 | from model import model
|
---|
4 | from triangle import triangle
|
---|
5 | from setmask import setmask
|
---|
6 | from parameterize import parameterize
|
---|
7 | from setflowequation import setflowequation
|
---|
8 | from solve import solve
|
---|
9 | from matdamageice import matdamageice
|
---|
10 | from generic import generic
|
---|
11 | from socket import gethostname as oshostname
|
---|
12 |
|
---|
13 | md=triangle(model(),'../Exp/Square.exp',150000.)
|
---|
14 | md=setmask(md,'all','')
|
---|
15 | md.materials=matdamageice()
|
---|
16 | md=parameterize(md,'../Par/SquareShelf.py')
|
---|
17 | md.damage.isdamage=1
|
---|
18 | md.damage.D=0.5*numpy.ones(md.mesh.numberofvertices)
|
---|
19 | md.damage.spcdamage=numpy.nan*numpy.ones(md.mesh.numberofvertices)
|
---|
20 | md=setflowequation(md,'SSA','all')
|
---|
21 | md.cluster=generic('name',oshostname(),'np',3)
|
---|
22 | md=solve(md,'Stressbalance')
|
---|
23 |
|
---|
24 | #Fields and tolerances to track changes
|
---|
25 | field_names =['Vx','Vy','Vel','Pressure']
|
---|
26 | field_tolerances=[1e-13,1e-13,1e-13,1e-13]
|
---|
27 | field_values=[\
|
---|
28 | md.results.StressbalanceSolution.Vx,\
|
---|
29 | md.results.StressbalanceSolution.Vy,\
|
---|
30 | md.results.StressbalanceSolution.Vel,\
|
---|
31 | md.results.StressbalanceSolution.Pressure,\
|
---|
32 | ]
|
---|