Esempio n. 1
0
d = os.path.dirname(out_dir)
if not os.path.exists(d):
    os.makedirs(d)

# ISMIP HOM A experiment :
md = im.model()
md.miscellaneous.name = 'ISMIP_HOM_A'

# Geometry :
print_text('::: issm -- constructing geometry :::', 'red')

# Define the geometry of the simulation :
#md = triangle(md, './exp/square.exp', 80000)
L = 80000.0
n = 50
md = im.squaremesh(md, L, L, n, n)
md = im.setmask(md, 'all', '')

#surface
md.geometry.surface = -md.mesh.x * np.tan(0.5 * np.pi / 180.0)

# base of ice sheet with 'L' the size of the side of the square :
md.geometry.base = + md.geometry.surface - 1000.0 \
                   + 500.0 * np.sin(md.mesh.x*2*np.pi/L) \
                           * np.sin(md.mesh.y*2*np.pi/L)

#thickness is the difference between surface and base :
md.geometry.thickness = md.geometry.surface - md.geometry.base

# ISMIP_HOM experiment :
md.materials.rho_ice = 910.0
Esempio n. 2
0
Hini = 100.0  # [m] initial ice thickness
Tm = 273.15  # [K] melting temperature of ice
n = 3.0  # [--] Glen's exponent
A = 2e-17  # [Pa^{-n} s^{-1}] flow
beta = 1e4  # [Pa m^{-1/n} a^{-1/n}] friction coefficient
p = 3.0  # [--] Paterson flow exponent one
q = 0.0  # [--] Paterson flow exponent two
adot = 0.3  # [m a^{-a}] surface-mass balance
tf = 20000.0  # [a] final time
dt = 10.0  # [a] time step
cfl = 0.5  # [--] CFL coefficient
inter = 10  # [--] interval to save data

# create an empty rectangular mesh :
#md     = triangle(md, './exp/MismipDomain.exp', 10000)
md = im.squaremesh(md, Lx, Ly, nx=64, ny=20)
md = im.setmask(md, 'all', '')

# set up element-wise multiplicative identities :

# rank-zero tensor vertex ones vector :
v_ones = np.ones(md.mesh.numberofvertices)

# rank-zero tensor element ones vector :
e_ones = np.ones(md.mesh.numberofelements)

# rank-two tensor ones vector :
A_ones = np.ones((md.mesh.numberofvertices, 6))

# rank-one tensor ones vector :
b_ones = np.ones((md.mesh.numberofvertices, 3))
Esempio n. 3
0
Tm = 273.15  # [K] melting temperature of ice
n = 3.0  # [--] Glen's exponent
A = 2e-17  # [Pa^{-n} s^{-1}] flow
beta = 1e4  # [Pa m^{-1/n} a^{-1/n}] friction coefficient
p = 3.0  # [--] Paterson friction exponent one
q = 0.0  # [--] Paterson friction exponent two
adot = 0.3  # [m a^{-a}] surface-mass balance
tf = 1  # [a] final time
dt = 1  # [a] time step
dt_sav = 1  # [a] time interval to save data
cfl = 0.5  # [--] CFL coefficient
num_p = 4  # [--] number of processor cores to use

# create an empty rectangular mesh :
#md     = triangle(md, './exp/MismipDomain.exp', 10000)
md = im.squaremesh(md, Lx, Ly, nx=nx, ny=ny)
md = im.setmask(md, 'all', '')

# set up element-wise multiplicative identities :

# rank-zero tensor vertex ones vector :
v_ones = np.ones(md.mesh.numberofvertices)

# rank-zero tensor element ones vector :
e_ones = np.ones(md.mesh.numberofelements)

# rank-two tensor ones vector :
A_ones = np.ones((md.mesh.numberofvertices, 6))

# rank-one tensor ones vector :
b_ones = np.ones((md.mesh.numberofvertices, 3))