[22267] | 1 | #Test Name: SquareSheetShelfAmrBamgIceFront
|
---|
| 2 | import numpy as np
|
---|
| 3 | from model import *
|
---|
| 4 | from socket import gethostname
|
---|
| 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 = setflowequation(md,'SSA','all')
|
---|
| 15 | md.cluster = generic('name',gethostname(),'np',3)
|
---|
| 16 | md.transient.isstressbalance = 1
|
---|
| 17 | md.transient.ismasstransport = 1
|
---|
| 18 | md.transient.issmb = 0
|
---|
| 19 | md.transient.isthermal = 0
|
---|
| 20 | md.transient.isgroundingline = 0
|
---|
| 21 | #amr bamg settings, just ice front
|
---|
| 22 | md.amr.hmin = 10000
|
---|
| 23 | md.amr.hmax = 100000
|
---|
| 24 | md.amr.fieldname = 'None'
|
---|
| 25 | md.amr.keepmetric = 0
|
---|
| 26 | md.amr.gradation = 1.2
|
---|
| 27 | md.amr.groundingline_resolution = 12000
|
---|
| 28 | md.amr.groundingline_distance = 0
|
---|
| 29 | md.amr.icefront_resolution = 12000
|
---|
| 30 | md.amr.icefront_distance = 100000
|
---|
| 31 | md.amr.thicknesserror_resolution = 1000
|
---|
| 32 | md.amr.thicknesserror_threshold = 0
|
---|
| 33 | md.amr.deviatoricerror_resolution = 1000
|
---|
| 34 | md.amr.deviatoricerror_threshold = 0
|
---|
| 35 | md.transient.amr_frequency = 1
|
---|
| 36 | md.timestepping.start_time = 0
|
---|
| 37 | md.timestepping.final_time = 3
|
---|
| 38 | md.timestepping.time_step = 1
|
---|
| 39 | md = solve(md,'Transient')
|
---|
| 40 |
|
---|
| 41 | #Fields and tolerances to track changes
|
---|
| 42 | field_names = ['Vx','Vy','Vel','Pressure']
|
---|
| 43 | field_tolerances = [1e-13,1e-13,1e-13,1e-13]
|
---|
| 44 | field_values = [
|
---|
| 45 | md.results.TransientSolution[2].Vx,
|
---|
| 46 | md.results.TransientSolution[2].Vy,
|
---|
| 47 | md.results.TransientSolution[2].Vel,
|
---|
| 48 | md.results.TransientSolution[2].Pressure,
|
---|
| 49 | ]
|
---|