|
Nektar++
|
Higher-order pressure boundary condition, added to the pressure system as a Neumann contribution. More...
#include <HOPressureBndCondOp.hpp>
Public Member Functions | |
| void | SetVelocityContext (const MultiRegions::ExpListSharedPtr &velocityExpansionList, const std::vector< std::string > &velocityComponents) |
| Set the velocity expansion list and the names of the velocity components, from which the boundary-adjacent elements are found. | |
| void | SetKinvis (const TData &kinvis) |
| Set the kinematic viscosity kinvis Update() uses. | |
| void | SetTime (const TData &time) |
| Set the time at which UpdateWithAcceleration() evaluates the prescribed boundary velocity (default 0). | |
| void | SetScale (const TData &scale) |
| Set the scale by which Update() multiplies the fields it is passed (default 1). | |
| void | Update (LibUtilities::Field< TData, FieldState::Phys > &rhs, LibUtilities::Field< TData, FieldState::Phys > &velocity) |
| Compute the pressure flux scale * (rhs - kinvis * CurlCurl(velocity)) . n on the boundary. | |
| void | UpdateWithAcceleration (LibUtilities::Field< TData, FieldState::Phys > &rhs, LibUtilities::Field< TData, FieldState::Phys > &velocity, LibUtilities::Field< TData, FieldState::Phys > &predictor) |
| Compute the pressure flux, adding the acceleration needed to reach the prescribed boundary velocity at the time set by SetTime(). | |
| void | UpdateWeak (LibUtilities::Field< TData, FieldState::Phys > &rhs, LibUtilities::Field< TData, FieldState::Phys > &velocity, LibUtilities::Field< TData, FieldState::Phys > &predictor) |
| Compute the pressure flux of the weak pressure form: the flux of UpdateWithAcceleration() less scale * predictor . n. | |
| bool | HasNonDirichletVelocity () const |
| Whether a region on this rank has a velocity component that is not Dirichlet, so that UpdateWithAcceleration() and UpdateWeak() read rhs. | |
Public Member Functions inherited from Nektar::MultiRegions::NeuBndCondOp< TData > | |
| void | Apply (LibUtilities::Field< TData, FieldState::Coeff > &inout) |
| void | operator() (LibUtilities::Field< TData, FieldState::Coeff > &inout) |
| void | UpdateBndCoeffs (const TData &time=0.0) |
| size_t | GetNumBndDofs () |
| void | AddNeumannSurfaceIntegral (LibUtilities::MemoryRegion< TData > &data) |
| Add the surface integral of the Neumann boundary values on this rank, per component, as of their last update, to data[c] for component c, or data[c * nHomo + p] for plane p of a field with nHomo homogeneous planes, in the memory space of the operator's execution space. | |
| void | ExcludeUserDefinedType (const std::string &userDefinedType) |
Leave the boundary regions whose Neumann condition has USERDEFINEDTYPE userDefinedType, compared without regard to case, to another operator, which supplies their Neumann value: this operator no longer applies them. | |
Public Member Functions inherited from Nektar::MultiRegions::Operator< TData > | |
| virtual | ~Operator ()=default |
| Operator (const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > components) | |
| Construct the interface part of a concrete operator; called by the factory-registered creator functions. | |
Static Public Member Functions | |
| static std::shared_ptr< HOPressureBndCondOp< TData > > | Create (const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components, const std::string &execStr="") |
Static Public Member Functions inherited from Nektar::MultiRegions::NeuBndCondOp< TData > | |
| static std::shared_ptr< NeuBndCondOp< TData > > | Create (const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components, const std::string &execStr="") |
Static Public Member Functions inherited from Nektar::MultiRegions::Operator< TData > | |
| template<template< typename > typename TOperator> | |
| static std::shared_ptr< TOperator< TData > > | Create (const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > components, const std::string &execStr) |
| Create a concrete operator instance through the operator factory. | |
| static std::string | GetOpExecSpace (std::shared_ptr< LibUtilities::SessionReader > session, const bool warn=true) |
| Return the execution space name ("opExecSpace") for an operator. | |
| static const DefaultOpImplRule * | GetDefaultOpImplRule (const StdRegions::StdExpansionSharedPtr &exp, const std::string &execSpace) |
| Return the row of the default implementation table (DefaultOpImplTable.hpp) that a block of elements takes, or null if none does. | |
| static std::string | GetDefaultOpImpl (const StdRegions::StdExpansionSharedPtr &exp, const std::string &execSpace) |
| Return the implementation a block of elements takes when neither the command line nor the session names one for its operator. | |
| static std::vector< unsigned int > | GetDefaultInterleaveWidths (const MultiRegions::ExpListSharedPtr &expansionList) |
Return the default interleave widths, one per block of expansionList, that persistent Fields (e.g. solution storage, time-integration and linear-solver workspace) built on it should be constructed with. | |
| static bool | IsDiscontinuousProjection (std::shared_ptr< LibUtilities::SessionReader > session) |
| Return true if the session uses a Discontinuous (DG) projection. | |
Static Public Attributes | |
| static const std::string | name = "HOPressureBndCond" |
| static const std::string | userDefinedType = "H" |
| USERDEFINEDTYPE of the pressure Neumann conditions the operator applies. | |
Static Public Attributes inherited from Nektar::MultiRegions::NeuBndCondOp< TData > | |
| static const std::string | name = "NeuBndCond" |
Protected Member Functions | |
| HOPressureBndCondOp (const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components) | |
| ~HOPressureBndCondOp () override=default | |
| virtual void | v_SetVelocityContext (const MultiRegions::ExpListSharedPtr &velocityExpansionList, const std::vector< std::string > &velocityComponents)=0 |
| virtual void | v_Update (LibUtilities::Field< TData, FieldState::Phys > &rhs, LibUtilities::Field< TData, FieldState::Phys > &velocity)=0 |
| virtual void | v_UpdateWithAcceleration (LibUtilities::Field< TData, FieldState::Phys > &rhs, LibUtilities::Field< TData, FieldState::Phys > &velocity, LibUtilities::Field< TData, FieldState::Phys > &predictor)=0 |
| virtual void | v_UpdateWeak (LibUtilities::Field< TData, FieldState::Phys > &rhs, LibUtilities::Field< TData, FieldState::Phys > &velocity, LibUtilities::Field< TData, FieldState::Phys > &predictor)=0 |
Protected Member Functions inherited from Nektar::MultiRegions::NeuBndCondOp< TData > | |
| NeuBndCondOp (const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components) | |
| ~NeuBndCondOp () override=default | |
| virtual void | v_Apply (LibUtilities::Field< TData, FieldState::Coeff > &inout)=0 |
| virtual void | v_UpdateBndCoeffs (const TData &time)=0 |
| virtual size_t | v_GetNumBndDofs ()=0 |
| virtual void | v_AddNeumannSurfaceIntegral (LibUtilities::MemoryRegion< TData > &data)=0 |
| virtual void | v_ExcludeUserDefinedType (const std::string &userDefinedType)=0 |
Protected Attributes | |
| bool | m_hasNonDirichletVelocity = false |
| Set by SetVelocityContext(); read by HasNonDirichletVelocity(). | |
| bool | m_isSetKinvis = false |
| Set by SetKinvis(); checked by Update() in debug builds. | |
| TData | m_kinvis = 0.0 |
| Kinematic viscosity, set by SetKinvis(). | |
| TData | m_time = 0.0 |
| Time of the prescribed boundary velocity, set by SetTime(). | |
| TData | m_scale = 1.0 |
| Scale of the fields passed to Update(), set by SetScale(). | |
Protected Attributes inherited from Nektar::MultiRegions::NeuBndCondOp< TData > | |
| bool | m_bndCoeffsInitialised = false |
| bool | m_hasTimeDependentBndCoeffs = false |
Protected Attributes inherited from Nektar::MultiRegions::Operator< TData > | |
| MultiRegions::ExpListSharedPtr | m_expansionList |
| Expansion list the operator acts on. | |
| std::vector< std::string > | m_components |
| Names of the field components the operator was built for. | |
| LibUtilities::NekDataWarehouseSharedPtr | m_dataWarehouse |
| Data warehouse shared with the other operators on the expansion list, used to build and cache shared tables (basis matrices, mode indices, geometric factors) once. | |
Higher-order pressure boundary condition, added to the pressure system as a Neumann contribution.
On every pressure boundary region with a Neumann condition and USERDEFINEDTYPE="H", the pressure flux is the normal component of scale * (rhs - kinvis * CurlCurl(velocity)), less the acceleration needed to reach the prescribed boundary velocity, in the velocity components that are Dirichlet on the region. The prescribed velocity is taken as the velocity solve imposes it, projected onto the boundary expansion of the velocity. Update() computes the flux from the current fields, with the kinematic viscosity set by SetKinvis(), the scale set by SetScale() and at the time set by SetTime(); Apply() adds its inner product to the pressure forcing. UpdateWeak() computes the flux of the weak pressure form, which leaves the explicit contribution to the volume term. It is added to the pressure system with LinearSystemOp::AddNeumannBCOp(op, userDefinedType), so that the default Neumann operator of the system leaves its regions out.
Definition at line 62 of file HOPressureBndCondOp.hpp.
|
inlineprotected |
Definition at line 206 of file HOPressureBndCondOp.hpp.
|
overrideprotecteddefault |
|
inlinestatic |
Definition at line 65 of file HOPressureBndCondOp.hpp.
References Nektar::HOPressureBndCondOp< TData >::Create().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and Nektar::HOPressureBndCondOp< TData >::Create().
|
inline |
Whether a region on this rank has a velocity component that is not Dirichlet, so that UpdateWithAcceleration() and UpdateWeak() read rhs.
Definition at line 189 of file HOPressureBndCondOp.hpp.
References Nektar::HOPressureBndCondOp< TData >::m_hasNonDirichletVelocity.
|
inline |
Set the kinematic viscosity kinvis Update() uses.
Definition at line 94 of file HOPressureBndCondOp.hpp.
References Nektar::HOPressureBndCondOp< TData >::m_isSetKinvis, and Nektar::HOPressureBndCondOp< TData >::m_kinvis.
|
inline |
Set the scale by which Update() multiplies the fields it is passed (default 1).
Definition at line 113 of file HOPressureBndCondOp.hpp.
References Nektar::HOPressureBndCondOp< TData >::m_scale.
|
inline |
Set the time at which UpdateWithAcceleration() evaluates the prescribed boundary velocity (default 0).
Definition at line 104 of file HOPressureBndCondOp.hpp.
References Nektar::HOPressureBndCondOp< TData >::m_time.
|
inline |
Set the velocity expansion list and the names of the velocity components, from which the boundary-adjacent elements are found.
Definition at line 84 of file HOPressureBndCondOp.hpp.
References Nektar::HOPressureBndCondOp< TData >::v_SetVelocityContext().
|
inline |
Compute the pressure flux scale * (rhs - kinvis * CurlCurl(velocity)) . n on the boundary.
Definition at line 122 of file HOPressureBndCondOp.hpp.
References Nektar::HOPressureBndCondOp< TData >::v_Update().
|
inline |
Compute the pressure flux of the weak pressure form: the flux of UpdateWithAcceleration() less scale * predictor . n.
The weak form takes the predictor, which holds the explicit advection and forcing, into the volume term of the pressure equation, so the flux is -scale * kinvis * CurlCurl(velocity) . n
A velocity component that is not Dirichlet on a region takes predictor - rhs, the velocity the predictor carries, as its boundary velocity, as UpdateWithAcceleration() does: its flux there is -scale * (kinvis * CurlCurl(velocity) + predictor - rhs) n_d. rhs and predictor are read only when HasNonDirichletVelocity(), and rhs may be uninstantiated otherwise.
Definition at line 177 of file HOPressureBndCondOp.hpp.
References Nektar::HOPressureBndCondOp< TData >::v_UpdateWeak().
|
inline |
Compute the pressure flux, adding the acceleration needed to reach the prescribed boundary velocity at the time set by SetTime().
predictor is the complete right-hand side of the implicit stage, which holds the explicit contribution rhs of Update(), so rhs cancels from the flux scale * (rhs - kinvis * CurlCurl(velocity)) . n
A velocity component that is not Dirichlet on a region has no prescribed boundary velocity and takes no acceleration: its flux there is scale * (rhs - kinvis * CurlCurl(velocity)) n_d. rhs is read only when HasNonDirichletVelocity(), and may be uninstantiated otherwise.
Definition at line 150 of file HOPressureBndCondOp.hpp.
References Nektar::HOPressureBndCondOp< TData >::v_UpdateWithAcceleration().
|
protectedpure virtual |
Implemented in Nektar::detail::HOPressureBndCondOpImpl< ExecSpace, TData >.
Referenced by Nektar::HOPressureBndCondOp< TData >::SetVelocityContext().
|
protectedpure virtual |
Implemented in Nektar::detail::HOPressureBndCondOpImpl< ExecSpace, TData >.
Referenced by Nektar::HOPressureBndCondOp< TData >::Update().
|
protectedpure virtual |
Implemented in Nektar::detail::HOPressureBndCondOpImpl< ExecSpace, TData >.
Referenced by Nektar::HOPressureBndCondOp< TData >::UpdateWeak().
|
protectedpure virtual |
Implemented in Nektar::detail::HOPressureBndCondOpImpl< ExecSpace, TData >.
Referenced by Nektar::HOPressureBndCondOp< TData >::UpdateWithAcceleration().
|
protected |
Set by SetVelocityContext(); read by HasNonDirichletVelocity().
Definition at line 196 of file HOPressureBndCondOp.hpp.
Referenced by Nektar::detail::HOPressureBndCondOpImpl< ExecSpace, TData >::BuildBoundaryPhys(), Nektar::detail::HOPressureBndCondOpImpl< ExecSpace, TData >::BuildBoundaryVelocityData(), Nektar::HOPressureBndCondOp< TData >::HasNonDirichletVelocity(), and Nektar::detail::HOPressureBndCondOpImpl< ExecSpace, TData >::UpdateFlux().
|
protected |
Set by SetKinvis(); checked by Update() in debug builds.
Definition at line 198 of file HOPressureBndCondOp.hpp.
Referenced by Nektar::HOPressureBndCondOp< TData >::SetKinvis(), and Nektar::detail::HOPressureBndCondOpImpl< ExecSpace, TData >::UpdateFlux().
|
protected |
Kinematic viscosity, set by SetKinvis().
Definition at line 200 of file HOPressureBndCondOp.hpp.
Referenced by Nektar::HOPressureBndCondOp< TData >::SetKinvis(), and Nektar::detail::HOPressureBndCondOpImpl< ExecSpace, TData >::UpdateFlux().
|
protected |
Scale of the fields passed to Update(), set by SetScale().
Definition at line 204 of file HOPressureBndCondOp.hpp.
Referenced by Nektar::HOPressureBndCondOp< TData >::SetScale(), and Nektar::detail::HOPressureBndCondOpImpl< ExecSpace, TData >::UpdateFlux().
|
protected |
Time of the prescribed boundary velocity, set by SetTime().
Definition at line 202 of file HOPressureBndCondOp.hpp.
Referenced by Nektar::detail::HOPressureBndCondOpImpl< ExecSpace, TData >::EvaluateBoundaryVelocity(), and Nektar::HOPressureBndCondOp< TData >::SetTime().
|
inlinestatic |
Definition at line 74 of file HOPressureBndCondOp.hpp.
|
inlinestatic |
USERDEFINEDTYPE of the pressure Neumann conditions the operator applies.
Definition at line 78 of file HOPressureBndCondOp.hpp.