[26703] | 1 | #!/Applications/Julia-1.6.app/Contents/Resources/julia/bin/julia
|
---|
| 2 | include("issm.jl")
|
---|
| 3 | using .ISSM
|
---|
| 4 |
|
---|
| 5 | md = ISSM.model()
|
---|
| 6 | md = ISSM.triangle(md,"../../test/Exp/Square.exp",150000.)
|
---|
| 7 | md = ISSM.setmask(md,"","")
|
---|
| 8 |
|
---|
| 9 | #Geometry
|
---|
| 10 | hmin=300.
|
---|
| 11 | hmax=1000.
|
---|
| 12 | ymin=minimum(md.mesh.y)
|
---|
| 13 | ymax=maximum(md.mesh.y)
|
---|
| 14 | xmin=minimum(md.mesh.x)
|
---|
| 15 | xmax=maximum(md.mesh.x)
|
---|
| 16 | md.geometry.thickness = hmax .+ (hmin-hmax)*(md.mesh.y .- ymin)./(ymax-ymin) .+ 0.1*(hmin-hmax)*(md.mesh.x .- xmin)./(xmax-xmin)
|
---|
| 17 | md.geometry.base = -md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness .+20
|
---|
| 18 | md.geometry.surface = md.geometry.base+md.geometry.thickness
|
---|
| 19 | md.geometry.bed = md.geometry.base
|
---|
| 20 |
|
---|
| 21 | #Initial velocity
|
---|
| 22 | #x = ISSM.archread(ISSM.issmdir()*"/test/Data/SquareShelfConstrained.arch","x")
|
---|
| 23 | #y = ISSM.archread(ISSM.issmdir()*"/test/Data/SquareShelfConstrained.arch","y")
|
---|
| 24 | #vx = ISSM.archread(ISSM.issmdir()*"/test/Data/SquareShelfConstrained.arch","vx")
|
---|
| 25 | #vy = ISSM.archread(ISSM.issmdir()*"/test/Data/SquareShelfConstrained.arch","vy")
|
---|
| 26 | #index = ISSM.archread(ISSM.issmdir()*"/test/Data/SquareShelfConstrained.arch","index")
|
---|
| 27 | md.initialization.vx=zeros(md.mesh.numberofvertices)#InterpFromMeshToMesh2d(index,x,y,vx,md.mesh.x,md.mesh.y)
|
---|
| 28 | md.initialization.vy=zeros(md.mesh.numberofvertices)#InterpFromMeshToMesh2d(index,x,y,vy,md.mesh.x,md.mesh.y)
|
---|
| 29 |
|
---|
| 30 | md.materials.rheology_B=1.815730284801701e+08*ones(md.mesh.numberofvertices)
|
---|
| 31 | md.materials.rheology_n=3*ones(md.mesh.numberofelements)
|
---|
| 32 | md.friction.coefficient=20*ones(md.mesh.numberofvertices)
|
---|
| 33 |
|
---|
| 34 | md.stressbalance.restol=0.05
|
---|
| 35 | md.stressbalance.reltol=0.05
|
---|
| 36 | md.stressbalance.abstol=NaN
|
---|
| 37 |
|
---|
| 38 | #Boundary conditions
|
---|
| 39 | md.stressbalance.spcvx = NaN*ones(md.mesh.numberofvertices)
|
---|
| 40 | md.stressbalance.spcvy = NaN*ones(md.mesh.numberofvertices)
|
---|
| 41 | pos = findall(md.mesh.vertexonboundary)
|
---|
| 42 | md.stressbalance.spcvx[pos] .= 0.0
|
---|
| 43 | md.stressbalance.spcvy[pos] .= 0.0
|
---|
| 44 |
|
---|
| 45 | md=ISSM.solve(md,"Stressbalance")
|
---|