Nektar++
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
Nektar::SubSteppingExtrapolateWeakPressure Class Reference

#include <SubSteppingExtrapolateWeakPressure.h>

Inheritance diagram for Nektar::SubSteppingExtrapolateWeakPressure:
[legend]

Public Member Functions

 SubSteppingExtrapolateWeakPressure (const LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields, MultiRegions::ExpListSharedPtr pPressure, const Array< OneD, int > pVel, const SolverUtils::AdvectionSharedPtr advObject)
 
 ~SubSteppingExtrapolateWeakPressure () override
 
- Public Member Functions inherited from Nektar::SubSteppingExtrapolate
 SubSteppingExtrapolate (const LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields, MultiRegions::ExpListSharedPtr pPressure, const Array< OneD, int > pVel, const SolverUtils::AdvectionSharedPtr advObject)
 
 ~SubSteppingExtrapolate () override
 
- Public Member Functions inherited from Nektar::Extrapolate
 Extrapolate (const LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields, MultiRegions::ExpListSharedPtr pPressure, const Array< OneD, int > pVel, const SolverUtils::AdvectionSharedPtr advObject)
 
virtual ~Extrapolate ()
 
void GenerateHOPBCMap (const LibUtilities::SessionReaderSharedPtr &pSsession)
 
void UpdateRobinPrimCoeff (void)
 
void SubSteppingTimeIntegration (const LibUtilities::TimeIntegrationSchemeSharedPtr &IntegrationScheme)
 
void SubStepSaveFields (const int nstep)
 
void SubStepSetPressureBCs (const Array< OneD, const Array< OneD, NekDouble > > &inarray, const NekDouble Aii_DT, NekDouble kinvis)
 
void SubStepAdvance (const int nstep, NekDouble time)
 
void MountHOPBCs (int HBCdata, NekDouble kinvis, Array< OneD, NekDouble > &Q, Array< OneD, const NekDouble > &Advection)
 
void EvaluatePressureBCs (const Array< OneD, const Array< OneD, NekDouble > > &fields, const Array< OneD, const Array< OneD, NekDouble > > &N, NekDouble kinvis)
 
void SetForcing (const std::vector< SolverUtils::ForcingSharedPtr > &forcing)
 
void AddDuDt (void)
 
void AddVelBC (void)
 
void ExtrapolatePressureHBCs (void)
 
void CopyPressureHBCsToPbndExp (void)
 
Array< OneD, NekDoubleGetMaxStdVelocity (const Array< OneD, Array< OneD, NekDouble > > inarray)
 
void CorrectPressureBCs (const Array< OneD, NekDouble > &pressure)
 
void IProductNormVelocityOnHBC (const Array< OneD, const Array< OneD, NekDouble > > &Vel, Array< OneD, NekDouble > &IprodVn)
 
void IProductNormVelocityBCOnHBC (Array< OneD, NekDouble > &IprodVn)
 
std::string GetSubStepName (void)
 
void ExtrapolateArray (Array< OneD, Array< OneD, NekDouble > > &array)
 
void EvaluateBDFArray (Array< OneD, Array< OneD, NekDouble > > &array)
 
void ExtrapolateArray (Array< OneD, Array< OneD, NekDouble > > &oldarrays, Array< OneD, NekDouble > &newarray, Array< OneD, NekDouble > &outarray)
 
void AddNormVelOnOBC (const int nbcoeffs, const int nreg, Array< OneD, Array< OneD, NekDouble > > &u)
 
void AddPressureToOutflowBCs (NekDouble kinvis)
 
void GenerateBndElmtExpansion (void)
 

Static Public Member Functions

static ExtrapolateSharedPtr create (const LibUtilities::SessionReaderSharedPtr &pSession, Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, MultiRegions::ExpListSharedPtr &pPressure, const Array< OneD, int > &pVel, const SolverUtils::AdvectionSharedPtr &advObject)
 Creates an instance of this class. More...
 
- Static Public Member Functions inherited from Nektar::SubSteppingExtrapolate
static ExtrapolateSharedPtr create (const LibUtilities::SessionReaderSharedPtr &pSession, Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, MultiRegions::ExpListSharedPtr &pPressure, const Array< OneD, int > &pVel, const SolverUtils::AdvectionSharedPtr &advObject)
 Creates an instance of this class. More...
 

Static Public Attributes

static std::string className
 Name of class. More...
 
- Static Public Attributes inherited from Nektar::SubSteppingExtrapolate
static std::string className
 Name of class. More...
 

Protected Member Functions

void v_SubStepSetPressureBCs (const Array< OneD, const Array< OneD, NekDouble > > &inarray, NekDouble Aii_Dt, NekDouble kinvis) override
 
void v_AddNormVelOnOBC (const int nbcoeffs, const int nreg, Array< OneD, Array< OneD, NekDouble > > &u) override
 
- Protected Member Functions inherited from Nektar::SubSteppingExtrapolate
void v_EvaluatePressureBCs (const Array< OneD, const Array< OneD, NekDouble > > &fields, const Array< OneD, const Array< OneD, NekDouble > > &N, NekDouble kinvis) override
 
void v_SubSteppingTimeIntegration (const LibUtilities::TimeIntegrationSchemeSharedPtr &IntegrationScheme) override
 
void v_SubStepSaveFields (int nstep) override
 
void v_SubStepSetPressureBCs (const Array< OneD, const Array< OneD, NekDouble > > &inarray, NekDouble Aii_Dt, NekDouble kinvis) override
 
void v_AccelerationBDF (Array< OneD, Array< OneD, NekDouble > > &array) override
 
void v_SubStepAdvance (int nstep, NekDouble time) override
 
void v_MountHOPBCs (int HBCdata, NekDouble kinvis, Array< OneD, NekDouble > &Q, Array< OneD, const NekDouble > &Advection) override
 
std::string v_GetSubStepName (void) override
 
void SubStepAdvection (const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
 
void SubStepProjection (const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
 
void SubStepExtrapolateField (NekDouble toff, Array< OneD, Array< OneD, NekDouble > > &ExtVel, Array< OneD, NekDouble > &ExtVn)
 
void AddAdvectionPenaltyFlux (const Array< OneD, NekDouble > &Vn, const Array< OneD, const Array< OneD, NekDouble > > &physfield, Array< OneD, Array< OneD, NekDouble > > &outarray)
 
NekDouble GetSubstepTimeStep ()
 
- Protected Member Functions inherited from Nektar::Extrapolate
virtual void v_EvaluatePressureBCs (const Array< OneD, const Array< OneD, NekDouble > > &inarray, const Array< OneD, const Array< OneD, NekDouble > > &N, NekDouble kinvis)=0
 
virtual void v_SubSteppingTimeIntegration (const LibUtilities::TimeIntegrationSchemeSharedPtr &IntegrationScheme)=0
 
virtual void v_SubStepSaveFields (int nstep)=0
 
virtual void v_SubStepSetPressureBCs (const Array< OneD, const Array< OneD, NekDouble > > &inarray, NekDouble Aii_DT, NekDouble kinvis)=0
 
virtual void v_SubStepAdvance (int nstep, NekDouble time)=0
 
virtual void v_MountHOPBCs (int HBCdata, NekDouble kinvis, Array< OneD, NekDouble > &Q, Array< OneD, const NekDouble > &Advection)=0
 
virtual std::string v_GetSubStepName (void)
 
virtual void v_AccelerationBDF (Array< OneD, Array< OneD, NekDouble > > &array)
 
void CalcNeumannPressureBCs (const Array< OneD, const Array< OneD, NekDouble > > &fields, const Array< OneD, const Array< OneD, NekDouble > > &N, NekDouble kinvis)
 
virtual void v_CalcNeumannPressureBCs (const Array< OneD, const Array< OneD, NekDouble > > &fields, const Array< OneD, const Array< OneD, NekDouble > > &N, NekDouble kinvis)
 
virtual void v_CorrectPressureBCs (const Array< OneD, NekDouble > &pressure)
 
virtual void v_AddNormVelOnOBC (const int nbcoeffs, const int nreg, Array< OneD, Array< OneD, NekDouble > > &u)
 
void CalcOutflowBCs (const Array< OneD, const Array< OneD, NekDouble > > &fields, NekDouble kinvis)
 
void RollOver (Array< OneD, Array< OneD, NekDouble > > &input)
 

Additional Inherited Members

- Protected Attributes inherited from Nektar::SubSteppingExtrapolate
LibUtilities::TimeIntegrationSchemeSharedPtr m_intScheme
 
LibUtilities::TimeIntegrationSchemeSharedPtr m_subStepIntegrationScheme
 
LibUtilities::TimeIntegrationSchemeOperators m_subStepIntegrationOps
 
Array< OneD, Array< OneD, NekDouble > > m_previousVelFields
 
Array< OneD, Array< OneD, NekDouble > > m_previousVnFields
 
NekDouble m_cflSafetyFactor
 
int m_infosteps
 
int m_minsubsteps
 
int m_maxsubsteps
 
- Protected Attributes inherited from Nektar::Extrapolate
LibUtilities::SessionReaderSharedPtr m_session
 
LibUtilities::CommSharedPtr m_comm
 
Array< OneD, HBCTypem_hbcType
 Array of type of high order BCs for splitting shemes. More...
 
Array< OneD, MultiRegions::ExpListSharedPtrm_fields
 Velocity fields. More...
 
MultiRegions::ExpListSharedPtr m_pressure
 Pointer to field holding pressure field. More...
 
Array< OneD, int > m_velocity
 int which identifies which components of m_fields contains the velocity (u,v,w); More...
 
SolverUtils::AdvectionSharedPtr m_advObject
 
std::vector< SolverUtils::ForcingSharedPtrm_forcing
 
Array< OneD, Array< OneD, NekDouble > > m_previousVelFields
 
int m_curl_dim
 Curl-curl dimensionality. More...
 
int m_bnd_dim
 bounday dimensionality More...
 
Array< OneD, const SpatialDomains::BoundaryConditionShPtrm_PBndConds
 pressure boundary conditions container More...
 
Array< OneD, MultiRegions::ExpListSharedPtrm_PBndExp
 pressure boundary conditions expansion container More...
 
Array< OneD, MultiRegions::ExpListSharedPtrm_bndElmtExps
 Boundary expansions on each domain boundary. More...
 
int m_pressureCalls
 number of times the high-order pressure BCs have been called More...
 
int m_numHBCDof
 
int m_HBCnumber
 
int m_intSteps
 Maximum points used in pressure BC evaluation. More...
 
NekDouble m_timestep
 
Array< OneD, Array< OneD, NekDouble > > m_pressureHBCs
 Storage for current and previous levels of high order pressure boundary conditions. More...
 
Array< OneD, Array< OneD, NekDouble > > m_iprodnormvel
 Storage for current and previous levels of the inner product of normal velocity. More...
 
Array< OneD, Array< OneD, NekDouble > > m_traceNormals
 
HighOrderOutflowSharedPtr m_houtflow
 
- Static Protected Attributes inherited from Nektar::Extrapolate
static NekDouble StifflyStable_Betaq_Coeffs [3][3]
 
static NekDouble StifflyStable_Alpha_Coeffs [3][3]
 
static NekDouble StifflyStable_Gamma0_Coeffs [3] = {1.0, 1.5, 11.0 / 6.0}
 

Detailed Description

Definition at line 51 of file SubSteppingExtrapolateWeakPressure.h.

Constructor & Destructor Documentation

◆ SubSteppingExtrapolateWeakPressure()

Nektar::SubSteppingExtrapolateWeakPressure::SubSteppingExtrapolateWeakPressure ( const LibUtilities::SessionReaderSharedPtr  pSession,
Array< OneD, MultiRegions::ExpListSharedPtr pFields,
MultiRegions::ExpListSharedPtr  pPressure,
const Array< OneD, int >  pVel,
const SolverUtils::AdvectionSharedPtr  advObject 
)

Definition at line 50 of file SubSteppingExtrapolateWeakPressure.cpp.

55 : SubSteppingExtrapolate(pSession, pFields, pPressure, pVel, advObject)
56{
57}
SubSteppingExtrapolate(const LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields, MultiRegions::ExpListSharedPtr pPressure, const Array< OneD, int > pVel, const SolverUtils::AdvectionSharedPtr advObject)

◆ ~SubSteppingExtrapolateWeakPressure()

Nektar::SubSteppingExtrapolateWeakPressure::~SubSteppingExtrapolateWeakPressure ( )
override

Definition at line 59 of file SubSteppingExtrapolateWeakPressure.cpp.

60{
61}

Member Function Documentation

◆ create()

static ExtrapolateSharedPtr Nektar::SubSteppingExtrapolateWeakPressure::create ( const LibUtilities::SessionReaderSharedPtr pSession,
Array< OneD, MultiRegions::ExpListSharedPtr > &  pFields,
MultiRegions::ExpListSharedPtr pPressure,
const Array< OneD, int > &  pVel,
const SolverUtils::AdvectionSharedPtr advObject 
)
inlinestatic

Creates an instance of this class.

Definition at line 55 of file SubSteppingExtrapolateWeakPressure.h.

60 {
61 ExtrapolateSharedPtr p = MemoryManager<
62 SubSteppingExtrapolateWeakPressure>::AllocateSharedPtr(pSession,
63 pFields,
64 pPressure,
65 pVel,
66 advObject);
67 return p;
68 }
SubSteppingExtrapolateWeakPressure(const LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields, MultiRegions::ExpListSharedPtr pPressure, const Array< OneD, int > pVel, const SolverUtils::AdvectionSharedPtr advObject)
std::shared_ptr< Extrapolate > ExtrapolateSharedPtr
Definition: Extrapolate.h:60

References CellMLToNektar.cellml_metadata::p.

◆ v_AddNormVelOnOBC()

void Nektar::SubSteppingExtrapolateWeakPressure::v_AddNormVelOnOBC ( const int  nbcoeffs,
const int  nreg,
Array< OneD, Array< OneD, NekDouble > > &  u 
)
overrideprotectedvirtual

Reimplemented from Nektar::Extrapolate.

Definition at line 90 of file SubSteppingExtrapolateWeakPressure.cpp.

92{
93 if (!m_houtflow.get()) // no outflow on partition so just return
94 {
95 return;
96 }
97
98 int nbcoeffs = m_PBndExp[nreg]->GetNcoeffs();
99 // int nqb = m_PBndExp[nreg]->GetTotPoints();
100
101 Array<OneD, NekDouble> IProdVnTmp(nbcoeffs);
102
103 Array<OneD, Array<OneD, NekDouble>> ubnd(m_curl_dim);
104
105 for (int i = 0; i < m_curl_dim; ++i)
106 {
107 EvaluateBDFArray(m_houtflow->m_outflowVelBnd[cnt][i]);
108
109 ubnd[i] = m_houtflow->m_outflowVelBnd[cnt][i][m_intSteps - 1];
110
111 // point input u to the first part of the array for later uee.
112 u[i] = m_houtflow->m_outflowVelBnd[cnt][i][0];
113 }
114
115 m_PBndExp[nreg]->NormVectorIProductWRTBase(ubnd, IProdVnTmp);
116
117 Vmath::Svtvp(nbcoeffs, -1.0 / m_timestep, IProdVnTmp, 1,
118 m_PBndExp[nreg]->UpdateCoeffs(), 1,
119 m_PBndExp[nreg]->UpdateCoeffs(), 1);
120}
int m_curl_dim
Curl-curl dimensionality.
Definition: Extrapolate.h:217
void EvaluateBDFArray(Array< OneD, Array< OneD, NekDouble > > &array)
int m_intSteps
Maximum points used in pressure BC evaluation.
Definition: Extrapolate.h:241
HighOrderOutflowSharedPtr m_houtflow
Definition: Extrapolate.h:261
NekDouble m_timestep
Definition: Extrapolate.h:243
Array< OneD, MultiRegions::ExpListSharedPtr > m_PBndExp
pressure boundary conditions expansion container
Definition: Extrapolate.h:226
void Svtvp(int n, const T alpha, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Svtvp (scalar times vector plus vector): z = alpha*x + y.
Definition: Vmath.hpp:396

References Nektar::Extrapolate::EvaluateBDFArray(), Nektar::Extrapolate::m_curl_dim, Nektar::Extrapolate::m_houtflow, Nektar::Extrapolate::m_intSteps, Nektar::Extrapolate::m_PBndExp, Nektar::Extrapolate::m_timestep, and Vmath::Svtvp().

◆ v_SubStepSetPressureBCs()

void Nektar::SubSteppingExtrapolateWeakPressure::v_SubStepSetPressureBCs ( const Array< OneD, const Array< OneD, NekDouble > > &  inarray,
NekDouble  Aii_Dt,
NekDouble  kinvis 
)
overrideprotectedvirtual

Reimplemented from Nektar::SubSteppingExtrapolate.

Definition at line 63 of file SubSteppingExtrapolateWeakPressure.cpp.

66{
67 Array<OneD, Array<OneD, NekDouble>> nullvelfields;
68
70
71 // Calculate non-linear and viscous BCs at current level and
72 // put in m_pressureHBCs[0]
73 CalcNeumannPressureBCs(inarray, nullvelfields, kinvis);
74
75 // Extrapolate to m_pressureHBCs to n+1
77
78 // Add (phi,gamma0 u^{n+1}/Dt) term to m_presureHBC
79 AddVelBC();
80
81 // Copy m_pressureHBCs to m_PbndExp
83
84 // Evaluate High order outflow conditiosn if required.
85 CalcOutflowBCs(inarray, kinvis);
86}
Array< OneD, Array< OneD, NekDouble > > m_pressureHBCs
Storage for current and previous levels of high order pressure boundary conditions.
Definition: Extrapolate.h:247
void CopyPressureHBCsToPbndExp(void)
void CalcNeumannPressureBCs(const Array< OneD, const Array< OneD, NekDouble > > &fields, const Array< OneD, const Array< OneD, NekDouble > > &N, NekDouble kinvis)
Definition: Extrapolate.h:172
void ExtrapolateArray(Array< OneD, Array< OneD, NekDouble > > &array)
int m_pressureCalls
number of times the high-order pressure BCs have been called
Definition: Extrapolate.h:232
void CalcOutflowBCs(const Array< OneD, const Array< OneD, NekDouble > > &fields, NekDouble kinvis)

References Nektar::Extrapolate::AddVelBC(), Nektar::Extrapolate::CalcNeumannPressureBCs(), Nektar::Extrapolate::CalcOutflowBCs(), Nektar::Extrapolate::CopyPressureHBCsToPbndExp(), Nektar::Extrapolate::ExtrapolateArray(), Nektar::Extrapolate::m_pressureCalls, and Nektar::Extrapolate::m_pressureHBCs.

Member Data Documentation

◆ className

std::string Nektar::SubSteppingExtrapolateWeakPressure::className
static
Initial value:
=
"SubSteppingWeakPressure", SubSteppingExtrapolateWeakPressure::create,
"SubSteppingWeakPressure")
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
static ExtrapolateSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, MultiRegions::ExpListSharedPtr &pPressure, const Array< OneD, int > &pVel, const SolverUtils::AdvectionSharedPtr &advObject)
Creates an instance of this class.
ExtrapolateFactory & GetExtrapolateFactory()
Definition: Extrapolate.cpp:48

Name of class.

Registers the class with the Factory.

Definition at line 71 of file SubSteppingExtrapolateWeakPressure.h.