10 #if !defined(KRATOS_ASSIGN_ROTATION_ABOUT_AN_AXIS_TO_NODES_PROCESS_H_INCLUDED)
11 #define KRATOS_ASSIGN_ROTATION_ABOUT_AN_AXIS_TO_NODES_PROCESS_H_INCLUDED
60 "model_part_name":"MODEL_PART_NAME",
61 "variable_name": "VARIABLE_NAME",
79 for(
unsigned int i=0;
i<3;
i++)
126 this->AssignRotationAboutAnAxis();
191 std::string
Info()
const override
193 return "AssignRotationAboutAnAxisToNodesProcess";
199 rOStream <<
"AssignRotationAboutAnAxisToNodesProcess";
263 void AssignRotationAboutAnAxis()
280 bool dynamic_angular_velocity =
false;
281 bool dynamic_angular_acceleration =
false;
284 const double& rDeltaTime = rCurrentProcessInfo[DELTA_TIME];
287 angular_velocity.
clear();
289 angular_acceleration.
clear();
291 double time_factor = 0.0;
299 dynamic_angular_velocity =
true;
300 time_factor = rDeltaTime;
305 dynamic_angular_velocity =
true;
306 dynamic_angular_acceleration =
true;
307 time_factor = rDeltaTime * rDeltaTime;
315 if( dynamic_angular_velocity ){
316 angular_velocity = delta_rotation / rDeltaTime;
317 if( dynamic_angular_acceleration ){
318 angular_acceleration = angular_velocity / rDeltaTime;
325 #pragma omp parallel for private(distance,radius,rotation_matrix)
329 ModelPart::NodesContainerType::iterator it = it_begin +
i;
331 distance = it->GetInitialPosition() -
mcenter;
333 total_quaternion.ToRotationMatrix(rotation_matrix);
337 array_1d<double,3>& displacement = it->FastGetSolutionStepValue(DISPLACEMENT);
338 displacement =
radius - distance;
340 if( dynamic_angular_velocity ){
346 array_1d<double,3>&
velocity = it->FastGetSolutionStepValue(VELOCITY);
350 if( dynamic_angular_acceleration ){
352 array_1d<double,3>&
acceleration = it->FastGetSolutionStepValue(ACCELERATION);
414 rOStream << std::endl;
The base class for assigning a value to scalar variables or array_1d components processes in Kratos.
Definition: assign_rotation_about_an_axis_to_nodes_process.hpp:35
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: assign_rotation_about_an_axis_to_nodes_process.hpp:197
std::string mvariable_name
Definition: assign_rotation_about_an_axis_to_nodes_process.hpp:222
AssignRotationAboutAnAxisToNodesProcess(ModelPart &model_part, Parameters rParameters)
Definition: assign_rotation_about_an_axis_to_nodes_process.hpp:52
void operator()()
This operator is provided to call the process as a function and simply calls the Execute method.
Definition: assign_rotation_about_an_axis_to_nodes_process.hpp:109
~AssignRotationAboutAnAxisToNodesProcess() override
Destructor.
Definition: assign_rotation_about_an_axis_to_nodes_process.hpp:101
double mprevious_value
Definition: assign_rotation_about_an_axis_to_nodes_process.hpp:224
void Execute() override
Execute method is used to execute the AssignRotationAboutAnAxisToNodesProcess algorithms.
Definition: assign_rotation_about_an_axis_to_nodes_process.hpp:121
ModelPart & mrModelPart
Definition: assign_rotation_about_an_axis_to_nodes_process.hpp:221
void ExecuteBeforeOutputStep() override
this function will be executed at every time step BEFORE writing the output
Definition: assign_rotation_about_an_axis_to_nodes_process.hpp:158
double mvalue
Definition: assign_rotation_about_an_axis_to_nodes_process.hpp:223
AssignRotationAboutAnAxisToNodesProcess(AssignRotationAboutAnAxisToNodesProcess const &rOther)
Copy constructor.
KRATOS_CLASS_POINTER_DEFINITION(AssignRotationAboutAnAxisToNodesProcess)
Pointer definition of AssignRotationAboutAnAxisToNodesProcess.
void ExecuteFinalize() override
Definition: assign_rotation_about_an_axis_to_nodes_process.hpp:171
array_1d< double, 3 > mdirection
Definition: assign_rotation_about_an_axis_to_nodes_process.hpp:225
void ExecuteBeforeSolutionLoop() override
Definition: assign_rotation_about_an_axis_to_nodes_process.hpp:140
void ExecuteInitialize() override
Definition: assign_rotation_about_an_axis_to_nodes_process.hpp:134
AssignRotationAboutAnAxisToNodesProcess(ModelPart &model_part)
Definition: assign_rotation_about_an_axis_to_nodes_process.hpp:48
void ExecuteInitializeSolutionStep() override
this function will be executed at every time step BEFORE performing the solve phase
Definition: assign_rotation_about_an_axis_to_nodes_process.hpp:146
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: assign_rotation_about_an_axis_to_nodes_process.hpp:203
array_1d< double, 3 > mcenter
Definition: assign_rotation_about_an_axis_to_nodes_process.hpp:226
std::string Info() const override
Turn back information as a string.
Definition: assign_rotation_about_an_axis_to_nodes_process.hpp:191
void ExecuteAfterOutputStep() override
this function will be executed at every time step AFTER writing the output
Definition: assign_rotation_about_an_axis_to_nodes_process.hpp:164
void ExecuteFinalizeSolutionStep() override
this function will be executed at every time step AFTER performing the solve phase
Definition: assign_rotation_about_an_axis_to_nodes_process.hpp:151
static void VectorToSkewSymmetricTensor(const TVector3 &rVector, TMatrix3 &rSkewSymmetricTensor)
Definition: beam_math_utilities.hpp:231
KratosComponents class encapsulates a lookup table for a family of classes in a generic way.
Definition: kratos_components.h:49
NodesContainerType & Nodes()
Definition: mesh.h:346
NodeIterator NodesBegin()
Definition: mesh.h:326
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
MeshType & GetMesh(IndexType ThisIndex=0)
Definition: model_part.h:1791
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
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
std::string GetString() const
This method returns the string contained in the current Parameter.
Definition: kratos_parameters.cpp:684
size_type size() const
Returns the number of elements in the container.
Definition: pointer_vector_set.h:502
The base class for all processes in Kratos.
Definition: process.h:49
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
static Quaternion FromRotationVector(double rx, double ry, double rz)
Definition: quaternion.h:427
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
BOOST_UBLAS_INLINE void clear()
Definition: array_1d.h:325
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#define KRATOS_ERROR
Definition: exception.h:161
bool Has(const std::string &ModelerName)
Checks if the modeler is registered.
Definition: modeler_factory.cpp:24
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
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
tuple acceleration
Definition: generate_droplet_dynamics.py:117
float radius
Definition: mesh_to_mdpa_converter.py:18
int nnodes
Definition: sensitivityMatrix.py:24
integer i
Definition: TensorModule.f:17