model.init_adot(adot) model.init_U_ob(u_ob, v_ob) model.init_E(1.0) ## solve the balance velocity for stats beta : #F = solvers.BalanceVelocitySolver(model, config) #F.solve() # #model.save_xml(model.Ubar, 'Ubar') # use T0 and beta0 from the previous run : model.init_T(in_dir + 'T.xml') # temp model.init_W(in_dir + 'W.xml') # water model.init_Mb(in_dir + 'Mb.xml') # basal melt rate model.init_U(in_dir + 'u.xml', in_dir + 'v.xml', in_dir + 'w.xml') # velocity model.init_beta(in_dir + 'beta.xml') # friction #model.init_Ubar('dump/BV/Ubar.xml') # balance velocity #model.init_beta_stats() # friction model.save_pvd(model.beta, 'beta0') # solve the steady state solver : F = solvers.SteadySolver(model, config) F.solve() model.save_xml(model.T, 'T') model.save_xml(model.W, 'W') model.save_xml(model.S, 'S') model.save_xml(model.B, 'B')
config['coupled']['on'] = False config['coupled']['max_iter'] = 5 config['velocity']['newton_params'] = params config['velocity']['vert_solve_method'] = 'mumps'#'superlu_dist' config['velocity']['calc_pressure'] = False config['velocity']['transient_beta'] = None #'stats' config['enthalpy']['on'] = True config['enthalpy']['solve_method'] = 'mumps'#'superlu_dist' config['age']['on'] = True config['age']['use_smb_for_ela'] = True config['balance_velocity']['kappa'] = 5.0 config['velocity']['on'] = False config['enthalpy']['on'] = False 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_U(in_dir + 'u.xml', in_dir + 'v.xml', in_dir + 'w.xml') # solve the BP model : F = solvers.SteadySolver(model, config) F.solve()
config['age']['on'] = False config['age']['use_smb_for_ela'] = True config['balance_velocity']['kappa'] = 20.0 config['balance_velocity']['adot'] = adot 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() if i == 0: model.init_T(in_dir + 'T.xml') #model.init_W(in_dir + 'W.xml') model.init_Mb(in_dir + 'Mb.xml') model.init_U(in_dir + 'u.xml', in_dir + 'v.xml', in_dir + 'w.xml') else: model.init_T(dir_b + str(i - 1) + '/T.xml') #model.init_W(dir_b + str(i-1) + '/W.xml') model.init_Mb(dir_b + str(i - 1) + '/Mb.xml') model.init_U(dir_b + str(i - 1) + '/u.xml', dir_b + str(i - 1) + '/v.xml', dir_b + str(i - 1) + '/w.xml') model.init_q_geo(model.ghf) model.init_T_surface(T_s) model.init_adot(adot) model.init_Ubar(in_dir + 'Ubar.xml') model.init_beta_stats() # solve the BP model : F = solvers.SteadySolver(model, config)