v0.14.0
Loading...
Searching...
No Matches
NavierStokesElement.hpp
Go to the documentation of this file.
1/**
2 * \file NavierStokesElement.hpp
3 * \example NavierStokesElement.hpp
4 *
5 * \brief Implementation of operators for fluid flow
6 *
7 * Implementation of operators for computations of the fluid flow, governed by
8 * for Stokes and Navier-Stokes equations, and computation of the drag force
9 */
10
11
12
13#ifndef __NAVIERSTOKESELEMENT_HPP__
14#define __NAVIERSTOKESELEMENT_HPP__
15
16#ifndef __BASICFINITEELEMENTS_HPP__
18#endif // __BASICFINITEELEMENTS_HPP__
19
20using namespace boost::numeric;
21
22/**
23 * @brief Element for simulating viscous fluid flow
24*/
26
31
37
38 struct BlockData {
39 int iD;
46 : iD(-1), fluidViscosity(-1), fluidDensity(-1), inertiaCoef(-1),
47 viscousCoef(-1) {}
48 };
49
50 struct CommonData {
51
52 boost::shared_ptr<MatrixDouble> gradVelPtr;
53 boost::shared_ptr<MatrixDouble> velPtr;
54 boost::shared_ptr<VectorDouble> pressPtr;
55
56 boost::shared_ptr<MatrixDouble> pressureDragTract;
57 boost::shared_ptr<MatrixDouble> shearDragTract;
58 boost::shared_ptr<MatrixDouble> totalDragTract;
59
63
65
66 std::map<int, BlockData> setOfBlocksData;
67 std::map<int, BlockData> setOfFacesData;
68
70
71 gradVelPtr = boost::shared_ptr<MatrixDouble>(new MatrixDouble());
72 velPtr = boost::shared_ptr<MatrixDouble>(new MatrixDouble());
73 pressPtr = boost::shared_ptr<VectorDouble>(new VectorDouble());
74
75 pressureDragTract = boost::shared_ptr<MatrixDouble>(new MatrixDouble());
76 shearDragTract = boost::shared_ptr<MatrixDouble>(new MatrixDouble());
77 totalDragTract = boost::shared_ptr<MatrixDouble>(new MatrixDouble());
78
79 int vec_size;
80 if (m_field.get_comm_rank() == 0)
81 vec_size = 3;
82 else
83 vec_size = 0;
84
85 pressureDragForceVec = createVectorMPI(m_field.get_comm(), vec_size, 3);
86 shearDragForceVec = createVectorMPI(m_field.get_comm(), vec_size, 3);
87 totalDragForceVec = createVectorMPI(m_field.get_comm(), vec_size, 3);
88
89 volumeFluxVec = createVectorMPI(m_field.get_comm(), vec_size, 3);
90 }
91
94 CHKERR PetscOptionsBegin(PETSC_COMM_WORLD, "", "Problem", "none");
95
96 ierr = PetscOptionsEnd();
97 CHKERRQ(ierr);
99 }
100 };
101
103
104 static double lambda;
105
111 };
112
113 /**
114 * @brief Setting up elements
115 *
116 * This functions adds element to the database, adds provided fields to rows
117 * and columns of the element, provides access of the element to the fields
118 * data and adds entities of particular dimension (or a given range of
119 * entities to the element)
120 *
121 * @param m_field MoFEM interface
122 * @param element_name Name of the element
123 * @param velocity_field_name Name of the velocity field
124 * @param pressure_field_name Name of the pressure field
125 * @param mesh_field_name Name for mesh node positions field
126 * @param ents Range of entities to be added to element
127 * @return Error code
128 */
130 const string element_name,
131 const string velocity_field_name,
132 const string pressure_field_name,
133 const string mesh_field_name,
134 const int dim = 3,
135 Range *ents = nullptr) {
137
138 CHKERR m_field.add_finite_element(element_name);
139
140 CHKERR m_field.modify_finite_element_add_field_row(element_name,
141 velocity_field_name);
142 CHKERR m_field.modify_finite_element_add_field_col(element_name,
143 velocity_field_name);
144 CHKERR m_field.modify_finite_element_add_field_data(element_name,
145 velocity_field_name);
146
147 CHKERR m_field.modify_finite_element_add_field_row(element_name,
148 pressure_field_name);
149 CHKERR m_field.modify_finite_element_add_field_col(element_name,
150 pressure_field_name);
151 CHKERR m_field.modify_finite_element_add_field_data(element_name,
152 pressure_field_name);
153
154 CHKERR m_field.modify_finite_element_add_field_data(element_name,
155 mesh_field_name);
156
157 if (ents != nullptr) {
159 element_name);
160 } else {
161 CHKERR m_field.add_ents_to_finite_element_by_dim(0, dim, element_name);
162 }
163
165 }
166
167 /**
168 * @brief Setting up operators for solving Navier-Stokes equations
169 *
170 * Pushes operators for solving Navier-Stokes equations to pipelines of RHS
171 * and LHS element instances
172 *
173 * @param feRhs pointer to RHS element instance
174 * @param feLhs pointer to LHS element instance
175 * @param velocity_field name of the velocity field
176 * @param pressure_field name of the pressure field
177 * @param common_data pointer to common data object
178 * @param type type of entities in the domain
179 * @return Error code
180 */
182 boost::shared_ptr<VolumeElementForcesAndSourcesCore> feRhs,
183 boost::shared_ptr<VolumeElementForcesAndSourcesCore> feLhs,
184 const std::string velocity_field, const std::string pressure_field,
185 boost::shared_ptr<CommonData> common_data, const EntityType type = MBTET);
186
187 /**
188 * @brief Setting up operators for solving Stokes equations
189 *
190 * Pushes operators for solving Stokes equations to pipelines of RHS
191 * and LHS element instances
192 *
193 * @param feRhs pointer to RHS element instance
194 * @param feLhs pointer to LHS element instance
195 * @param velocity_field name of the velocity field
196 * @param pressure_field name of the pressure field
197 * @param common_data pointer to common data object
198 * @param type type of entities in the domain
199 * @return Error code
200 */
202 boost::shared_ptr<VolumeElementForcesAndSourcesCore> feRhs,
203 boost::shared_ptr<VolumeElementForcesAndSourcesCore> feLhs,
204 const std::string velocity_field, const std::string pressure_field,
205 boost::shared_ptr<CommonData> common_data, const EntityType type = MBTET);
206
207 /**
208 * @brief Setting up operators for calculating drag force on the solid surface
209 *
210 * Pushes operators for caluclating drag force components on the fluid-solid
211 * interface
212 *
213 * @param dragFe pointer to face element instance
214 * @param sideDragFe pointer to volume on side element instance
215 * @param velocity_field name of the velocity field
216 * @param pressure_field name of the pressure field
217 * @param common_data pointer to common data object
218 * @return Error code
219 */
221 boost::shared_ptr<FaceElementForcesAndSourcesCore> dragFe,
222 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> sideDragFe,
223 std::string side_fe_name, const std::string velocity_field,
224 const std::string pressure_field,
225 boost::shared_ptr<CommonData> common_data);
226
227 /**
228 * @brief Setting up operators for post processing output of drag traction
229 *
230 * Pushes operators for post processing ouput of drag traction components on
231 * the fluid-solid interface
232 *
233 * @param dragFe pointer to face element instance
234 * @param sideDragFe pointer to volume on side element instance
235 * @param velocity_field name of the velocity field
236 * @param pressure_field name of the pressure field
237 * @param common_data pointer to common data object
238 * @return Error code
239 */
241 boost::shared_ptr<PostProcFace> postProcDragPtr,
242 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> sideDragFe,
243 std::string side_fe_name, const std::string velocity_field,
244 const std::string pressure_field,
245 boost::shared_ptr<CommonData> common_data);
246
247 /**
248 * @brief Setting up operators for calculation of volume flux
249 */
251 boost::shared_ptr<VolumeElementForcesAndSourcesCore> fe_flux_ptr,
252 const std::string velocity_field,
253 boost::shared_ptr<CommonData> common_data, const EntityType type = MBTET);
254
255 /**
256 * \brief Set integration rule to volume elements
257 *
258 * Integration rule is order of polynomial which is calculated exactly.
259 * Finite element selects integration method based on return of this
260 * function.
261 *
262 */
263 struct VolRule {
264 int operator()(int order_row, int order_col, int order_data) const {
265 return 2 * order_data;
266 }
267 };
268
269 struct FaceRule {
270 int operator()(int order_row, int order_col, int order_data) const {
271 return order_data + 2;
272 }
273 };
274
275 /**
276 * \brief Base class for operators assembling LHS
277 */
279
280 boost::shared_ptr<CommonData> commonData;
283
285
289
291
292 OpAssembleLhs(const string field_name_row, const string field_name_col,
293 boost::shared_ptr<CommonData> common_data,
294 BlockData &block_data)
295 : UserDataOperator(field_name_row, field_name_col,
297 commonData(common_data), blockData(block_data) {
298 sYmm = false;
299 diagonalBlock = false;
300 };
301
302 MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type,
303 EntityType col_type, EntData &row_data,
304 EntData &col_data);
305
306 virtual MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data) {
309 };
310
311 MoFEMErrorCode aSsemble(EntData &row_data, EntData &col_data);
312 };
313
314 /**
315 * @brief Assemble off-diagonal block of the LHS
316 * Operator for assembling off-diagonal block of the LHS
317 */
319
320 OpAssembleLhsOffDiag(const string field_name_row,
321 const string field_name_col,
322 boost::shared_ptr<CommonData> common_data,
323 BlockData &block_data)
324 : OpAssembleLhs(field_name_row, field_name_col, common_data,
325 block_data) {
326 sYmm = false;
327 diagonalBlock = false;
328 };
329
330 MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data);
331 };
332
333 /**
334 * @brief Assemble linear (symmetric) part of the diagonal block of the LHS
335 * Operator for assembling linear (symmetric) part of the diagonal block of
336 * the LHS
337 */
339
341
342 OpAssembleLhsDiagLin(const string field_name_row,
343 const string field_name_col,
344 boost::shared_ptr<CommonData> common_data,
345 BlockData &block_data)
346 : OpAssembleLhs(field_name_row, field_name_col, common_data,
347 block_data) {
348 sYmm = true;
349 diagonalBlock = true;
350 };
351
352 MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data);
353 };
354
355 /**
356 * @brief Assemble non-linear (non-symmetric) part of the diagonal block of
357 * the LHS Operator for assembling non-linear (non-symmetric) part of the
358 * diagonal block of the LHS
359 */
361
363
364 OpAssembleLhsDiagNonLin(const string field_name_row,
365 const string field_name_col,
366 boost::shared_ptr<CommonData> common_data,
367 BlockData &block_data)
368 : OpAssembleLhs(field_name_row, field_name_col, common_data,
369 block_data) {
370 sYmm = false;
371 diagonalBlock = true;
372 };
373
374 MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data);
375 };
376
377 /**
378 * \brief Base class for operators assembling RHS
379 */
381
382 boost::shared_ptr<CommonData> commonData;
384 int nbRows; ///< number of dofs on row
386
388
390 boost::shared_ptr<CommonData> common_data,
391 BlockData &block_data)
393 commonData(common_data), blockData(block_data){};
394
395 MoFEMErrorCode doWork(int row_side, EntityType row_type, EntData &row_data);
396
401
403 };
404
405 /**
406 * @brief Assemble linear part of the velocity component of the RHS vector
407 *
408 * Operator for assembling linear part of the velocity component of the RHS
409 * vector:
410 * \f[ \mathbf{R}^{\textrm{S}}_{\mathbf{u}} =
411 * C_\text{V}\int\limits_{\Omega}\nabla\mathbf{u}\mathbin{:}\nabla\mathbf{v}\,
412 * d\Omega
413 * \f]
414 * where \f$C_\text{V}\f$ is the viscosity
415 * coefficient: \f$C_\text{V}=\mu\f$ in the dimensional case and
416 * \f$C_\text{V}=1\f$ in the non-dimensional case.
417 */
419
421 boost::shared_ptr<CommonData> common_data,
422 BlockData &block_data)
423 : OpAssembleRhs(field_name, common_data, block_data){};
424
425 /**
426 * \brief Integrate local entity vector
427 * @param data entity data on element row
428 * @return error code
429 */
431 };
432
433 /**
434 * @brief Assemble non-linear part of the velocity component of the RHS vector
435 *
436 * Operator for assembling non-linear part of the velocity component of the
437 * RHS vector:
438 * \f[
439 * \mathbf{R}^{\textrm{NS}}_{\mathbf{u}} =
440 * C_\text{I}\int\limits_\Omega \left(\mathbf{u}\cdot\nabla\right)\mathbf{u}
441 * \cdot\mathbf{v} \,d\Omega,
442 * \f]
443 * where \f$C_\text{I}\f$ is the inertia
444 * coefficient: \f$C_\text{V}=\rho\f$ in the dimensional case and
445 * \f$C_\text{V}=\mathcal{R}\f$ in the non-dimensional case.
446 */
448
450 boost::shared_ptr<CommonData> common_data,
451 BlockData &block_data)
452 : OpAssembleRhs(field_name, common_data, block_data){};
453
455 };
456
457 /**
458 * @brief Assemble the pressure component of the RHS vector
459 *
460 * Operator for assembling pressure component of the RHS vector:
461 * \f[
462 * \mathbf{R}^{\textrm{S}}_{p} = -\int\limits_{\Omega}p\,
463 * \nabla\cdot\mathbf{v} \, d\Omega
464 * \f]
465 */
467
469 boost::shared_ptr<CommonData> common_data,
470 BlockData &block_data)
471 : OpAssembleRhs(field_name, common_data, block_data){};
472
473 /**
474 * \brief Integrate local constrains vector
475 */
477 };
478
479 /**
480 * @brief Calculate drag force on the fluid-solid interface
481 *
482 * Operator fo calculating drag force components on the fluid-solid interface.
483 * Integrates components of the drag traction:
484 * \f[
485 * \mathbf{F}_{\textrm{D}} =
486 * -\int\limits_{\Gamma_{\textrm{S}}}\left(-p\mathbf{I} +
487 * \mu\left(\nabla\mathbf{u}+\mathbf{u}^{\intercal}\right)\right) \, d\Gamma
488 * \f]
489 */
491
492 boost::shared_ptr<CommonData> commonData;
494
496 boost::shared_ptr<CommonData> &common_data,
497 BlockData &block_data)
500 commonData(common_data), blockData(block_data) {
501 doVertices = true;
502 doEdges = false;
503 doQuads = false;
504 doTris = false;
505 doTets = false;
506 doPrisms = false;
507 };
508
509 MoFEMErrorCode doWork(int side, EntityType type, EntData &data);
510 };
511
512 /**
513 * @brief Calculate drag traction on the fluid-solid interface
514 *
515 * Operator fo calculating drag traction on the fluid-solid interface
516 * \f[
517 * \mathbf{t} = -p\mathbf{I} +
518 * \mu\left(\nabla\mathbf{u}+\mathbf{u}^{\intercal}\right)
519 * \f]
520 */
522
523 boost::shared_ptr<CommonData> commonData;
525 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> sideFe;
526 std::string sideFeName;
527
529 const string field_name,
530 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> &side_fe,
531 std::string side_fe_name, boost::shared_ptr<CommonData> &common_data,
532 BlockData &block_data)
535 sideFe(side_fe), sideFeName(side_fe_name), commonData(common_data),
536 blockData(block_data) {
537 doVertices = true;
538 doEdges = false;
539 doQuads = false;
540 doTris = false;
541 doTets = false;
542 doPrisms = false;
543 };
544
545 MoFEMErrorCode doWork(int side, EntityType type, EntData &data);
546 };
547
548 /**
549 * @brief Post processing output of drag traction on the fluid-solid interface
550 *
551 */
553
554 boost::shared_ptr<CommonData> commonData;
555 moab::Interface &postProcMesh;
556 std::vector<EntityHandle> &mapGaussPts;
558
559 OpPostProcDrag(const string field_name, moab::Interface &post_proc_mesh,
560 std::vector<EntityHandle> &map_gauss_pts,
561 boost::shared_ptr<CommonData> &common_data,
562 BlockData &block_data)
565 commonData(common_data), postProcMesh(post_proc_mesh),
566 mapGaussPts(map_gauss_pts), blockData(block_data) {
567 doVertices = true;
568 doEdges = false;
569 doQuads = false;
570 doTris = false;
571 doTets = false;
572 doPrisms = false;
573 };
574
575 MoFEMErrorCode doWork(int side, EntityType type, EntData &data);
576 };
577
578 /**
579 * @brief Post processing output of the vorticity criterion levels
580 *
581 */
583
584 boost::shared_ptr<CommonData> commonData;
585 moab::Interface &postProcMesh;
586 std::vector<EntityHandle> &mapGaussPts;
588
589 OpPostProcVorticity(moab::Interface &post_proc_mesh,
590 std::vector<EntityHandle> &map_gauss_pts,
591 boost::shared_ptr<CommonData> &common_data,
592 BlockData &block_data)
594 commonData(common_data), postProcMesh(post_proc_mesh),
595 mapGaussPts(map_gauss_pts), blockData(block_data) {
596 doVertices = true;
597 doEdges = false;
598 doQuads = false;
599 doTris = false;
600 doTets = false;
601 doPrisms = false;
602 };
603
604 MoFEMErrorCode doWork(int side, EntityType type, EntData &data);
605 };
606
607 /**
608 * @brief calculating volumetric flux
609 *
610 */
612
613 boost::shared_ptr<CommonData> commonData;
615 int nbRows; ///< number of dofs on row
617
619 boost::shared_ptr<CommonData> common_data,
620 BlockData &block_data)
622 commonData(common_data), blockData(block_data){};
623
624 MoFEMErrorCode doWork(int side, EntityType type, EntData &data);
625 };
626};
627
628#endif //__NAVIERSTOKESELEMENT_HPP__
#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()
#define CHKERR
Inline error check.
const int dim
virtual MoFEMErrorCode add_ents_to_finite_element_by_dim(const EntityHandle entities, const int dim, const std::string &name, const bool recursive=true)=0
add entities to finite element
virtual MoFEMErrorCode add_finite_element(const std::string &fe_name, enum MoFEMTypes bh=MF_EXCL, int verb=DEFAULT_VERBOSITY)=0
add finite element
virtual MoFEMErrorCode modify_finite_element_add_field_col(const std::string &fe_name, const std::string name_row)=0
set field col which finite element use
virtual MoFEMErrorCode modify_finite_element_add_field_data(const std::string &fe_name, const std::string name_filed)=0
set finite element field data
virtual MoFEMErrorCode modify_finite_element_add_field_row(const std::string &fe_name, const std::string name_row)=0
set field row which finite element use
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
UBlasMatrix< double > MatrixDouble
Definition Types.hpp:77
UBlasVector< double > VectorDouble
Definition Types.hpp:68
auto createVectorMPI(MPI_Comm comm, PetscInt n, PetscInt N)
Create MPI Vector.
constexpr auto field_name
Class used to scale loads, f.e. in arc-length control.
virtual MPI_Comm & get_comm() const =0
virtual int get_comm_rank() const =0
bool & doTris
\deprectaed
bool & doPrisms
\deprectaed
bool sYmm
If true assume that matrix is symmetric structure.
bool & doVertices
\deprectaed If false skip vertices
bool & doTets
\deprectaed
bool & doEdges
\deprectaed If false skip edges
bool & doQuads
\deprectaed
Deprecated interface functions.
Data on single entity (This is passed as argument to DataOperator::doWork)
structure for User Loop Methods on finite elements
@ OPROW
operator doWork function is executed on FE rows
@ OPROWCOL
operator doWork is executed on FE rows &columns
intrusive_ptr for managing petsc objects
boost::shared_ptr< MatrixDouble > pressureDragTract
boost::shared_ptr< MatrixDouble > gradVelPtr
std::map< int, BlockData > setOfBlocksData
boost::shared_ptr< MatrixDouble > shearDragTract
std::map< int, BlockData > setOfFacesData
boost::shared_ptr< VectorDouble > pressPtr
boost::shared_ptr< MatrixDouble > totalDragTract
CommonData(MoFEM::Interface &m_field)
boost::shared_ptr< MatrixDouble > velPtr
int operator()(int order_row, int order_col, int order_data) const
MoFEMErrorCode scaleNf(const FEMethod *fe, VectorDouble &nf)
Assemble linear (symmetric) part of the diagonal block of the LHS Operator for assembling linear (sym...
OpAssembleLhsDiagLin(const string field_name_row, const string field_name_col, boost::shared_ptr< CommonData > common_data, BlockData &block_data)
MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data)
FTensor::Tensor2< double, 3, 3 > diffDiff
Assemble non-linear (non-symmetric) part of the diagonal block of the LHS Operator for assembling non...
OpAssembleLhsDiagNonLin(const string field_name_row, const string field_name_col, boost::shared_ptr< CommonData > common_data, BlockData &block_data)
MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data)
Base class for operators assembling LHS.
MoFEMErrorCode aSsemble(EntData &row_data, EntData &col_data)
virtual MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data)
MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data)
Operator for bi-linear form, usually to calculate values on left hand side.
boost::shared_ptr< CommonData > commonData
OpAssembleLhs(const string field_name_row, const string field_name_col, boost::shared_ptr< CommonData > common_data, BlockData &block_data)
Assemble off-diagonal block of the LHS Operator for assembling off-diagonal block of the LHS.
MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data)
OpAssembleLhsOffDiag(const string field_name_row, const string field_name_col, boost::shared_ptr< CommonData > common_data, BlockData &block_data)
Base class for operators assembling RHS.
OpAssembleRhs(const string field_name, boost::shared_ptr< CommonData > common_data, BlockData &block_data)
boost::shared_ptr< CommonData > commonData
MoFEMErrorCode doWork(int row_side, EntityType row_type, EntData &row_data)
Operator for linear form, usually to calculate values on right hand side.
MoFEMErrorCode aSsemble(EntData &data)
virtual MoFEMErrorCode iNtegrate(EntData &data)
Assemble the pressure component of the RHS vector.
MoFEMErrorCode iNtegrate(EntData &data)
Integrate local constrains vector.
OpAssembleRhsPressure(const string field_name, boost::shared_ptr< CommonData > common_data, BlockData &block_data)
Assemble linear part of the velocity component of the RHS vector.
MoFEMErrorCode iNtegrate(EntData &data)
Integrate local entity vector.
OpAssembleRhsVelocityLin(const string field_name, boost::shared_ptr< CommonData > common_data, BlockData &block_data)
Assemble non-linear part of the velocity component of the RHS vector.
OpAssembleRhsVelocityNonLin(const string field_name, boost::shared_ptr< CommonData > common_data, BlockData &block_data)
Calculate drag force on the fluid-solid interface.
boost::shared_ptr< CommonData > commonData
OpCalcDragForce(const string field_name, boost::shared_ptr< CommonData > &common_data, BlockData &block_data)
MoFEMErrorCode doWork(int side, EntityType type, EntData &data)
Operator for linear form, usually to calculate values on right hand side.
Calculate drag traction on the fluid-solid interface.
MoFEMErrorCode doWork(int side, EntityType type, EntData &data)
Operator for linear form, usually to calculate values on right hand side.
boost::shared_ptr< CommonData > commonData
boost::shared_ptr< VolumeElementForcesAndSourcesCoreOnSide > sideFe
OpCalcDragTraction(const string field_name, boost::shared_ptr< VolumeElementForcesAndSourcesCoreOnSide > &side_fe, std::string side_fe_name, boost::shared_ptr< CommonData > &common_data, BlockData &block_data)
MoFEMErrorCode doWork(int side, EntityType type, EntData &data)
Operator for linear form, usually to calculate values on right hand side.
OpCalcVolumeFlux(const string field_name, boost::shared_ptr< CommonData > common_data, BlockData &block_data)
boost::shared_ptr< CommonData > commonData
Post processing output of drag traction on the fluid-solid interface.
boost::shared_ptr< CommonData > commonData
MoFEMErrorCode doWork(int side, EntityType type, EntData &data)
Operator for linear form, usually to calculate values on right hand side.
OpPostProcDrag(const string field_name, moab::Interface &post_proc_mesh, std::vector< EntityHandle > &map_gauss_pts, boost::shared_ptr< CommonData > &common_data, BlockData &block_data)
moab::Interface & postProcMesh
BlockData & blockData
std::vector< EntityHandle > & mapGaussPts
Post processing output of the vorticity criterion levels.
moab::Interface & postProcMesh
BlockData & blockData
std::vector< EntityHandle > & mapGaussPts
OpPostProcVorticity(moab::Interface &post_proc_mesh, std::vector< EntityHandle > &map_gauss_pts, boost::shared_ptr< CommonData > &common_data, BlockData &block_data)
MoFEMErrorCode doWork(int side, EntityType type, EntData &data)
Operator for linear form, usually to calculate values on right hand side.
boost::shared_ptr< CommonData > commonData
Set integration rule to volume elements.
int operator()(int order_row, int order_col, int order_data) const
Element for simulating viscous fluid flow.
static MoFEMErrorCode setCalcDragOperators(boost::shared_ptr< FaceElementForcesAndSourcesCore > dragFe, boost::shared_ptr< VolumeElementForcesAndSourcesCoreOnSide > sideDragFe, std::string side_fe_name, const std::string velocity_field, const std::string pressure_field, boost::shared_ptr< CommonData > common_data)
Setting up operators for calculating drag force on the solid surface.
static MoFEMErrorCode addElement(MoFEM::Interface &m_field, const string element_name, const string velocity_field_name, const string pressure_field_name, const string mesh_field_name, const int dim=3, Range *ents=nullptr)
Setting up elements.
static MoFEMErrorCode setPostProcDragOperators(boost::shared_ptr< PostProcFace > postProcDragPtr, boost::shared_ptr< VolumeElementForcesAndSourcesCoreOnSide > sideDragFe, std::string side_fe_name, const std::string velocity_field, const std::string pressure_field, boost::shared_ptr< CommonData > common_data)
Setting up operators for post processing output of drag traction.
static MoFEMErrorCode setNavierStokesOperators(boost::shared_ptr< VolumeElementForcesAndSourcesCore > feRhs, boost::shared_ptr< VolumeElementForcesAndSourcesCore > feLhs, const std::string velocity_field, const std::string pressure_field, boost::shared_ptr< CommonData > common_data, const EntityType type=MBTET)
Setting up operators for solving Navier-Stokes equations.
static MoFEMErrorCode setStokesOperators(boost::shared_ptr< VolumeElementForcesAndSourcesCore > feRhs, boost::shared_ptr< VolumeElementForcesAndSourcesCore > feLhs, const std::string velocity_field, const std::string pressure_field, boost::shared_ptr< CommonData > common_data, const EntityType type=MBTET)
Setting up operators for solving Stokes equations.
static MoFEMErrorCode setCalcVolumeFluxOperators(boost::shared_ptr< VolumeElementForcesAndSourcesCore > fe_flux_ptr, const std::string velocity_field, boost::shared_ptr< CommonData > common_data, const EntityType type=MBTET)
Setting up operators for calculation of volume flux.