Finite Element Domain Decomposition Library
FEDDLib
Loading...
Searching...
No Matches
FEDD::AssembleFEGeneralizedNewtonian< SC, LO, GO, NO > Class Template Reference
Inheritance diagram for FEDD::AssembleFEGeneralizedNewtonian< SC, LO, GO, NO >:

Public Types

typedef Matrix< SC, LO, GO, NO > Matrix_Type
 
typedef Teuchos::RCP< Matrix_TypeMatrixPtr_Type
 
typedef SmallMatrix< SC > SmallMatrix_Type
 
typedef Teuchos::RCP< SmallMatrix_TypeSmallMatrixPtr_Type
 
typedef MultiVector< SC, LO, GO, NO > MultiVector_Type
 
typedef Teuchos::RCP< MultiVector_TypeMultiVectorPtr_Type
 
typedef AssembleFE< SC, LO, GO, NO > AssembleFE_Type
 
typedef DifferentiableFuncClass< SC, LO, GO, NO > DifferentiableFuncClass_Type
 
typedef Teuchos::RCP< DifferentiableFuncClass_TypeDifferentiableFuncClassPtr_Type
 
typedef InputToOutputMappingClass< SC, LO, GO, NO > InputToOutputMappingClass_Type
 
typedef Teuchos::RCP< InputToOutputMappingClass_TypeInputToOutputMappingClassPtr_Type
 
- Public Types inherited from FEDD::AssembleFENavierStokes< default_sc, default_lo, default_go, default_no >
typedef Matrix< default_sc, default_lo, default_go, default_no > Matrix_Type
 
typedef Teuchos::RCP< Matrix_TypeMatrixPtr_Type
 
typedef SmallMatrix< default_sc > SmallMatrix_Type
 
typedef Teuchos::RCP< SmallMatrix_TypeSmallMatrixPtr_Type
 
typedef MultiVector< default_sc, default_lo, default_go, default_no > MultiVector_Type
 
typedef Teuchos::RCP< MultiVector_TypeMultiVectorPtr_Type
 
typedef AssembleFE< default_sc, default_lo, default_go, default_no > AssembleFE_Type
 
- Public Types inherited from FEDD::AssembleFE< default_sc, default_lo, default_go, default_no >
typedef SmallMatrix< default_sc > SmallMatrix_Type
 
typedef Teuchos::RCP< SmallMatrix_TypeSmallMatrixPtr_Type
 
typedef AssembleFE< default_sc, default_lo, default_go, default_no > AssembleFE_Type
 

Public Member Functions

void assembleJacobian () override
 Assemble the element Jacobian matrix.
 
void assembleRHS () override
 Assemble the element right hand side vector.
 
void assembleJacobianBlock (LO i)
 Assemble the element Jacobian matrix.
 
void computeLocalconstOutputField () override
 Compute the viscosity for an element depending on the knwon velocity solution.
 
void assembleFixedPoint ()
 
SmallMatrixPtr_Type getFixedPointMatrix ()
 
- Public Member Functions inherited from FEDD::AssembleFENavierStokes< default_sc, default_lo, default_go, default_no >
void assembleJacobian () override
 Assemble the element Jacobian matrix.
 
void assembleRHS () override
 Assemble the element right hand side vector.
 
void assembleJacobianBlock (default_lo i) override
 Assemble the element Jacobian matrix.
 
void setCoeff (SmallMatrix_Type coeff)
 
void assembleFixedPoint ()
 Assembly of FixedPoint- Matrix (System Matrix K with current u)
 
SmallMatrixPtr_Type getFixedPointMatrix ()
 
- Public Member Functions inherited from FEDD::AssembleFE< default_sc, default_lo, default_go, default_no >
SmallMatrixPtr_Type getJacobian ()
 Get the currently assembled element Jacobian matrix.
 
SmallMatrixPtr_Type getJacobianBlock (default_lo i)
 Get the currently assembled element Jacobian matrix.
 
vec_dbl_ptr_Type getRHS ()
 Get the currently assembled right hand side vector.
 
virtual void checkParameters ()
 Check the input parameters from the constructor and the ParameterList for completeness and consistency.
 
virtual void updateParams (ParameterListPtr_Type params)
 Set or update the parameters read from the ParameterList.
 
virtual void updateParameter (std::string type, double value)
 Update the parameter read from the ParameterList.
 
virtual void advanceInTime (double dt)
 This function is called every time the FEDDLib proceeds from one to the next time step. The size of the time step will always be provided as input.
 
double getTimeStep ()
 Get the time state of the object.
 
void advanceNewtonStep ()
 This function is called every time the FEDDLib proceeds from one to the next newton step. The size of the time step will always be provided as input.
 
int getNewtonStep ()
 Get the time state of the object.
 
void updateSolution (vec_dbl_Type solution)
 Update the solution vector.
 
vec_dbl_ptr_Type getSolution ()
 Get the current local solution vector.
 
void preProcessing ()
 This function is called in the beginning of each Newton step before actually assmblying anything.
 
void postProcessing ()
 This function is called at the end of each Newton step after updating the solution vector.
 
int getDim ()
 Get the spatial dimension. (Typically 2 or 3)
 
vec2D_dbl_Type getNodesRefConfig ()
 Return the coordnates of the finite element nodes.
 
void addRHSFunc (RhsFunc_Type rhsFunc)
 
tuple_sd_vec_ptr_Type getTupleElement ()
 Return vector of tupled with element based values. First column per tuple string with description, second column with corresponding value.
 
double getTimeIncrement ()
 Returns the time increment. Required by AceGen implementation.
 
void setGlobalElementID (default_go goID)
 
default_go getGlobalElementID ()
 
vec_dbl_Type getLocalconstOutputField ()
 Obtain value of resulting postprocessing field at nodes/ inside an element.
 

Protected Member Functions

 AssembleFEGeneralizedNewtonian (int flag, vec2D_dbl_Type nodesRefConfig, ParameterListPtr_Type parameters, tuple_disk_vec_ptr_Type tuple)
 Constructor for AssembleFEAceNavierStokes.
 
void assemblyStress (SmallMatrixPtr_Type &elementMatrix)
 Assembly function for shear stress tensor which includes viscosity function $ \int_T \nabla v : (2\eta(\Dot{\gamma}(u))) D(u) ~dx$, which is a highly nonlinear Term.
 
void assemblyStressDev (SmallMatrixPtr_Type &elementMatrix)
 Assembly function for directional derivative contribution of shear stress tensor term (see function for detailed formula)
 
void assemblyOutflowNeumannBoundaryTerm (SmallMatrixPtr_Type &elementMatrix)
 Assembly function for neumann boundary term - If we want to have same outflow boundary condition as for the Newtonian case (Laplace operator) we have to subtract boundary integral term see @article{Pacheco2021, abstract = {The matter of appropriate boundary conditions for open or truncated outflow regions in internal flow is still focus of discussion and research. In most practical applications, one can at best estimate mean pressure values or flow rates at such outlets. In the context of finite element methods, it is known that enforcing mean pressures through the pseudo-tractions arising from the Laplacian Navier-Stokes formulation yields accurate, physically consistent solutions. Nevertheless, when generalised Newtonian fluid models are considered, the resulting non-uniform viscosity fields render the classical Laplacian formulation inadequate. Thus, it is common practice to use the socalled stress-divergence formulation with natural boundary conditions known for causing nonphysical outflow behaviour. In order to overcome such a limitation, this work presents a novel mixed variational formulation that can be seen as a generalisation of the Laplacian Navier-Stokes form to fluids with shear-rate-dependent viscosity, as appearing in hemodynamic and polymeric flows. By appropriately manipulating the viscous terms in the variational formulation and employing a simple projection of the constitutive law, it is possible to devise a formulation with the desired natural boundary conditions and low computational complexity. Several numerical examples are presented to showcase the potential of our method, revealing improved accuracy and robustness in comparison with the state of the art.}, author = {Pacheco, Douglas R Q and Steinbach, Olaf}, doi = {10.51375/ijcvse.2021.1.6}, file = {:home/user/.local/share/data/Mendeley Ltd./Mendeley Desktop/Downloaded/Pacheco, Steinbach - 2021 - On outflow boundary conditions in finite element simulations of non-Newtonian internal flows.pdf:pdf}, journal = {International Journal of Computing and Visualization in Science and Engineering}, mendeley-groups = {DoctoralThesis/Numerical Fluid Dynamics/NonNewtonian/Boundary_Conditions}, number = {April}, title = {{On outflow boundary conditions in finite element simulations of non-Newtonian internal flows}}, year = {2021} }.
 
void assemblyOutflowNeumannBoundaryTermDev (SmallMatrixPtr_Type &elementMatrix)
 Assembly function for directional derivative contribution neumann boundary term.
 
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 shape function.
 
- Protected Member Functions inherited from FEDD::AssembleFENavierStokes< default_sc, default_lo, default_go, default_no >
 AssembleFENavierStokes (int flag, vec2D_dbl_Type nodesRefConfig, ParameterListPtr_Type parameters, tuple_disk_vec_ptr_Type tuple)
 Constructor for AssembleFEAceNavierStokes.
 
void assemblyLaplacian (SmallMatrixPtr_Type &elementMatrix)
 Assembly function for vector values laplacian $ \int_T \nabla v \cdot \nabla u ~dx$.
 
void assemblyAdvection (SmallMatrixPtr_Type &elementMatrix)
 Assembly advection vector field $ \int_T \nabla v \cdot u(\nabla u) ~dx$.
 
void assemblyAdvectionInU (SmallMatrixPtr_Type &elementMatrix)
 Assembly advection vector field in u
TODO: [JK] What is this? Is this the portion that needs to be added for Newton's method? Basically: A+N+W, A:Laplace, N is assemblyAdvection and W is assemblyAdvectionInU?
 
void assemblyDivAndDivT (SmallMatrixPtr_Type &elementMatrix)
 Assembly $ \int_T  div(v) p ~dx$ / $ \int_T  div(u) q ~dx$.
 
void buildTransformation (SmallMatrix< default_sc > &B)
 Building Transformation.
 
void applyBTinv (vec3D_dbl_ptr_Type &dPhiIn, vec3D_dbl_Type &dPhiOut, SmallMatrix< default_sc > &Binv)
 
- Protected Member Functions inherited from FEDD::AssembleFE< default_sc, default_lo, default_go, default_no >
 AssembleFE (int flag, vec2D_dbl_Type nodesRefConfig, ParameterListPtr_Type parameters, tuple_disk_vec_ptr_Type tuple)
 Constructor.
 

Protected Attributes

std::string shearThinningModel
 
int dofsElementViscosity_
 
InputToOutputMappingClassPtr_Type viscosityModel
 
- Protected Attributes inherited from FEDD::AssembleFENavierStokes< default_sc, default_lo, default_go, default_no >
int dofsVelocity_
 
int dofsPressure_
 
std::string FETypeVelocity_
 
std::string FETypePressure_
 
int numNodesVelocity_
 
int numNodesPressure_
 
int dofsElementVelocity_
 
int dofsElementPressure_
 
int dofsElement_
 
vec_dbl_Type solutionVelocity_
 
vec_dbl_Type solutionPressure_
 
SmallMatrixPtr_Type constantMatrix_
 
SmallMatrixPtr_Type ANB_
 
SmallMatrix_Type coeff_
 
double viscosity_
 
double density_
 
std::string linearization_
 
- Protected Attributes inherited from FEDD::AssembleFE< default_sc, default_lo, default_go, default_no >
SmallMatrixPtr_Type jacobian_
 
SmallMatrixPtr_Type jacobianBlock_
 
vec_dbl_ptr_Type rhsVec_
 
RhsFunc_Type rhsFunc_
 
int dim_
 
tuple_disk_vec_ptr_Type diskTuple_
 
tuple_sd_vec_ptr_Type elementIntormation_
 
vec2D_dbl_Type nodesRefConfig_
 
bool timeProblem_
 
int flag_
 
double timeStep_
 
int newtonStep_
 
ParameterListPtr_Type paramsMaterial_
 
ParameterListPtr_Type params_
 
vec_dbl_ptr_Type solution_
 
double timeIncrement_
 
default_go globalElementID_
 
vec_dbl_Type constOutputField_
 

Friends

class AssembleFEFactory< SC, LO, GO, NO >
 

Constructor & Destructor Documentation

◆ AssembleFEGeneralizedNewtonian()

template<class SC, class LO, class GO, class NO>
FEDD::AssembleFEGeneralizedNewtonian< SC, LO, GO, NO >::AssembleFEGeneralizedNewtonian ( int flag,
vec2D_dbl_Type nodesRefConfig,
ParameterListPtr_Type parameters,
tuple_disk_vec_ptr_Type tuple )
protected

Constructor for AssembleFEAceNavierStokes.

Parameters
[in]flagFlag of element
[in]nodesRefConfigNodes of element in reference configuration
[in]paramsParameterlist for current problem
[in]tuplevector of element information tuples.
Here is the call graph for this function:

Member Function Documentation

◆ assembleJacobian()

template<class SC, class LO, class GO, class NO>
void FEDD::AssembleFEGeneralizedNewtonian< SC, LO, GO, NO >::assembleJacobian ( )
overridevirtual

Assemble the element Jacobian matrix.

Implements FEDD::AssembleFE< default_sc, default_lo, default_go, default_no >.

◆ assembleJacobianBlock()

template<class SC = default_sc, class LO = default_lo, class GO = default_go, class NO = default_no>
void FEDD::AssembleFEGeneralizedNewtonian< SC, LO, GO, NO >::assembleJacobianBlock ( LO i)
inlinevirtual

Assemble the element Jacobian matrix.

Parameters
[in]blockID i

Implements FEDD::AssembleFE< default_sc, default_lo, default_go, default_no >.

◆ assembleRHS()

template<class SC, class LO, class GO, class NO>
void FEDD::AssembleFEGeneralizedNewtonian< SC, LO, GO, NO >::assembleRHS ( )
overridevirtual

Assemble the element right hand side vector.

Implements FEDD::AssembleFE< default_sc, default_lo, default_go, default_no >.

Here is the call graph for this function:

◆ assemblyOutflowNeumannBoundaryTerm()

template<class SC = default_sc, class LO = default_lo, class GO = default_go, class NO = default_no>
void FEDD::AssembleFEGeneralizedNewtonian< SC, LO, GO, NO >::assemblyOutflowNeumannBoundaryTerm ( SmallMatrixPtr_Type & elementMatrix)
inlineprotected

Assembly function for neumann boundary term - If we want to have same outflow boundary condition as for the Newtonian case (Laplace operator) we have to subtract boundary integral term see @article{Pacheco2021, abstract = {The matter of appropriate boundary conditions for open or truncated outflow regions in internal flow is still focus of discussion and research. In most practical applications, one can at best estimate mean pressure values or flow rates at such outlets. In the context of finite element methods, it is known that enforcing mean pressures through the pseudo-tractions arising from the Laplacian Navier-Stokes formulation yields accurate, physically consistent solutions. Nevertheless, when generalised Newtonian fluid models are considered, the resulting non-uniform viscosity fields render the classical Laplacian formulation inadequate. Thus, it is common practice to use the socalled stress-divergence formulation with natural boundary conditions known for causing nonphysical outflow behaviour. In order to overcome such a limitation, this work presents a novel mixed variational formulation that can be seen as a generalisation of the Laplacian Navier-Stokes form to fluids with shear-rate-dependent viscosity, as appearing in hemodynamic and polymeric flows. By appropriately manipulating the viscous terms in the variational formulation and employing a simple projection of the constitutive law, it is possible to devise a formulation with the desired natural boundary conditions and low computational complexity. Several numerical examples are presented to showcase the potential of our method, revealing improved accuracy and robustness in comparison with the state of the art.}, author = {Pacheco, Douglas R Q and Steinbach, Olaf}, doi = {10.51375/ijcvse.2021.1.6}, file = {:home/user/.local/share/data/Mendeley Ltd./Mendeley Desktop/Downloaded/Pacheco, Steinbach - 2021 - On outflow boundary conditions in finite element simulations of non-Newtonian internal flows.pdf:pdf}, journal = {International Journal of Computing and Visualization in Science and Engineering}, mendeley-groups = {DoctoralThesis/Numerical Fluid Dynamics/NonNewtonian/Boundary_Conditions}, number = {April}, title = {{On outflow boundary conditions in finite element simulations of non-Newtonian internal flows}}, year = {2021} }.

/*!

Parameters
[in]&elementMatrix

◆ assemblyOutflowNeumannBoundaryTermDev()

template<class SC = default_sc, class LO = default_lo, class GO = default_go, class NO = default_no>
void FEDD::AssembleFEGeneralizedNewtonian< SC, LO, GO, NO >::assemblyOutflowNeumannBoundaryTermDev ( SmallMatrixPtr_Type & elementMatrix)
inlineprotected

Assembly function for directional derivative contribution neumann boundary term.

/*!

Parameters
[in]&elementMatrix

◆ assemblyStress()

template<class SC, class LO, class GO, class NO>
void FEDD::AssembleFEGeneralizedNewtonian< SC, LO, GO, NO >::assemblyStress ( SmallMatrixPtr_Type & elementMatrix)
protected

Assembly function for shear stress tensor which includes viscosity function $ \int_T \nabla v : (2\eta(\Dot{\gamma}(u))) D(u) ~dx$, which is a highly nonlinear Term.

Parameters
[in]&elementMatrix
Here is the call graph for this function:
Here is the caller graph for this function:

◆ assemblyStressDev()

template<class SC, class LO, class GO, class NO>
void FEDD::AssembleFEGeneralizedNewtonian< SC, LO, GO, NO >::assemblyStressDev ( SmallMatrixPtr_Type & elementMatrix)
protected

Assembly function for directional derivative contribution of shear stress tensor term (see function for detailed formula)

Parameters
[in]&elementMatrix
Here is the call graph for this function:

◆ computeLocalconstOutputField()

template<class SC, class LO, class GO, class NO>
void FEDD::AssembleFEGeneralizedNewtonian< SC, LO, GO, NO >::computeLocalconstOutputField ( )
overridevirtual

Compute the viscosity for an element depending on the knwon velocity solution.

Reimplemented from FEDD::AssembleFE< default_sc, default_lo, default_go, default_no >.

Here is the call graph for this function:

◆ computeShearRate()

template<class SC, class LO, class GO, class NO>
void FEDD::AssembleFEGeneralizedNewtonian< SC, LO, GO, NO >::computeShearRate ( vec3D_dbl_Type dPhiTrans,
vec_dbl_ptr_Type & gammaDot,
int dim )
protected

Computation of shear rate using the current velocity solution at the nodes and the derivative of the shape function.

Parameters
[in]dPhiTrans- Derivative of shape function
[in]dim- dimension of the problem
[in,out]gammaDot- shear rate value depending on inputs

Building Transformation

Here is the caller graph for this function:

The documentation for this class was generated from the following files: