v0.14.0
FluidPressure.hpp
Go to the documentation of this file.
1 /* \file FluidPressure.hpp
2  *
3  * \brief Implementation of fluid pressure element
4  *
5  * \todo Implement nonlinear case (consrvative force, i.e. normal follows
6  * surface normal)
7  *
8  */
9 
10 
11 
12 #ifndef __FLUID_PRESSURE_HPP
13 #define __FLUID_PRESSURE_HPP
14 
15 /** \brief Fluid pressure forces
16 
17 \todo Implementation for large displacements
18 
19 */
20 struct FluidPressure {
21 
24 
27  int getRule(int order) { return order + 1; };
28 
32  }
33  };
35  MyTriangleFE &getLoopFe() { return fe; }
36 
37  FluidPressure(MoFEM::Interface &m_field) : mField(m_field), fe(mField) {}
38 
39  typedef int MeshSetId;
40  struct FluidData {
41  double dEnsity; ///< fluid density [kg/m^2] or any consistent unit
42  VectorDouble aCCeleration; ///< acceleration [m/s^2]
43  VectorDouble zEroPressure; ///< fluid level of reference zero pressure.
44  Range
45  tRis; ///< range of surface element to which fluid pressure is applied
46  friend std::ostream &operator<<(std::ostream &os,
47  const FluidPressure::FluidData &e);
48  };
49  std::map<MeshSetId, FluidData> setOfFluids;
50 
51  boost::ptr_vector<MethodForForceScaling> methodsOp;
52 
55 
56  Vec F;
58  boost::ptr_vector<MethodForForceScaling> &methodsOp;
59  bool allowNegativePressure; ///< allows for negative pressures
60  bool hoGeometry;
61 
62  OpCalculatePressure(const std::string field_name, Vec _F, FluidData &data,
63  boost::ptr_vector<MethodForForceScaling> &methods_op,
64  bool allow_negative_pressure, bool ho_geometry)
67  F(_F), dAta(data), methodsOp(methods_op),
68  allowNegativePressure(allow_negative_pressure),
69  hoGeometry(ho_geometry) {}
70 
72 
73  MoFEMErrorCode doWork(int side, EntityType type,
75 
76  };
77 
79  const std::string field_name,
80  const std::string mesh_nodals_positions = "MESH_NODE_POSITIONS");
81 
83  string field_name, Vec F, bool allow_negative_pressure = true,
84  bool ho_geometry = false);
85 };
86 
87 std::ostream &operator<<(std::ostream &os, const FluidPressure::FluidData &e);
88 
89 #endif //__FLUID_PRESSSURE_HPP
FluidPressure::methodsOp
boost::ptr_vector< MethodForForceScaling > methodsOp
Definition: FluidPressure.hpp:51
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:460
FluidPressure::addNeumannFluidPressureBCElements
MoFEMErrorCode addNeumannFluidPressureBCElements(const std::string field_name, const std::string mesh_nodals_positions="MESH_NODE_POSITIONS")
Definition: FluidPressure.cpp:67
FluidPressure::OpCalculatePressure::Nf
VectorDouble Nf
Definition: FluidPressure.hpp:71
FluidPressure::FluidData::dEnsity
double dEnsity
fluid density [kg/m^2] or any consistent unit
Definition: FluidPressure.hpp:41
_F
#define _F(n)
Definition: quad.c:25
MoFEM::Exceptions::MoFEMErrorCode
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:56
FluidPressure::FluidData
Definition: FluidPressure.hpp:40
FluidPressure::FluidData::tRis
Range tRis
range of surface element to which fluid pressure is applied
Definition: FluidPressure.hpp:45
order
constexpr int order
Definition: dg_projection.cpp:18
MoFEM::DeprecatedCoreInterface
Deprecated interface functions.
Definition: DeprecatedCoreInterface.hpp:16
FluidPressure::OpCalculatePressure::F
Vec F
Definition: FluidPressure.hpp:56
FluidPressure::setOfFluids
std::map< MeshSetId, FluidData > setOfFluids
Definition: FluidPressure.hpp:49
MoFEM
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:10
MoFEM::ForcesAndSourcesCore::UserDataOperator
Definition: ForcesAndSourcesCore.hpp:549
MoFEM::FaceElementForcesAndSourcesCore::UserDataOperator
default operator for TRI element
Definition: FaceElementForcesAndSourcesCore.hpp:94
FluidPressure::mField
MoFEM::Interface & mField
Definition: FluidPressure.hpp:22
FluidPressure::MyTriangleFE::getRule
int getRule(int order)
Definition: FluidPressure.hpp:27
convert.type
type
Definition: convert.py:64
FluidPressure
Fluid pressure forces.
Definition: FluidPressure.hpp:20
FluidPressure::OpCalculatePressure::allowNegativePressure
bool allowNegativePressure
allows for negative pressures
Definition: FluidPressure.hpp:59
FluidPressure::FluidData::zEroPressure
VectorDouble zEroPressure
fluid level of reference zero pressure.
Definition: FluidPressure.hpp:43
FluidPressure::FluidPressure
FluidPressure(MoFEM::Interface &m_field)
Definition: FluidPressure.hpp:37
MoFEM::FaceElementForcesAndSourcesCore
Face finite element.
Definition: FaceElementForcesAndSourcesCore.hpp:23
FluidPressure::FluidData::operator<<
friend std::ostream & operator<<(std::ostream &os, const FluidPressure::FluidData &e)
Definition: FluidPressure.cpp:144
FluidPressure::OpCalculatePressure::dAta
FluidData & dAta
Definition: FluidPressure.hpp:57
FluidPressure::MeshSetId
int MeshSetId
Definition: FluidPressure.hpp:39
FluidPressure::OpCalculatePressure::methodsOp
boost::ptr_vector< MethodForForceScaling > & methodsOp
Definition: FluidPressure.hpp:58
FaceElementForcesAndSourcesCore
FluidPressure::OpCalculatePressure::doWork
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
Definition: FluidPressure.cpp:12
EntData
EntitiesFieldData::EntData EntData
Definition: child_and_parent.cpp:37
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
Range
operator<<
std::ostream & operator<<(std::ostream &os, const FluidPressure::FluidData &e)
Definition: FluidPressure.cpp:144
FluidPressure::getLoopFe
MyTriangleFE & getLoopFe()
Definition: FluidPressure.hpp:35
FluidPressure::setNeumannFluidPressureFiniteElementOperators
MoFEMErrorCode setNeumannFluidPressureFiniteElementOperators(string field_name, Vec F, bool allow_negative_pressure=true, bool ho_geometry=false)
Definition: FluidPressure.cpp:131
FluidPressure::OpCalculatePressure::hoGeometry
bool hoGeometry
Definition: FluidPressure.hpp:60
FluidPressure::FluidData::aCCeleration
VectorDouble aCCeleration
acceleration [m/s^2]
Definition: FluidPressure.hpp:42
EigenMatrix::Vec
const FTensor::Tensor2< T, Dim, Dim > Vec
Definition: MatrixFunction.hpp:66
FluidPressure::MyTriangleFE::preProcess
MoFEMErrorCode preProcess()
function is run at the beginning of loop
Definition: FluidPressure.hpp:29
FluidPressure::OpCalculatePressure
Definition: FluidPressure.hpp:53
MoFEM::Types::VectorDouble
UBlasVector< double > VectorDouble
Definition: Types.hpp:68
FluidPressure::MyTriangleFE
Definition: FluidPressure.hpp:23
FluidPressure::fe
MyTriangleFE fe
Definition: FluidPressure.hpp:34
FluidPressure::MyTriangleFE::MyTriangleFE
MyTriangleFE(MoFEM::Interface &m_field)
Definition: FluidPressure.hpp:25
MoFEMFunctionBeginHot
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:453
FluidPressure::OpCalculatePressure::OpCalculatePressure
OpCalculatePressure(const std::string field_name, Vec _F, FluidData &data, boost::ptr_vector< MethodForForceScaling > &methods_op, bool allow_negative_pressure, bool ho_geometry)
Definition: FluidPressure.hpp:62
F
@ F
Definition: free_surface.cpp:394
MoFEM::ForcesAndSourcesCore::UserDataOperator::OPROW
@ OPROW
operator doWork function is executed on FE rows
Definition: ForcesAndSourcesCore.hpp:567