v0.15.5
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
FreeSurfaceOps::OpWettingAngleRhs Struct Reference

[OpWettingAngleRhs] More...

#include "tutorials/vec-5_free_surface/src/FreeSurfaceOps.hpp"

Inheritance diagram for FreeSurfaceOps::OpWettingAngleRhs:
[legend]
Collaboration diagram for FreeSurfaceOps::OpWettingAngleRhs:
[legend]

Public Member Functions

 OpWettingAngleRhs (const std::string field_name, boost::shared_ptr< MatrixDouble > grad_h_ptr, boost::shared_ptr< Range > ents_ptr=nullptr, double wetting_angle=0)
 
MoFEMErrorCode iNtegrate (DataForcesAndSourcesCore::EntData &row_data)
 

Private Attributes

boost::shared_ptr< MatrixDouble > gradHPtr
 
boost::shared_ptr< RangeentsPtr
 
double wettingAngle
 

Detailed Description

[OpWettingAngleRhs]

Boundary wetting-angle RHS

Parameters
field_nameName of the field associated with the operator
grad_h_ptrPointer to the gradient of the free surface height matrix
ents_ptrPointer to the range of entities (edges) to consider
wetting_angleContact wetting angle in degrees
Returns
MoFEMErrorCode

Implements the boundary term from eq. 3.2d:

Examples
mofem/tutorials/vec-5_free_surface/free_surface.cpp.

Definition at line 201 of file FreeSurfaceOps.hpp.

Constructor & Destructor Documentation

◆ OpWettingAngleRhs()

FreeSurfaceOps::OpWettingAngleRhs::OpWettingAngleRhs ( const std::string  field_name,
boost::shared_ptr< MatrixDouble >  grad_h_ptr,
boost::shared_ptr< Range ents_ptr = nullptr,
double  wetting_angle = 0 
)
inline

Definition at line 202 of file FreeSurfaceOps.hpp.

207 AssemblyBoundaryEleOp::OPROW),
208 gradHPtr(grad_h_ptr), entsPtr(ents_ptr), wettingAngle(wetting_angle) {}
auto wetting_angle
Wetting angle function (placeholder)
constexpr auto field_name
boost::shared_ptr< MatrixDouble > gradHPtr
boost::shared_ptr< Range > entsPtr
FormsIntegrators< BoundaryEleOp >::Assembly< A >::OpBase AssemblyBoundaryEleOp

Member Function Documentation

◆ iNtegrate()

MoFEMErrorCode FreeSurfaceOps::OpWettingAngleRhs::iNtegrate ( DataForcesAndSourcesCore::EntData &  row_data)
inline

Definition at line 210 of file FreeSurfaceOps.hpp.

210 {
212 if (entsPtr) {
213 if (entsPtr->find(AssemblyBoundaryEleOp::getFEEntityHandle()) ==
214 entsPtr->end())
216 }
217 const double area = getMeasure();
218 auto t_w = getFTensor0IntegrationWeight();
219 auto t_row_base = row_data.getFTensor0N();
220 auto t_grad_h = getFTensor1FromMat<SPACE_DIM>(*gradHPtr);
221 auto t_coords = getFTensor1CoordsAtGaussPts();
222
223 auto s = wetting_angle_sub_stepping(getFEMethod()->ts_step);
224
225 for (int gg = 0; gg != nbIntegrationPts; gg++) {
226
227 const double r = t_coords(0);
228 const double alpha = t_w * cylindrical(r) * area;
229 const double h_grad_norm = sqrt(t_grad_h(i) * t_grad_h(i) + eps); // ||∇h||
230 const double cos_angle = std::cos(M_PI * wettingAngle / 180);
231 const double rhs_wetting = s * eta2 * h_grad_norm * cos_angle; // s * η² * ||∇h|| * cos(angle)
232
233 // cerr << "pass "
234 // << h_grad_norm <<"\n";
235 int bb = 0;
236 for (; bb != nbRows; ++bb) {
237 locF[bb] += alpha * t_row_base * rhs_wetting;
238 ++t_row_base;
239 }
240
241 for (; bb < nbRowBaseFunctions; ++bb)
242 ++t_row_base;
243
244 ++t_w;
245 ++t_grad_h;
246 ++t_coords;
247 }
248
250 }
static const double eps
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#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]
double eta2
auto wetting_angle_sub_stepping
[cylindrical]
FTensor::Index< 'i', SPACE_DIM > i
int r
Definition sdf.py:205

Member Data Documentation

◆ entsPtr

boost::shared_ptr<Range> FreeSurfaceOps::OpWettingAngleRhs::entsPtr
private

Definition at line 254 of file FreeSurfaceOps.hpp.

◆ gradHPtr

boost::shared_ptr<MatrixDouble> FreeSurfaceOps::OpWettingAngleRhs::gradHPtr
private

Definition at line 253 of file FreeSurfaceOps.hpp.

◆ wettingAngle

double FreeSurfaceOps::OpWettingAngleRhs::wettingAngle
private

Definition at line 255 of file FreeSurfaceOps.hpp.


The documentation for this struct was generated from the following file: