41 "model_part_name":"PLEASE_CHOOSE_MODEL_PART_NAME",
42 "variable_name": "PLEASE_PRESCRIBE_VARIABLE_NAME",
44 "gravity_direction": 1,
45 "first_reference_coordinate": [0.0,1.0,0.0],
46 "second_reference_coordinate": [1.0,0.5,0.0],
47 "third_reference_coordinate": [1.0,0.5,1.0],
48 "specific_weight" : 10000.0,
54 rParameters[
"first_reference_coordinate"];
55 rParameters[
"second_reference_coordinate"];
56 rParameters[
"third_reference_coordinate"];
57 rParameters[
"variable_name"];
58 rParameters[
"model_part_name"];
71 calculateEquationParameters();
94 if (mIsFixed) rNode.Fix(var);
95 else if (mIsFixedProvided) rNode.Free(var);
97 double distance = inner_prod(mNormalVector, rNode.Coordinates());
98 const double d = inner_prod(mNormalVector, direction);
99 distance = -(distance - mEqRHS) / d;
100 const double pressure = mSpecificWeight * distance;
101 rNode.FastGetSolutionStepValue(var) = std::max(pressure,0.0);
108 std::string
Info()
const override
110 return "ApplyConstantBoundaryPhreaticSurfacePressureProcess";
128 void calculateEquationParameters()
134 KRATOS_ERROR <<
"Normal vector to phreatic surface has zero size!"
Definition: apply_constant_boundary_phreatic_surface_pressure_process.hpp:26
std::string mVariableName
Definition: apply_constant_boundary_phreatic_surface_pressure_process.hpp:116
ApplyConstantBoundaryPhreaticSurfacePressureProcess & operator=(const ApplyConstantBoundaryPhreaticSurfacePressureProcess &)=delete
bool mIsFixedProvided
Definition: apply_constant_boundary_phreatic_surface_pressure_process.hpp:118
Vector3 mSecondReferenceCoordinate
Definition: apply_constant_boundary_phreatic_surface_pressure_process.hpp:122
double mEqRHS
Definition: apply_constant_boundary_phreatic_surface_pressure_process.hpp:125
ApplyConstantBoundaryPhreaticSurfacePressureProcess(const ApplyConstantBoundaryPhreaticSurfacePressureProcess &)=delete
Vector3 mNormalVector
Definition: apply_constant_boundary_phreatic_surface_pressure_process.hpp:124
Vector3 mFirstReferenceCoordinate
Definition: apply_constant_boundary_phreatic_surface_pressure_process.hpp:121
ApplyConstantBoundaryPhreaticSurfacePressureProcess(ModelPart &model_part, Parameters rParameters)
Definition: apply_constant_boundary_phreatic_surface_pressure_process.hpp:32
KRATOS_CLASS_POINTER_DEFINITION(ApplyConstantBoundaryPhreaticSurfacePressureProcess)
Vector3 mThirdReferenceCoordinate
Definition: apply_constant_boundary_phreatic_surface_pressure_process.hpp:123
void ExecuteInitialize() override
Definition: apply_constant_boundary_phreatic_surface_pressure_process.hpp:84
unsigned int mGravityDirection
Definition: apply_constant_boundary_phreatic_surface_pressure_process.hpp:119
~ApplyConstantBoundaryPhreaticSurfacePressureProcess() override=default
double mSpecificWeight
Definition: apply_constant_boundary_phreatic_surface_pressure_process.hpp:120
bool mIsFixed
Definition: apply_constant_boundary_phreatic_surface_pressure_process.hpp:117
ModelPart & mrModelPart
Member Variables.
Definition: apply_constant_boundary_phreatic_surface_pressure_process.hpp:115
std::string Info() const override
Turn back information as a string.
Definition: apply_constant_boundary_phreatic_surface_pressure_process.hpp:108
KratosComponents class encapsulates a lookup table for a family of classes in a generic way.
Definition: kratos_components.h:49
static T CrossProduct(const T &a, const T &b)
Performs the vector product of the two input vectors a,b.
Definition: math_utils.h:762
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
NodesContainerType & Nodes(IndexType ThisIndex=0)
Definition: model_part.h:507
This class defines the node.
Definition: node.h:65
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
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
std::string GetString() const
This method returns the string contained in the current Parameter.
Definition: kratos_parameters.cpp:684
bool Has(const std::string &rEntry) const
This method checks if the Parameter contains a certain entry.
Definition: kratos_parameters.cpp:520
bool GetBool() const
This method returns the boolean contained in the current Parameter.
Definition: kratos_parameters.cpp:675
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_ERROR
Definition: exception.h:161
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
TExpressionType::data_type norm_2(AMatrix::MatrixExpression< TExpressionType, TCategory > const &TheExpression)
Definition: amatrix_interface.h:625
void block_for_each(TIterator itBegin, TIterator itEnd, TFunction &&rFunction)
Execute a functor on all items of a range in parallel.
Definition: parallel_utilities.h:299
TExpression1Type::data_type inner_prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:592
model_part
Definition: face_heat.py:14