def _MoveAndRotateWake(self): ''' This function moves and rotates the wake with the same parameters as the geometry. ''' self.moving_parameters = KratosMultiphysics.Parameters() self.moving_parameters.AddEmptyValue("origin") self.moving_parameters["origin"].SetVector( self.main_model_part.ProcessInfo.GetValue(CPFApp.WAKE_ORIGIN)) self.moving_parameters.AddEmptyValue("rotation_angle") angle = math.radians( -self.main_model_part.ProcessInfo.GetValue(CPFApp.ROTATION_ANGLE)) self.moving_parameters["rotation_angle"].SetDouble(angle) CPFApp.MoveModelPartProcess(self.wake_model_part, self.moving_parameters).Execute()
def _InitializeSkinModelPart(self): ''' This function loads and moves the skin_model_part in the main_model_part to the desired initial point (origin). It also rotates the skin model part around the origin point according to the rotation_angle''' self.skin_model_part=self.model.CreateModelPart("skin") ini_time=time.time() # Reading skin model part KratosMultiphysics.ModelPartIO(self.skin_model_part_name).ReadModelPart(self.skin_model_part) # Moving and rotating the skin model part angle=math.radians(-self.moving_parameters["rotation_angle"].GetDouble()) self.moving_parameters["rotation_angle"].SetDouble(angle) CompressiblePotentialFlow.MoveModelPartProcess(self.skin_model_part, self.moving_parameters).Execute() KratosMultiphysics.Logger.PrintInfo('LevelSetRemeshing','InitializeSkin time: ',time.time()-ini_time)