KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
List of all members
Kratos::FractionalStepDiscontinuous< TDim > Class Template Reference

A stabilized element for the incompressible Navier-Stokes equations. More...

#include <fractional_step_discontinuous.h>

Inheritance diagram for Kratos::FractionalStepDiscontinuous< TDim >:
Collaboration diagram for Kratos::FractionalStepDiscontinuous< TDim >:

Public Member Functions

Life Cycle
 FractionalStepDiscontinuous (IndexType NewId=0)
 Default constuctor. More...
 
 FractionalStepDiscontinuous (IndexType NewId, const NodesArrayType &ThisNodes)
 Constructor using an array of nodes. More...
 
 FractionalStepDiscontinuous (IndexType NewId, GeometryType::Pointer pGeometry)
 Constructor using a geometry object. More...
 
 FractionalStepDiscontinuous (IndexType NewId, GeometryType::Pointer pGeometry, Element::PropertiesType::Pointer pProperties)
 Constuctor using geometry and properties. More...
 
 ~FractionalStepDiscontinuous () override
 Destructor. More...
 
Operators

Calculate the element's local contribution to the system for the current step. this function is essentially identical to the one of the father element, to which it only adds a term in the momentum equation to allow imposing weakly the tangential component of the velocity on the cut elements

void CalculateLocalSystem (MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
 Calculate the element's local contribution to the system for the current step. More...
 
Operations
Element::Pointer Create (IndexType NewId, NodesArrayType const &ThisNodes, Element::PropertiesType::Pointer pProperties) const override
 Create a new element of this type. More...
 
Element::Pointer Create (IndexType NewId, Element::GeometryType::Pointer pGeom, Element::PropertiesType::Pointer pProperties) const override
 
Elemental Data
void Calculate (const Variable< double > &rVariable, double &rOutput, const ProcessInfo &rCurrentProcessInfo) override
 Checks the input and that all required Kratos variables have been registered. More...
 
void Calculate (const Variable< array_1d< double, 3 > > &rVariable, array_1d< double, 3 > &rOutput, const ProcessInfo &rCurrentProcessInfo) override
 
Input and output
std::string Info () const override
 Turn back information as a string. More...
 
void PrintInfo (std::ostream &rOStream) const override
 Print information about this object. More...
 
- Public Member Functions inherited from Kratos::FractionalStep< TDim >
 FractionalStep (IndexType NewId=0)
 Default constuctor. More...
 
 FractionalStep (IndexType NewId, const NodesArrayType &ThisNodes)
 Constructor using an array of nodes. More...
 
 FractionalStep (IndexType NewId, GeometryType::Pointer pGeometry)
 Constructor using a geometry object. More...
 
 FractionalStep (IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
 Constuctor using geometry and properties. More...
 
 ~FractionalStep () override
 Destructor. More...
 
Element::Pointer Create (IndexType NewId, NodesArrayType const &ThisNodes, Element::PropertiesType::Pointer pProperties) const override
 Create a new element of this type. More...
 
Element::Pointer Create (IndexType NewId, Element::GeometryType::Pointer pGeom, Element::PropertiesType::Pointer pProperties) const override
 
Element::Pointer Clone (IndexType NewId, NodesArrayType const &rThisNodes) const override
 
void Initialize (const ProcessInfo &rCurrentProcessInfo) override
 
void InitializeSolutionStep (const ProcessInfo &rCurrentProcessInfo) override
 Initializes the element and all geometric information required for the problem. More...
 
void InitializeNonLinearIteration (const ProcessInfo &rCurrentProcessInfo) override
 
void CalculateLeftHandSide (MatrixType &rLeftHandSideMatrix, const ProcessInfo &rCurrentProcessInfo) override
 
void CalculateRightHandSide (VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
 
void EquationIdVector (EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const override
 Provides the global indices for each one of this element's local rows. More...
 
void GetDofList (DofsVectorType &rElementalDofList, const ProcessInfo &rCurrentProcessInfo) const override
 Returns a list of the element's Dofs. More...
 
GeometryData::IntegrationMethod GetIntegrationMethod () const override
 
void CalculateOnIntegrationPoints (const Variable< array_1d< double, 3 > > &rVariable, std::vector< array_1d< double, 3 > > &rValues, const ProcessInfo &rCurrentProcessInfo) override
 Obtain an array_1d<double,3> elemental variable, evaluated on gauss points. More...
 
void CalculateOnIntegrationPoints (const Variable< double > &rVariable, std::vector< double > &rValues, const ProcessInfo &rCurrentProcessInfo) override
 Obtain a double elemental variable, evaluated on gauss points. More...
 
void CalculateOnIntegrationPoints (const Variable< array_1d< double, 6 > > &rVariable, std::vector< array_1d< double, 6 > > &rValues, const ProcessInfo &rCurrentProcessInfo) override
 Obtain an array_1d<double,6> elemental variable, evaluated on gauss points. More...
 
void CalculateOnIntegrationPoints (const Variable< Vector > &rVariable, std::vector< Vector > &rValues, const ProcessInfo &rCurrentProcessInfo) override
 Obtain a Vector elemental variable, evaluated on gauss points. More...
 
void CalculateOnIntegrationPoints (const Variable< Matrix > &rVariable, std::vector< Matrix > &rValues, const ProcessInfo &rCurrentProcessInfo) override
 Obtain a Matrix elemental variable, evaluated on gauss points. More...
 
int Check (const ProcessInfo &rCurrentProcessInfo) const override
 Checks the input and that all required Kratos variables have been registered. More...
 
const Parameters GetSpecifications () const override
 This method provides the specifications/requirements of the element. More...
 
 KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION (FractionalStep)
 Pointer definition of FractionalStep. More...
 
- Public Member Functions inherited from Kratos::Element
 Element (IndexType NewId=0)
 
 Element (IndexType NewId, const NodesArrayType &ThisNodes)
 
 Element (IndexType NewId, GeometryType::Pointer pGeometry)
 
 Element (IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
 
 Element (Element const &rOther)
 Copy constructor. More...
 
 ~Element () override
 Destructor. More...
 
Elementoperator= (Element const &rOther)
 Assignment operator. More...
 
virtual Pointer Create (IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const
 It creates a new element pointer. More...
 
virtual Pointer Create (IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties) const
 It creates a new element pointer. More...
 
virtual void GetValuesVector (Vector &values, int Step=0) const
 
virtual void GetFirstDerivativesVector (Vector &values, int Step=0) const
 
virtual void GetSecondDerivativesVector (Vector &values, int Step=0) const
 
virtual void ResetConstitutiveLaw ()
 
virtual void FinalizeNonLinearIteration (const ProcessInfo &rCurrentProcessInfo)
 
virtual void FinalizeSolutionStep (const ProcessInfo &rCurrentProcessInfo)
 
virtual void CalculateFirstDerivativesContributions (MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo)
 
virtual void CalculateFirstDerivativesLHS (MatrixType &rLeftHandSideMatrix, const ProcessInfo &rCurrentProcessInfo)
 
virtual void CalculateFirstDerivativesRHS (VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo)
 
virtual void CalculateSecondDerivativesContributions (MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo)
 
virtual void CalculateSecondDerivativesLHS (MatrixType &rLeftHandSideMatrix, const ProcessInfo &rCurrentProcessInfo)
 
virtual void CalculateSecondDerivativesRHS (VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo)
 
virtual void CalculateMassMatrix (MatrixType &rMassMatrix, const ProcessInfo &rCurrentProcessInfo)
 
virtual void CalculateDampingMatrix (MatrixType &rDampingMatrix, const ProcessInfo &rCurrentProcessInfo)
 
virtual void CalculateLumpedMassVector (VectorType &rLumpedMassVector, const ProcessInfo &rCurrentProcessInfo) const
 
virtual void AddExplicitContribution (const ProcessInfo &rCurrentProcessInfo)
 
virtual void AddExplicitContribution (const VectorType &rRHSVector, const Variable< VectorType > &rRHSVariable, const Variable< double > &rDestinationVariable, const ProcessInfo &rCurrentProcessInfo)
 This function is designed to make the element to assemble an rRHS vector identified by a variable rRHSVariable by assembling it to the nodes on the variable rDestinationVariable. (This is the double version) More...
 
virtual void AddExplicitContribution (const VectorType &rRHSVector, const Variable< VectorType > &rRHSVariable, const Variable< array_1d< double, 3 > > &rDestinationVariable, const ProcessInfo &rCurrentProcessInfo)
 This function is designed to make the element to assemble an rRHS vector identified by a variable rRHSVariable by assembling it to the nodes on the variable rDestinationVariable. (This is the vector version) More...
 
virtual void AddExplicitContribution (const MatrixType &rLHSMatrix, const Variable< MatrixType > &rLHSVariable, const Variable< Matrix > &rDestinationVariable, const ProcessInfo &rCurrentProcessInfo)
 This function is designed to make the element to assemble an rRHS vector identified by a variable rRHSVariable by assembling it to the nodes on the variable rDestinationVariable. (This is the matrix version) More...
 
virtual void Calculate (const Variable< Vector > &rVariable, Vector &Output, const ProcessInfo &rCurrentProcessInfo)
 
virtual void Calculate (const Variable< Matrix > &rVariable, Matrix &Output, const ProcessInfo &rCurrentProcessInfo)
 
virtual void CalculateOnIntegrationPoints (const Variable< bool > &rVariable, std::vector< bool > &rOutput, const ProcessInfo &rCurrentProcessInfo)
 
virtual void CalculateOnIntegrationPoints (const Variable< int > &rVariable, std::vector< int > &rOutput, const ProcessInfo &rCurrentProcessInfo)
 
virtual void CalculateOnIntegrationPoints (const Variable< array_1d< double, 3 >> &rVariable, std::vector< array_1d< double, 3 >> &rOutput, const ProcessInfo &rCurrentProcessInfo)
 
virtual void CalculateOnIntegrationPoints (const Variable< array_1d< double, 4 >> &rVariable, std::vector< array_1d< double, 4 >> &rOutput, const ProcessInfo &rCurrentProcessInfo)
 
virtual void CalculateOnIntegrationPoints (const Variable< array_1d< double, 6 >> &rVariable, std::vector< array_1d< double, 6 >> &rOutput, const ProcessInfo &rCurrentProcessInfo)
 
virtual void CalculateOnIntegrationPoints (const Variable< array_1d< double, 9 >> &rVariable, std::vector< array_1d< double, 9 >> &rOutput, const ProcessInfo &rCurrentProcessInfo)
 
virtual void CalculateOnIntegrationPoints (const Variable< ConstitutiveLaw::Pointer > &rVariable, std::vector< ConstitutiveLaw::Pointer > &rOutput, const ProcessInfo &rCurrentProcessInfo)
 
virtual void SetValuesOnIntegrationPoints (const Variable< bool > &rVariable, const std::vector< bool > &rValues, const ProcessInfo &rCurrentProcessInfo)
 
virtual void SetValuesOnIntegrationPoints (const Variable< int > &rVariable, const std::vector< int > &rValues, const ProcessInfo &rCurrentProcessInfo)
 
virtual void SetValuesOnIntegrationPoints (const Variable< double > &rVariable, const std::vector< double > &rValues, const ProcessInfo &rCurrentProcessInfo)
 
virtual void SetValuesOnIntegrationPoints (const Variable< array_1d< double, 3 >> &rVariable, const std::vector< array_1d< double, 3 >> &rValues, const ProcessInfo &rCurrentProcessInfo)
 
virtual void SetValuesOnIntegrationPoints (const Variable< array_1d< double, 4 >> &rVariable, const std::vector< array_1d< double, 4 >> &rValues, const ProcessInfo &rCurrentProcessInfo)
 
virtual void SetValuesOnIntegrationPoints (const Variable< array_1d< double, 6 >> &rVariable, const std::vector< array_1d< double, 6 >> &rValues, const ProcessInfo &rCurrentProcessInfo)
 
virtual void SetValuesOnIntegrationPoints (const Variable< array_1d< double, 9 >> &rVariable, const std::vector< array_1d< double, 9 >> &rValues, const ProcessInfo &rCurrentProcessInfo)
 
virtual void SetValuesOnIntegrationPoints (const Variable< Vector > &rVariable, const std::vector< Vector > &rValues, const ProcessInfo &rCurrentProcessInfo)
 
virtual void SetValuesOnIntegrationPoints (const Variable< Matrix > &rVariable, const std::vector< Matrix > &rValues, const ProcessInfo &rCurrentProcessInfo)
 
virtual void SetValuesOnIntegrationPoints (const Variable< ConstitutiveLaw::Pointer > &rVariable, const std::vector< ConstitutiveLaw::Pointer > &rValues, const ProcessInfo &rCurrentProcessInfo)
 
virtual void MassMatrix (MatrixType &rMassMatrix, const ProcessInfo &rCurrentProcessInfo)
 
virtual void AddMassMatrix (MatrixType &rLeftHandSideMatrix, double coeff, const ProcessInfo &rCurrentProcessInfo)
 
virtual void DampMatrix (MatrixType &rDampMatrix, const ProcessInfo &rCurrentProcessInfo)
 
virtual void AddInertiaForces (VectorType &rRightHandSideVector, double coeff, const ProcessInfo &rCurrentProcessInfo)
 
virtual void CalculateLocalVelocityContribution (MatrixType &rDampingMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo)
 
virtual void CalculateSensitivityMatrix (const Variable< double > &rDesignVariable, Matrix &rOutput, const ProcessInfo &rCurrentProcessInfo)
 
virtual void CalculateSensitivityMatrix (const Variable< array_1d< double, 3 > > &rDesignVariable, Matrix &rOutput, const ProcessInfo &rCurrentProcessInfo)
 
PropertiesType::Pointer pGetProperties ()
 returns the pointer to the property of the element. Does not throw an error, to allow copying of elements which don't have any property assigned. More...
 
const PropertiesType::Pointer pGetProperties () const
 
PropertiesTypeGetProperties ()
 
PropertiesType const & GetProperties () const
 
void SetProperties (PropertiesType::Pointer pProperties)
 
bool HasProperties () const
 Check that the Element has a correctly initialized pointer to a Properties instance. More...
 
void PrintData (std::ostream &rOStream) const override
 Print object's data. More...
 
 KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION (Element)
 
- Public Member Functions inherited from Kratos::GeometricalObject
 GeometricalObject (IndexType NewId=0)
 Default constructor. More...
 
 GeometricalObject (IndexType NewId, GeometryType::Pointer pGeometry)
 Default constructor. More...
 
 ~GeometricalObject () override
 Destructor. More...
 
 GeometricalObject (GeometricalObject const &rOther)
 Copy constructor. More...
 
GeometricalObjectoperator= (GeometricalObject const &rOther)
 Assignment operator. More...
 
virtual void SetGeometry (GeometryType::Pointer pGeometry)
 Sets the pointer to the geometry. More...
 
GeometryType::Pointer pGetGeometry ()
 Returns the pointer to the geometry. More...
 
const GeometryType::Pointer pGetGeometry () const
 Returns the pointer to the geometry (const version) More...
 
GeometryTypeGetGeometry ()
 Returns the reference of the geometry. More...
 
GeometryType const & GetGeometry () const
 Returns the reference of the geometry (const version) More...
 
FlagsGetFlags ()
 Returns the flags of the object. More...
 
Flags const & GetFlags () const
 Returns the flags of the object (const version) More...
 
void SetFlags (Flags const &rThisFlags)
 Sets the flags of the object. More...
 
DataValueContainerData ()
 
DataValueContainerGetData ()
 
DataValueContainer const & GetData () const
 
void SetData (DataValueContainer const &rThisData)
 
template<class TDataType >
bool Has (const Variable< TDataType > &rThisVariable) const
 
template<class TVariableType >
void SetValue (const TVariableType &rThisVariable, typename TVariableType::Type const &rValue)
 
template<class TVariableType >
TVariableType::Type & GetValue (const TVariableType &rThisVariable)
 
template<class TVariableType >
TVariableType::Type const & GetValue (const TVariableType &rThisVariable) const
 
void PrintData (std::ostream &rOStream) const override
 Print object's data. More...
 
unsigned int use_count () const noexcept
 
 KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION (GeometricalObject)
 Pointer definition of GeometricalObject. More...
 
bool IsActive () const
 Checks if the GeometricalObject is active. More...
 
- Public Member Functions inherited from Kratos::IndexedObject
 IndexedObject (IndexType NewId=0)
 Default constructor. More...
 
virtual ~IndexedObject ()
 Destructor. More...
 
 IndexedObject (IndexedObject const &rOther)
 Copy constructor. More...
 
IndexedObjectoperator= (IndexedObject const &rOther)
 Assignment operator. More...
 
template<class TObjectType >
IndexType operator() (TObjectType const &rThisObject) const
 
IndexType Id () const
 
IndexType GetId () const
 
virtual void SetId (IndexType NewId)
 
IndexTypeDepricatedIdAccess ()
 TODO: remove this function when removing data_file_io object. More...
 
 KRATOS_CLASS_POINTER_DEFINITION (IndexedObject)
 Pointer definition of IndexedObject. More...
 
- Public Member Functions inherited from Kratos::Flags
Flagsoperator= (Flags const &rOther)
 Assignment operator. More...
 
 operator bool () const
 
Flags operator~ () const
 
bool operator! () const
 
void AssignFlags (Flags const &rOther)
 
void Set (const Flags ThisFlag)
 
void Set (const Flags ThisFlag, bool Value)
 
void Reset (const Flags ThisFlag)
 
void Flip (const Flags ThisFlag)
 
void SetPosition (IndexType Position, bool Value=true)
 
bool GetPosition (IndexType Position) const
 
void FlipPosition (IndexType Position)
 
void ClearPosition (IndexType Position)
 
void Clear ()
 
Flags AsFalse () const
 
bool Is (Flags const &rOther) const
 
bool IsDefined (Flags const &rOther) const
 
bool IsNot (Flags const &rOther) const
 
bool IsNotDefined (Flags const &rOther) const
 
 KRATOS_CLASS_POINTER_DEFINITION (Flags)
 Pointer definition of Flags. More...
 
const Flagsoperator|= (const Flags &Other)
 
const Flagsoperator&= (const Flags &Other)
 
 Flags ()
 Default constructor. More...
 
 Flags (Flags const &rOther)
 Copy constructor. More...
 
virtual ~Flags ()
 Destructor. More...
 

Protected Member Functions

Protected Operators
void CalculateLocalPressureSystem (MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
 
void AddMomentumSystemTerms (Matrix &rLHSMatrix, Vector &rRHSVector, const double Density, const Vector &rConvOperator, const array_1d< double, 3 > &rBodyForce, const double OldPressure, const double TauOne, const double TauTwo, const array_1d< double, 3 > &rMomentumProjection, const double MassProjection, const ShapeFunctionsType &rN, const ShapeFunctionDerivativesType &rDN_DX, const double Weight) override
 
Protected Operations
void CalculateGeometryData (ShapeFunctionDerivativesArrayType &rDN_DX, Matrix &rNContainer, Vector &rGaussWeights) override
 Determine integration point weights and shape funcition derivatives from the element's geometry. More...
 
- Protected Member Functions inherited from Kratos::FractionalStep< TDim >
void VelocityEquationIdVector (EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const
 
void VelocityEquationIdVector (EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const
 
void GetVelocityDofList (DofsVectorType &rElementalDofList, const ProcessInfo &rCurrentProcessInfo) const
 
void GetVelocityDofList (DofsVectorType &rElementalDofList, const ProcessInfo &rCurrentProcessInfo) const
 
void GetVelocityValues (Vector &rValues, const int Step) const
 
void GetVelocityValues (Vector &rValues, const int Step) const
 
void AddViscousTerm (MatrixType &rDampingMatrix, const ShapeFunctionDerivativesType &rShapeDeriv, const double Weight)
 
void AddViscousTerm (MatrixType &rDampingMatrix, const ShapeFunctionDerivativesType &rShapeDeriv, const double Weight)
 
virtual void CalculateLocalFractionalVelocitySystem (MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo)
 
void CalculateEndOfStepSystem (MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo)
 
void VelocityEquationIdVector (EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const
 
void PressureEquationIdVector (EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const
 
void GetVelocityDofList (DofsVectorType &rElementalDofList, const ProcessInfo &rCurrentProcessInfo) const
 
void GetPressureDofList (DofsVectorType &rElementalDofList, const ProcessInfo &rCurrentProcessInfo) const
 
void GetPressureValues (Vector &rValues, const int Step=0) const
 
void GetVelocityValues (Vector &rValues, const int Step=0) const
 
double ElementSize ()
 
virtual double EffectiveViscosity (double Density, const ShapeFunctionsType &rN, const ShapeFunctionDerivativesType &rDN_DX, double ElemSize, const ProcessInfo &rProcessInfo)
 EffectiveViscosity Calculate the viscosity at given integration point, using Smagorinsky if enabled. More...
 
double EquivalentStrainRate (const ShapeFunctionDerivativesType &rDN_DX) const
 EquivalentStrainRate Calculate the second invariant of the strain rate tensor GammaDot = (2SijSij)^0.5. More...
 
void AddMomentumMassTerm (Matrix &rMassMatrix, const ShapeFunctionsType &rN, const double Weight)
 Add integration point contribution to the mass matrix. More...
 
void AddViscousTerm (MatrixType &rDampingMatrix, const ShapeFunctionDerivativesType &rShapeDeriv, const double Weight)
 
virtual void CalculateTau (double &TauOne, double &TauTwo, double ElemSize, const array_1d< double, 3 > &rAdvVel, const double Density, const double Viscosity, const ProcessInfo &rCurrentProcessInfo)
 Calculate Stabilization parameters. More...
 
virtual void CalculateProjectionRHS (VectorType &rMomentumRHS, VectorType &rMassRHS, const ShapeFunctionsType &rN, const ShapeFunctionDerivativesType &rDN_DX, const double Weight)
 
virtual void CalculateProjectionRHS (VectorType &rConvTerm, VectorType &rPresTerm, VectorType &rDivTerm, const ShapeFunctionsType &rN, const ShapeFunctionDerivativesType &rDN_DX, const double Weight)
 
void ModulatedGradientDiffusion (MatrixType &rDampingMatrix, const ShapeFunctionDerivativesType &rDN_DX, const double Weight)
 
void ConvectionOperator (Vector &rResult, const array_1d< double, 3 > &rConvVel, const ShapeFunctionDerivativesType &DN_DX)
 Write the convective operator evaluated at this point (for each nodal funciton) to an array. More...
 
virtual void EvaluateConvVelocity (array_1d< double, 3 > &rConvVel, const ShapeFunctionsType &N)
 Evaluate ALE convective velocity (velocity-mesh velocity) at a given point. More...
 
template<class TVariableType >
void EvaluateInPoint (TVariableType &rResult, const Kratos::Variable< TVariableType > &Var, const ShapeFunctionsType &rShapeFunc)
 Write the value of a variable at a point inside the element to a double. More...
 
template<class TVariableType >
void EvaluateInPoint (TVariableType &rResult, const Kratos::Variable< TVariableType > &Var, const ShapeFunctionsType &rShapeFunc, const IndexType Step)
 Write the value of a variable at a point inside the element to a double. More...
 
void EvaluateGradientInPoint (array_1d< double, TDim > &rResult, const Kratos::Variable< double > &Var, const ShapeFunctionDerivativesType &rDN_DX)
 
void EvaluateDivergenceInPoint (double &rResult, const Kratos::Variable< array_1d< double, 3 > > &Var, const ShapeFunctionDerivativesType &rDN_DX)
 
template<class TValueType >
void GetElementalValueForOutput (const Kratos::Variable< TValueType > &rVariable, std::vector< TValueType > &rOutput)
 Helper function to print results on gauss points. More...
 

Protected Attributes

Protected member Variables
array_1d< double,(TDim-1) *3 > medge_areas
 

Type Definitions

typedef Node NodeType
 Node type (default is: Node) More...
 
typedef Geometry< NodeTypeGeometryType
 Geometry type (using with given NodeType) More...
 
typedef Geometry< NodeType >::PointsArrayType NodesArrayType
 Definition of nodes container type, redefined from GeometryType. More...
 
typedef Vector VectorType
 Vector type for local contributions to the linear system. More...
 
typedef Matrix MatrixType
 Matrix type for local contributions to the linear system. More...
 
typedef std::size_t IndexType
 
typedef std::size_t SizeType
 
typedef std::vector< std::size_t > EquationIdVectorType
 
typedef std::vector< Dof< double >::Pointer > DofsVectorType
 
typedef PointerVectorSet< Dof< double >, IndexedObjectDofsArrayType
 
typedef Kratos::Vector ShapeFunctionsType
 Type for shape function values container. More...
 
typedef Kratos::Matrix ShapeFunctionDerivativesType
 Type for a matrix containing the shape function gradients. More...
 
typedef GeometryType::ShapeFunctionsGradientsType ShapeFunctionDerivativesArrayType
 Type for an array of shape function gradient matrices. More...
 
 KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION (FractionalStepDiscontinuous)
 Pointer definition of FractionalStepDiscontinuous. More...
 

Serialization

class Serializer
 

Additional Inherited Members

- Public Types inherited from Kratos::FractionalStep< TDim >
typedef Node NodeType
 Node type (default is: Node) More...
 
typedef Geometry< NodeTypeGeometryType
 Geometry type (using with given NodeType) More...
 
typedef Geometry< NodeType >::PointsArrayType NodesArrayType
 Definition of nodes container type, redefined from GeometryType. More...
 
typedef Vector VectorType
 Vector type for local contributions to the linear system. More...
 
typedef Matrix MatrixType
 Matrix type for local contributions to the linear system. More...
 
typedef std::size_t IndexType
 
typedef std::size_t SizeType
 
typedef std::vector< std::size_t > EquationIdVectorType
 
typedef std::vector< Dof< double >::Pointer > DofsVectorType
 
typedef PointerVectorSet< Dof< double >, IndexedObjectDofsArrayType
 
typedef Kratos::Vector ShapeFunctionsType
 Type for shape function values container. More...
 
typedef Kratos::Matrix ShapeFunctionDerivativesType
 Type for a matrix containing the shape function gradients. More...
 
typedef GeometryType::ShapeFunctionsGradientsType ShapeFunctionDerivativesArrayType
 Type for an array of shape function gradient matrices. More...
 
- Public Types inherited from Kratos::Element
typedef Element ElementType
 definition of element type More...
 
typedef GeometricalObject BaseType
 base type: an GeometricalObject that automatically has a unique number More...
 
typedef Node NodeType
 definition of node type (default is: Node) More...
 
typedef Properties PropertiesType
 
typedef Geometry< NodeTypeGeometryType
 definition of the geometry type with given NodeType More...
 
typedef Geometry< NodeType >::PointsArrayType NodesArrayType
 definition of nodes container type, redefined from GeometryType More...
 
typedef Vector VectorType
 
typedef Matrix MatrixType
 
typedef std::size_t IndexType
 
typedef std::size_t SizeType
 
typedef Dof< doubleDofType
 
typedef std::vector< std::size_t > EquationIdVectorType
 
typedef std::vector< DofType::PointerDofsVectorType
 
typedef PointerVectorSet< DofTypeDofsArrayType
 
typedef GeometryData::IntegrationMethod IntegrationMethod
 Type definition for integration methods. More...
 
typedef GeometryData GeometryDataType
 
- Public Types inherited from Kratos::GeometricalObject
typedef Node NodeType
 Definition of the node type. More...
 
typedef Geometry< NodeTypeGeometryType
 The geometry type definition. More...
 
typedef std::size_t IndexType
 Defines the index type. More...
 
typedef std::size_t result_type
 Defines the result type. More...
 
- Public Types inherited from Kratos::IndexedObject
typedef std::size_t IndexType
 The definition of the index type. More...
 
typedef std::size_t result_type
 The definition of the result_type. More...
 
- Public Types inherited from Kratos::Flags
enum  FlagsList {
  Flag0 = BlockType(1) , Flag1 = BlockType(1) << 1 , Flag2 = BlockType(1) << 2 , Flag3 = BlockType(1) << 3 ,
  Flag4 = BlockType(1) << 4 , Flag5 = BlockType(1) << 5 , Flag6 = BlockType(1) << 6 , Flag7 = BlockType(1) << 7 ,
  Flag8 = BlockType(1) << 8 , Flag9 = BlockType(1) << 9 , Flag10 = BlockType(1) << 10 , Flag11 = BlockType(1) << 11 ,
  Flag12 = BlockType(1) << 12 , Flag13 = BlockType(1) << 13 , Flag14 = BlockType(1) << 14 , Flag15 = BlockType(1) << 15 ,
  Flag16 = BlockType(1) << 16 , Flag17 = BlockType(1) << 17 , Flag18 = BlockType(1) << 18 , Flag19 = BlockType(1) << 19 ,
  Flag20 = BlockType(1) << 20 , Flag21 = BlockType(1) << 21 , Flag22 = BlockType(1) << 22 , Flag23 = BlockType(1) << 23 ,
  Flag24 = BlockType(1) << 24 , Flag25 = BlockType(1) << 25 , Flag26 = BlockType(1) << 26 , Flag27 = BlockType(1) << 27 ,
  Flag28 = BlockType(1) << 28 , Flag29 = BlockType(1) << 29 , Flag30 = BlockType(1) << 30
}
 
typedef int64_t BlockType
 
typedef int64_t FlagType
 
typedef std::size_t IndexType
 
- Static Public Member Functions inherited from Kratos::GeometricalObject
static bool HasSameType (const GeometricalObject &rLHS, const GeometricalObject &rRHS)
 Checks if two GeometricalObject have the same type. More...
 
static bool HasSameType (const GeometricalObject *rLHS, const GeometricalObject *rRHS)
 Checks if two GeometricalObject have the same type (pointer version) More...
 
static bool HasSameGeometryType (const GeometricalObject &rLHS, const GeometricalObject &rRHS)
 Checks if two GeometricalObject have the same geometry type. More...
 
static bool HasSameGeometryType (const GeometricalObject *rLHS, const GeometricalObject *rRHS)
 Checks if two GeometricalObject have the same geometry type (pointer version) More...
 
static bool IsSame (const GeometricalObject &rLHS, const GeometricalObject &rRHS)
 Checks if two GeometricalObject are the same. More...
 
static bool IsSame (const GeometricalObject *rLHS, const GeometricalObject *rRHS)
 Checks if two GeometricalObject are the same (pointer version) More...
 
- Static Public Member Functions inherited from Kratos::Flags
static const Flags AllDefined ()
 
static const Flags AllTrue ()
 
static Flags Create (IndexType ThisPosition, bool Value=true)
 

Detailed Description

template<unsigned int TDim>
class Kratos::FractionalStepDiscontinuous< TDim >

A stabilized element for the incompressible Navier-Stokes equations.

Member Typedef Documentation

◆ DofsArrayType

◆ DofsVectorType

template<unsigned int TDim>
typedef std::vector< Dof<double>::Pointer > Kratos::FractionalStepDiscontinuous< TDim >::DofsVectorType

◆ EquationIdVectorType

template<unsigned int TDim>
typedef std::vector<std::size_t> Kratos::FractionalStepDiscontinuous< TDim >::EquationIdVectorType

◆ GeometryType

template<unsigned int TDim>
typedef Geometry<NodeType> Kratos::FractionalStepDiscontinuous< TDim >::GeometryType

Geometry type (using with given NodeType)

◆ IndexType

template<unsigned int TDim>
typedef std::size_t Kratos::FractionalStepDiscontinuous< TDim >::IndexType

◆ MatrixType

template<unsigned int TDim>
typedef Matrix Kratos::FractionalStepDiscontinuous< TDim >::MatrixType

Matrix type for local contributions to the linear system.

◆ NodesArrayType

Definition of nodes container type, redefined from GeometryType.

◆ NodeType

template<unsigned int TDim>
typedef Node Kratos::FractionalStepDiscontinuous< TDim >::NodeType

Node type (default is: Node)

◆ ShapeFunctionDerivativesArrayType

Type for an array of shape function gradient matrices.

◆ ShapeFunctionDerivativesType

Type for a matrix containing the shape function gradients.

◆ ShapeFunctionsType

template<unsigned int TDim>
typedef Kratos::Vector Kratos::FractionalStepDiscontinuous< TDim >::ShapeFunctionsType

Type for shape function values container.

◆ SizeType

template<unsigned int TDim>
typedef std::size_t Kratos::FractionalStepDiscontinuous< TDim >::SizeType

◆ VectorType

template<unsigned int TDim>
typedef Vector Kratos::FractionalStepDiscontinuous< TDim >::VectorType

Vector type for local contributions to the linear system.

Constructor & Destructor Documentation

◆ FractionalStepDiscontinuous() [1/4]

template<unsigned int TDim>
Kratos::FractionalStepDiscontinuous< TDim >::FractionalStepDiscontinuous ( IndexType  NewId = 0)
inline

Default constuctor.

Parameters
NewIdIndex number of the new element (optional)

◆ FractionalStepDiscontinuous() [2/4]

template<unsigned int TDim>
Kratos::FractionalStepDiscontinuous< TDim >::FractionalStepDiscontinuous ( IndexType  NewId,
const NodesArrayType ThisNodes 
)
inline

Constructor using an array of nodes.

Parameters
NewIdIndex of the new element
ThisNodesAn array containing the nodes of the new element

◆ FractionalStepDiscontinuous() [3/4]

template<unsigned int TDim>
Kratos::FractionalStepDiscontinuous< TDim >::FractionalStepDiscontinuous ( IndexType  NewId,
GeometryType::Pointer  pGeometry 
)
inline

Constructor using a geometry object.

Parameters
NewIdIndex of the new element
pGeometryPointer to a geometry object

◆ FractionalStepDiscontinuous() [4/4]

template<unsigned int TDim>
Kratos::FractionalStepDiscontinuous< TDim >::FractionalStepDiscontinuous ( IndexType  NewId,
GeometryType::Pointer  pGeometry,
Element::PropertiesType::Pointer  pProperties 
)
inline

Constuctor using geometry and properties.

Parameters
NewIdIndex of the new element
pGeometryPointer to a geometry object
pPropertiesPointer to the element's properties

◆ ~FractionalStepDiscontinuous()

template<unsigned int TDim>
Kratos::FractionalStepDiscontinuous< TDim >::~FractionalStepDiscontinuous ( )
inlineoverride

Destructor.

Member Function Documentation

◆ AddMomentumSystemTerms()

template<unsigned int TDim>
void Kratos::FractionalStepDiscontinuous< TDim >::AddMomentumSystemTerms ( Matrix rLHSMatrix,
Vector rRHSVector,
const double  Density,
const Vector rConvOperator,
const array_1d< double, 3 > &  rBodyForce,
const double  OldPressure,
const double  TauOne,
const double  TauTwo,
const array_1d< double, 3 > &  rMomentumProjection,
const double  MassProjection,
const ShapeFunctionsType rN,
const ShapeFunctionDerivativesType rDN_DX,
const double  Weight 
)
overrideprotectedvirtual

The FractionalStepDiscontinuous element is designed to allow including embedded objects in the computations. The element employes discontinuous shape functions as described by Ausas [.....]. This allows considering an independent flow field on the two sides of the element. The practical problem is however that by construction the normal gradient (with respect to the embedded surface) of the finite element variable is ZERO.

The position and direction of the discontinuity is obtained by reading the value

 const Vector& distances = this->GetValue(ELEMENTAL_DISTANCES);

which defines a level set function at element level. Note that this function is allowed to be discontinuous from one element to the next.

cut elements are identified by the boolean variable "SPLIT_ELEMENT" as

 bool split_element = this->GetValue(SPLIT_ELEMENT);

which has to be set to "true" in order for the embedded obstacle to be considered. ELEMENTAL_DISTANCES will NOT be read unless SPLIT_ELEMENT is set to "true"

normal velocity at the cut surface is imposed weakly while solving the pressure system. tangential velocity is also imposed weakly in solving the momentum equation. Please note that since the normal gradient of velocity is zero, the imposition of the tangential component of the velocity can be understood as a numerical wall law. In both cases the value of the velocity to be imposed is given in the elemental variable EMBEDDED_VELOCITY and can be fetched as

    const array_1d<double,3>& vel = this->GetValue(EMBEDDED_VELOCITY);

Note that the element assumes ASSIGNED the variables ELEMENTAL_DISTANCES, SPLIT_ELEMENT, EMBEDDED_VELOCITY hence this assignment has to be done by the user (automatic tools are available) prior to the computational loop Note also that if the element is to be used only for a one-sided flow, the flow variables shall be fixed ( by the user, not by this element) in the area to be deactivated.

As a final comment, the element allows as a feature to ease FSI coupling with lightweight structure: if an estimate of the structural mass PER UNIT AREA is available, this data will be used in the computation of the pressure. This follows the ideas in [.....] and allows avoiding added-mass effects. The estimate of the structural mass can be given as:

another feature of the element is the capability of adding a mass-like matrix epsilon*1/nu*Mass to the pressure equation this is useful for cases in which there may be domains without any Neumann condition, where the pressure would be otherwise undefined. the value of the coefficient epsilon (which should be a very small number in the range 1e-6-1e-15) is controlled by epsilon = rCurrentProcessInfo[PRESSURE_MASSMATRIX_COEFFICIENT]

Reimplemented from Kratos::FractionalStep< TDim >.

◆ Calculate() [1/2]

template<unsigned int TDim>
void Kratos::FractionalStepDiscontinuous< TDim >::Calculate ( const Variable< array_1d< double, 3 > > &  rVariable,
array_1d< double, 3 > &  rOutput,
const ProcessInfo rCurrentProcessInfo 
)
overridevirtual
Parameters
rVariableUse ADVPROJ or VELOCITY
Output(unused)
rCurrentProcessInfoProcess info instance (unused)

Reimplemented from Kratos::FractionalStep< TDim >.

◆ Calculate() [2/2]

template<unsigned int TDim>
void Kratos::FractionalStepDiscontinuous< TDim >::Calculate ( const Variable< double > &  rVariable,
double rOutput,
const ProcessInfo rCurrentProcessInfo 
)
overridevirtual

Checks the input and that all required Kratos variables have been registered.

This function provides the place to perform checks on the completeness of the input. It is designed to be called only once (or anyway, not often) typically at the beginning of the calculations, so to verify that nothing is missing from the input or that no common error is found.

Parameters
rCurrentProcessInfoThe ProcessInfo of the ModelPart that contains this element.
Returns
0 if no errors were found.
Parameters
rVariableUse DIVPROJ
rOutput(unused)
rCurrentProcessInfoProcess info instance (unused)

Reimplemented from Kratos::FractionalStep< TDim >.

◆ CalculateGeometryData()

template<unsigned int TDim>
void Kratos::FractionalStepDiscontinuous< TDim >::CalculateGeometryData ( ShapeFunctionDerivativesArrayType rDN_DX,
Matrix rNContainer,
Vector rGaussWeights 
)
overrideprotectedvirtual

Determine integration point weights and shape funcition derivatives from the element's geometry.

Reimplemented from Kratos::FractionalStep< TDim >.

◆ CalculateLocalPressureSystem()

template<unsigned int TDim>
void Kratos::FractionalStepDiscontinuous< TDim >::CalculateLocalPressureSystem ( MatrixType rLeftHandSideMatrix,
VectorType rRightHandSideVector,
const ProcessInfo rCurrentProcessInfo 
)
overrideprotectedvirtual

Reimplemented from Kratos::FractionalStep< TDim >.

◆ CalculateLocalSystem()

template<unsigned int TDim>
void Kratos::FractionalStepDiscontinuous< TDim >::CalculateLocalSystem ( MatrixType rLeftHandSideMatrix,
VectorType rRightHandSideVector,
const ProcessInfo rCurrentProcessInfo 
)
overridevirtual

Calculate the element's local contribution to the system for the current step.

Reimplemented from Kratos::FractionalStep< TDim >.

◆ Create() [1/2]

template<unsigned int TDim>
Element::Pointer Kratos::FractionalStepDiscontinuous< TDim >::Create ( IndexType  NewId,
Element::GeometryType::Pointer  pGeom,
Element::PropertiesType::Pointer  pProperties 
) const
inlineoverride

◆ Create() [2/2]

template<unsigned int TDim>
Element::Pointer Kratos::FractionalStepDiscontinuous< TDim >::Create ( IndexType  NewId,
NodesArrayType const &  ThisNodes,
Element::PropertiesType::Pointer  pProperties 
) const
inlineoverride

Create a new element of this type.

Returns a pointer to a new FractionalStepDiscontinuous element, created using given input

Parameters
NewIdthe ID of the new element
ThisNodesthe nodes of the new element
pPropertiesthe properties assigned to the new element
Returns
a Pointer to the new element

◆ Info()

template<unsigned int TDim>
std::string Kratos::FractionalStepDiscontinuous< TDim >::Info ( ) const
inlineoverridevirtual

Turn back information as a string.

Reimplemented from Kratos::FractionalStep< TDim >.

◆ KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION()

template<unsigned int TDim>
Kratos::FractionalStepDiscontinuous< TDim >::KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION ( FractionalStepDiscontinuous< TDim >  )

Pointer definition of FractionalStepDiscontinuous.

◆ PrintInfo()

template<unsigned int TDim>
void Kratos::FractionalStepDiscontinuous< TDim >::PrintInfo ( std::ostream &  rOStream) const
inlineoverridevirtual

Print information about this object.

Reimplemented from Kratos::FractionalStep< TDim >.

Friends And Related Function Documentation

◆ Serializer

template<unsigned int TDim>
friend class Serializer
friend

Member Data Documentation

◆ medge_areas

template<unsigned int TDim>
array_1d<double,(TDim-1)*3 > Kratos::FractionalStepDiscontinuous< TDim >::medge_areas
protected

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