v0.15.0
Loading...
Searching...
No Matches
FreeSurfaceOps::OpWettingAngleRhs Struct Reference

#include "tutorials/vec-5/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

Examples
free_surface.cpp.

Definition at line 138 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 139 of file FreeSurfaceOps.hpp.

144 AssemblyBoundaryEleOp::OPROW),
145 gradHPtr(grad_h_ptr), entsPtr(ents_ptr), wettingAngle(wetting_angle) {}
auto wetting_angle
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 147 of file FreeSurfaceOps.hpp.

147 {
149 if (entsPtr) {
150 if (entsPtr->find(AssemblyBoundaryEleOp::getFEEntityHandle()) ==
151 entsPtr->end())
153 }
154 const double area = getMeasure();
155 auto t_w = getFTensor0IntegrationWeight();
156 auto t_row_base = row_data.getFTensor0N();
157 auto t_grad_h = getFTensor1FromMat<SPACE_DIM>(*gradHPtr);
158 auto t_coords = getFTensor1CoordsAtGaussPts();
159
160 auto s = wetting_angle_sub_stepping(getFEMethod()->ts_step);
161
162 for (int gg = 0; gg != nbIntegrationPts; gg++) {
163
164 const double r = t_coords(0);
165 const double alpha = t_w * cylindrical(r) * area;
166 const double h_grad_norm = sqrt(t_grad_h(i) * t_grad_h(i) + eps);
167 const double cos_angle = std::cos(M_PI * wettingAngle / 180);
168 const double rhs_wetting = s * eta2 * h_grad_norm * cos_angle;
169
170 // cerr << "pass "
171 // << h_grad_norm <<"\n";
172 int bb = 0;
173 for (; bb != nbRows; ++bb) {
174 locF[bb] += alpha * t_row_base * rhs_wetting;
175 ++t_row_base;
176 }
177
178 for (; bb < nbRowBaseFunctions; ++bb)
179 ++t_row_base;
180
181 ++t_w;
182 ++t_grad_h;
183 ++t_coords;
184 }
185
187 }
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
double eta2
auto wetting_angle_sub_stepping
FTensor::Index< 'i', SPACE_DIM > i
int r
Definition sdf.py:8

Member Data Documentation

◆ entsPtr

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

Definition at line 191 of file FreeSurfaceOps.hpp.

◆ gradHPtr

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

Definition at line 190 of file FreeSurfaceOps.hpp.

◆ wettingAngle

double FreeSurfaceOps::OpWettingAngleRhs::wettingAngle
private

Definition at line 192 of file FreeSurfaceOps.hpp.


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