v0.15.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 PetscOptionsBegin(PETSC_COMM_WORLD, "", "Problem", "none");
95 PetscOptionsEnd();
97 }
98 };
99
101
102 static double lambda;
103
109 };
110
111 /**
112 * @brief Setting up elements
113 *
114 * This functions adds element to the database, adds provided fields to rows
115 * and columns of the element, provides access of the element to the fields
116 * data and adds entities of particular dimension (or a given range of
117 * entities to the element)
118 *
119 * @param m_field MoFEM interface
120 * @param element_name Name of the element
121 * @param velocity_field_name Name of the velocity field
122 * @param pressure_field_name Name of the pressure field
123 * @param mesh_field_name Name for mesh node positions field
124 * @param ents Range of entities to be added to element
125 * @return Error code
126 */
128 const string element_name,
129 const string velocity_field_name,
130 const string pressure_field_name,
131 const string mesh_field_name,
132 const int dim = 3,
133 Range *ents = nullptr) {
135
136 CHKERR m_field.add_finite_element(element_name);
137
138 CHKERR m_field.modify_finite_element_add_field_row(element_name,
139 velocity_field_name);
140 CHKERR m_field.modify_finite_element_add_field_col(element_name,
141 velocity_field_name);
142 CHKERR m_field.modify_finite_element_add_field_data(element_name,
143 velocity_field_name);
144
145 CHKERR m_field.modify_finite_element_add_field_row(element_name,
146 pressure_field_name);
147 CHKERR m_field.modify_finite_element_add_field_col(element_name,
148 pressure_field_name);
149 CHKERR m_field.modify_finite_element_add_field_data(element_name,
150 pressure_field_name);
151
152 CHKERR m_field.modify_finite_element_add_field_data(element_name,
153 mesh_field_name);
154
155 if (ents != nullptr) {
156 CHKERR m_field.add_ents_to_finite_element_by_dim(*ents, dim,
157 element_name);
158 } else {
159 CHKERR m_field.add_ents_to_finite_element_by_dim(0, dim, element_name);
160 }
161
163 }
164
165 /**
166 * @brief Setting up operators for solving Navier-Stokes equations
167 *
168 * Pushes operators for solving Navier-Stokes equations to pipelines of RHS
169 * and LHS element instances
170 *
171 * @param feRhs pointer to RHS element instance
172 * @param feLhs pointer to LHS element instance
173 * @param velocity_field name of the velocity field
174 * @param pressure_field name of the pressure field
175 * @param common_data pointer to common data object
176 * @param type type of entities in the domain
177 * @return Error code
178 */
180 boost::shared_ptr<VolumeElementForcesAndSourcesCore> feRhs,
181 boost::shared_ptr<VolumeElementForcesAndSourcesCore> feLhs,
182 const std::string velocity_field, const std::string pressure_field,
183 boost::shared_ptr<CommonData> common_data, const EntityType type = MBTET);
184
185 /**
186 * @brief Setting up operators for solving Stokes equations
187 *
188 * Pushes operators for solving Stokes equations to pipelines of RHS
189 * and LHS element instances
190 *
191 * @param feRhs pointer to RHS element instance
192 * @param feLhs pointer to LHS element instance
193 * @param velocity_field name of the velocity field
194 * @param pressure_field name of the pressure field
195 * @param common_data pointer to common data object
196 * @param type type of entities in the domain
197 * @return Error code
198 */
200 boost::shared_ptr<VolumeElementForcesAndSourcesCore> feRhs,
201 boost::shared_ptr<VolumeElementForcesAndSourcesCore> feLhs,
202 const std::string velocity_field, const std::string pressure_field,
203 boost::shared_ptr<CommonData> common_data, const EntityType type = MBTET);
204
205 /**
206 * @brief Setting up operators for calculating drag force on the solid surface
207 *
208 * Pushes operators for caluclating drag force components on the fluid-solid
209 * interface
210 *
211 * @param dragFe pointer to face element instance
212 * @param sideDragFe pointer to volume on side element instance
213 * @param velocity_field name of the velocity field
214 * @param pressure_field name of the pressure field
215 * @param common_data pointer to common data object
216 * @return Error code
217 */
219 boost::shared_ptr<FaceElementForcesAndSourcesCore> dragFe,
220 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> sideDragFe,
221 std::string side_fe_name, const std::string velocity_field,
222 const std::string pressure_field,
223 boost::shared_ptr<CommonData> common_data);
224
225 /**
226 * @brief Setting up operators for post processing output of drag traction
227 *
228 * Pushes operators for post processing ouput of drag traction components on
229 * the fluid-solid interface
230 *
231 * @param dragFe pointer to face element instance
232 * @param sideDragFe pointer to volume on side element instance
233 * @param velocity_field name of the velocity field
234 * @param pressure_field name of the pressure field
235 * @param common_data pointer to common data object
236 * @return Error code
237 */
239 boost::shared_ptr<PostProcFace> postProcDragPtr,
240 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> sideDragFe,
241 std::string side_fe_name, const std::string velocity_field,
242 const std::string pressure_field,
243 boost::shared_ptr<CommonData> common_data);
244
245 /**
246 * @brief Setting up operators for calculation of volume flux
247 */
249 boost::shared_ptr<VolumeElementForcesAndSourcesCore> fe_flux_ptr,
250 const std::string velocity_field,
251 boost::shared_ptr<CommonData> common_data, const EntityType type = MBTET);
252
253 /**
254 * \brief Set integration rule to volume elements
255 *
256 * Integration rule is order of polynomial which is calculated exactly.
257 * Finite element selects integration method based on return of this
258 * function.
259 *
260 */
261 struct VolRule {
262 int operator()(int order_row, int order_col, int order_data) const {
263 return 2 * order_data;
264 }
265 };
266
267 struct FaceRule {
268 int operator()(int order_row, int order_col, int order_data) const {
269 return order_data + 2;
270 }
271 };
272
273 /**
274 * \brief Base class for operators assembling LHS
275 */
277
278 boost::shared_ptr<CommonData> commonData;
281
283
287
289
290 OpAssembleLhs(const string field_name_row, const string field_name_col,
291 boost::shared_ptr<CommonData> common_data,
292 BlockData &block_data)
293 : UserDataOperator(field_name_row, field_name_col,
295 commonData(common_data), blockData(block_data) {
296 sYmm = false;
297 diagonalBlock = false;
298 };
299
300 MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type,
301 EntityType col_type, EntData &row_data,
302 EntData &col_data);
303
304 virtual MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data) {
307 };
308
309 MoFEMErrorCode aSsemble(EntData &row_data, EntData &col_data);
310 };
311
312 /**
313 * @brief Assemble off-diagonal block of the LHS
314 * Operator for assembling off-diagonal block of the LHS
315 */
317
318 OpAssembleLhsOffDiag(const string field_name_row,
319 const string field_name_col,
320 boost::shared_ptr<CommonData> common_data,
321 BlockData &block_data)
322 : OpAssembleLhs(field_name_row, field_name_col, common_data,
323 block_data) {
324 sYmm = false;
325 diagonalBlock = false;
326 };
327
328 MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data);
329 };
330
331 /**
332 * @brief Assemble linear (symmetric) part of the diagonal block of the LHS
333 * Operator for assembling linear (symmetric) part of the diagonal block of
334 * the LHS
335 */
337
339
340 OpAssembleLhsDiagLin(const string field_name_row,
341 const string field_name_col,
342 boost::shared_ptr<CommonData> common_data,
343 BlockData &block_data)
344 : OpAssembleLhs(field_name_row, field_name_col, common_data,
345 block_data) {
346 sYmm = true;
347 diagonalBlock = true;
348 };
349
350 MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data);
351 };
352
353 /**
354 * @brief Assemble non-linear (non-symmetric) part of the diagonal block of
355 * the LHS Operator for assembling non-linear (non-symmetric) part of the
356 * diagonal block of the LHS
357 */
359
361
362 OpAssembleLhsDiagNonLin(const string field_name_row,
363 const string field_name_col,
364 boost::shared_ptr<CommonData> common_data,
365 BlockData &block_data)
366 : OpAssembleLhs(field_name_row, field_name_col, common_data,
367 block_data) {
368 sYmm = false;
369 diagonalBlock = true;
370 };
371
372 MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data);
373 };
374
375 /**
376 * \brief Base class for operators assembling RHS
377 */
379
380 boost::shared_ptr<CommonData> commonData;
382 int nbRows; ///< number of dofs on row
384
386
388 boost::shared_ptr<CommonData> common_data,
389 BlockData &block_data)
391 commonData(common_data), blockData(block_data){};
392
393 MoFEMErrorCode doWork(int row_side, EntityType row_type, EntData &row_data);
394
399
401 };
402
403 /**
404 * @brief Assemble linear part of the velocity component of the RHS vector
405 *
406 * Operator for assembling linear part of the velocity component of the RHS
407 * vector:
408 * \f[ \mathbf{R}^{\textrm{S}}_{\mathbf{u}} =
409 * C_\text{V}\int\limits_{\Omega}\nabla\mathbf{u}\mathbin{:}\nabla\mathbf{v}\,
410 * d\Omega
411 * \f]
412 * where \f$C_\text{V}\f$ is the viscosity
413 * coefficient: \f$C_\text{V}=\mu\f$ in the dimensional case and
414 * \f$C_\text{V}=1\f$ in the non-dimensional case.
415 */
417
419 boost::shared_ptr<CommonData> common_data,
420 BlockData &block_data)
421 : OpAssembleRhs(field_name, common_data, block_data){};
422
423 /**
424 * \brief Integrate local entity vector
425 * @param data entity data on element row
426 * @return error code
427 */
429 };
430
431 /**
432 * @brief Assemble non-linear part of the velocity component of the RHS vector
433 *
434 * Operator for assembling non-linear part of the velocity component of the
435 * RHS vector:
436 * \f[
437 * \mathbf{R}^{\textrm{NS}}_{\mathbf{u}} =
438 * C_\text{I}\int\limits_\Omega \left(\mathbf{u}\cdot\nabla\right)\mathbf{u}
439 * \cdot\mathbf{v} \,d\Omega,
440 * \f]
441 * where \f$C_\text{I}\f$ is the inertia
442 * coefficient: \f$C_\text{V}=\rho\f$ in the dimensional case and
443 * \f$C_\text{V}=\mathcal{R}\f$ in the non-dimensional case.
444 */
446
448 boost::shared_ptr<CommonData> common_data,
449 BlockData &block_data)
450 : OpAssembleRhs(field_name, common_data, block_data){};
451
453 };
454
455 /**
456 * @brief Assemble the pressure component of the RHS vector
457 *
458 * Operator for assembling pressure component of the RHS vector:
459 * \f[
460 * \mathbf{R}^{\textrm{S}}_{p} = -\int\limits_{\Omega}p\,
461 * \nabla\cdot\mathbf{v} \, d\Omega
462 * \f]
463 */
465
467 boost::shared_ptr<CommonData> common_data,
468 BlockData &block_data)
469 : OpAssembleRhs(field_name, common_data, block_data){};
470
471 /**
472 * \brief Integrate local constrains vector
473 */
475 };
476
477 /**
478 * @brief Calculate drag force on the fluid-solid interface
479 *
480 * Operator fo calculating drag force components on the fluid-solid interface.
481 * Integrates components of the drag traction:
482 * \f[
483 * \mathbf{F}_{\textrm{D}} =
484 * -\int\limits_{\Gamma_{\textrm{S}}}\left(-p\mathbf{I} +
485 * \mu\left(\nabla\mathbf{u}+\mathbf{u}^{\intercal}\right)\right) \, d\Gamma
486 * \f]
487 */
489
490 boost::shared_ptr<CommonData> commonData;
492
494 boost::shared_ptr<CommonData> &common_data,
495 BlockData &block_data)
498 commonData(common_data), blockData(block_data) {
499 doVertices = true;
500 doEdges = false;
501 doQuads = false;
502 doTris = false;
503 doTets = false;
504 doPrisms = false;
505 };
506
507 MoFEMErrorCode doWork(int side, EntityType type, EntData &data);
508 };
509
510 /**
511 * @brief Calculate drag traction on the fluid-solid interface
512 *
513 * Operator fo calculating drag traction on the fluid-solid interface
514 * \f[
515 * \mathbf{t} = -p\mathbf{I} +
516 * \mu\left(\nabla\mathbf{u}+\mathbf{u}^{\intercal}\right)
517 * \f]
518 */
520
521 boost::shared_ptr<CommonData> commonData;
523 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> sideFe;
524 std::string sideFeName;
525
527 const string field_name,
528 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> &side_fe,
529 std::string side_fe_name, boost::shared_ptr<CommonData> &common_data,
530 BlockData &block_data)
533 sideFe(side_fe), sideFeName(side_fe_name), commonData(common_data),
534 blockData(block_data) {
535 doVertices = true;
536 doEdges = false;
537 doQuads = false;
538 doTris = false;
539 doTets = false;
540 doPrisms = false;
541 };
542
543 MoFEMErrorCode doWork(int side, EntityType type, EntData &data);
544 };
545
546 /**
547 * @brief Post processing output of drag traction on the fluid-solid interface
548 *
549 */
551
552 boost::shared_ptr<CommonData> commonData;
553 moab::Interface &postProcMesh;
554 std::vector<EntityHandle> &mapGaussPts;
556
557 OpPostProcDrag(const string field_name, moab::Interface &post_proc_mesh,
558 std::vector<EntityHandle> &map_gauss_pts,
559 boost::shared_ptr<CommonData> &common_data,
560 BlockData &block_data)
563 commonData(common_data), postProcMesh(post_proc_mesh),
564 mapGaussPts(map_gauss_pts), blockData(block_data) {
565 doVertices = true;
566 doEdges = false;
567 doQuads = false;
568 doTris = false;
569 doTets = false;
570 doPrisms = false;
571 };
572
573 MoFEMErrorCode doWork(int side, EntityType type, EntData &data);
574 };
575
576 /**
577 * @brief Post processing output of the vorticity criterion levels
578 *
579 */
581
582 boost::shared_ptr<CommonData> commonData;
583 moab::Interface &postProcMesh;
584 std::vector<EntityHandle> &mapGaussPts;
586
587 OpPostProcVorticity(moab::Interface &post_proc_mesh,
588 std::vector<EntityHandle> &map_gauss_pts,
589 boost::shared_ptr<CommonData> &common_data,
590 BlockData &block_data)
592 commonData(common_data), postProcMesh(post_proc_mesh),
593 mapGaussPts(map_gauss_pts), blockData(block_data) {
594 doVertices = true;
595 doEdges = false;
596 doQuads = false;
597 doTris = false;
598 doTets = false;
599 doPrisms = false;
600 };
601
602 MoFEMErrorCode doWork(int side, EntityType type, EntData &data);
603 };
604
605 /**
606 * @brief calculating volumetric flux
607 *
608 */
610
611 boost::shared_ptr<CommonData> commonData;
613 int nbRows; ///< number of dofs on row
615
617 boost::shared_ptr<CommonData> common_data,
618 BlockData &block_data)
620 commonData(common_data), blockData(block_data){};
621
622 MoFEMErrorCode doWork(int side, EntityType type, EntData &data);
623 };
624};
625
626#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.
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_row(const std::string &fe_name, const std::string name_row)=0
set field row which finite element use
virtual MoFEMErrorCode modify_finite_element_add_field_data(const std::string &fe_name, const std::string name_field)=0
set finite element field data
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)
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 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 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)
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)
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)
std::vector< EntityHandle > & mapGaussPts
Post processing output of the vorticity criterion levels.
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.