14 #if !defined(KRATOS_POROMECHANICS_FACE_LOAD_CONTROL_MODULE_PROCESS )
15 #define KRATOS_POROMECHANICS_FACE_LOAD_CONTROL_MODULE_PROCESS
51 "model_part_name":"MODEL_PART_NAME",
52 "imposed_direction" : 0,
53 "face_load_table_id" : 0,
54 "initial_velocity" : 0.0,
55 "limit_velocity" : 1.0,
56 "velocity_factor" : 1.0,
57 "initial_stiffness" : 1.0e7,
58 "force_increment_tolerance": 100.0,
59 "update_stiffness": true,
60 "force_averaging_time": 1.0e-5
65 double ImposedDirection = rParameters[
"imposed_direction"].
GetInt();
67 if(ImposedDirection == 2)
75 else if(ImposedDirection == 1)
107 #pragma omp parallel for
108 for(
int i = 0;
i<NNodes;
i++) {
109 ModelPart::NodesContainerType::iterator it = it_begin +
i;
110 it->SetValue(AVERAGE_REACTION,zero_vector);
111 it->SetValue(TARGET_REACTION,zero_vector);
112 it->SetValue(LOADING_VELOCITY,zero_vector);
143 #pragma omp parallel for
144 for(
int i = 0;
i<NNodes;
i++) {
145 ModelPart::NodesContainerType::iterator it = it_begin +
i;
146 it->Fix(disp_component);
147 it->FastGetSolutionStepValue(disp_component) = 0.0;
148 it->GetValue(loading_vel_component) =
mVelocity;
175 const double NextTargetReaction = this->
GetTargetReaction(CurrentTime+DeltaTime);
176 const double df_target = NextTargetReaction - ReactionForce;
197 #pragma omp parallel for
198 for(
int i = 0;
i<NNodes;
i++) {
199 ModelPart::NodesContainerType::iterator it = it_begin +
i;
200 it->FastGetSolutionStepValue(disp_component) +=
mVelocity * DeltaTime;
225 #pragma omp parallel for
226 for(
int i = 0;
i<NNodes;
i++) {
227 ModelPart::NodesContainerType::iterator it = it_begin +
i;
230 it->GetValue(average_reaction_component) = ReactionForce;
231 it->GetValue(loading_vel_component) =
mVelocity;
236 std::string
Info()
const override
238 return "PoromechanicsFaceLoadControlModuleProcess";
244 rOStream <<
"PoromechanicsFaceLoadControlModuleProcess";
283 double FaceArea = 0.0;
284 #pragma omp parallel for reduction(+:FaceArea)
285 for(
int i = 0;
i < NCons;
i++)
287 ModelPart::ConditionsContainerType::iterator itCond = con_begin +
i;
288 FaceArea += itCond->GetGeometry().Area();
293 const double face_load = pFaceLoadTable->GetValue(
time);
295 return face_load*FaceArea;
301 if (length_of_vector == 0) {
303 if(number_of_steps_for_force_averaging < 1) number_of_steps_for_force_averaging = 1;
305 KRATOS_INFO(
"Poro control module") <<
" 'number_of_steps_for_force_averaging' is "<< number_of_steps_for_force_averaging << std::endl;
310 if(length_of_vector > 1) {
311 for(
int i=1;
i<length_of_vector;
i++) {
317 double average = 0.0;
318 for(
int i=0;
i<length_of_vector;
i++) {
321 average /= (
double) length_of_vector;
336 double FaceReaction = 0.0;
337 #pragma omp parallel for reduction(+:FaceReaction)
338 for(
int i = 0;
i<NNodes;
i++){
339 ModelPart::NodesContainerType::iterator it = it_begin +
i;
340 FaceReaction += it->FastGetSolutionStepValue(reaction_component);
343 return FaceReaction/NNodes;
377 rOStream << std::endl;
static const TComponentType & Get(const std::string &rName)
Retrieves a component with the specified name.
Definition: kratos_components.h:114
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
ConditionIterator ConditionsBegin(IndexType ThisIndex=0)
Definition: model_part.h:1361
NodeIterator NodesBegin(IndexType ThisIndex=0)
Definition: model_part.h:487
ConditionsContainerType & Conditions(IndexType ThisIndex=0)
Definition: model_part.h:1381
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
TableType::Pointer pGetTable(IndexType TableId)
Definition: model_part.h:595
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
int GetInt() const
This method returns the integer contained in the current Parameter.
Definition: kratos_parameters.cpp:666
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
bool GetBool() const
This method returns the boolean contained in the current Parameter.
Definition: kratos_parameters.cpp:675
FaceLoad control module for displacements.
Definition: poromechanics_face_load_control_module_process.hpp:30
std::string mDisplacementName
Definition: poromechanics_face_load_control_module_process.hpp:260
Table< double, double > TableType
Defining a table with double argument and result type as table type.
Definition: poromechanics_face_load_control_module_process.hpp:37
unsigned int mFaceLoadTableId
Definition: poromechanics_face_load_control_module_process.hpp:265
void ExecuteInitialize() override
Definition: poromechanics_face_load_control_module_process.hpp:132
std::string mReactionName
Definition: poromechanics_face_load_control_module_process.hpp:261
std::string mLoadingVelocityName
Definition: poromechanics_face_load_control_module_process.hpp:264
std::string mAverageReactionName
Definition: poromechanics_face_load_control_module_process.hpp:262
void ExecuteFinalizeSolutionStep() override
This function will be executed at every time step AFTER performing the solve phase.
Definition: poromechanics_face_load_control_module_process.hpp:210
virtual double EstimateStiffness(const double &rReactionForce, const double &rDeltaTime)
Definition: poromechanics_face_load_control_module_process.hpp:346
virtual double CalculateReactionForce()
Definition: poromechanics_face_load_control_module_process.hpp:327
double mReactionForceOld
Definition: poromechanics_face_load_control_module_process.hpp:269
void Execute() override
Execute method is used to execute the PoromechanicsFaceLoadControlModuleProcess algorithms.
Definition: poromechanics_face_load_control_module_process.hpp:126
double mForceAveragingTime
Definition: poromechanics_face_load_control_module_process.hpp:274
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: poromechanics_face_load_control_module_process.hpp:248
KRATOS_CLASS_POINTER_DEFINITION(PoromechanicsFaceLoadControlModuleProcess)
std::string mTargetReactionName
Definition: poromechanics_face_load_control_module_process.hpp:263
ModelPart & mrModelPart
Member Variables.
Definition: poromechanics_face_load_control_module_process.hpp:258
bool mUpdateStiffness
Definition: poromechanics_face_load_control_module_process.hpp:272
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: poromechanics_face_load_control_module_process.hpp:242
void ExecuteInitializeSolutionStep() override
this function will be executed at every time step BEFORE performing the solve phase
Definition: poromechanics_face_load_control_module_process.hpp:155
double mStiffness
Definition: poromechanics_face_load_control_module_process.hpp:271
double mForceIncrementTolerance
Definition: poromechanics_face_load_control_module_process.hpp:270
double mVelocity
Definition: poromechanics_face_load_control_module_process.hpp:266
virtual double UpdateVectorOfHistoricalForcesAndComputeNewAverage(const double &last_reaction)
Definition: poromechanics_face_load_control_module_process.hpp:298
double mVelocityFactor
Definition: poromechanics_face_load_control_module_process.hpp:268
~PoromechanicsFaceLoadControlModuleProcess() override
Destructor.
Definition: poromechanics_face_load_control_module_process.hpp:121
double mLimitVelocity
Definition: poromechanics_face_load_control_module_process.hpp:267
std::vector< double > mVectorOfLastForces
Definition: poromechanics_face_load_control_module_process.hpp:273
PoromechanicsFaceLoadControlModuleProcess(ModelPart &rModelPart, Parameters rParameters)
Constructor.
Definition: poromechanics_face_load_control_module_process.hpp:42
std::string Info() const override
Turn back information as a string.
Definition: poromechanics_face_load_control_module_process.hpp:236
virtual double GetTargetReaction(const double &time)
Definition: poromechanics_face_load_control_module_process.hpp:278
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
#define KRATOS_INFO(label)
Definition: logger.h:250
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
REACTION_CHECK_STIFFNESS_FACTOR int
Definition: contact_structural_mechanics_application_variables.h:75
TABLE_NUMBER_ANGULAR_VELOCITY TABLE_NUMBER_MOMENT I33 BEAM_INERTIA_ROT_UNIT_LENGHT_Y KRATOS_DEFINE_APPLICATION_VARIABLE(DEM_APPLICATION, double, BEAM_INERTIA_ROT_UNIT_LENGHT_Z) typedef std double
Definition: DEM_application_variables.h:182
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
time
Definition: face_heat.py:85
integer i
Definition: TensorModule.f:17