Changeset 24313 for issm/trunk/test/Par/RoundSheetStaticEISMINT.py
- Timestamp:
- 11/01/19 12:01:57 (5 years ago)
- Location:
- issm/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk
-
issm/trunk/test
- Property svn:mergeinfo changed
-
issm/trunk/test/Par/RoundSheetStaticEISMINT.py
r21729 r24313 2 2 from SetMarineIceSheetBC import SetMarineIceSheetBC 3 3 4 print " creating thickness"5 hmin =0.016 hmax =2756.77 radius =numpy.sqrt((md.mesh.x)**2+(md.mesh.y)**2)8 radiusmax =numpy.max(radius)9 radius[numpy.nonzero(radius >(1.-10**-9)*radiusmax)]=radiusmax#eliminate roundoff issues in next statement10 md.geometry.thickness =hmin*numpy.ones((numpy.size(md.mesh.x)))+hmax*(4.*((1./2.)**(4./3.)*numpy.ones((numpy.size(md.mesh.x)))-((radius)/(2.*radiusmax))**(4./3.)))**(3./8.)11 md.geometry.base =0.*md.geometry.thickness12 md.geometry.surface =md.geometry.base+md.geometry.thickness4 print(" creating thickness") 5 hmin = 0.01 6 hmax = 2756.7 7 radius = numpy.sqrt((md.mesh.x)**2 + (md.mesh.y)**2) 8 radiusmax = numpy.max(radius) 9 radius[numpy.nonzero(radius > (1. - 10**-9) * radiusmax)] = radiusmax #eliminate roundoff issues in next statement 10 md.geometry.thickness = hmin * numpy.ones((numpy.size(md.mesh.x))) + hmax * (4. * ((1. / 2.)**(4. / 3.) * numpy.ones((numpy.size(md.mesh.x))) - ((radius) / (2. * radiusmax))**(4. / 3.)))**(3. / 8.) 11 md.geometry.base = 0. * md.geometry.thickness 12 md.geometry.surface = md.geometry.base + md.geometry.thickness 13 13 14 print " creating drag"15 md.friction.coefficient =20.*numpy.ones((md.mesh.numberofvertices))16 md.friction.coefficient[numpy.nonzero(md.mask.groundedice_levelset <0.)[0]]=0.17 md.friction.p =numpy.ones((md.mesh.numberofelements))18 md.friction.q =numpy.ones((md.mesh.numberofelements))14 print(" creating drag") 15 md.friction.coefficient = 20. * numpy.ones((md.mesh.numberofvertices)) 16 md.friction.coefficient[numpy.nonzero(md.mask.groundedice_levelset < 0.)[0]] = 0. 17 md.friction.p = numpy.ones((md.mesh.numberofelements)) 18 md.friction.q = numpy.ones((md.mesh.numberofelements)) 19 19 20 print " creating temperatures"21 tmin =238.15#K22 st =1.67*10**-2/1000. #k/m23 md.initialization.temperature =tmin+st*radius24 md.basalforcings.geothermalflux =4.2*10**-2*numpy.ones((md.mesh.numberofvertices))20 print(" creating temperatures") 21 tmin = 238.15 #K 22 st = 1.67 * 10**-2 / 1000. #k / m 23 md.initialization.temperature = tmin + st * radius 24 md.basalforcings.geothermalflux = 4.2 * 10**-2 * numpy.ones((md.mesh.numberofvertices)) 25 25 26 print " creating flow law parameter"27 md.materials.rheology_B =6.81*10**7*numpy.ones((md.mesh.numberofvertices)) #to have the same B as the analytical solution28 md.materials.rheology_n =3.*numpy.ones((md.mesh.numberofelements))26 print(" creating flow law parameter") 27 md.materials.rheology_B = 6.81 * 10**7 * numpy.ones((md.mesh.numberofvertices)) #to have the same B as the analytical solution 28 md.materials.rheology_n = 3. * numpy.ones((md.mesh.numberofelements)) 29 29 30 print " creating surface mass balance"31 smb_max =0.5 #m/yr32 sb =10**-2/1000. #m/yr/m33 rel =450.*1000.#m34 md.smb.mass_balance =numpy.minimum(smb_max*numpy.ones_like(radius),sb*(rel-radius))30 print(" creating surface mass balance") 31 smb_max = 0.5 #m / yr 32 sb = 10**-2 / 1000. #m / yr / m 33 rel = 450. * 1000. #m 34 md.smb.mass_balance = numpy.minimum(smb_max * numpy.ones_like(radius), sb * (rel - radius)) 35 35 36 print " creating velocities"37 constant =0.338 md.inversion.vx_obs =constant/2.*md.mesh.x*(md.geometry.thickness)**-139 md.inversion.vy_obs =constant/2.*md.mesh.y*(md.geometry.thickness)**-140 md.inversion.vel_obs =numpy.sqrt((md.inversion.vx_obs)**2+(md.inversion.vy_obs)**2)41 md.initialization.vx =numpy.zeros((md.mesh.numberofvertices))42 md.initialization.vy =numpy.zeros((md.mesh.numberofvertices))43 md.initialization.vz =numpy.zeros((md.mesh.numberofvertices))44 md.initialization.pressure =numpy.zeros((md.mesh.numberofvertices))36 print(" creating velocities") 37 constant = 0.3 38 md.inversion.vx_obs = constant / 2. * md.mesh.x * (md.geometry.thickness)**- 1 39 md.inversion.vy_obs = constant / 2. * md.mesh.y * (md.geometry.thickness)**- 1 40 md.inversion.vel_obs = numpy.sqrt((md.inversion.vx_obs)**2 + (md.inversion.vy_obs)**2) 41 md.initialization.vx = numpy.zeros((md.mesh.numberofvertices)) 42 md.initialization.vy = numpy.zeros((md.mesh.numberofvertices)) 43 md.initialization.vz = numpy.zeros((md.mesh.numberofvertices)) 44 md.initialization.pressure = numpy.zeros((md.mesh.numberofvertices)) 45 45 46 46 #Deal with boundary conditions: 47 print " boundary conditions for stressbalance model:"48 md =SetMarineIceSheetBC(md,'../Exp/RoundFrontEISMINT.exp')47 print(" boundary conditions for stressbalance model:") 48 md = SetMarineIceSheetBC(md, '../Exp/RoundFrontEISMINT.exp') 49 49 50 radius =numpy.sqrt((md.mesh.x)**2+(md.mesh.y)**2)51 pos =numpy.nonzero(radius==numpy.min(radius))[0]52 md.mesh.x[pos] =0.53 md.mesh.y[pos] =0.#the closest node to the center is changed to be exactly at the center50 radius = numpy.sqrt((md.mesh.x)**2 + (md.mesh.y)**2) 51 pos = numpy.nonzero(radius == numpy.min(radius))[0] 52 md.mesh.x[pos] = 0. 53 md.mesh.y[pos] = 0. #the closest node to the center is changed to be exactly at the center 54 54 55 md.stressbalance.spcvx[pos] =0.56 md.stressbalance.spcvy[pos] =0.57 md.stressbalance.spcvz[pos] =0.55 md.stressbalance.spcvx[pos] = 0. 56 md.stressbalance.spcvy[pos] = 0. 57 md.stressbalance.spcvz[pos] = 0.
Note:
See TracChangeset
for help on using the changeset viewer.