13 #if !defined(FIND_TRIPLE_POINT_CONDITION_INCLUDED )
14 #define FIND_TRIPLE_POINT_CONDITION_INCLUDED
27 #include <pybind11/pybind11.h>
34 #include "utilities/geometry_utilities.h"
120 for(ModelPart::NodesContainerType::iterator
im = ThisModelPart.
NodesBegin() ;
im != ThisModelPart.
NodesEnd() ;
im++)
122 if (
im->FastGetSolutionStepValue(IS_STRUCTURE) != 0.0)
128 for (
unsigned int i = 0;
i < neighb.
size();
i++)
130 if (neighb[
i].FastGetSolutionStepValue(IS_BOUNDARY) != 0.0)
132 if (neighb[
i].FastGetSolutionStepValue(IS_FREE_SURFACE) != 0.0)
134 if (neighb[
i].FastGetSolutionStepValue(IS_STRUCTURE) != 0.0)
136 if (neighb[
i].FastGetSolutionStepValue(IS_LAGRANGIAN_INLET) != 0.0)
140 if (is_free == 1 && is_struct == 1)
141 im->FastGetSolutionStepValue(TRIPLE_POINT) = 1.0;
153 unsigned int num_tp = 0;
154 unsigned int num_fs = 0;
157 for(ModelPart::NodesContainerType::iterator
im = ThisModelPart.
NodesBegin() ;
im != ThisModelPart.
NodesEnd() ;
im++)
161 if ((
im->FastGetSolutionStepValue(TRIPLE_POINT) != 0.0) && (
im->FastGetSolutionStepValue(CONTACT_ANGLE) < 1
e-15) && (
im->FastGetSolutionStepValue(VELOCITY_X) != 0.0))
162 im->FastGetSolutionStepValue(TRIPLE_POINT) = 0.0;
164 An =
im->FastGetSolutionStepValue(NORMAL);
166 if (
im->FastGetSolutionStepValue(TRIPLE_POINT) != 0.0 && An[2] < -0.99)
168 im->FastGetSolutionStepValue(TRIPLE_POINT) = 0.0;
169 im->FastGetSolutionStepValue(CONTACT_ANGLE) = 0.0;
173 if (
im->FastGetSolutionStepValue(IS_STRUCTURE) != 0.0)
175 if( An[0] > 0.01 || An[0] < -0.01 || An[1] > 0.01 || An[1] < -0.01)
178 im->FastGetSolutionStepValue(TRIPLE_POINT) = 1.0;
181 im->FastGetSolutionStepValue(TRIPLE_POINT) = 0.0;
190 return sqrt(
a[0]*
a[0] +
a[1]*
a[1] +
a[2]*
a[2]);
195 return (
a[0]*
b[0] +
a[1]*
b[1] +
a[2]*
b[2]);
Short class definition.
Definition: find_triple_point.h:73
void NormalizeVec3D(array_1d< double, 3 > &input)
Definition: find_triple_point.h:198
FindTriplePoint()
Default constructor.
Definition: find_triple_point.h:87
void FindTriplePoint3D(ModelPart &ThisModelPart)
Definition: find_triple_point.h:149
void FindTriplePoint2D(ModelPart &ThisModelPart)
Definition: find_triple_point.h:112
double Norm3D(const array_1d< double, 3 > &a)
Definition: find_triple_point.h:188
KRATOS_CLASS_POINTER_DEFINITION(FindTriplePoint)
Pointer definition of PushStructureProcess.
~FindTriplePoint() override
Destructor.
Definition: find_triple_point.h:92
double DotProduct3D(const array_1d< double, 3 > &a, const array_1d< double, 3 > &b)
Definition: find_triple_point.h:193
This class is a vector which stores global pointers.
Definition: global_pointers_vector.h:61
size_type size() const
Definition: global_pointers_vector.h:307
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
NodeIterator NodesEnd(IndexType ThisIndex=0)
Definition: model_part.h:497
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
im
Definition: GenerateCN.py:100
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
input
Definition: generate_frictional_mortar_condition.py:435
a
Definition: generate_stokes_twofluid_element.py:77
b
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:31
integer i
Definition: TensorModule.f:17
e
Definition: run_cpp_mpi_tests.py:31