Exemplo n.º 1
0
model = model.Model(config)
model.set_mesh(mesh)
model.set_surface_and_bed(S, B)
model.set_subdomains(ff, cf, ff_acc)
model.initialize_variables()

model.init_viscosity_mode('full')
model.init_mask(mask)
model.init_q_geo(model.ghf)
model.init_T_surface(T_s)
model.init_adot(adot)
model.init_E(1.0)

model.init_T(in_dir + 'T.xml')  # temp
model.init_beta(in_dir + 'beta.xml')  # friction
model.init_W(in_dir + 'W.xml')  # water
model.init_E_shf(in_dir + 'E_shf.xml')  # enhancement
model.init_U(in_dir + 'u.xml', in_dir + 'v.xml', in_dir + 'w.xml')

# solve the BP model :
F = solvers.SteadySolver(model, config)
F.solve()

model.save_xml(model.T, 'T')
model.save_xml(model.W, 'W')
model.save_xml(model.u, 'u')
model.save_xml(model.v, 'v')
model.save_xml(model.w, 'w')
model.save_xml(model.Mb, 'Mb')
Exemplo n.º 2
0
B = Function(Q)

File(in_dir + 'S_s.xml') >> S
File(in_dir + 'B_s.xml') >> B

config = default_config()
config['output_path'] = out_dir
config['model_order'] = 'SSA'
config['use_dukowicz'] = False

model = model.Model(config)
model.set_mesh(mesh)
model.set_surface_and_bed(S, B)
model.initialize_variables()

model.init_beta(in_dir + 'beta_s.xml')
model.init_component_Ubar(in_dir + 'ubar_s.xml', in_dir + 'vbar_s.xml')
model.init_etabar(in_dir + 'etabar_s.xml')

T = solvers.StokesBalanceSolver(model, config)
T.solve()

Ubar = project(as_vector([model.ubar, model.vbar]))

model.save_pvd(model.eta, 'eta')
model.save_pvd(Ubar, 'Ubar')
model.save_xml(model.tau_id, 'tau_id')
model.save_xml(model.tau_jd, 'tau_jd')
model.save_xml(model.tau_ib, 'tau_ib')
model.save_xml(model.tau_jb, 'tau_jb')
model.save_xml(model.tau_ii, 'tau_ii')
Exemplo n.º 3
0
model.init_T_surface(T_s)
model.init_adot(adot)
model.init_U_ob(u_ob, v_ob)
model.init_E(1.0)

#model.init_u_lat(model.u_ob)
#model.init_v_lat(model.v_ob)
model.init_u_lat(0.0)
model.init_v_lat(0.0)
model.init_w_lat(0.0)

# use T0 and beta0 from the previous run :
if i > 0:
    model.init_T(dir_b + str(i - 1) + '/T.xml')  # temp
    model.init_W(dir_b + str(i - 1) + '/W.xml')  # water
    model.init_beta(dir_b + str(i - 1) + '/beta.xml')  # friction
else:
    model.init_T(model.T_w - 30.0)
    model.init_beta_SIA()
    #model.init_beta(100.0)

model.save_pvd(model.beta, 'beta0')
model.save_pvd(model.U_ob, 'U_ob')

F = solvers.SteadySolver(model, config)
F.solve()

params['newton_solver']['maximum_iterations'] = 25
config['velocity']['solve_vert_velocity'] = False
config['velocity']['use_U0'] = False
config['enthalpy']['on'] = False