Finite Element Domain Decomposition Library
FEDDLib
Loading...
Searching...
No Matches
AssembleFEGeneralizedNewtonian_decl.hpp
1#ifndef AssembleFEGeneralizedNewtonian_DECL_hpp
2#define AssembleFEGeneralizedNewtonian_DECL_hpp
3
4#include "feddlib/core/AceFemAssembly/AssembleFE.hpp"
5#include "feddlib/core/AceFemAssembly/specific/AssembleFENavierStokes.hpp"
6#include "feddlib/core/FE/Helper.hpp"
7#include "feddlib/core/FEDDCore.hpp"
8#include "feddlib/core/LinearAlgebra/Matrix.hpp"
9#include "feddlib/core/LinearAlgebra/MultiVector.hpp"
10#include "feddlib/core/General/DifferentiableFuncClass.hpp"
11// Add the generalized Newtonian Fluid models for the viscosity
12#include "feddlib/core/AceFemAssembly/specific/GeneralizedNewtonianModels/CarreauYasuda.hpp"
13#include "feddlib/core/AceFemAssembly/specific/GeneralizedNewtonianModels/PowerLaw.hpp"
14#include "feddlib/core/AceFemAssembly/specific/GeneralizedNewtonianModels/Dimless_Carreau.hpp"
15
16namespace FEDD
17{
18
19 template <class SC = default_sc, class LO = default_lo, class GO = default_go, class NO = default_no>
21 {
22 public:
23 typedef Matrix<SC, LO, GO, NO> Matrix_Type;
24 typedef Teuchos::RCP<Matrix_Type> MatrixPtr_Type;
25
26 typedef SmallMatrix<SC> SmallMatrix_Type;
27 typedef Teuchos::RCP<SmallMatrix_Type> SmallMatrixPtr_Type;
28
29 typedef MultiVector<SC, LO, GO, NO> MultiVector_Type;
30 typedef Teuchos::RCP<MultiVector_Type> MultiVectorPtr_Type;
31
32 typedef AssembleFE<SC, LO, GO, NO> AssembleFE_Type;
33
34 typedef DifferentiableFuncClass<SC, LO, GO, NO> DifferentiableFuncClass_Type;
35 typedef Teuchos::RCP<DifferentiableFuncClass_Type> DifferentiableFuncClassPtr_Type;
36
37 typedef InputToOutputMappingClass<SC, LO, GO, NO> InputToOutputMappingClass_Type;
38 typedef Teuchos::RCP<InputToOutputMappingClass_Type> InputToOutputMappingClassPtr_Type;
39 // smart pointer inside we need a type
40
44 void assembleJacobian() override;
45
49 void assembleRHS() override;
50
55 void assembleJacobianBlock(LO i){TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "No implementation");};
56
61
62 /*
63 \brief Assembly of FixedPoint- Matrix (System Matrix K with current u)
64 */
65 void assembleFixedPoint();
66
67 SmallMatrixPtr_Type getFixedPointMatrix(){return this->ANB_;};
68
69 protected:
70 std::string shearThinningModel;
71 int dofsElementViscosity_;
72
82 AssembleFEGeneralizedNewtonian(int flag, vec2D_dbl_Type nodesRefConfig, ParameterListPtr_Type parameters, tuple_disk_vec_ptr_Type tuple);
83
89 void assemblyStress(SmallMatrixPtr_Type &elementMatrix);
90
96 void assemblyStressDev(SmallMatrixPtr_Type &elementMatrix);
115 void assemblyOutflowNeumannBoundaryTerm(SmallMatrixPtr_Type &elementMatrix){TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "Will be added when normal evaluation on the finite element is finished");} ;
116
123 void assemblyOutflowNeumannBoundaryTermDev(SmallMatrixPtr_Type &elementMatrix){TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "Will be added when normal evaluation on the finite element is finished");};
124
132 void computeShearRate(vec3D_dbl_Type dPhiTrans, vec_dbl_ptr_Type &gammaDot, int dim);
133
134 friend class AssembleFEFactory<SC, LO, GO, NO>; // Must have for specfic classes
135
136 InputToOutputMappingClassPtr_Type viscosityModel; // viscosity Model can be in theory any Input to output mapping
137
138 private:
139 };
140
141}
142#endif
This class allows for constructing AssembleFE objects.
Definition AssembleFEFactory_decl.hpp:37
void assembleRHS() override
Assemble the element right hand side vector.
Definition AssembleFEGeneralizedNewtonian_def.hpp:654
void assembleJacobian() override
Assemble the element Jacobian matrix.
Definition AssembleFEGeneralizedNewtonian_def.hpp:64
void assemblyOutflowNeumannBoundaryTerm(SmallMatrixPtr_Type &elementMatrix)
Assembly function for neumann boundary term - If we want to have same outflow boundary condition as f...
Definition AssembleFEGeneralizedNewtonian_decl.hpp:115
AssembleFEGeneralizedNewtonian(int flag, vec2D_dbl_Type nodesRefConfig, ParameterListPtr_Type parameters, tuple_disk_vec_ptr_Type tuple)
Constructor for AssembleFEAceNavierStokes.
Definition AssembleFEGeneralizedNewtonian_def.hpp:33
void assemblyOutflowNeumannBoundaryTermDev(SmallMatrixPtr_Type &elementMatrix)
Assembly function for directional derivative contribution neumann boundary term.
Definition AssembleFEGeneralizedNewtonian_decl.hpp:123
void assemblyStress(SmallMatrixPtr_Type &elementMatrix)
Assembly function for shear stress tensor which includes viscosity function , which is a highly nonli...
Definition AssembleFEGeneralizedNewtonian_def.hpp:178
void computeLocalconstOutputField() override
Compute the viscosity for an element depending on the knwon velocity solution.
Definition AssembleFEGeneralizedNewtonian_def.hpp:808
void assembleJacobianBlock(LO i)
Assemble the element Jacobian matrix.
Definition AssembleFEGeneralizedNewtonian_decl.hpp:55
void computeShearRate(vec3D_dbl_Type dPhiTrans, vec_dbl_ptr_Type &gammaDot, int dim)
Computation of shear rate using the current velocity solution at the nodes and the derivative of the ...
Definition AssembleFEGeneralizedNewtonian_def.hpp:721
void assemblyStressDev(SmallMatrixPtr_Type &elementMatrix)
Assembly function for directional derivative contribution of shear stress tensor term (see function f...
Definition AssembleFEGeneralizedNewtonian_def.hpp:373
AssembleFENavierStokes(int flag, vec2D_dbl_Type nodesRefConfig, ParameterListPtr_Type parameters, tuple_disk_vec_ptr_Type tuple)
Definition AssembleFENavierStokes_def.hpp:9
This abstract class defining the interface for any type of element assembly rountines in the FEDDLib.
Definition AssembleFE_decl.hpp:61
This abstract class is derived from the abstract class of general input to output mapping....
Definition DifferentiableFuncClass_decl.hpp:31
This abstract class defining the general concepts of a mapping between an input and an output....
Definition InputToOutputMappingClass_decl.hpp:36
Definition Matrix_decl.hpp:32
Definition MultiVector_decl.hpp:36
This class represents a templated small Matrix of type T. Primarily created for 2x2 and 3x3 matrices....
Definition SmallMatrix.hpp:22
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement.cpp:5