Exemple #1
0
    Surface = Expression('- x[0] * tan(alpha)',
                         alpha=alpha,
                         element=model.Q.ufl_element())
    Bed = Expression('- x[0] * tan(alpha) - 1000.0',
                     alpha=alpha,
                     element=model.Q.ufl_element())
    Beta2 = Expression('1000 + 1000 * sin(2*pi*x[0]/L) * sin(2*pi*x[1]/L)',
                       alpha=alpha,
                       L=L,
                       element=model.Q.ufl_element())

    model.set_geometry(Surface, Bed, deform=True)
    model.set_parameters(IceParameters())
    model.initialize_variables()

    nonlin_solver_params = default_nonlin_solver_params()
    nonlin_solver_params['newton_solver']['linear_solver'] = 'mumps'

    config = {
        'mode': 'steady',
        'output_path': './results_stokes_L' + str(L) + '/',
        'wall_markers': [],
        'periodic_boundary_conditions': True,
        't_start': None,
        't_end': None,
        'time_step': None,
        'log': True,
        'coupled': {
            'on': False,
            'inner_tol': 0.0,
            'max_iter': 2
Surface            = dbm.get_spline_expression('h')
Bed                = dbm.get_spline_expression('b')
SurfaceTemperature = dsr.get_spline_expression('T')
BasalHeatFlux      = dfm.get_spline_expression('q_geo')
adot               = dsr.get_spline_expression('adot')
U_observed         = dmg.get_spline_expression('v_mag')

model = model.Model()
model.set_geometry(Surface, Bed)
model.set_mesh(mesh, flat_mesh=flat_mesh, deform=True)
model.set_parameters(pc.IceParameters())
model.initialize_variables()


# specifify non-linear solver parameters :
nonlin_solver_params = default_nonlin_solver_params()
nonlin_solver_params['newton_solver']['relaxation_parameter']    = 0.7
nonlin_solver_params['newton_solver']['relative_tolerance']      = 1e-3
nonlin_solver_params['newton_solver']['absolute_tolerance']      = 1e2
nonlin_solver_params['newton_solver']['maximum_iterations']      = 20
nonlin_solver_params['newton_solver']['error_on_nonconvergence'] = False
nonlin_solver_params['newton_solver']['linear_solver']           = 'mumps'
nonlin_solver_params['newton_solver']['preconditioner']          = 'default'
parameters['form_compiler']['quadrature_degree']                 = 2

config = { 'mode'                         : 'steady',
           't_start'                      : None,
           't_end'                        : None,
           'time_step'                    : None,
           'output_path'                  : out_dir,
           'wall_markers'                 : [],
Exemple #3
0
 'wall_markers'                 : [],
 'periodic_boundary_conditions' : True,
 't_start'                      : None,
 't_end'                        : None,
 'time_step'                    : None,
 'log'                          : True,
 'coupled' : 
 { 
   'on'        : False,
   'inner_tol' : 0.0,
   'max_iter'  : 1
 },
 'velocity' : 
 { 
   'on'             : True,
   'newton_params'  : default_nonlin_solver_params(),
   'viscosity_mode' : 'isothermal',
   'b_linear'       : None,
   'use_T0'         : False,
   'T0'             : None,
   'A0'             : 1e-16,
   'beta2'          : Beta2(),
   'r'              : 0.0,
   'E'              : 1,
   'approximation'  : 'fo',
   'boundaries'     : None
 },
 'enthalpy' : 
 { 
   'on'                  : False,
   'use_surface_climate' : False,