def WriteFluidMdpa(filename, model_part, element_name, condition_name): restart_file = open(filename + ".mdpa", 'w') import new_restart_utilities new_restart_utilities.PrintProperties(restart_file) new_restart_utilities.PrintNodes(model_part.Nodes, restart_file) new_restart_utilities.PrintElements(element_name, model_part.Elements, restart_file) new_restart_utilities.PrintConditions(condition_name, model_part.Conditions, restart_file) #printing info for slip BC new_restart_utilities.PrintRestart_Variable_On_Condition( IS_STRUCTURE, "IS_STRUCTURE", model_part.Conditions, restart_file) new_restart_utilities.PrintRestart_ScalarVariable(VELOCITY_X, "VELOCITY_X", model_part.Nodes, restart_file) new_restart_utilities.PrintRestart_ScalarVariable(VELOCITY_Y, "VELOCITY_Y", model_part.Nodes, restart_file) new_restart_utilities.PrintRestart_ScalarVariable(VELOCITY_Z, "VELOCITY_Z", model_part.Nodes, restart_file) new_restart_utilities.PrintRestart_ScalarVariable(PRESSURE, "PRESSURE", model_part.Nodes, restart_file) new_restart_utilities.PrintRestart_ScalarVariable(VISCOSITY, "VISCOSITY", model_part.Nodes, restart_file) new_restart_utilities.PrintRestart_ScalarVariable(DENSITY, "DENSITY", model_part.Nodes, restart_file) restart_file.close()
def WriteRestartFile(self, FileName): restart_file = open(FileName + ".mdpa", 'w') import new_restart_utilities new_restart_utilities.PrintProperties(restart_file) new_restart_utilities.PrintNodes(self.model_part.Nodes, restart_file) new_restart_utilities.PrintElements("Fluid2D", self.model_part.Elements, restart_file) new_restart_utilities.PrintRestart_ScalarVariable( VELOCITY_X, "VELOCITY_X", self.model_part.Nodes, restart_file) new_restart_utilities.PrintRestart_ScalarVariable( VELOCITY_Y, "VELOCITY_Y", self.model_part.Nodes, restart_file) new_restart_utilities.PrintRestart_ScalarVariable( VELOCITY_Z, "VELOCITY_Z", self.model_part.Nodes, restart_file) new_restart_utilities.PrintRestart_ScalarVariable( ACCELERATION_X, "ACCELERATION_X", self.model_part.Nodes, restart_file) new_restart_utilities.PrintRestart_ScalarVariable( ACCELERATION_Y, "ACCELERATION_Y", self.model_part.Nodes, restart_file) new_restart_utilities.PrintRestart_ScalarVariable( ACCELERATION_Z, "ACCELERATION_Z", self.model_part.Nodes, restart_file) new_restart_utilities.PrintRestart_ScalarVariable( FORCE_X, "FORCE_X", self.model_part.Nodes, restart_file) new_restart_utilities.PrintRestart_ScalarVariable( FORCE_Y, "FORCE_Y", self.model_part.Nodes, restart_file) new_restart_utilities.PrintRestart_ScalarVariable( FORCE_Z, "FORCE_Z", self.model_part.Nodes, restart_file) # new_restart_utilities.PrintRestart_ScalarVariable(ANGULAR_ACCELERATION_X,"ANGULAR_ACCELERATION_X",self.model_part.Nodes,restart_file) # new_restart_utilities.PrintRestart_ScalarVariable(ANGULAR_ACCELERATION_Y,"ANGULAR_ACCELERATION_Y",self.model_part.Nodes,restart_file) # new_restart_utilities.PrintRestart_ScalarVariable(ANGULAR_ACCELERATION_Z,"ANGULAR_ACCELERATION_Z",self.model_part.Nodes,restart_file) # new_restart_utilities.PrintRestart_ScalarVariable(ANGULAR_VELOCITY_X,"ANGULAR_VELOCITY_X",self.model_part.Nodes,restart_file) # new_restart_utilities.PrintRestart_ScalarVariable(ANGULAR_VELOCITY_Y,"ANGULAR_VELOCITY_Y",self.model_part.Nodes,restart_file) # new_restart_utilities.PrintRestart_ScalarVariable(ANGULAR_VELOCITY_Z,"ANGULAR_VELOCITY_Z",self.model_part.Nodes,restart_file) new_restart_utilities.PrintRestart_ScalarVariable( PRESSURE, "PRESSURE", self.model_part.Nodes, restart_file) new_restart_utilities.PrintRestart_ScalarVariable( VISCOSITY, "VISCOSITY", self.model_part.Nodes, restart_file) new_restart_utilities.PrintRestart_ScalarVariable( DENSITY, "DENSITY", self.model_part.Nodes, restart_file) restart_file.close()
def WriteRestartFile(self, FileName): restart_file = open(FileName + ".mdpa", 'w') import new_restart_utilities new_restart_utilities.PrintProperties(restart_file) new_restart_utilities.PrintNodes(self.model_part.Nodes, restart_file) new_restart_utilities.PrintElements("Fluid2DGLS", self.model_part.Elements, restart_file) new_restart_utilities.PrintRestart_ScalarVariable( PRESSURE, "PRESSURE", self.model_part.Nodes, restart_file) new_restart_utilities.PrintRestart_ScalarVariable( VISCOSITY, "VISCOSITY", self.model_part.Nodes, restart_file) new_restart_utilities.PrintRestart_ScalarVariable( DENSITY, "DENSITY", self.model_part.Nodes, restart_file) new_restart_utilities.PrintRestart_ScalarVariable( TEMPERATURE, "TEMPERATURE", self.model_part.Nodes, restart_file) new_restart_utilities.PrintRestart_ScalarVariable( IS_STRUCTURE, "IS_STRUCTURE", self.model_part.Nodes, restart_file) new_restart_utilities.PrintRestart_ScalarVariable( IS_FREE_SURFACE, "IS_FREE_SURFACE", self.model_part.Nodes, restart_file) new_restart_utilities.PrintRestart_ScalarVariable( IS_FREE_SURFACE, "IS_LAGRANGIAN_INLET", self.model_part.Nodes, restart_file) new_restart_utilities.PrintRestart_ScalarVariable( IS_BOUNDARY, "IS_BOUNDARY", self.model_part.Nodes, restart_file) new_restart_utilities.PrintRestart_ScalarVariable( VELOCITY_X, "VELOCITY_X", self.model_part.Nodes, restart_file) new_restart_utilities.PrintRestart_ScalarVariable( VELOCITY_Y, "VELOCITY_Y", self.model_part.Nodes, restart_file) new_restart_utilities.PrintRestart_ScalarVariable( VELOCITY_Z, "VELOCITY_Z", self.model_part.Nodes, restart_file) new_restart_utilities.PrintRestart_ScalarVariable( YCH4, "YCH4", self.model_part.Nodes, restart_file) new_restart_utilities.PrintRestart_ScalarVariable( TEMPERATURE, "TEMPERATURE", self.model_part.Nodes, restart_file) new_restart_utilities.PrintRestart_ScalarVariable( FACE_HEAT_FLUX, "FACE_HEAT_FLUX", self.model_part.Nodes, restart_file) new_restart_utilities.PrintRestart_ScalarVariable( ENTHALPY, "ENTHALPY", self.model_part.Nodes, restart_file) restart_file.close()