11 #if !defined(KRATOS_FSI_UTILS )
12 #define KRATOS_FSI_UTILS
138 double dp_norm = 0.00;
139 double p_norm = 0.00;
144 for(ModelPart::NodesContainerType::iterator it = fluid_interface_nodes.begin(); it != fluid_interface_nodes.end(); it++)
146 p = it->FastGetSolutionStepValue(PRESSURE);
147 dp =
p - (it->FastGetSolutionStepValue(PRESSURE_OLD_IT));
155 double ratio = sqrt(dp_norm/p_norm);
156 std::cout <<
"dp_norm = " << dp_norm << std::endl;
157 std::cout <<
"FSI convergence ratio = " << ratio << std::endl;
159 if( dp < abs_toll*abs_toll )
177 if( order > structure_buffer_size-1)
178 KRATOS_THROW_ERROR(std::logic_error,
"using a force prediction order higher than the buffer size ... increase the buffer size or reduce the prediction order",
"");
182 std::cout <<
"first order force prediction" << std::endl;
183 for(ModelPart::NodesContainerType::iterator it = structure_interface_nodes.begin(); it != structure_interface_nodes.end(); it++)
185 it->FastGetSolutionStepValue(rVariable) = it->FastGetSolutionStepValue(rVariable,1);
190 std::cout <<
"second order force prediction" << std::endl;
191 for(ModelPart::NodesContainerType::iterator it = structure_interface_nodes.begin(); it != structure_interface_nodes.end(); it++)
193 it->FastGetSolutionStepValue(rVariable) = 2.0*it->FastGetSolutionStepValue(rVariable,1) - it->FastGetSolutionStepValue(rVariable,2);
Definition: FSI_utils.h:79
void StructuralPressurePrediction(Variable< double > &rVariable, ModelPart::NodesContainerType &structure_interface_nodes, const int structure_buffer_size, const int order)
Definition: FSI_utils.h:173
bool CheckPressureConvergence(ModelPart::NodesContainerType &fluid_interface_nodes, double toll, double abs_toll)
Definition: FSI_utils.h:134
MeshType::NodesContainerType NodesContainerType
Nodes container. Which is a vector set of nodes with their Id's as key.
Definition: model_part.h:128
#define KRATOS_THROW_ERROR(ExceptionType, ErrorMessage, MoreInfo)
Definition: define.h:77
#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
p
Definition: sensitivityMatrix.py:52
e
Definition: run_cpp_mpi_tests.py:31