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