Example #1
0
    def create_sediment_model(self, mesh, bathymetry):
        self.P1DG = FunctionSpace(mesh, "DG", 1)
        self.P1_vec_dg = VectorFunctionSpace(mesh, "DG", 1)

        #if uv_init is None:
        self.uv_d = Function(self.P1_vec_dg).project(self.uv_init)
        #if elev_init is None:
        self.eta_d = Function(self.P1DG).project(self.elev_init)

        self.sediment_model = SedimentModel(
            ModelOptions2d,
            suspendedload=self.suspended,
            convectivevel=self.convective_vel_flag,
            bedload=self.bedload,
            angle_correction=self.angle_correction,
            slope_eff=self.slope_eff,
            seccurrent=False,
            sediment_slide=self.sediment_slide,
            mesh2d=mesh,
            bathymetry_2d=bathymetry,
            dt=self.dt,
            uv_init=self.uv_d,
            elev_init=self.eta_d,
            ks=self.ks,
            average_size=self.average_size,
            porosity=self.porosity,
            max_angle=self.max_angle,
            meshgrid_size=self.meshgrid_size,
            cons_tracer=self.use_tracer_conservative_form,
            morfac=self.morphological_acceleration_factor,
            wetting_and_drying=self.wetting_and_drying,
            wetting_alpha=self.wetting_and_drying_alpha)
Example #2
0
    def create_sediment_model(self, mesh, bathymetry):
        self.P1DG = FunctionSpace(mesh, "DG", 1)
        self.P1_vec_dg = VectorFunctionSpace(mesh, "DG", 1)
        # TODO: Do these really need to be attributes? Would prefer to avoid stashing func spaces

        self.uv_d = Function(self.P1_vec_dg).project(self.uv_init)
        self.eta_d = Function(self.P1DG).project(self.elev_init)

        self.sediment_model = SedimentModel(  # TODO: Use kwargs dict format
            ModelOptions2d,
            suspendedload=self.suspended,
            convectivevel=self.convective_vel_flag,
            bedload=self.bedload,
            angle_correction=self.angle_correction,
            slope_eff=self.slope_eff,
            seccurrent=False,
            mesh2d=mesh,
            bathymetry_2d=bathymetry,
            uv_init=self.uv_d,
            elev_init=self.eta_d,
            ks=self.ks,
            average_size=self.average_size,
            cons_tracer=self.use_tracer_conservative_form,
            wetting_and_drying=self.wetting_and_drying,
            wetting_alpha=self.wetting_and_drying_alpha)
Example #3
0
    def create_sediment_model(self, mesh, bathymetry):
        self.P1DG = FunctionSpace(mesh, "DG", 1)
        self.P1_vec_dg = VectorFunctionSpace(mesh, "DG", 1)

        self.uv_d = Function(self.P1_vec_dg).project(self.uv_init)
        self.eta_d = Function(self.P1DG).project(self.elev_init)

        self.sediment_model = SedimentModel(ModelOptions2d, suspendedload=self.suspended, convectivevel=self.convective_vel_flag,
                                            bedload=self.bedload, angle_correction=self.angle_correction, slope_eff=self.slope_eff, seccurrent=False,
                                            mesh2d=mesh, bathymetry_2d=bathymetry,
                                            uv_init=self.uv_d, elev_init=self.eta_d, ks=self.ks, average_size=self.average_size,
                                            cons_tracer=self.use_tracer_conservative_form, wetting_and_drying=self.wetting_and_drying, wetting_alpha=self.wetting_and_drying_alpha)