Calculate lift force on free surface boundary.
More...
#include "tutorials/vec-5_free_surface/src/FreeSurfaceOps.hpp"
|
| | OpCalculateLift (const std::string field_name, boost::shared_ptr< VectorDouble > p_ptr, boost::shared_ptr< VectorDouble > lift_ptr, boost::shared_ptr< Range > ents_ptr) |
| |
| MoFEMErrorCode | doWork (int row_side, EntityType row_type, EntitiesFieldData::EntData &data) |
| |
|
| boost::shared_ptr< VectorDouble > | pPtr |
| |
| boost::shared_ptr< VectorDouble > | liftPtr |
| |
| boost::shared_ptr< Range > | entsPtr |
| |
Calculate lift force on free surface boundary.
- Parameters
-
| field_name | Name of the field associated with the operator |
| p_ptr | Pointer to the pressure vector on the free surface |
| lift_ptr | Pointer to the lift force vector to be computed |
| ents_ptr | Pointer to the range of entities (edges) to consider |
- Returns
- MoFEMErrorCode
Computes the integral ∫_Γ -p n dΓ, where:
- p : pressure on the free surface
- n : outward normal vector on the boundary
- Examples
- mofem/tutorials/vec-5_free_surface/free_surface.cpp.
Definition at line 31 of file FreeSurfaceOps.hpp.
◆ OpCalculateLift()
| FreeSurfaceOps::OpCalculateLift::OpCalculateLift |
( |
const std::string |
field_name, |
|
|
boost::shared_ptr< VectorDouble > |
p_ptr, |
|
|
boost::shared_ptr< VectorDouble > |
lift_ptr, |
|
|
boost::shared_ptr< Range > |
ents_ptr |
|
) |
| |
|
inline |
Definition at line 32 of file FreeSurfaceOps.hpp.
38 std::fill(&doEntities[MBVERTEX], &doEntities[MBMAXTYPE], false);
39 doEntities[MBEDGE] = true;
40 }
BoundaryEle::UserDataOperator BoundaryEleOp
constexpr auto field_name
boost::shared_ptr< VectorDouble > liftPtr
boost::shared_ptr< VectorDouble > pPtr
boost::shared_ptr< Range > entsPtr
◆ doWork()
| MoFEMErrorCode FreeSurfaceOps::OpCalculateLift::doWork |
( |
int |
row_side, |
|
|
EntityType |
row_type, |
|
|
EntitiesFieldData::EntData & |
data |
|
) |
| |
|
inline |
Definition at line 42 of file FreeSurfaceOps.hpp.
43 {
45
46 const auto fe_ent = getFEEntityHandle();
48
49 auto t_w = getFTensor0IntegrationWeight();
50 auto t_p = getFTensor0FromVec(*
pPtr);
51 auto t_normal = getFTensor1Normal();
52 auto t_coords = getFTensor1CoordsAtGaussPts();
53 auto t_lift = getFTensor1FromArray<SPACE_DIM, SPACE_DIM>(*
liftPtr);
54
55 const auto nb_int_points = getGaussPts().size2();
56
57 for (int gg = 0; gg != nb_int_points; gg++) {
58
59 const double r = t_coords(0);
61 t_lift(
i) -= t_normal(
i) * (t_p * alpha);
62
63 ++t_w;
64 ++t_p;
65 ++t_coords;
66 }
67 }
68
70 }
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
auto cylindrical
[cylindrical]
FTensor::Index< 'i', SPACE_DIM > i
◆ entsPtr
| boost::shared_ptr<Range> FreeSurfaceOps::OpCalculateLift::entsPtr |
|
private |
◆ liftPtr
| boost::shared_ptr<VectorDouble> FreeSurfaceOps::OpCalculateLift::liftPtr |
|
private |
◆ pPtr
| boost::shared_ptr<VectorDouble> FreeSurfaceOps::OpCalculateLift::pPtr |
|
private |
The documentation for this struct was generated from the following file: