def __init__(self, model, custom_settings): self._validate_settings_in_baseclass = True # To be removed eventually # Note: deliberately calling the constructor of the base python solver (the parent of my parent) custom_settings = self._BackwardsCompatibilityHelper(custom_settings) super(navier_stokes_solver_vmsmonolithic.NavierStokesSolverMonolithic, self).__init__(model, custom_settings) self.formulation = navier_stokes_solver_vmsmonolithic.StabilizedFormulation( self.settings["formulation"]) self.element_name = self.formulation.element_name self.condition_name = self.formulation.condition_name self.element_integrates_in_time = self.formulation.element_integrates_in_time scheme_type = self.settings["time_scheme"].GetString() if scheme_type == "bossak": self.min_buffer_size = 2 elif scheme_type == "bdf2": self.min_buffer_size = 3 else: msg = "Unknown time_scheme option found in project parameters:\n" msg += "\"" + scheme_type + "\"\n" msg += "Accepted values are \"bossak\" or \"bdf2\".\n" raise Exception(msg) ## Construct the linear solver self.trilinos_linear_solver = trilinos_linear_solver_factory.ConstructSolver( self.settings["linear_solver_settings"]) KratosMultiphysics.Logger.Print( "Construction of TrilinosNavierStokesSolverMonolithic finished.")
def __init__(self, model, custom_settings): self._validate_settings_in_baseclass = True # To be removed eventually # Note: deliberately calling the constructor of the base python solver (the parent of my parent) custom_settings = self._BackwardsCompatibilityHelper(custom_settings) super(navier_stokes_solver_vmsmonolithic.NavierStokesSolverMonolithic, self).__init__(model, custom_settings) self.formulation = navier_stokes_solver_vmsmonolithic.StabilizedFormulation( self.settings["formulation"]) self.element_name = self.formulation.element_name self.condition_name = self.formulation.condition_name self.element_integrates_in_time = self.formulation.element_integrates_in_time self.element_has_nodal_properties = self.formulation.element_has_nodal_properties scheme_type = self.settings["time_scheme"].GetString() if scheme_type == "bossak": self.min_buffer_size = 2 elif scheme_type == "bdf2": self.min_buffer_size = 3 elif scheme_type == "steady": self.min_buffer_size = 1 self._SetUpSteadySimulation() else: msg = "Unknown time_scheme option found in project parameters:\n" msg += "\"" + scheme_type + "\"\n" msg += "Accepted values are \"bossak\", \"bdf2\" or \"steady\".\n" raise Exception(msg) ## Construct the linear solver self.trilinos_linear_solver = trilinos_linear_solver_factory.ConstructSolver( self.settings["linear_solver_settings"]) ## Construct the turbulence model solver if not self.settings["turbulence_model_solver_settings"].IsEquivalentTo( KratosMultiphysics.Parameters("{}")): self._turbulence_model_solver = CreateTurbulenceModel( model, self.settings["turbulence_model_solver_settings"], True) self.condition_name = self._turbulence_model_solver.GetFluidVelocityPressureConditionName( ) KratosMultiphysics.Logger.PrintInfo( "TrilinosNavierStokesSolverMonolithic", "Using " + self.condition_name + " as wall condition") KratosMultiphysics.Logger.Print( "Construction of TrilinosNavierStokesSolverMonolithic finished.")
def __init__(self, model, custom_settings): self._validate_settings_in_baseclass = True # To be removed eventually # Note: deliberately calling the constructor of the base python solver (the parent of my parent) custom_settings = self._BackwardsCompatibilityHelper(custom_settings) super(navier_stokes_solver_vmsmonolithic.NavierStokesSolverMonolithic, self).__init__(model, custom_settings) self.formulation = navier_stokes_solver_vmsmonolithic.StabilizedFormulation( self.settings["formulation"]) self.element_name = self.formulation.element_name self.condition_name = self.formulation.condition_name self.min_buffer_size = 2 ## Construct the linear solver self.trilinos_linear_solver = trilinos_linear_solver_factory.ConstructSolver( self.settings["linear_solver_settings"]) KratosMultiphysics.Logger.Print( "Construction of TrilinosNavierStokesSolverMonolithic finished.")