Ejemplo n.º 1
0
    def DispersePhaseInitialize(self):
        vars_man.AddNodalVariables(self.spheres_model_part, self.pp.dem_vars)
        vars_man.AddNodalVariables(self.rigid_face_model_part, self.pp.rigid_faces_vars)
        vars_man.AddNodalVariables(self.DEM_inlet_model_part, self.pp.inlet_vars)
        vars_man.AddExtraProcessInfoVariablesToDispersePhaseModelPart(
            self.pp,
            self.disperse_phase_solution.spheres_model_part)

        self.disperse_phase_solution.Initialize()
Ejemplo n.º 2
0
    def AddExtraVariables(self):
        spheres_model_part = self.all_model_parts.Get('SpheresPart')
        fluid_model_part = self.all_model_parts.Get('FluidPart')

        # building lists of variables for which memory is to be allocated
        # TEMPORARY, HORRIBLE !!!
        import variables_management as vars_man

        vars_man.ConstructListsOfVariables(self.pp)
        fluid_model_part = self.all_model_parts.Get('FluidPart')

        if "REACTION" in self.pp.nodal_results:
            fluid_model_part.AddNodalSolutionStepVariable(REACTION)
        if "DISTANCE" in self.pp.nodal_results:
            fluid_model_part.AddNodalSolutionStepVariable(DISTANCE)

        # importing the solvers needed
        SolverSettings = self.pp.FluidSolverConfiguration
        self.solver_module = import_solver(SolverSettings)

        # caution with breaking up this block (memory allocation)! {
        self.solver_module.AddVariables(fluid_model_part, SolverSettings)
        vars_man.AddNodalVariables(fluid_model_part,
                                   self.pp.fluid_vars)  #     MOD.
        # }
        # self.ReadFluidModelPart()
        # Creating necessary directories
        [post_path, data_and_results, graphs_path,
         MPI_results] = self.procedures.CreateDirectories(
             str(self.main_path), str(self.pp.CFD_DEM.problem_name))

        vars_man.AddNodalVariables(spheres_model_part, self.pp.dem_vars)
        vars_man.AddNodalVariables(self.rigid_face_model_part,
                                   self.pp.rigid_faces_vars)
        vars_man.AddNodalVariables(self.DEM_inlet_model_part,
                                   self.pp.inlet_vars)
        # adding extra process info variables
        vars_man.AddingExtraProcessInfoVariables(self.pp, fluid_model_part,
                                                 spheres_model_part)
Ejemplo n.º 3
0
    fluid_model_part.AddNodalSolutionStepVariable(DISTANCE)

#
#
# importing the solvers needed
SolverSettings = pp.FluidSolverConfiguration
solver_module = import_solver(SolverSettings)

#
# importing variables
print('Adding nodal variables to the fluid_model_part')  #     MOD.
sys.stdout.flush()

# caution with breaking up this block (memory allocation)! {
solver_module.AddVariables(fluid_model_part, SolverSettings)
vars_man.AddNodalVariables(fluid_model_part, pp.fluid_vars)  #     MOD.
# }

# introducing input file name
input_file_name = pp.problem_name

# reading the fluid part
model_part_io_fluid = ModelPartIO(input_file_name)
model_part_io_fluid.ReadModelPart(fluid_model_part)

#_____________________________________________________________________________________________________________________________________
#
#                               F L U I D    B L O C K    E N D S
#_____________________________________________________________________________________________________________________________________

# Constructing a utilities objects
Ejemplo n.º 4
0
    fluid_model_part.AddNodalSolutionStepVariable(DISTANCE)

#
#
# importing the solvers needed
SolverSettings = ProjectParameters.FluidSolverConfiguration
solver_module = import_solver(SolverSettings)

#
# importing variables
print('Adding nodal variables to the fluid_model_part')  #     MOD.
sys.stdout.flush()

# caution with breaking up this block (memory allocation)! {
solver_module.AddVariables(fluid_model_part, SolverSettings)
vars_man.AddNodalVariables(fluid_model_part,
                           ProjectParameters.fluid_vars)  #     MOD.
# }

# introducing input file name
input_file_name = ProjectParameters.problem_name

# reading the fluid part
model_part_io_fluid = ModelPartIO(input_file_name, True)
model_part_io_fluid.ReadModelPart(fluid_model_part)

#_____________________________________________________________________________________________________________________________________
#
#                               F L U I D    B L O C K    E N D S
#_____________________________________________________________________________________________________________________________________

# creating utilities from DEM_procedures
Ejemplo n.º 5
0
    def AddExtraVariables(self):
        spheres_model_part = self.all_model_parts.Get('SpheresPart')
        fluid_model_part = self.all_model_parts.Get('FluidPart')

        # building lists of variables for which memory is to be allocated
        # TEMPORARY, HORRIBLE !!!
        import variables_management as vars_man

        vars_man.ConstructListsOfVariables(self.pp)
        #_____________________________________________________________________________________________________________________________________
        #
        #                               F L U I D    B L O C K    B E G I N S
        #_____________________________________________________________________________________________________________________________________

        # defining variables to be used
        # GID IO IS NOT USING THIS NOW. TO BE REMOVED ONCE THE "PRINT IN POINTS"
        # CODE IS NOT USING IT

        variables_dictionary = {
            "PRESSURE": PRESSURE,
            "VELOCITY": VELOCITY,
            "MU": MU,  #    MOD.
            "BUOYANCY": BUOYANCY,  #    MOD.
            "DRAG_FORCE": DRAG_FORCE,  #    MOD.
            "LIFT_FORCE": LIFT_FORCE
        }  #    MOD.

        fluid_model_part = self.all_model_parts.Get('FluidPart')

        if "REACTION" in self.pp.nodal_results:
            fluid_model_part.AddNodalSolutionStepVariable(REACTION)
        if "DISTANCE" in self.pp.nodal_results:
            fluid_model_part.AddNodalSolutionStepVariable(DISTANCE)

        # importing the solvers needed
        SolverSettings = self.pp.FluidSolverConfiguration
        self.solver_module = import_solver(SolverSettings)

        # caution with breaking up this block (memory allocation)! {
        self.solver_module.AddVariables(fluid_model_part, SolverSettings)
        vars_man.AddNodalVariables(fluid_model_part,
                                   self.pp.fluid_vars)  #     MOD.
        # }
        # self.ReadFluidModelPart()
        # Creating necessary directories
        [post_path, data_and_results, graphs_path,
         MPI_results] = self.procedures.CreateDirectories(
             str(self.main_path), str(self.pp.CFD_DEM.problem_name))

        #_____________________________________________________________________________________________________________________________________
        #
        #                               F L U I D    B L O C K    E N D S
        #_____________________________________________________________________________________________________________________________________

        # Add variables

        vars_man.AddNodalVariables(spheres_model_part, self.pp.dem_vars)
        vars_man.AddNodalVariables(self.rigid_face_model_part,
                                   self.pp.rigid_faces_vars)
        vars_man.AddNodalVariables(self.DEM_inlet_model_part,
                                   self.pp.inlet_vars)
        # adding extra process info variables
        vars_man.AddingExtraProcessInfoVariables(self.pp, fluid_model_part,
                                                 spheres_model_part)