13 #if !defined(KRATOS_LAGRANGIAN_ROTATION_PROCESS)
14 #define KRATOS_LAGRANGIAN_ROTATION_PROCESS
45 "model_part_name":"PLEASE_CHOOSE_MODEL_PART_NAME",
46 "angular_velocity": 0.0,
47 "rotation_axis_initial_point": [0.0,0.0,0.0],
48 "rotation_axis_final_point": [0.0,0.0,1.0],
55 rParameters[
"model_part_name"];
90 const double axis_norm =
norm_2(rotation_axis);
91 if (axis_norm > 1.0e-15)
93 rotation_axis[0] *= 1.0 / axis_norm;
94 rotation_axis[1] *= 1.0 / axis_norm;
95 rotation_axis[2] *= 1.0 / axis_norm;
103 for (
int i = 0;
i < 3; ++
i)
105 for (
int j = 0;
j < 3; ++
j)
189 this->CalculateRodriguesMatrices(current_time);
194 #pragma omp parallel for private(point_initial_position)
197 ModelPart::NodesContainerType::iterator it = it_begin +
i;
200 noalias(point_initial_position) = it->Coordinates();
233 std::string
Info()
const override
235 return "LagrangianRotationProcess";
241 rOStream <<
"LagrangianRotationProcess";
270 void CalculateRodriguesMatrices(
const double current_time)
282 current_angular_velocity = 0;
285 double sin_theta = std::sin(
delta_time * current_angular_velocity);
286 double cos_theta = std::cos(
delta_time * current_angular_velocity);
309 rOStream << std::endl;
Definition: amatrix_interface.h:41
Process used to rotate lagrangian model parts using Rodrigues' rotation formula.
Definition: lagrangian_rotation_process.hpp:29
BoundedMatrix< double, 3, 3 > mrotation_dt_matrix
Definition: lagrangian_rotation_process.hpp:264
double minitial_time
Definition: lagrangian_rotation_process.hpp:257
void ExecuteInitializeSolutionStep() override
this function will be executed at every time step BEFORE performing the solve phase
Definition: lagrangian_rotation_process.hpp:176
std::string Info() const override
Turn back information as a string.
Definition: lagrangian_rotation_process.hpp:233
array_1d< double, 3 > maxis_final_point
Definition: lagrangian_rotation_process.hpp:260
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: lagrangian_rotation_process.hpp:239
KRATOS_CLASS_POINTER_DEFINITION(LagrangianRotationProcess)
~LagrangianRotationProcess() override
Destructor.
Definition: lagrangian_rotation_process.hpp:72
array_1d< double, 3 > maxis_initial_point
Definition: lagrangian_rotation_process.hpp:259
LagrangianRotationProcess(ModelPart &model_part, Parameters rParameters)
Constructor.
Definition: lagrangian_rotation_process.hpp:37
BoundedMatrix< double, 3, 3 > mantisym_axis_matrix
Definition: lagrangian_rotation_process.hpp:263
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: lagrangian_rotation_process.hpp:245
void ExecuteInitialize() override
Definition: lagrangian_rotation_process.hpp:83
void Execute() override
Execute method is used to execute the ApplyComponentTableProcess algorithms.
Definition: lagrangian_rotation_process.hpp:77
double mfinal_time
Definition: lagrangian_rotation_process.hpp:258
double mangular_velocity
Definition: lagrangian_rotation_process.hpp:256
BoundedMatrix< double, 3, 3 > midentity_matrix
Definition: lagrangian_rotation_process.hpp:261
BoundedMatrix< double, 3, 3 > maxis_matrix
Definition: lagrangian_rotation_process.hpp:262
ModelPart & mr_model_part
Member Variables.
Definition: lagrangian_rotation_process.hpp:254
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
NodeIterator NodesBegin(IndexType ThisIndex=0)
Definition: model_part.h:487
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
NodesContainerType & Nodes(IndexType ThisIndex=0)
Definition: model_part.h:507
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
double GetDouble() const
This method returns the double contained in the current Parameter.
Definition: kratos_parameters.cpp:657
Vector GetVector() const
This method returns the vector contained in the current Parameter.
Definition: kratos_parameters.cpp:707
void ValidateAndAssignDefaults(const Parameters &rDefaultParameters)
This function is designed to verify that the parameters under testing match the form prescribed by th...
Definition: kratos_parameters.cpp:1306
The base class for all processes in Kratos.
Definition: process.h:49
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
TExpressionType::data_type norm_2(AMatrix::MatrixExpression< TExpressionType, TCategory > const &TheExpression)
Definition: amatrix_interface.h:625
KratosZeroMatrix< double > ZeroMatrix
Definition: amatrix_interface.h:559
AMatrix::MatrixProductExpression< TExpression1Type, TExpression2Type > prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:568
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
float velocity
Definition: PecletTest.py:54
model_part
Definition: face_heat.py:14
delta_time
Definition: generate_frictional_mortar_condition.py:130
int j
Definition: quadrature.py:648
int nnodes
Definition: sensitivityMatrix.py:24
integer i
Definition: TensorModule.f:17