Nektar++
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
Nektar::VelocityCorrectionScheme Class Reference

#include <VelocityCorrectionScheme.h>

Inheritance diagram for Nektar::VelocityCorrectionScheme:
[legend]

Public Member Functions

void SetUpPressureForcing (const Array< OneD, const Array< OneD, NekDouble > > &fields, Array< OneD, Array< OneD, NekDouble > > &Forcing, const NekDouble aii_Dt)
 
void SetUpViscousForcing (const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &Forcing, const NekDouble aii_Dt)
 
void SolvePressure (const Array< OneD, NekDouble > &Forcing)
 
void SolveSolid (NekDouble time)
 
void SolveViscous (const Array< OneD, const Array< OneD, NekDouble > > &Forcing, const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble aii_Dt)
 
void SolveUnsteadyStokesSystem (const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time, const NekDouble a_iixDt)
 
void EvaluateAdvection_SetPressureBCs (const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
 
- Public Member Functions inherited from Nektar::IncNavierStokes
int GetNConvectiveFields (void)
 
void AddForcing (const SolverUtils::ForcingSharedPtr &pForce)
 
bool DefinedForcing (const std::string &sForce)
 
- Public Member Functions inherited from Nektar::SolverUtils::AdvectionSystem
SOLVER_UTILS_EXPORT AdvectionSystem (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
 
SOLVER_UTILS_EXPORT ~AdvectionSystem () override=default
 
SOLVER_UTILS_EXPORT AdvectionSharedPtr GetAdvObject ()
 Returns the advection object held by this instance.
 
SOLVER_UTILS_EXPORT Array< OneD, NekDoubleGetElmtCFLVals (const bool FlagAcousticCFL=true)
 
SOLVER_UTILS_EXPORT NekDouble GetCFLEstimate (int &elmtid)
 
- Public Member Functions inherited from Nektar::SolverUtils::UnsteadySystem
SOLVER_UTILS_EXPORT ~UnsteadySystem () override=default
 Destructor.
 
SOLVER_UTILS_EXPORT NekDouble GetTimeStep (const Array< OneD, const Array< OneD, NekDouble > > &inarray)
 Calculate the larger time-step mantaining the problem stable.
 
SOLVER_UTILS_EXPORT NekDouble GetTimeStep ()
 
SOLVER_UTILS_EXPORT void SetTimeStep (const NekDouble timestep)
 
SOLVER_UTILS_EXPORT void SteadyStateResidual (int step, Array< OneD, NekDouble > &L2)
 
SOLVER_UTILS_EXPORT LibUtilities::TimeIntegrationSchemeSharedPtrGetTimeIntegrationScheme ()
 Returns the time integration scheme.
 
SOLVER_UTILS_EXPORT LibUtilities::TimeIntegrationSchemeOperatorsGetTimeIntegrationSchemeOperators ()
 Returns the time integration scheme operators.
 
- Public Member Functions inherited from Nektar::SolverUtils::EquationSystem
virtual SOLVER_UTILS_EXPORT ~EquationSystem ()
 Destructor.
 
SOLVER_UTILS_EXPORT void InitObject (bool DeclareField=true)
 Initialises the members of this object.
 
SOLVER_UTILS_EXPORT void DoInitialise (bool dumpInitialConditions=true)
 Perform any initialisation necessary before solving the problem.
 
SOLVER_UTILS_EXPORT void DoSolve ()
 Solve the problem.
 
SOLVER_UTILS_EXPORT void TransCoeffToPhys ()
 Transform from coefficient to physical space.
 
SOLVER_UTILS_EXPORT void TransPhysToCoeff ()
 Transform from physical to coefficient space.
 
SOLVER_UTILS_EXPORT void Output ()
 Perform output operations after solve.
 
SOLVER_UTILS_EXPORT std::string GetSessionName ()
 Get Session name.
 
template<class T >
std::shared_ptr< T > as ()
 
SOLVER_UTILS_EXPORT void ResetSessionName (std::string newname)
 Reset Session name.
 
SOLVER_UTILS_EXPORT LibUtilities::SessionReaderSharedPtr GetSession ()
 Get Session name.
 
SOLVER_UTILS_EXPORT MultiRegions::ExpListSharedPtr GetPressure ()
 Get pressure field if available.
 
SOLVER_UTILS_EXPORT void ExtraFldOutput (std::vector< Array< OneD, NekDouble > > &fieldcoeffs, std::vector< std::string > &variables)
 
SOLVER_UTILS_EXPORT void PrintSummary (std::ostream &out)
 Print a summary of parameters and solver characteristics.
 
SOLVER_UTILS_EXPORT void SetLambda (NekDouble lambda)
 Set parameter m_lambda.
 
SOLVER_UTILS_EXPORT SessionFunctionSharedPtr GetFunction (std::string name, const MultiRegions::ExpListSharedPtr &field=MultiRegions::NullExpListSharedPtr, bool cache=false)
 Get a SessionFunction by name.
 
SOLVER_UTILS_EXPORT void SetInitialConditions (NekDouble initialtime=0.0, bool dumpInitialConditions=true, const int domain=0)
 Initialise the data in the dependent fields.
 
SOLVER_UTILS_EXPORT void EvaluateExactSolution (int field, Array< OneD, NekDouble > &outfield, const NekDouble time)
 Evaluates an exact solution.
 
SOLVER_UTILS_EXPORT NekDouble L2Error (unsigned int field, const Array< OneD, NekDouble > &exactsoln, bool Normalised=false)
 Compute the L2 error between fields and a given exact solution.
 
SOLVER_UTILS_EXPORT NekDouble L2Error (unsigned int field, bool Normalised=false)
 Compute the L2 error of the fields.
 
SOLVER_UTILS_EXPORT NekDouble LinfError (unsigned int field, const Array< OneD, NekDouble > &exactsoln=NullNekDouble1DArray)
 Linf error computation.
 
SOLVER_UTILS_EXPORT NekDouble H1Error (unsigned int field, const Array< OneD, NekDouble > &exactsoln, bool Normalised=false)
 Compute the H1 error between fields and a given exact solution.
 
SOLVER_UTILS_EXPORT Array< OneD, NekDoubleErrorExtraPoints (unsigned int field)
 Compute error (L2 and L_inf) over an larger set of quadrature points return [L2 Linf].
 
SOLVER_UTILS_EXPORT void Checkpoint_Output (const int n)
 Write checkpoint file of m_fields.
 
SOLVER_UTILS_EXPORT void Checkpoint_Output (const int n, MultiRegions::ExpListSharedPtr &field, std::vector< Array< OneD, NekDouble > > &fieldcoeffs, std::vector< std::string > &variables)
 Write checkpoint file of custom data fields.
 
SOLVER_UTILS_EXPORT void Checkpoint_BaseFlow (const int n)
 Write base flow file of m_fields.
 
SOLVER_UTILS_EXPORT void WriteFld (const std::string &outname)
 Write field data to the given filename.
 
SOLVER_UTILS_EXPORT void WriteFld (const std::string &outname, MultiRegions::ExpListSharedPtr &field, std::vector< Array< OneD, NekDouble > > &fieldcoeffs, std::vector< std::string > &variables)
 Write input fields to the given filename.
 
SOLVER_UTILS_EXPORT void ImportFld (const std::string &infile, Array< OneD, MultiRegions::ExpListSharedPtr > &pFields)
 Input field data from the given file.
 
SOLVER_UTILS_EXPORT void ImportFldToMultiDomains (const std::string &infile, Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const int ndomains)
 Input field data from the given file to multiple domains.
 
SOLVER_UTILS_EXPORT void ImportFld (const std::string &infile, std::vector< std::string > &fieldStr, Array< OneD, Array< OneD, NekDouble > > &coeffs)
 Output a field. Input field data into array from the given file.
 
SOLVER_UTILS_EXPORT void ImportFld (const std::string &infile, MultiRegions::ExpListSharedPtr &pField, std::string &pFieldName)
 Output a field. Input field data into ExpList from the given file.
 
SOLVER_UTILS_EXPORT void SessionSummary (SummaryList &vSummary)
 Write out a session summary.
 
SOLVER_UTILS_EXPORT Array< OneD, MultiRegions::ExpListSharedPtr > & UpdateFields ()
 
SOLVER_UTILS_EXPORT LibUtilities::FieldMetaDataMapUpdateFieldMetaDataMap ()
 Get hold of FieldInfoMap so it can be updated.
 
SOLVER_UTILS_EXPORT NekDouble GetTime ()
 Return final time.
 
SOLVER_UTILS_EXPORT int GetNcoeffs ()
 
SOLVER_UTILS_EXPORT int GetNcoeffs (const int eid)
 
SOLVER_UTILS_EXPORT int GetNumExpModes ()
 
SOLVER_UTILS_EXPORT const Array< OneD, int > GetNumExpModesPerExp ()
 
SOLVER_UTILS_EXPORT int GetNvariables ()
 
SOLVER_UTILS_EXPORT const std::string GetVariable (unsigned int i)
 
SOLVER_UTILS_EXPORT int GetTraceTotPoints ()
 
SOLVER_UTILS_EXPORT int GetTraceNpoints ()
 
SOLVER_UTILS_EXPORT int GetExpSize ()
 
SOLVER_UTILS_EXPORT int GetPhys_Offset (int n)
 
SOLVER_UTILS_EXPORT int GetCoeff_Offset (int n)
 
SOLVER_UTILS_EXPORT int GetTotPoints ()
 
SOLVER_UTILS_EXPORT int GetTotPoints (int n)
 
SOLVER_UTILS_EXPORT int GetNpoints ()
 
SOLVER_UTILS_EXPORT int GetSteps ()
 
SOLVER_UTILS_EXPORT void SetSteps (const int steps)
 
SOLVER_UTILS_EXPORT NekDouble GetTimeStep ()
 
SOLVER_UTILS_EXPORT void CopyFromPhysField (const int i, Array< OneD, NekDouble > &output)
 
SOLVER_UTILS_EXPORT void CopyToPhysField (const int i, const Array< OneD, const NekDouble > &input)
 
SOLVER_UTILS_EXPORT Array< OneD, NekDouble > & UpdatePhysField (const int i)
 
SOLVER_UTILS_EXPORT void ZeroPhysFields ()
 
SOLVER_UTILS_EXPORT void FwdTransFields ()
 
SOLVER_UTILS_EXPORT void SetModifiedBasis (const bool modbasis)
 
SOLVER_UTILS_EXPORT int GetCheckpointNumber ()
 
SOLVER_UTILS_EXPORT void SetCheckpointNumber (int num)
 
SOLVER_UTILS_EXPORT int GetCheckpointSteps ()
 
SOLVER_UTILS_EXPORT void SetCheckpointSteps (int num)
 
SOLVER_UTILS_EXPORT int GetInfoSteps ()
 
SOLVER_UTILS_EXPORT void SetInfoSteps (int num)
 
SOLVER_UTILS_EXPORT void SetIterationNumberPIT (int num)
 
SOLVER_UTILS_EXPORT void SetWindowNumberPIT (int num)
 
SOLVER_UTILS_EXPORT Array< OneD, const Array< OneD, NekDouble > > GetTraceNormals ()
 
SOLVER_UTILS_EXPORT LibUtilities::FieldMetaDataMapGetFieldMetaDataMap (void)
 
SOLVER_UTILS_EXPORT void SetTime (const NekDouble time)
 
SOLVER_UTILS_EXPORT void SetTimeStep (const NekDouble timestep)
 
SOLVER_UTILS_EXPORT void SetInitialStep (const int step)
 
SOLVER_UTILS_EXPORT void SetBoundaryConditions (NekDouble time)
 Evaluates the boundary conditions at the given time.
 
SOLVER_UTILS_EXPORT bool NegatedOp ()
 Identify if operator is negated in DoSolve.
 
- Public Member Functions inherited from Nektar::SolverUtils::ALEHelper
virtual ~ALEHelper ()=default
 
virtual SOLVER_UTILS_EXPORT void v_ALEInitObject (int spaceDim, Array< OneD, MultiRegions::ExpListSharedPtr > &fields)
 
SOLVER_UTILS_EXPORT void InitObject (int spaceDim, Array< OneD, MultiRegions::ExpListSharedPtr > &fields)
 
virtual SOLVER_UTILS_EXPORT void v_UpdateGridVelocity (const NekDouble &time)
 
virtual SOLVER_UTILS_EXPORT void v_ALEPreMultiplyMass (Array< OneD, Array< OneD, NekDouble > > &fields)
 
SOLVER_UTILS_EXPORT void ALEDoElmtInvMass (Array< OneD, Array< OneD, NekDouble > > &traceNormals, Array< OneD, Array< OneD, NekDouble > > &fields, NekDouble time)
 Update m_fields with u^n by multiplying by inverse mass matrix. That's then used in e.g. checkpoint output and L^2 error calculation.
 
SOLVER_UTILS_EXPORT void ALEDoElmtInvMassBwdTrans (const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
 
SOLVER_UTILS_EXPORT void MoveMesh (const NekDouble &time, Array< OneD, Array< OneD, NekDouble > > &traceNormals)
 
SOLVER_UTILS_EXPORT void ResetMatricesNormal (Array< OneD, Array< OneD, NekDouble > > &traceNormals)
 
SOLVER_UTILS_EXPORT void UpdateNormalsFlag ()
 
const Array< OneD, const Array< OneD, NekDouble > > & GetGridVelocity ()
 
bool & GetUpdateNormalsFlag ()
 
SOLVER_UTILS_EXPORT const Array< OneD, const Array< OneD, NekDouble > > & GetGridVelocityTrace ()
 
SOLVER_UTILS_EXPORT void ExtraFldOutputGridVelocity (std::vector< Array< OneD, NekDouble > > &fieldcoeffs, std::vector< std::string > &variables)
 
SOLVER_UTILS_EXPORT void ExtraFldOutputGrid (std::vector< Array< OneD, NekDouble > > &fieldcoeffs, std::vector< std::string > &variables)
 
- Public Member Functions inherited from Nektar::SolverUtils::FluidInterface
virtual ~FluidInterface ()=default
 
SOLVER_UTILS_EXPORT void GetVelocity (const Array< OneD, const Array< OneD, NekDouble > > &physfield, Array< OneD, Array< OneD, NekDouble > > &velocity)
 Extract array with velocity from physfield.
 
SOLVER_UTILS_EXPORT bool HasConstantDensity ()
 
SOLVER_UTILS_EXPORT void GetDensity (const Array< OneD, const Array< OneD, NekDouble > > &physfield, Array< OneD, NekDouble > &density)
 Extract array with density from physfield.
 
SOLVER_UTILS_EXPORT void GetPressure (const Array< OneD, const Array< OneD, NekDouble > > &physfield, Array< OneD, NekDouble > &pressure)
 Extract array with pressure from physfield.
 
SOLVER_UTILS_EXPORT void SetMovingFrameVelocities (const Array< OneD, NekDouble > &vFrameVels)
 
SOLVER_UTILS_EXPORT bool GetMovingFrameVelocities (Array< OneD, NekDouble > &vFrameVels)
 
SOLVER_UTILS_EXPORT void SetMovingFrameDisp (const Array< OneD, NekDouble > &vFrameDisp)
 
SOLVER_UTILS_EXPORT bool GetMovingFrameDisp (Array< OneD, NekDouble > &vFrameDisp)
 
SOLVER_UTILS_EXPORT void SetMovingFramePivot (const Array< OneD, NekDouble > &vFramePivot)
 
SOLVER_UTILS_EXPORT void GetMovingFramePivot (Array< OneD, NekDouble > &vFramePivot)
 
SOLVER_UTILS_EXPORT void SetMovableDoFs (const std::set< int > &dirDoFs)
 
SOLVER_UTILS_EXPORT void GetMovableDoFs (std::set< int > &dirDoFs)
 
SOLVER_UTILS_EXPORT void SetAeroForce (Array< OneD, NekDouble > forces)
 Set aerodynamic force and moment.
 
SOLVER_UTILS_EXPORT void GetAeroForce (Array< OneD, NekDouble > forces)
 Get aerodynamic force and moment.
 

Static Public Member Functions

static SolverUtils::EquationSystemSharedPtr create (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
 Creates an instance of this class.
 

Static Public Attributes

static std::string className
 Name of class.
 
- Static Public Attributes inherited from Nektar::SolverUtils::UnsteadySystem
static std::string cmdSetStartTime
 
static std::string cmdSetStartChkNum
 

Protected Member Functions

 VelocityCorrectionScheme (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
 
 ~VelocityCorrectionScheme () override=default
 
void v_InitObject (bool DeclareField=true) override
 Initialisation object for EquationSystem.
 
void SetupFlowrate (NekDouble aii_dt)
 Set up the Stokes solution used to impose constant flowrate through a boundary.
 
NekDouble MeasureFlowrate (const Array< OneD, Array< OneD, NekDouble > > &inarray)
 Measure the volumetric flow rate through the volumetric flow rate reference surface.
 
bool v_PostIntegrate (int step) override
 
void v_GenerateSummary (SolverUtils::SummaryList &s) override
 Print a summary of time stepping parameters.
 
void v_TransCoeffToPhys (void) override
 Virtual function for transformation to physical space.
 
void v_TransPhysToCoeff (void) override
 Virtual function for transformation to coefficient space.
 
void v_DoInitialise (bool dumpInitialConditions=true) override
 Sets up initial conditions.
 
Array< OneD, bool > v_GetSystemSingularChecks () override
 
int v_GetForceDimension () override
 
virtual void v_SetUpPressureForcing (const Array< OneD, const Array< OneD, NekDouble > > &fields, Array< OneD, Array< OneD, NekDouble > > &Forcing, const NekDouble aii_Dt)
 
virtual void v_SetUpViscousForcing (const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &Forcing, const NekDouble aii_Dt)
 
virtual void v_SolvePressure (const Array< OneD, NekDouble > &Forcing)
 
virtual void v_SolveSolid (NekDouble time)
 
virtual void v_SolveViscous (const Array< OneD, const Array< OneD, NekDouble > > &Forcing, const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble aii_Dt)
 
virtual void v_SolveUnsteadyStokesSystem (const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time, const NekDouble a_iixDt)
 
virtual void v_EvaluateAdvection_SetPressureBCs (const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
 
bool v_RequireFwdTrans () override
 
virtual std::string v_GetExtrapolateStr (void)
 
virtual std::string v_GetSubSteppingExtrapolateStr (const std::string &instr)
 
void SetUpSVV (void)
 
void SetUpExtrapolation (void)
 
void SVVVarDiffCoeff (const NekDouble velmag, Array< OneD, NekDouble > &diffcoeff, const Array< OneD, Array< OneD, NekDouble > > &vel=NullNekDoubleArrayOfArray)
 
void AppendSVVFactors (StdRegions::ConstFactorMap &factors, StdRegions::VarFactorsMap &varFactorsMap)
 
void ComputeGJPNormalVelocity (const Array< OneD, const Array< OneD, NekDouble > > &inarray, StdRegions::VarCoeffMap &varcoeffs)
 
void UpdateVelocityBCs (NekDouble time)
 
void AddMovingFrameDataToParams (const std::vector< std::string > &strFrameData, const Array< OneD, NekDouble > &movingFrameData, std::map< std::string, NekDouble > &params)
 
- Protected Member Functions inherited from Nektar::IncNavierStokes
 IncNavierStokes (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
 Constructor.
 
 ~IncNavierStokes () override=default
 
void v_GetPressure (const Array< OneD, const Array< OneD, NekDouble > > &physfield, Array< OneD, NekDouble > &pressure) override
 
void v_GetDensity (const Array< OneD, const Array< OneD, NekDouble > > &physfield, Array< OneD, NekDouble > &density) override
 
bool v_HasConstantDensity () override
 
void v_GetVelocity (const Array< OneD, const Array< OneD, NekDouble > > &physfield, Array< OneD, Array< OneD, NekDouble > > &velocity) override
 
void v_SetMovingFrameVelocities (const Array< OneD, NekDouble > &vFrameVels) override
 
bool v_GetMovingFrameVelocities (Array< OneD, NekDouble > &vFrameVels) override
 
void v_SetMovingFrameDisp (const Array< OneD, NekDouble > &vFrameDisp) override
 
void v_SetMovingFramePivot (const Array< OneD, NekDouble > &vFramePivot) override
 
void v_GetMovingFramePivot (Array< OneD, NekDouble > &vFramePivot) override
 
bool v_GetMovingFrameDisp (Array< OneD, NekDouble > &vFrameDisp) override
 
void v_SetAeroForce (Array< OneD, NekDouble > forces) override
 
void v_GetAeroForce (Array< OneD, NekDouble > forces) override
 
void v_SetMovableDoFs (const std::set< int > &dirDoFs) override
 
void v_GetMovableDoFs (std::set< int > &dirDoFs) override
 
void EvaluateAdvectionTerms (const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
 
void WriteModalEnergy (void)
 
void SetBoundaryConditions (NekDouble time)
 time dependent boundary conditions updating
 
void SetRadiationBoundaryForcing (int fieldid)
 Set Radiation forcing term.
 
void SetZeroNormalVelocity ()
 Set Normal Velocity Component to Zero.
 
void SetWomersleyBoundary (const int fldid, const int bndid)
 Set Womersley Profile if specified.
 
void SetUpWomersley (const int fldid, const int bndid, std::string womstr)
 Set Up Womersley details.
 
MultiRegions::ExpListSharedPtr v_GetPressure () override
 
Array< OneD, NekDoublev_GetMaxStdVelocity (const NekDouble SpeedSoundFactor) override
 
bool v_PreIntegrate (int step) override
 
- Protected Member Functions inherited from Nektar::SolverUtils::UnsteadySystem
SOLVER_UTILS_EXPORT UnsteadySystem (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
 Initialises UnsteadySystem class members.
 
SOLVER_UTILS_EXPORT void v_DoSolve () override
 Solves an unsteady problem.
 
virtual SOLVER_UTILS_EXPORT void v_PrintStatusInformation (const int step, const NekDouble cpuTime)
 Print Status Information.
 
virtual SOLVER_UTILS_EXPORT void v_PrintSummaryStatistics (const NekDouble intTime)
 Print Summary Statistics.
 
virtual SOLVER_UTILS_EXPORT NekDouble v_GetTimeStep (const Array< OneD, const Array< OneD, NekDouble > > &inarray)
 Return the timestep to be used for the next step in the time-marching loop.
 
virtual SOLVER_UTILS_EXPORT void v_SteadyStateResidual (int step, Array< OneD, NekDouble > &L2)
 
virtual SOLVER_UTILS_EXPORT bool v_UpdateTimeStepCheck ()
 
SOLVER_UTILS_EXPORT NekDouble MaxTimeStepEstimator ()
 Get the maximum timestep estimator for cfl control.
 
SOLVER_UTILS_EXPORT void CheckForRestartTime (NekDouble &time, int &nchk)
 
SOLVER_UTILS_EXPORT void SVVVarDiffCoeff (const Array< OneD, Array< OneD, NekDouble > > vel, StdRegions::VarCoeffMap &varCoeffMap)
 Evaluate the SVV diffusion coefficient according to Moura's paper where it should proportional to h time velocity.
 
SOLVER_UTILS_EXPORT void DoDummyProjection (const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
 Perform dummy projection.
 
- Protected Member Functions inherited from Nektar::SolverUtils::EquationSystem
SOLVER_UTILS_EXPORT EquationSystem (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
 Initialises EquationSystem class members.
 
virtual SOLVER_UTILS_EXPORT NekDouble v_LinfError (unsigned int field, const Array< OneD, NekDouble > &exactsoln=NullNekDouble1DArray)
 Virtual function for the L_inf error computation between fields and a given exact solution.
 
virtual SOLVER_UTILS_EXPORT NekDouble v_L2Error (unsigned int field, const Array< OneD, NekDouble > &exactsoln=NullNekDouble1DArray, bool Normalised=false)
 Virtual function for the L_2 error computation between fields and a given exact solution.
 
virtual SOLVER_UTILS_EXPORT NekDouble v_H1Error (unsigned int field, const Array< OneD, NekDouble > &exactsoln=NullNekDouble1DArray, bool Normalised=false)
 Virtual function for the H_1 error computation between fields and a given exact solution.
 
virtual SOLVER_UTILS_EXPORT void v_SetInitialConditions (NekDouble initialtime=0.0, bool dumpInitialConditions=true, const int domain=0)
 
virtual SOLVER_UTILS_EXPORT void v_EvaluateExactSolution (unsigned int field, Array< OneD, NekDouble > &outfield, const NekDouble time)
 
virtual SOLVER_UTILS_EXPORT void v_Output (void)
 
virtual SOLVER_UTILS_EXPORT bool v_NegatedOp (void)
 Virtual function to identify if operator is negated in DoSolve.
 
virtual SOLVER_UTILS_EXPORT void v_ExtraFldOutput (std::vector< Array< OneD, NekDouble > > &fieldcoeffs, std::vector< std::string > &variables)
 

Protected Attributes

bool m_useHomo1DSpecVanVisc
 bool to identify if spectral vanishing viscosity is active.
 
bool m_useSpecVanVisc
 bool to identify if spectral vanishing viscosity is active.
 
bool m_useGJPStabilisation
 bool to identify if GJP semi-implicit is active.
 
bool m_useGJPNormalVel
 bool to identify if GJP normal Velocity should be applied in explicit approach
 
NekDouble m_GJPJumpScale
 
NekDouble m_sVVCutoffRatio
 cutt off ratio from which to start decayhing modes
 
NekDouble m_sVVDiffCoeff
 Diffusion coefficient of SVV modes.
 
NekDouble m_sVVCutoffRatioHomo1D
 
NekDouble m_sVVDiffCoeffHomo1D
 Diffusion coefficient of SVV modes in homogeneous 1D Direction.
 
Array< OneD, NekDoublem_svvVarDiffCoeff
 Array of coefficient if power kernel is used in SVV.
 
bool m_IsSVVPowerKernel
 Identifier for Power Kernel otherwise DG kernel.
 
Array< OneD, NekDoublem_diffCoeff
 Diffusion coefficients (will be kinvis for velocities)
 
StdRegions::VarCoeffMap m_varCoeffLap
 Variable Coefficient map for the Laplacian which can be activated as part of SVV or otherwise.
 
NekDouble m_flowrate
 Desired volumetric flowrate.
 
NekDouble m_flowrateArea
 Area of the boundary through which we are measuring the flowrate.
 
bool m_homd1DFlowinPlane
 
NekDouble m_greenFlux
 Flux of the Stokes function solution.
 
NekDouble m_alpha
 Current flowrate correction.
 
int m_flowrateBndID
 Boundary ID of the flowrate reference surface.
 
int m_planeID
 Plane ID for cases with homogeneous expansion.
 
MultiRegions::ExpListSharedPtr m_flowrateBnd
 Flowrate reference surface.
 
Array< OneD, Array< OneD, NekDouble > > m_flowrateStokes
 Stokes solution used to impose flowrate.
 
std::ofstream m_flowrateStream
 Output stream to record flowrate.
 
int m_flowrateSteps
 Interval at which to record flowrate data.
 
int m_flowrateStepsPrecision
 Decimal precision of flow rate (alpha)
 
NekDouble m_flowrateAiidt
 Value of aii_dt used to compute Stokes flowrate solution.
 
Array< OneD, Array< OneD, NekDouble > > m_F
 
- Protected Attributes inherited from Nektar::IncNavierStokes
ExtrapolateSharedPtr m_extrapolation
 
IncBoundaryConditionsSharedPtr m_IncNavierStokesBCs
 
std::ofstream m_mdlFile
 modal energy file
 
bool m_SmoothAdvection
 bool to identify if advection term smoothing is requested
 
std::vector< SolverUtils::ForcingSharedPtrm_forcing
 Forcing terms.
 
int m_nConvectiveFields
 Number of fields to be convected;.
 
Array< OneD, int > m_velocity
 int which identifies which components of m_fields contains the velocity (u,v,w);
 
MultiRegions::ExpListSharedPtr m_pressure
 Pointer to field holding pressure field.
 
NekDouble m_kinvis
 Kinematic viscosity.
 
int m_energysteps
 dump energy to file at steps time
 
EquationType m_equationType
 equation type;
 
Array< OneD, Array< OneD, int > > m_fieldsBCToElmtID
 Mapping from BCs to Elmt IDs.
 
Array< OneD, Array< OneD, int > > m_fieldsBCToTraceID
 Mapping from BCs to Elmt Edge IDs.
 
Array< OneD, Array< OneD, NekDouble > > m_fieldsRadiationFactor
 RHS Factor for Radiation Condition.
 
int m_intSteps
 Number of time integration steps AND Order of extrapolation for pressure boundary conditions.
 
Array< OneD, NekDoublem_pivotPoint
 pivot point for moving reference frame
 
Array< OneD, NekDoublem_aeroForces
 
std::map< int, std::map< int, WomersleyParamsSharedPtr > > m_womersleyParams
 Womersley parameters if required.
 
- Protected Attributes inherited from Nektar::SolverUtils::AdvectionSystem
SolverUtils::AdvectionSharedPtr m_advObject
 Advection term.
 
- Protected Attributes inherited from Nektar::SolverUtils::UnsteadySystem
LibUtilities::TimeIntegrationSchemeSharedPtr m_intScheme
 Wrapper to the time integration scheme.
 
LibUtilities::TimeIntegrationSchemeOperators m_ode
 The time integration scheme operators to use.
 
Array< OneD, Array< OneD, NekDouble > > m_previousSolution
 Storage for previous solution for steady-state check.
 
std::vector< int > m_intVariables
 
NekDouble m_cflSafetyFactor
 CFL safety factor (comprise between 0 to 1).
 
NekDouble m_CFLGrowth
 CFL growth rate.
 
NekDouble m_CFLEnd
 Maximun cfl in cfl growth.
 
int m_abortSteps
 Number of steps between checks for abort conditions.
 
bool m_explicitDiffusion
 Indicates if explicit or implicit treatment of diffusion is used.
 
bool m_explicitAdvection
 Indicates if explicit or implicit treatment of advection is used.
 
bool m_explicitReaction
 Indicates if explicit or implicit treatment of reaction is used.
 
int m_steadyStateSteps
 Check for steady state at step interval.
 
NekDouble m_steadyStateTol
 Tolerance to which steady state should be evaluated at.
 
int m_filtersInfosteps
 Number of time steps between outputting filters information.
 
std::vector< std::pair< std::string, FilterSharedPtr > > m_filters
 
bool m_homoInitialFwd
 Flag to determine if simulation should start in homogeneous forward transformed state.
 
std::ofstream m_errFile
 
NekDouble m_epsilon
 Diffusion coefficient.
 
- Protected Attributes inherited from Nektar::SolverUtils::EquationSystem
LibUtilities::CommSharedPtr m_comm
 Communicator.
 
bool m_verbose
 
LibUtilities::SessionReaderSharedPtr m_session
 The session reader.
 
std::map< std::string, SolverUtils::SessionFunctionSharedPtrm_sessionFunctions
 Map of known SessionFunctions.
 
LibUtilities::FieldIOSharedPtr m_fld
 Field input/output.
 
Array< OneD, MultiRegions::ExpListSharedPtrm_fields
 Array holding all dependent variables.
 
SpatialDomains::BoundaryConditionsSharedPtr m_boundaryConditions
 Pointer to boundary conditions object.
 
SpatialDomains::MeshGraphSharedPtr m_graph
 Pointer to graph defining mesh.
 
std::string m_sessionName
 Name of the session.
 
NekDouble m_time
 Current time of simulation.
 
int m_initialStep
 Number of the step where the simulation should begin.
 
NekDouble m_fintime
 Finish time of the simulation.
 
NekDouble m_timestep
 Time step size.
 
NekDouble m_lambda
 Lambda constant in real system if one required.
 
NekDouble m_checktime
 Time between checkpoints.
 
NekDouble m_lastCheckTime
 
NekDouble m_TimeIncrementFactor
 
int m_nchk
 Number of checkpoints written so far.
 
int m_steps
 Number of steps to take.
 
int m_checksteps
 Number of steps between checkpoints.
 
int m_infosteps
 Number of time steps between outputting status information.
 
int m_iterPIT = 0
 Number of parallel-in-time time iteration.
 
int m_windowPIT = 0
 Index of windows for parallel-in-time time iteration.
 
int m_spacedim
 Spatial dimension (>= expansion dim).
 
int m_expdim
 Expansion dimension.
 
bool m_singleMode
 Flag to determine if single homogeneous mode is used.
 
bool m_halfMode
 Flag to determine if half homogeneous mode is used.
 
bool m_multipleModes
 Flag to determine if use multiple homogenenous modes are used.
 
bool m_useFFT
 Flag to determine if FFT is used for homogeneous transform.
 
bool m_homogen_dealiasing
 Flag to determine if dealiasing is used for homogeneous simulations.
 
bool m_specHP_dealiasing
 Flag to determine if dealisising is usde for the Spectral/hp element discretisation.
 
enum MultiRegions::ProjectionType m_projectionType
 Type of projection; e.g continuous or discontinuous.
 
Array< OneD, Array< OneD, NekDouble > > m_traceNormals
 Array holding trace normals for DG simulations in the forwards direction.
 
Array< OneD, bool > m_checkIfSystemSingular
 Flag to indicate if the fields should be checked for singularity.
 
LibUtilities::FieldMetaDataMap m_fieldMetaDataMap
 Map to identify relevant solver info to dump in output fields.
 
Array< OneD, NekDoublem_movingFrameData
 Moving reference frame status in the body frame X, Y, Z, Theta_x, Theta_y, Theta_z, [inertial] U, V, W, Omega_x, Omega_y, Omega_z, [body] A_x, A_y, A_z, DOmega_x, DOmega_y, DOmega_z, [body] pivot_x, pivot_y, pivot_z [body].
 
std::vector< std::string > m_strFrameData
 variable name in m_movingFrameData
 
std::vector< bool > m_movableDoFs
 
int m_NumQuadPointsError
 Number of Quadrature points used to work out the error.
 
enum HomogeneousType m_HomogeneousType
 
NekDouble m_LhomX
 physical length in X direction (if homogeneous)
 
NekDouble m_LhomY
 physical length in Y direction (if homogeneous)
 
NekDouble m_LhomZ
 physical length in Z direction (if homogeneous)
 
int m_npointsX
 number of points in X direction (if homogeneous)
 
int m_npointsY
 number of points in Y direction (if homogeneous)
 
int m_npointsZ
 number of points in Z direction (if homogeneous)
 
int m_HomoDirec
 number of homogenous directions
 
- Protected Attributes inherited from Nektar::SolverUtils::ALEHelper
Array< OneD, MultiRegions::ExpListSharedPtrm_fieldsALE
 
Array< OneD, Array< OneD, NekDouble > > m_gridVelocity
 
Array< OneD, Array< OneD, NekDouble > > m_gridVelocityTrace
 
std::vector< ALEBaseShPtrm_ALEs
 
bool m_ALESolver = false
 
bool m_meshDistorted = false
 
bool m_implicitALESolver = false
 
bool m_updateNormals = false
 
NekDouble m_prevStageTime = 0.0
 
int m_spaceDim
 

Static Protected Attributes

static std::string solverTypeLookupId
 
- Static Protected Attributes inherited from Nektar::IncNavierStokes
static std::string eqTypeLookupIds []
 
- Static Protected Attributes inherited from Nektar::SolverUtils::EquationSystem
static std::string equationSystemTypeLookupIds []
 
static std::string projectionTypeLookupIds []
 

Friends

class MemoryManager< VelocityCorrectionScheme >
 

Additional Inherited Members

- Protected Types inherited from Nektar::SolverUtils::EquationSystem
enum  HomogeneousType { eHomogeneous1D , eHomogeneous2D , eHomogeneous3D , eNotHomogeneous }
 Parameter for homogeneous expansions. More...
 

Detailed Description

Definition at line 42 of file VelocityCorrectionScheme.h.

Constructor & Destructor Documentation

◆ VelocityCorrectionScheme()

Nektar::VelocityCorrectionScheme::VelocityCorrectionScheme ( const LibUtilities::SessionReaderSharedPtr pSession,
const SpatialDomains::MeshGraphSharedPtr pGraph 
)
protected

Constructor. Creates ...

Parameters

param

Definition at line 65 of file VelocityCorrectionScheme.cpp.

68 : UnsteadySystem(pSession, pGraph), IncNavierStokes(pSession, pGraph),
70{
71}
IncNavierStokes(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
Constructor.
SOLVER_UTILS_EXPORT UnsteadySystem(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
Initialises UnsteadySystem class members.
StdRegions::VarCoeffMap m_varCoeffLap
Variable Coefficient map for the Laplacian which can be activated as part of SVV or otherwise.
static VarCoeffMap NullVarCoeffMap

◆ ~VelocityCorrectionScheme()

Nektar::VelocityCorrectionScheme::~VelocityCorrectionScheme ( )
overrideprotecteddefault

Member Function Documentation

◆ AddMovingFrameDataToParams()

void Nektar::VelocityCorrectionScheme::AddMovingFrameDataToParams ( const std::vector< std::string > &  strFrameData,
const Array< OneD, NekDouble > &  movingFrameData,
std::map< std::string, NekDouble > &  params 
)
protected

Definition at line 1286 of file VelocityCorrectionScheme.cpp.

1290{
1291 for (size_t i = 0; i < strFrameData.size(); ++i)
1292 {
1293 if (std::fabs(movingFrameData[i]) != 0.0)
1294 {
1295 params[strFrameData[i]] = movingFrameData[i];
1296 }
1297 }
1298}

Referenced by UpdateVelocityBCs(), v_DoInitialise(), and v_EvaluateAdvection_SetPressureBCs().

◆ AppendSVVFactors()

void Nektar::VelocityCorrectionScheme::AppendSVVFactors ( StdRegions::ConstFactorMap factors,
StdRegions::VarFactorsMap varFactorsMap 
)
protected

Definition at line 1221 of file VelocityCorrectionScheme.cpp.

1224{
1225
1226 if (m_useSpecVanVisc)
1227 {
1231 {
1233 {
1236 }
1237 else
1238 {
1241 }
1242 }
1243 }
1244}
NekDouble m_kinvis
Kinematic viscosity.
Array< OneD, NekDouble > m_svvVarDiffCoeff
Array of coefficient if power kernel is used in SVV.
bool m_IsSVVPowerKernel
Identifier for Power Kernel otherwise DG kernel.
NekDouble m_sVVCutoffRatio
cutt off ratio from which to start decayhing modes
NekDouble m_sVVDiffCoeff
Diffusion coefficient of SVV modes.
bool m_useSpecVanVisc
bool to identify if spectral vanishing viscosity is active.
StdRegions::ConstFactorMap factors
static Array< OneD, NekDouble > NullNekDouble1DArray

References Nektar::StdRegions::eFactorSVVCutoffRatio, Nektar::StdRegions::eFactorSVVDGKerDiffCoeff, Nektar::StdRegions::eFactorSVVDiffCoeff, Nektar::StdRegions::eFactorSVVPowerKerDiffCoeff, m_IsSVVPowerKernel, Nektar::IncNavierStokes::m_kinvis, m_sVVCutoffRatio, m_sVVDiffCoeff, m_svvVarDiffCoeff, m_useSpecVanVisc, and Nektar::NullNekDouble1DArray.

Referenced by v_SolveViscous(), and Nektar::VCSImplicit::v_SolveViscous().

◆ ComputeGJPNormalVelocity()

void Nektar::VelocityCorrectionScheme::ComputeGJPNormalVelocity ( const Array< OneD, const Array< OneD, NekDouble > > &  inarray,
StdRegions::VarCoeffMap varcoeffs 
)
protected

Definition at line 1252 of file VelocityCorrectionScheme.cpp.

1255{
1257 {
1259 std::dynamic_pointer_cast<MultiRegions::ContField>(m_fields[0]);
1260
1261 cfield->InitGJPData();
1262
1263 MultiRegions::GJPStabilisationSharedPtr GJPData = cfield->GetGJPData();
1264
1265 int nTracePts = GJPData->GetNumTracePts();
1266 Array<OneD, NekDouble> unorm(nTracePts, 1.0);
1267 Array<OneD, NekDouble> Fwd(nTracePts), Bwd(nTracePts);
1268 Array<OneD, Array<OneD, NekDouble>> traceNormals =
1269 GJPData->GetTraceNormals();
1270
1271 m_fields[0]->GetFwdBwdTracePhys(inarray[0], Fwd, Bwd, true, true);
1272 Vmath::Vmul(nTracePts, Fwd, 1, traceNormals[0], 1, unorm, 1);
1273
1274 // Evaluate u.n on trace
1275 for (int f = 1; f < m_fields[0]->GetCoordim(0); ++f)
1276 {
1277 m_fields[0]->GetFwdBwdTracePhys(inarray[f], Fwd, Bwd, true, true);
1278 Vmath::Vvtvp(nTracePts, Fwd, 1, traceNormals[f], 1, unorm, 1, unorm,
1279 1);
1280 }
1281 Vmath::Vabs(nTracePts, unorm, 1, unorm, 1);
1282 varcoeffs[StdRegions::eVarCoeffGJPNormVel] = unorm;
1283 }
1284}
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
bool m_useGJPNormalVel
bool to identify if GJP normal Velocity should be applied in explicit approach
std::shared_ptr< GJPStabilisation > GJPStabilisationSharedPtr
std::shared_ptr< ContField > ContFieldSharedPtr
Definition ContField.h:295
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
Definition Vmath.hpp:72
void Vabs(int n, const T *x, const int incx, T *y, const int incy)
vabs: y = |x|
Definition Vmath.hpp:352
void Vvtvp(int n, const T *w, const int incw, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
vvtvp (vector times vector plus vector): z = w*x + y
Definition Vmath.hpp:366

References Nektar::StdRegions::eVarCoeffGJPNormVel, Nektar::SolverUtils::EquationSystem::m_fields, m_useGJPNormalVel, Vmath::Vabs(), Vmath::Vmul(), and Vmath::Vvtvp().

Referenced by v_SolveViscous(), and Nektar::VCSImplicit::v_SolveViscous().

◆ create()

static SolverUtils::EquationSystemSharedPtr Nektar::VelocityCorrectionScheme::create ( const LibUtilities::SessionReaderSharedPtr pSession,
const SpatialDomains::MeshGraphSharedPtr pGraph 
)
inlinestatic

Creates an instance of this class.

Definition at line 48 of file VelocityCorrectionScheme.h.

51 {
54 pGraph);
55 p->InitObject();
56 return p;
57 }
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
std::shared_ptr< EquationSystem > EquationSystemSharedPtr
A shared pointer to an EquationSystem object.
std::vector< double > p(NPUPPER)

References Nektar::MemoryManager< DataType >::AllocateSharedPtr().

◆ EvaluateAdvection_SetPressureBCs()

void Nektar::VelocityCorrectionScheme::EvaluateAdvection_SetPressureBCs ( const Array< OneD, const Array< OneD, NekDouble > > &  inarray,
Array< OneD, Array< OneD, NekDouble > > &  outarray,
const NekDouble  time 
)
inline

Definition at line 102 of file VelocityCorrectionScheme.h.

105 {
106 v_EvaluateAdvection_SetPressureBCs(inarray, outarray, time);
107 }
virtual void v_EvaluateAdvection_SetPressureBCs(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)

References v_EvaluateAdvection_SetPressureBCs().

Referenced by v_InitObject().

◆ MeasureFlowrate()

NekDouble Nektar::VelocityCorrectionScheme::MeasureFlowrate ( const Array< OneD, Array< OneD, NekDouble > > &  inarray)
protected

Measure the volumetric flow rate through the volumetric flow rate reference surface.

This routine computes the volumetric flow rate

\[ Q(\mathbf{u}) = \frac{1}{\mu(R)} \int_R \mathbf{u} \cdot d\mathbf{s} \]

through the boundary region \( R \).

Definition at line 486 of file VelocityCorrectionScheme.cpp.

488{
489 NekDouble flowrate = 0.0;
490
491 if (m_flowrateBnd && m_flowrateBndID >= 0)
492 {
493 // If we're an actual boundary, calculate the vector flux through
494 // the boundary.
495 Array<OneD, Array<OneD, NekDouble>> boundary(m_spacedim);
496
498 {
499 // General case
500 for (int i = 0; i < m_spacedim; ++i)
501 {
502 m_fields[i]->ExtractPhysToBnd(m_flowrateBndID, inarray[i],
503 boundary[i]);
504 }
505 flowrate = m_flowrateBnd->VectorFlux(boundary);
506 }
507 else if (m_planeID == 0)
508 {
509 // Homogeneous with forcing in plane. Calculate flux only on
510 // the meanmode - calculateFlux necessary for hybrid
511 // parallelisation.
512 for (int i = 0; i < m_spacedim; ++i)
513 {
514 m_fields[i]->GetPlane(m_planeID)->ExtractPhysToBnd(
515 m_flowrateBndID, inarray[i], boundary[i]);
516 }
517
518 // the flowrate is calculated on the mean mode so it needs to be
519 // multiplied by LZ to be consistent with the general case.
520 flowrate = m_flowrateBnd->VectorFlux(boundary) *
521 m_session->GetParameter("LZ");
522 }
523 }
525 {
526 // 3DH1D case with no Flowrate boundary defined: compute flux
527 // through the zero-th (mean) plane.
528 flowrate = m_flowrateBnd->Integral(inarray[2]);
529 }
530
531 // Communication to obtain the total flowrate
533 {
534 m_comm->GetColumnComm()->AllReduce(flowrate, LibUtilities::ReduceSum);
535 }
536 else
537 {
538 m_comm->GetSpaceComm()->AllReduce(flowrate, LibUtilities::ReduceSum);
539 }
540 return flowrate / m_flowrateArea;
541}
int m_spacedim
Spatial dimension (>= expansion dim).
LibUtilities::CommSharedPtr m_comm
Communicator.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
MultiRegions::ExpListSharedPtr m_flowrateBnd
Flowrate reference surface.
NekDouble m_flowrateArea
Area of the boundary through which we are measuring the flowrate.
int m_planeID
Plane ID for cases with homogeneous expansion.
int m_flowrateBndID
Boundary ID of the flowrate reference surface.

References Nektar::SolverUtils::EquationSystem::eHomogeneous1D, Nektar::SolverUtils::EquationSystem::m_comm, Nektar::SolverUtils::EquationSystem::m_fields, m_flowrateArea, m_flowrateBnd, m_flowrateBndID, m_homd1DFlowinPlane, Nektar::SolverUtils::EquationSystem::m_HomogeneousType, m_planeID, Nektar::SolverUtils::EquationSystem::m_session, Nektar::SolverUtils::EquationSystem::m_spacedim, and Nektar::LibUtilities::ReduceSum.

Referenced by SetupFlowrate(), and v_SolveUnsteadyStokesSystem().

◆ SetUpExtrapolation()

void Nektar::VelocityCorrectionScheme::SetUpExtrapolation ( void  )
protected

Definition at line 152 of file VelocityCorrectionScheme.cpp.

153{
154 // creation of the extrapolation object
157 {
158 std::string vExtrapolation = v_GetExtrapolateStr();
159 if (m_session->DefinesSolverInfo("Extrapolation"))
160 {
161 vExtrapolation = v_GetSubSteppingExtrapolateStr(
162 m_session->GetSolverInfo("Extrapolation"));
163 }
165 vExtrapolation, m_session, m_fields, m_pressure, m_velocity,
167
168 m_extrapolation->SetForcing(m_forcing);
169 m_extrapolation->SubSteppingTimeIntegration(m_intScheme);
170 m_extrapolation->GenerateBndElmtExpansion();
171 m_extrapolation->GenerateHOPBCMap(m_session);
175 }
176}
MultiRegions::ExpListSharedPtr m_pressure
Pointer to field holding pressure field.
IncBoundaryConditionsSharedPtr m_IncNavierStokesBCs
ExtrapolateSharedPtr m_extrapolation
Array< OneD, int > m_velocity
int which identifies which components of m_fields contains the velocity (u,v,w);
EquationType m_equationType
equation type;
std::vector< SolverUtils::ForcingSharedPtr > m_forcing
Forcing terms.
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
SolverUtils::AdvectionSharedPtr m_advObject
Advection term.
LibUtilities::TimeIntegrationSchemeSharedPtr m_intScheme
Wrapper to the time integration scheme.
virtual std::string v_GetExtrapolateStr(void)
virtual std::string v_GetSubSteppingExtrapolateStr(const std::string &instr)
@ eUnsteadyNavierStokes
ExtrapolateFactory & GetExtrapolateFactory()

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), Nektar::LibUtilities::NekFactory< tKey, tBase, tParam >::CreateInstance(), Nektar::eUnsteadyNavierStokes, Nektar::eUnsteadyStokes, Nektar::GetExtrapolateFactory(), Nektar::SolverUtils::AdvectionSystem::m_advObject, Nektar::IncNavierStokes::m_equationType, Nektar::IncNavierStokes::m_extrapolation, Nektar::SolverUtils::EquationSystem::m_fields, Nektar::IncNavierStokes::m_forcing, Nektar::IncNavierStokes::m_IncNavierStokesBCs, Nektar::SolverUtils::UnsteadySystem::m_intScheme, Nektar::IncNavierStokes::m_pressure, Nektar::SolverUtils::EquationSystem::m_session, Nektar::IncNavierStokes::m_velocity, v_GetExtrapolateStr(), and v_GetSubSteppingExtrapolateStr().

Referenced by v_InitObject().

◆ SetupFlowrate()

void Nektar::VelocityCorrectionScheme::SetupFlowrate ( NekDouble  aii_dt)
protected

Set up the Stokes solution used to impose constant flowrate through a boundary.

This routine solves a Stokes equation using a unit forcing direction, specified by the user to be in the desired flow direction. This field can then be used to correct the end of each timestep to impose a constant volumetric flow rate through a user-defined boundary.

There are three modes of operation:

  • Standard two-dimensional or three-dimensional simulations (e.g. pipes or channels)
  • 3DH1D simulations where the forcing is not in the homogeneous direction (e.g. channel flow, where the y-direction of the 2D mesh is perpendicular to the wall);
  • 3DH1D simulations where the forcing is in the homogeneous direction (e.g. pipe flow in the z-direction).

In the first two cases, the user should define:

  • the Flowrate parameter, which dictates the volumetric flux through the reference area
  • tag a boundary region with the Flowrate user-defined type to define the reference area
  • define a FlowrateForce function with components ForceX, ForceY and ForceZ that defines a unit forcing in the appropriate direction.

In the latter case, the user should define only the Flowrate; the reference area is taken to be the homogeneous plane and the force is assumed to be the unit z-vector \( \hat{e}_z \).

This routine solves a single timestep of the Stokes problem (premultiplied by the backwards difference coefficient):

\[ \frac{\partial\mathbf{u}}{\partial t} = -\nabla p + \nu\nabla^2\mathbf{u} + \mathbf{f} \]

with a zero initial condition to obtain a field \( \mathbf{u}_s \). The flowrate is then corrected at each timestep \( n \) by adding the correction \( \alpha\mathbf{u}_s \) where

\[ \alpha = \frac{\overline{Q} - Q(\mathbf{u^n})}{Q(\mathbf{u}_s)} \]

where \( Q(\cdot)\) is the volumetric flux through the appropriate surface or line, which is implemented in VelocityCorrectionScheme::MeasureFlowrate. For more details, see chapter 3.2 of the thesis of D. Moxey (University of Warwick, 2011).

Definition at line 226 of file VelocityCorrectionScheme.cpp.

227{
228 m_flowrateBndID = -1;
229 m_flowrateArea = 0.0;
230
231 const Array<OneD, const SpatialDomains::BoundaryConditionShPtr> &bcs =
232 m_fields[0]->GetBndConditions();
233
234 std::string forces[] = {"X", "Y", "Z"};
235 Array<OneD, NekDouble> flowrateForce(m_spacedim, 0.0);
236
237 // Set up flowrate forces.
238 bool defined = true;
239 for (int i = 0; i < m_spacedim; ++i)
240 {
241 std::string varName = std::string("Force") + forces[i];
242 defined = m_session->DefinesFunction("FlowrateForce", varName);
243
244 if (!defined && m_HomogeneousType == eHomogeneous1D)
245 {
246 break;
247 }
248
249 ASSERTL0(defined,
250 "A 'FlowrateForce' function must defined with components "
251 "[ForceX, ...] to define direction of flowrate forcing");
252
254 m_session->GetFunction("FlowrateForce", varName);
255 flowrateForce[i] = ffunc->Evaluate();
256 }
257
258 // Define flag for case with homogeneous expansion and forcing not in the
259 // z-direction
260 m_homd1DFlowinPlane = false;
261 if (defined && m_HomogeneousType == eHomogeneous1D)
262 {
263 m_homd1DFlowinPlane = true;
264 }
265
266 // For 3DH1D simulations, if force isn't defined then assume in
267 // z-direction.
268 if (!defined)
269 {
270 flowrateForce[2] = 1.0;
271 }
272
273 // Find the boundary condition that is tagged as the flowrate boundary.
274 for (size_t i = 0; i < bcs.size(); ++i)
275 {
276 if (boost::iequals(bcs[i]->GetUserDefined(), "Flowrate"))
277 {
278 m_flowrateBndID = i;
279 break;
280 }
281 }
282
283 int tmpBr = m_flowrateBndID;
284 m_comm->AllReduce(tmpBr, LibUtilities::ReduceMax);
286 "One boundary region must be marked using the 'Flowrate' "
287 "user-defined type to monitor the volumetric flowrate.");
288
289 // Extract an appropriate expansion list to represents the boundary.
290 if (m_flowrateBndID >= 0)
291 {
292 // For a boundary, extract the boundary itself.
293 m_flowrateBnd = m_fields[0]->GetBndCondExpansions()[m_flowrateBndID];
294 }
296 {
297 // For 3DH1D simulations with no force specified, find the mean
298 // (0th) plane.
299 Array<OneD, unsigned int> zIDs = m_fields[0]->GetZIDs();
300 int tmpId = -1;
301
302 for (size_t i = 0; i < zIDs.size(); ++i)
303 {
304 if (zIDs[i] == 0)
305 {
306 tmpId = i;
307 break;
308 }
309 }
310
311 ASSERTL1(tmpId <= 0, "Should be either at location 0 or -1 if not "
312 "found");
313
314 if (tmpId != -1)
315 {
316 m_flowrateBnd = m_fields[0]->GetPlane(tmpId);
317 }
318 }
319
320 // At this point, some processors may not have m_flowrateBnd
321 // set if they don't contain the appropriate boundary. To
322 // calculate the area, we integrate 1.0 over the boundary
323 // (which has been set up with the appropriate subcommunicator
324 // to avoid deadlock), and then communicate this to the other
325 // processors with an AllReduce.
326 if (m_flowrateBnd)
327 {
328 Array<OneD, NekDouble> inArea(m_flowrateBnd->GetNpoints(), 1.0);
329 m_flowrateArea = m_flowrateBnd->Integral(inArea);
330 }
332
333 // In homogeneous case with forcing not aligned to the z-direction,
334 // redefine m_flowrateBnd so it is a 1D expansion
337 {
338 // For 3DH1D simulations with no force specified, find the mean
339 // (0th) plane.
340 Array<OneD, unsigned int> zIDs = m_fields[0]->GetZIDs();
341 m_planeID = -1;
342
343 for (size_t i = 0; i < zIDs.size(); ++i)
344 {
345 if (zIDs[i] == 0)
346 {
347 m_planeID = i;
348 break;
349 }
350 }
351
352 ASSERTL1(m_planeID <= 0, "Should be either at location 0 or -1 "
353 "if not found");
354
355 if (m_planeID != -1)
356 {
358 m_fields[0]->GetBndCondExpansions()[m_flowrateBndID]->GetPlane(
359 m_planeID);
360 }
361 }
362
363 // Set up some storage for the Stokes solution (to be stored in
364 // m_flowrateStokes) and its initial condition (inTmp), which holds the
365 // unit forcing.
366 int nqTot = m_fields[0]->GetNpoints();
367 Array<OneD, Array<OneD, NekDouble>> inTmp(m_spacedim);
368 m_flowrateStokes = Array<OneD, Array<OneD, NekDouble>>(m_spacedim);
369
370 for (int i = 0; i < m_spacedim; ++i)
371 {
372 inTmp[i] = Array<OneD, NekDouble>(nqTot, flowrateForce[i] * aii_dt);
373 m_flowrateStokes[i] = Array<OneD, NekDouble>(nqTot, 0.0);
374
376 {
377 Array<OneD, NekDouble> inTmp2(nqTot);
378 m_fields[i]->HomogeneousFwdTrans(nqTot, inTmp[i], inTmp2);
379 m_fields[i]->SetWaveSpace(true);
380 inTmp[i] = inTmp2;
381 }
382
383 Vmath::Zero(m_fields[i]->GetNcoeffs(), m_fields[i]->UpdateCoeffs(), 1);
384 }
385
386 // Create temporary extrapolation object to avoid issues with
387 // m_extrapolation for HOPBCs using higher order timestepping schemes.
388 // Zero pressure BCs in Neumann boundaries that may have been
389 // set in the advection step.
390 Array<OneD, const SpatialDomains::BoundaryConditionShPtr> PBndConds =
391 m_pressure->GetBndConditions();
392 Array<OneD, MultiRegions::ExpListSharedPtr> PBndExp =
393 m_pressure->GetBndCondExpansions();
394 for (size_t n = 0; n < PBndConds.size(); ++n)
395 {
396 if (PBndConds[n]->GetBoundaryConditionType() ==
398 {
399 Vmath::Zero(PBndExp[n]->GetNcoeffs(), PBndExp[n]->UpdateCoeffs(),
400 1);
401 }
402 }
403
404 // Finally, calculate the solution and the flux of the Stokes
405 // solution. We set m_greenFlux to maximum numeric limit, which signals
406 // to SolveUnsteadyStokesSystem that we don't need to apply a flowrate
407 // force.
408 m_greenFlux = std::numeric_limits<NekDouble>::max();
409 m_flowrateAiidt = aii_dt;
410
411 // Save the number of convective field in case it is not set
412 // to spacedim. Only need velocity components for stokes forcing
413 int SaveNConvectiveFields = m_nConvectiveFields;
415 // Save Dirichlet BCs and set to zero for Stokes solve
416 std::map<std::pair<int, int>, Array<OneD, NekDouble>> SaveDirBCs;
417 for (int i = 0; i < m_nConvectiveFields; ++i)
418 {
419 const Array<OneD, const ExpListSharedPtr> &BndCondExp =
420 m_fields[i]->GetBndCondExpansions();
421
422 for (int j = 0; j < BndCondExp.size(); ++j)
423 {
424 if (m_fields[i]
425 ->GetBndConditions()[j]
426 ->GetBoundaryConditionType() == SpatialDomains::eDirichlet)
427 {
428 Array<OneD, NekDouble> bndcoeffs =
429 m_fields[i]->UpdateBndCondExpansion(j)->UpdateCoeffs();
430 SaveDirBCs[std::make_pair(i, j)] =
431 Array<OneD, NekDouble>(bndcoeffs.size(), bndcoeffs.data());
432 Vmath::Zero(bndcoeffs.size(), bndcoeffs, 1);
433 }
434 }
435 }
436 SolveUnsteadyStokesSystem(inTmp, m_flowrateStokes, 0.0, aii_dt);
437 // Reset Dirichlet BCs
438 for (int i = 0; i < m_nConvectiveFields; ++i)
439 {
440 for (int j = 0; j < m_fields[i]->GetBndCondExpansions().size(); ++j)
441 {
442 if (m_fields[i]
443 ->GetBndConditions()[j]
444 ->GetBoundaryConditionType() == SpatialDomains::eDirichlet)
445 {
446 Array<OneD, NekDouble> bndcoeffs =
447 m_fields[i]->UpdateBndCondExpansion(j)->UpdateCoeffs();
448 Vmath::Vcopy(bndcoeffs.size(), SaveDirBCs[std::make_pair(i, j)],
449 1, bndcoeffs, 1);
450 }
451 }
452 }
453
454 m_nConvectiveFields = SaveNConvectiveFields;
456
457 // If the user specified IO_FlowSteps, open a handle to store output.
458 if (m_comm->GetRank() == 0 && m_flowrateSteps &&
459 !m_flowrateStream.is_open())
460 {
461 std::string filename = m_session->GetSessionName();
462 filename += ".prs";
463 m_flowrateStream.open(filename.c_str());
464 m_flowrateStream.setf(std::ios::scientific, std::ios::floatfield);
465 m_flowrateStream << "# step time dP" << std::endl
466 << "# -------------------------------------------"
467 << std::endl;
468 }
469
470 // Replace pressure BCs with those evaluated from advection step
471 m_extrapolation->CopyPressureHBCsToPbndExp();
472}
#define ASSERTL0(condition, msg)
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
int m_nConvectiveFields
Number of fields to be convected;.
SOLVER_UTILS_EXPORT int GetNcoeffs()
NekDouble m_greenFlux
Flux of the Stokes function solution.
NekDouble MeasureFlowrate(const Array< OneD, Array< OneD, NekDouble > > &inarray)
Measure the volumetric flow rate through the volumetric flow rate reference surface.
Array< OneD, Array< OneD, NekDouble > > m_flowrateStokes
Stokes solution used to impose flowrate.
void SolveUnsteadyStokesSystem(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time, const NekDouble a_iixDt)
int m_flowrateSteps
Interval at which to record flowrate data.
std::ofstream m_flowrateStream
Output stream to record flowrate.
NekDouble m_flowrateAiidt
Value of aii_dt used to compute Stokes flowrate solution.
std::shared_ptr< Equation > EquationSharedPtr
Definition Equation.h:131
void Zero(int n, T *x, const int incx)
Zero vector.
Definition Vmath.hpp:273
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition Vmath.hpp:825

References ASSERTL0, ASSERTL1, Nektar::SpatialDomains::eDirichlet, Nektar::SolverUtils::EquationSystem::eHomogeneous1D, Nektar::SpatialDomains::eNeumann, Nektar::SolverUtils::EquationSystem::GetNcoeffs(), Nektar::SolverUtils::EquationSystem::m_comm, Nektar::IncNavierStokes::m_extrapolation, Nektar::SolverUtils::EquationSystem::m_fields, m_flowrateAiidt, m_flowrateArea, m_flowrateBnd, m_flowrateBndID, m_flowrateSteps, m_flowrateStokes, m_flowrateStream, m_greenFlux, m_homd1DFlowinPlane, Nektar::SolverUtils::EquationSystem::m_HomogeneousType, Nektar::IncNavierStokes::m_nConvectiveFields, m_planeID, Nektar::IncNavierStokes::m_pressure, Nektar::SolverUtils::EquationSystem::m_session, Nektar::SolverUtils::EquationSystem::m_spacedim, MeasureFlowrate(), Nektar::LibUtilities::ReduceMax, SolveUnsteadyStokesSystem(), Vmath::Vcopy(), and Vmath::Zero().

Referenced by v_SolveUnsteadyStokesSystem().

◆ SetUpPressureForcing()

void Nektar::VelocityCorrectionScheme::SetUpPressureForcing ( const Array< OneD, const Array< OneD, NekDouble > > &  fields,
Array< OneD, Array< OneD, NekDouble > > &  Forcing,
const NekDouble  aii_Dt 
)
inline

Definition at line 62 of file VelocityCorrectionScheme.h.

65 {
66 v_SetUpPressureForcing(fields, Forcing, aii_Dt);
67 }
virtual void v_SetUpPressureForcing(const Array< OneD, const Array< OneD, NekDouble > > &fields, Array< OneD, Array< OneD, NekDouble > > &Forcing, const NekDouble aii_Dt)

References v_SetUpPressureForcing().

Referenced by v_SolveUnsteadyStokesSystem().

◆ SetUpSVV()

void Nektar::VelocityCorrectionScheme::SetUpSVV ( void  )
protected

Definition at line 993 of file VelocityCorrectionScheme.cpp.

994{
995
996 m_session->MatchSolverInfo("SpectralVanishingViscosity", "PowerKernel",
997 m_useSpecVanVisc, false);
998
1000 {
1002 }
1003 else
1004 {
1005 m_useHomo1DSpecVanVisc = false;
1006
1007 m_session->MatchSolverInfo("SpectralVanishingViscositySpectralHP",
1008 "PowerKernel", m_useSpecVanVisc, false);
1009 }
1010
1011 if (m_useSpecVanVisc)
1012 {
1013 m_IsSVVPowerKernel = true;
1014 }
1015 else
1016 {
1017 m_session->MatchSolverInfo("SpectralVanishingViscosity", "DGKernel",
1018 m_useSpecVanVisc, false);
1019 if (m_useSpecVanVisc)
1020 {
1022 }
1023 else
1024 {
1025 m_session->MatchSolverInfo("SpectralVanishingViscositySpectralHP",
1026 "DGKernel", m_useSpecVanVisc, false);
1027 }
1028
1029 if (m_useSpecVanVisc)
1030 {
1031 m_IsSVVPowerKernel = false;
1032 }
1033 }
1034
1035 // set up varcoeff kernel if PowerKernel or DG is specified
1036 if (m_useSpecVanVisc)
1037 {
1038 Array<OneD, Array<OneD, NekDouble>> SVVVelFields =
1040 if (m_session->DefinesFunction("SVVVelocityMagnitude"))
1041 {
1042 if (m_comm->GetRank() == 0)
1043 {
1044 std::cout << "Seting up SVV velocity from "
1045 "SVVVelocityMagnitude section in session file"
1046 << std::endl;
1047 }
1048 size_t nvel = m_velocity.size();
1049 size_t phystot = m_fields[0]->GetTotPoints();
1050 SVVVelFields = Array<OneD, Array<OneD, NekDouble>>(nvel);
1051 std::vector<std::string> vars;
1052 for (size_t i = 0; i < nvel; ++i)
1053 {
1054 SVVVelFields[i] = Array<OneD, NekDouble>(phystot);
1055 vars.push_back(m_session->GetVariable(m_velocity[i]));
1056 }
1057
1058 // Load up files into m_fields;
1059 GetFunction("SVVVelocityMagnitude")->Evaluate(vars, SVVVelFields);
1060 }
1061
1062 m_svvVarDiffCoeff = Array<OneD, NekDouble>(m_fields[0]->GetNumElmts());
1063 SVVVarDiffCoeff(1.0, m_svvVarDiffCoeff, SVVVelFields);
1064 m_session->LoadParameter("SVVDiffCoeff", m_sVVDiffCoeff, 1.0);
1065 }
1066 else
1067 {
1069 m_session->LoadParameter("SVVDiffCoeff", m_sVVDiffCoeff, 0.1);
1070 }
1071
1072 // Load parameters for Spectral Vanishing Viscosity
1073 if (m_useSpecVanVisc == false)
1074 {
1075 m_session->MatchSolverInfo("SpectralVanishingViscosity", "True",
1076 m_useSpecVanVisc, false);
1077 if (m_useSpecVanVisc == false)
1078 {
1079 m_session->MatchSolverInfo("SpectralVanishingViscosity",
1080 "ExpKernel", m_useSpecVanVisc, false);
1081 }
1083
1084 if (m_useSpecVanVisc == false)
1085 {
1086 m_session->MatchSolverInfo("SpectralVanishingViscositySpectralHP",
1087 "True", m_useSpecVanVisc, false);
1088 if (m_useSpecVanVisc == false)
1089 {
1090 m_session->MatchSolverInfo(
1091 "SpectralVanishingViscositySpectralHP", "ExpKernel",
1092 m_useSpecVanVisc, false);
1093 }
1094 }
1095 }
1096
1097 // Case of only Homo1D kernel
1098 if (m_session->DefinesSolverInfo("SpectralVanishingViscosityHomo1D"))
1099 {
1100 m_session->MatchSolverInfo("SpectralVanishingViscosityHomo1D", "True",
1101 m_useHomo1DSpecVanVisc, false);
1102 if (m_useHomo1DSpecVanVisc == false)
1103 {
1104 m_session->MatchSolverInfo("SpectralVanishingViscosityHomo1D",
1105 "ExpKernel", m_useHomo1DSpecVanVisc,
1106 false);
1107 }
1108 }
1109
1110 m_session->LoadParameter("SVVCutoffRatio", m_sVVCutoffRatio, 0.75);
1111 m_session->LoadParameter("SVVCutoffRatioHomo1D", m_sVVCutoffRatioHomo1D,
1113 m_session->LoadParameter("SVVDiffCoeffHomo1D", m_sVVDiffCoeffHomo1D,
1115
1117 {
1118 ASSERTL0(
1120 "Expect to have three velocity fields with homogenous expansion");
1121
1123 {
1124 Array<OneD, unsigned int> planes;
1125 planes = m_fields[0]->GetZIDs();
1126
1127 size_t num_planes = planes.size();
1128 Array<OneD, NekDouble> SVV(num_planes, 0.0);
1129 NekDouble fac;
1130 size_t kmodes = m_fields[0]->GetHomogeneousBasis()->GetNumModes();
1131 size_t pstart;
1132
1133 pstart = m_sVVCutoffRatioHomo1D * kmodes;
1134
1135 for (size_t n = 0; n < num_planes; ++n)
1136 {
1137 if (planes[n] > pstart)
1138 {
1139 fac = (NekDouble)((planes[n] - kmodes) *
1140 (planes[n] - kmodes)) /
1141 ((NekDouble)((planes[n] - pstart) *
1142 (planes[n] - pstart)));
1143 SVV[n] = m_sVVDiffCoeffHomo1D * exp(-fac) / m_kinvis;
1144 }
1145 }
1146
1147 for (size_t i = 0; i < m_velocity.size(); ++i)
1148 {
1149 m_fields[m_velocity[i]]->SetHomo1DSpecVanVisc(SVV);
1150 }
1151 }
1152 }
1153}
SOLVER_UTILS_EXPORT SessionFunctionSharedPtr GetFunction(std::string name, const MultiRegions::ExpListSharedPtr &field=MultiRegions::NullExpListSharedPtr, bool cache=false)
Get a SessionFunction by name.
NekDouble m_sVVDiffCoeffHomo1D
Diffusion coefficient of SVV modes in homogeneous 1D Direction.
void SVVVarDiffCoeff(const NekDouble velmag, Array< OneD, NekDouble > &diffcoeff, const Array< OneD, Array< OneD, NekDouble > > &vel=NullNekDoubleArrayOfArray)
bool m_useHomo1DSpecVanVisc
bool to identify if spectral vanishing viscosity is active.
static Array< OneD, Array< OneD, NekDouble > > NullNekDoubleArrayOfArray

References ASSERTL0, Nektar::SolverUtils::EquationSystem::eHomogeneous1D, Nektar::SolverUtils::EquationSystem::GetFunction(), Nektar::SolverUtils::EquationSystem::m_comm, Nektar::SolverUtils::EquationSystem::m_fields, Nektar::SolverUtils::EquationSystem::m_HomogeneousType, m_IsSVVPowerKernel, Nektar::IncNavierStokes::m_kinvis, Nektar::IncNavierStokes::m_nConvectiveFields, Nektar::SolverUtils::EquationSystem::m_session, m_sVVCutoffRatio, m_sVVCutoffRatioHomo1D, m_sVVDiffCoeff, m_sVVDiffCoeffHomo1D, m_svvVarDiffCoeff, m_useHomo1DSpecVanVisc, m_useSpecVanVisc, Nektar::IncNavierStokes::m_velocity, Nektar::NullNekDouble1DArray, Nektar::NullNekDoubleArrayOfArray, and SVVVarDiffCoeff().

Referenced by v_InitObject().

◆ SetUpViscousForcing()

void Nektar::VelocityCorrectionScheme::SetUpViscousForcing ( const Array< OneD, const Array< OneD, NekDouble > > &  inarray,
Array< OneD, Array< OneD, NekDouble > > &  Forcing,
const NekDouble  aii_Dt 
)
inline

Definition at line 69 of file VelocityCorrectionScheme.h.

72 {
73 v_SetUpViscousForcing(inarray, Forcing, aii_Dt);
74 }
virtual void v_SetUpViscousForcing(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &Forcing, const NekDouble aii_Dt)

References v_SetUpViscousForcing().

Referenced by v_SolveUnsteadyStokesSystem().

◆ SolvePressure()

void Nektar::VelocityCorrectionScheme::SolvePressure ( const Array< OneD, NekDouble > &  Forcing)
inline

Definition at line 76 of file VelocityCorrectionScheme.h.

77 {
78 v_SolvePressure(Forcing);
79 }
virtual void v_SolvePressure(const Array< OneD, NekDouble > &Forcing)

References v_SolvePressure().

Referenced by v_SolveUnsteadyStokesSystem().

◆ SolveSolid()

void Nektar::VelocityCorrectionScheme::SolveSolid ( NekDouble  time)
inline

Definition at line 81 of file VelocityCorrectionScheme.h.

82 {
83 v_SolveSolid(time);
84 }
virtual void v_SolveSolid(NekDouble time)

References v_SolveSolid().

Referenced by v_SolveUnsteadyStokesSystem().

◆ SolveUnsteadyStokesSystem()

void Nektar::VelocityCorrectionScheme::SolveUnsteadyStokesSystem ( const Array< OneD, const Array< OneD, NekDouble > > &  inarray,
Array< OneD, Array< OneD, NekDouble > > &  outarray,
const NekDouble  time,
const NekDouble  a_iixDt 
)
inline

Definition at line 94 of file VelocityCorrectionScheme.h.

98 {
99 v_SolveUnsteadyStokesSystem(inarray, outarray, time, a_iixDt);
100 }
virtual void v_SolveUnsteadyStokesSystem(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time, const NekDouble a_iixDt)

References v_SolveUnsteadyStokesSystem().

Referenced by SetupFlowrate(), and v_InitObject().

◆ SolveViscous()

void Nektar::VelocityCorrectionScheme::SolveViscous ( const Array< OneD, const Array< OneD, NekDouble > > &  Forcing,
const Array< OneD, const Array< OneD, NekDouble > > &  inarray,
Array< OneD, Array< OneD, NekDouble > > &  outarray,
const NekDouble  aii_Dt 
)
inline

Definition at line 86 of file VelocityCorrectionScheme.h.

90 {
91 v_SolveViscous(Forcing, inarray, outarray, aii_Dt);
92 }
virtual void v_SolveViscous(const Array< OneD, const Array< OneD, NekDouble > > &Forcing, const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble aii_Dt)

References v_SolveViscous().

Referenced by v_SolveUnsteadyStokesSystem().

◆ SVVVarDiffCoeff()

void Nektar::VelocityCorrectionScheme::SVVVarDiffCoeff ( const NekDouble  velmag,
Array< OneD, NekDouble > &  diffcoeff,
const Array< OneD, Array< OneD, NekDouble > > &  vel = NullNekDoubleArrayOfArray 
)
protected

Definition at line 1155 of file VelocityCorrectionScheme.cpp.

1158{
1159 size_t phystot = m_fields[0]->GetTotPoints();
1160 size_t nel = m_fields[0]->GetNumElmts();
1161 size_t nvel, cnt;
1162
1163 Array<OneD, NekDouble> tmp;
1164
1165 Vmath::Fill(nel, velmag, diffcoeff, 1);
1166
1167 if (vel != NullNekDoubleArrayOfArray)
1168 {
1169 Array<OneD, NekDouble> Velmag(phystot);
1170 nvel = vel.size();
1171 // calculate magnitude of v
1172 Vmath::Vmul(phystot, vel[0], 1, vel[0], 1, Velmag, 1);
1173 for (size_t n = 1; n < nvel; ++n)
1174 {
1175 Vmath::Vvtvp(phystot, vel[n], 1, vel[n], 1, Velmag, 1, Velmag, 1);
1176 }
1177 Vmath::Vsqrt(phystot, Velmag, 1, Velmag, 1);
1178
1179 cnt = 0;
1180 Array<OneD, NekDouble> tmp;
1181 // calculate mean value of vel mag.
1182 for (size_t i = 0; i < nel; ++i)
1183 {
1184 size_t nq = m_fields[0]->GetExp(i)->GetTotPoints();
1185 tmp = Velmag + cnt;
1186 diffcoeff[i] = m_fields[0]->GetExp(i)->Integral(tmp);
1187 Vmath::Fill(nq, 1.0, tmp, 1);
1188 NekDouble area = m_fields[0]->GetExp(i)->Integral(tmp);
1189 diffcoeff[i] = diffcoeff[i] / area;
1190 cnt += nq;
1191 }
1192 }
1193 else
1194 {
1195 nvel = m_expdim;
1196 }
1197
1198 for (size_t e = 0; e < nel; e++)
1199 {
1200 LocalRegions::ExpansionSharedPtr exp = m_fields[0]->GetExp(e);
1201 NekDouble h = 0;
1202
1203 // Find maximum length of edge.
1204 size_t nEdge = exp->GetGeom()->GetNumEdges();
1205 for (size_t i = 0; i < nEdge; ++i)
1206 {
1207 h = std::max(h, exp->GetGeom()->GetEdge(i)->GetVertex(0)->dist(
1208 *(exp->GetGeom()->GetEdge(i)->GetVertex(1))));
1209 }
1210
1211 int p = 0;
1212 for (int i = 0; i < m_expdim; ++i)
1213 {
1214 p = std::max(p, exp->GetBasisNumModes(i) - 1);
1215 }
1216
1217 diffcoeff[e] *= h / p;
1218 }
1219}
std::shared_ptr< Expansion > ExpansionSharedPtr
Definition Expansion.h:66
void Vsqrt(int n, const T *x, const int incx, T *y, const int incy)
sqrt y = sqrt(x)
Definition Vmath.hpp:340
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
Definition Vmath.hpp:54

References Vmath::Fill(), Nektar::SolverUtils::EquationSystem::m_expdim, Nektar::SolverUtils::EquationSystem::m_fields, Nektar::NullNekDoubleArrayOfArray, Vmath::Vmul(), Vmath::Vsqrt(), and Vmath::Vvtvp().

Referenced by SetUpSVV().

◆ UpdateVelocityBCs()

void Nektar::VelocityCorrectionScheme::UpdateVelocityBCs ( NekDouble  time)
protected

Definition at line 869 of file VelocityCorrectionScheme.cpp.

870{
871 // update velocity boundary condition
872 Array<OneD, Array<OneD, NekDouble>> fields;
873 Array<OneD, const Array<OneD, NekDouble>> Adv;
874 std::map<std::string, NekDouble> params;
875 params["Time"] = time;
876 params["velocity"] = 1.;
878 m_IncNavierStokesBCs->Update(fields, Adv, params);
879}
std::vector< std::string > m_strFrameData
variable name in m_movingFrameData
Array< OneD, NekDouble > m_movingFrameData
Moving reference frame status in the body frame X, Y, Z, Theta_x, Theta_y, Theta_z,...
void AddMovingFrameDataToParams(const std::vector< std::string > &strFrameData, const Array< OneD, NekDouble > &movingFrameData, std::map< std::string, NekDouble > &params)

References AddMovingFrameDataToParams(), Nektar::IncNavierStokes::m_IncNavierStokesBCs, Nektar::SolverUtils::EquationSystem::m_movingFrameData, and Nektar::SolverUtils::EquationSystem::m_strFrameData.

Referenced by v_SolveSolid(), and Nektar::VCSFSI::v_SolveSolid().

◆ v_DoInitialise()

void Nektar::VelocityCorrectionScheme::v_DoInitialise ( bool  dumpInitialConditions = true)
overrideprotectedvirtual

Sets up initial conditions.

Sets the initial conditions.

Reimplemented from Nektar::SolverUtils::UnsteadySystem.

Definition at line 651 of file VelocityCorrectionScheme.cpp.

652{
653 m_F = Array<OneD, Array<OneD, NekDouble>>(m_nConvectiveFields);
654
655 for (int i = 0; i < m_nConvectiveFields; ++i)
656 {
657 m_F[i] = Array<OneD, NekDouble>(m_fields[0]->GetTotPoints(), 0.0);
658 }
659
660 m_flowrateAiidt = 0.0;
661
662 AdvectionSystem::v_DoInitialise(dumpInitialConditions);
663
664 // Set up Field Meta Data for output files
665 m_fieldMetaDataMap["Kinvis"] = boost::lexical_cast<std::string>(m_kinvis);
666 m_fieldMetaDataMap["TimeStep"] =
667 boost::lexical_cast<std::string>(m_timestep);
668
669 // set boundary conditions here so that any normal component
670 // correction are imposed before they are imposed on initial
671 // field below
673 std::map<std::string, NekDouble> params;
674 params["Time"] = m_time;
675 params["velocity"] = 1.;
677 Array<OneD, Array<OneD, NekDouble>> fields;
678 Array<OneD, Array<OneD, NekDouble>> Adv;
679 m_IncNavierStokesBCs->Update(fields, Adv, params);
680
681 // Ensure the initial conditions have correct BCs
682 for (size_t i = 0; i < m_fields.size(); ++i)
683 {
684 m_fields[i]->ImposeDirichletConditions(m_fields[i]->UpdateCoeffs());
685 m_fields[i]->LocalToGlobal();
686 m_fields[i]->GlobalToLocal();
687 m_fields[i]->BwdTrans(m_fields[i]->GetCoeffs(),
688 m_fields[i]->UpdatePhys());
689 }
690
692 {
693 // initialise GJP in first field and copy to other convective fields
694 if (m_fields[0]->GetGJPData() == nullptr)
695 {
696 std::dynamic_pointer_cast<MultiRegions::ContField>(m_fields[0])
697 ->InitGJPData();
698 }
699 for (unsigned i = 1; i < m_nConvectiveFields; ++i)
700 {
701 std::dynamic_pointer_cast<MultiRegions::ContField>(m_fields[i])
702 ->SetGJPData(m_fields[0]->GetGJPData());
703 }
704 }
705}
void SetBoundaryConditions(NekDouble time)
time dependent boundary conditions updating
NekDouble m_timestep
Time step size.
NekDouble m_time
Current time of simulation.
SOLVER_UTILS_EXPORT int GetTotPoints()
LibUtilities::FieldMetaDataMap m_fieldMetaDataMap
Map to identify relevant solver info to dump in output fields.
bool m_useGJPStabilisation
bool to identify if GJP semi-implicit is active.
Array< OneD, Array< OneD, NekDouble > > m_F

References AddMovingFrameDataToParams(), Nektar::SolverUtils::EquationSystem::GetTotPoints(), m_F, Nektar::SolverUtils::EquationSystem::m_fieldMetaDataMap, Nektar::SolverUtils::EquationSystem::m_fields, m_flowrateAiidt, Nektar::IncNavierStokes::m_IncNavierStokesBCs, Nektar::IncNavierStokes::m_kinvis, Nektar::SolverUtils::EquationSystem::m_movingFrameData, Nektar::IncNavierStokes::m_nConvectiveFields, Nektar::SolverUtils::EquationSystem::m_strFrameData, Nektar::SolverUtils::EquationSystem::m_time, Nektar::SolverUtils::EquationSystem::m_timestep, m_useGJPStabilisation, and Nektar::IncNavierStokes::SetBoundaryConditions().

Referenced by Nektar::VCSImplicit::v_DoInitialise(), Nektar::PressDecompVCSFSI::v_DoInitialise(), and Nektar::VCSFSI::v_DoInitialise().

◆ v_EvaluateAdvection_SetPressureBCs()

void Nektar::VelocityCorrectionScheme::v_EvaluateAdvection_SetPressureBCs ( const Array< OneD, const Array< OneD, NekDouble > > &  inarray,
Array< OneD, Array< OneD, NekDouble > > &  outarray,
const NekDouble  time 
)
protectedvirtual

Explicit part of the method - Advection, Forcing + HOPBCs

Reimplemented in Nektar::VCSMapping, and Nektar::VCSImplicit.

Definition at line 758 of file VelocityCorrectionScheme.cpp.

761{
762 LibUtilities::Timer timer;
763 timer.Start();
764 EvaluateAdvectionTerms(inarray, outarray, time);
765 timer.Stop();
766 timer.AccumulateRegion("Advection Terms");
767
768 // Smooth advection
770 {
771 for (int i = 0; i < m_nConvectiveFields; ++i)
772 {
773 m_pressure->SmoothField(outarray[i]);
774 }
775 }
776
777 // Add forcing terms
778 for (auto &x : m_forcing)
779 {
780 x->Apply(m_fields, inarray, outarray, time);
781 }
782
783 // Calculate High-Order pressure boundary conditions
784 timer.Start();
785 std::map<std::string, NekDouble> params;
786 params["Kinvis"] = m_kinvis;
787 params["Time"] = time + m_timestep;
788 params["pressure"] = 1.;
790 m_extrapolation->EvaluatePressureBCs(inarray, outarray, m_kinvis);
791 m_IncNavierStokesBCs->Update(inarray, outarray, params);
792 timer.Stop();
793 timer.AccumulateRegion("Pressure BCs");
794}
bool m_SmoothAdvection
bool to identify if advection term smoothing is requested
void EvaluateAdvectionTerms(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)

References Nektar::LibUtilities::Timer::AccumulateRegion(), AddMovingFrameDataToParams(), Nektar::IncNavierStokes::EvaluateAdvectionTerms(), Nektar::IncNavierStokes::m_extrapolation, Nektar::SolverUtils::EquationSystem::m_fields, Nektar::IncNavierStokes::m_forcing, Nektar::IncNavierStokes::m_IncNavierStokesBCs, Nektar::IncNavierStokes::m_kinvis, Nektar::SolverUtils::EquationSystem::m_movingFrameData, Nektar::IncNavierStokes::m_nConvectiveFields, Nektar::IncNavierStokes::m_pressure, Nektar::IncNavierStokes::m_SmoothAdvection, Nektar::SolverUtils::EquationSystem::m_strFrameData, Nektar::SolverUtils::EquationSystem::m_timestep, Nektar::LibUtilities::Timer::Start(), and Nektar::LibUtilities::Timer::Stop().

Referenced by EvaluateAdvection_SetPressureBCs().

◆ v_GenerateSummary()

void Nektar::VelocityCorrectionScheme::v_GenerateSummary ( SolverUtils::SummaryList s)
overrideprotectedvirtual

Print a summary of time stepping parameters.

Prints a summary with some information regards the time-stepping.

Reimplemented from Nektar::SolverUtils::UnsteadySystem.

Definition at line 564 of file VelocityCorrectionScheme.cpp.

565{
566 AdvectionSystem::v_GenerateSummary(s);
567 SolverUtils::AddSummaryItem(s, "Splitting Scheme",
568 "Velocity correction (strong press. form)");
569
570 if (m_extrapolation->GetSubStepName().size())
571 {
572 SolverUtils::AddSummaryItem(s, "Substepping",
573 m_extrapolation->GetSubStepName());
574 }
575
576 std::string dealias = m_homogen_dealiasing ? "Homogeneous1D" : "";
578 {
579 dealias += (dealias == "" ? "" : " + ") + std::string("spectral/hp");
580 }
581 if (dealias != "")
582 {
583 SolverUtils::AddSummaryItem(s, "Dealiasing", dealias);
584 }
585
586 std::string smoothing = m_useSpecVanVisc ? "spectral/hp" : "";
587 if (smoothing != "")
588 {
590 {
592 s, "Smoothing-SpecHP",
593 "SVV (" + smoothing + " Exp Kernel(cut-off = " +
594 boost::lexical_cast<std::string>(m_sVVCutoffRatio) +
595 ", diff coeff = " +
596 boost::lexical_cast<std::string>(m_sVVDiffCoeff) + "))");
597 }
598 else
599 {
601 {
603 s, "Smoothing-SpecHP",
604 "SVV (" + smoothing + " Power Kernel (Power ratio =" +
605 boost::lexical_cast<std::string>(m_sVVCutoffRatio) +
606 ", diff coeff = " +
607 boost::lexical_cast<std::string>(m_sVVDiffCoeff) +
608 "*Uh/p))");
609 }
610 else
611 {
613 s, "Smoothing-SpecHP",
614 "SVV (" + smoothing + " DG Kernel (diff coeff = " +
615 boost::lexical_cast<std::string>(m_sVVDiffCoeff) +
616 "*Uh/p))");
617 }
618 }
619 }
620
622 {
624 s, "Smoothing-Homo1D",
625 "SVV (Homogeneous1D - Exp Kernel(cut-off = " +
626 boost::lexical_cast<std::string>(m_sVVCutoffRatioHomo1D) +
627 ", diff coeff = " +
628 boost::lexical_cast<std::string>(m_sVVDiffCoeffHomo1D) + "))");
629 }
630
632 {
634 s, "GJP Stab. Impl. ",
635 m_session->GetSolverInfo("GJPStabilisation"));
636 SolverUtils::AddSummaryItem(s, "GJP Stab. JumpScale", m_GJPJumpScale);
637
638 if (boost::iequals(m_session->GetSolverInfo("GJPStabilisation"),
639 "Explicit"))
640 {
642 s, "GJP Normal Velocity",
643 m_session->GetSolverInfo("GJPNormalVelocity"));
644 }
645 }
646}
bool m_specHP_dealiasing
Flag to determine if dealisising is usde for the Spectral/hp element discretisation.
bool m_homogen_dealiasing
Flag to determine if dealiasing is used for homogeneous simulations.
void AddSummaryItem(SummaryList &l, const std::string &name, const std::string &value)
Adds a summary item to the summary info list.
Definition Misc.cpp:47

References Nektar::SolverUtils::AddSummaryItem(), Nektar::SolverUtils::EquationSystem::eHomogeneous1D, Nektar::IncNavierStokes::m_extrapolation, m_GJPJumpScale, Nektar::SolverUtils::EquationSystem::m_homogen_dealiasing, Nektar::SolverUtils::EquationSystem::m_HomogeneousType, m_IsSVVPowerKernel, Nektar::SolverUtils::EquationSystem::m_session, Nektar::SolverUtils::EquationSystem::m_specHP_dealiasing, m_sVVCutoffRatio, m_sVVCutoffRatioHomo1D, m_sVVDiffCoeff, m_sVVDiffCoeffHomo1D, m_svvVarDiffCoeff, m_useGJPStabilisation, m_useHomo1DSpecVanVisc, m_useSpecVanVisc, and Nektar::NullNekDouble1DArray.

Referenced by Nektar::SmoothedProfileMethod::v_GenerateSummary().

◆ v_GetExtrapolateStr()

virtual std::string Nektar::VelocityCorrectionScheme::v_GetExtrapolateStr ( void  )
inlineprotectedvirtual

Reimplemented in Nektar::VCSImplicit, and Nektar::VCSWeakPressure.

Definition at line 228 of file VelocityCorrectionScheme.h.

229 {
230 return "Standard";
231 }

Referenced by SetUpExtrapolation().

◆ v_GetForceDimension()

int Nektar::VelocityCorrectionScheme::v_GetForceDimension ( void  )
overrideprotectedvirtual

Implements Nektar::IncNavierStokes.

Definition at line 750 of file VelocityCorrectionScheme.cpp.

751{
752 return m_session->GetVariables().size() - 1;
753}

References Nektar::SolverUtils::EquationSystem::m_session.

◆ v_GetSubSteppingExtrapolateStr()

virtual std::string Nektar::VelocityCorrectionScheme::v_GetSubSteppingExtrapolateStr ( const std::string &  instr)
inlineprotectedvirtual

Reimplemented in Nektar::VCSWeakPressure.

Definition at line 233 of file VelocityCorrectionScheme.h.

234 {
235 return instr;
236 }

Referenced by SetUpExtrapolation().

◆ v_GetSystemSingularChecks()

Array< OneD, bool > Nektar::VelocityCorrectionScheme::v_GetSystemSingularChecks ( )
overrideprotectedvirtual

Reimplemented from Nektar::SolverUtils::EquationSystem.

Definition at line 739 of file VelocityCorrectionScheme.cpp.

740{
741 int vVar = m_session->GetVariables().size();
742 Array<OneD, bool> vChecks(vVar, false);
743 vChecks[vVar - 1] = true;
744 return vChecks;
745}

References Nektar::SolverUtils::EquationSystem::m_session.

◆ v_InitObject()

void Nektar::VelocityCorrectionScheme::v_InitObject ( bool  DeclareFeld = true)
overrideprotectedvirtual

Initialisation object for EquationSystem.

Continuous field

Setting up the normals

Setting up the normals

Reimplemented from Nektar::IncNavierStokes.

Definition at line 73 of file VelocityCorrectionScheme.cpp.

74{
75 int n;
76
78 m_explicitDiffusion = false;
79
80 // Set m_pressure to point to last field of m_fields;
81 if (boost::iequals(m_session->GetVariable(m_fields.size() - 1), "p"))
82 {
83 m_nConvectiveFields = m_fields.size() - 1;
85 }
86 else
87 {
88 ASSERTL0(false, "Need to set up pressure field definition");
89 }
90
91 // Determine diffusion coefficients for each field
92 m_diffCoeff = Array<OneD, NekDouble>(m_nConvectiveFields, m_kinvis);
93 for (n = 0; n < m_nConvectiveFields; ++n)
94 {
95 std::string varName = m_session->GetVariable(n);
96 if (m_session->DefinesFunction("DiffusionCoefficient", varName))
97 {
99 m_session->GetFunction("DiffusionCoefficient", varName);
100 m_diffCoeff[n] = ffunc->Evaluate();
101 }
102 }
103
104 // Integrate only the convective fields
105 for (n = 0; n < m_nConvectiveFields; ++n)
106 {
107 m_intVariables.push_back(n);
108 }
109
111 SetUpSVV();
112
113 // check to see if it is explicity turned off
114 m_session->MatchSolverInfo("GJPStabilisation", "False",
116
117 // if GJPStabilisation set to False bool will be true and
118 // if not false so negate/revese bool
120
121 m_session->MatchSolverInfo("GJPNormalVelocity", "True", m_useGJPNormalVel,
122 false);
123
125 {
126 ASSERTL0(!boost::iequals(m_session->GetSolverInfo("GJPStabilisation"),
127 "SemiImplicit"),
128 "Can not specify GJPNormalVelocity with"
129 " GJPStabilisation set to SemiImplicit");
130 }
131
132 m_session->LoadParameter("GJPJumpScale", m_GJPJumpScale, 1.0);
133
134 m_session->MatchSolverInfo("SmoothAdvection", "True", m_SmoothAdvection,
135 false);
136
137 // set explicit time-intregration class operators
140
141 // set implicit time-intregration class operators
144
145 // Set up bits for flowrate.
146 m_session->LoadParameter("Flowrate", m_flowrate, 0.0);
147 m_session->LoadParameter("IO_FlowSteps", m_flowrateSteps, 0);
148 m_session->LoadParameter("IO_FlowStepsPrecision", m_flowrateStepsPrecision,
149 6);
150}
void v_InitObject(bool DeclareField=true) override
Initialisation object for EquationSystem.
void DefineImplicitSolve(FuncPointerT func, ObjectPointerT obj)
LibUtilities::TimeIntegrationSchemeOperators m_ode
The time integration scheme operators to use.
bool m_explicitDiffusion
Indicates if explicit or implicit treatment of diffusion is used.
NekDouble m_flowrate
Desired volumetric flowrate.
void EvaluateAdvection_SetPressureBCs(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
int m_flowrateStepsPrecision
Decimal precision of flow rate (alpha)
Array< OneD, NekDouble > m_diffCoeff
Diffusion coefficients (will be kinvis for velocities)

References ASSERTL0, Nektar::LibUtilities::TimeIntegrationSchemeOperators::DefineImplicitSolve(), Nektar::LibUtilities::TimeIntegrationSchemeOperators::DefineOdeRhs(), EvaluateAdvection_SetPressureBCs(), m_diffCoeff, Nektar::SolverUtils::UnsteadySystem::m_explicitDiffusion, Nektar::SolverUtils::EquationSystem::m_fields, m_flowrate, m_flowrateSteps, m_flowrateStepsPrecision, m_GJPJumpScale, Nektar::SolverUtils::UnsteadySystem::m_intVariables, Nektar::IncNavierStokes::m_kinvis, Nektar::IncNavierStokes::m_nConvectiveFields, Nektar::SolverUtils::UnsteadySystem::m_ode, Nektar::IncNavierStokes::m_pressure, Nektar::SolverUtils::EquationSystem::m_session, Nektar::IncNavierStokes::m_SmoothAdvection, m_useGJPNormalVel, m_useGJPStabilisation, SetUpExtrapolation(), SetUpSVV(), SolveUnsteadyStokesSystem(), and Nektar::IncNavierStokes::v_InitObject().

Referenced by Nektar::PressDecompVCSFSI::v_InitObject(), Nektar::SmoothedProfileMethod::v_InitObject(), Nektar::VCSFSI::v_InitObject(), and Nektar::VCSMapping::v_InitObject().

◆ v_PostIntegrate()

bool Nektar::VelocityCorrectionScheme::v_PostIntegrate ( int  step)
overrideprotectedvirtual

Reimplemented from Nektar::SolverUtils::AdvectionSystem.

Definition at line 543 of file VelocityCorrectionScheme.cpp.

544{
545 if (m_flowrateSteps > 0)
546 {
547 if (m_comm->GetRank() == 0 && (step + 1) % m_flowrateSteps == 0)
548 {
550 << std::setw(8) << step
551 << std::setw(m_flowrateStepsPrecision + 10) << m_time
552 << std::setw(m_flowrateStepsPrecision + 10) << std::fixed
553 << std::setprecision(m_flowrateStepsPrecision) << m_alpha
554 << std::endl;
555 }
556 }
557
559}
SOLVER_UTILS_EXPORT bool v_PostIntegrate(int step) override
NekDouble m_alpha
Current flowrate correction.

References m_alpha, Nektar::SolverUtils::EquationSystem::m_comm, m_flowrateSteps, m_flowrateStepsPrecision, m_flowrateStream, Nektar::SolverUtils::EquationSystem::m_time, and Nektar::SolverUtils::AdvectionSystem::v_PostIntegrate().

◆ v_RequireFwdTrans()

bool Nektar::VelocityCorrectionScheme::v_RequireFwdTrans ( void  )
inlineoverrideprotectedvirtual

Reimplemented from Nektar::SolverUtils::UnsteadySystem.

Definition at line 223 of file VelocityCorrectionScheme.h.

224 {
225 return false;
226 }

◆ v_SetUpPressureForcing()

void Nektar::VelocityCorrectionScheme::v_SetUpPressureForcing ( const Array< OneD, const Array< OneD, NekDouble > > &  fields,
Array< OneD, Array< OneD, NekDouble > > &  Forcing,
const NekDouble  aii_Dt 
)
protectedvirtual

Forcing term for Poisson solver solver

Reimplemented in Nektar::VCSMapping, Nektar::VCSImplicit, and Nektar::VCSWeakPressure.

Definition at line 884 of file VelocityCorrectionScheme.cpp.

887{
888 size_t i;
889 size_t physTot = m_fields[0]->GetTotPoints();
890 size_t nvel = m_velocity.size();
891
892 m_fields[0]->PhysDeriv(eX, fields[0], Forcing[0]);
893
894 for (i = 1; i < nvel; ++i)
895 {
896 // Use Forcing[1] as storage since it is not needed for the pressure
897 m_fields[i]->PhysDeriv(DirCartesianMap[i], fields[i], Forcing[1]);
898 Vmath::Vadd(physTot, Forcing[1], 1, Forcing[0], 1, Forcing[0], 1);
899 }
900
901 Vmath::Smul(physTot, 1.0 / aii_Dt, Forcing[0], 1, Forcing[0], 1);
902}
MultiRegions::Direction const DirCartesianMap[]
Definition ExpList.h:86
void Vadd(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Add vector z = x+y.
Definition Vmath.hpp:180
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*x.
Definition Vmath.hpp:100

References Nektar::MultiRegions::DirCartesianMap, Nektar::MultiRegions::eX, Nektar::SolverUtils::EquationSystem::m_fields, Nektar::IncNavierStokes::m_velocity, Vmath::Smul(), and Vmath::Vadd().

Referenced by SetUpPressureForcing(), and Nektar::VCSMapping::v_SetUpPressureForcing().

◆ v_SetUpViscousForcing()

void Nektar::VelocityCorrectionScheme::v_SetUpViscousForcing ( const Array< OneD, const Array< OneD, NekDouble > > &  inarray,
Array< OneD, Array< OneD, NekDouble > > &  Forcing,
const NekDouble  aii_Dt 
)
protectedvirtual

Forcing term for Helmholtz solver

Reimplemented in Nektar::VCSMapping, and Nektar::VCSImplicit.

Definition at line 907 of file VelocityCorrectionScheme.cpp.

910{
911 NekDouble aii_dtinv = 1.0 / aii_Dt;
912 size_t phystot = m_fields[0]->GetTotPoints();
913
914 // Grad p
915 m_pressure->BwdTrans(m_pressure->GetCoeffs(), m_pressure->UpdatePhys());
916
917 int nvel = m_velocity.size();
918 if (nvel == 2)
919 {
920 m_pressure->PhysDeriv(m_pressure->GetPhys(), Forcing[m_velocity[0]],
921 Forcing[m_velocity[1]]);
922 }
923 else
924 {
925 m_pressure->PhysDeriv(m_pressure->GetPhys(), Forcing[m_velocity[0]],
926 Forcing[m_velocity[1]], Forcing[m_velocity[2]]);
927 }
928
929 // zero convective fields.
930 for (int i = nvel; i < m_nConvectiveFields; ++i)
931 {
932 Vmath::Zero(phystot, Forcing[i], 1);
933 }
934
935 // Subtract inarray/(aii_dt) and divide by kinvis. Kinvis will
936 // need to be updated for the convected fields.
937 for (int i = 0; i < m_nConvectiveFields; ++i)
938 {
939 Blas::Daxpy(phystot, -aii_dtinv, inarray[i], 1, Forcing[i], 1);
940 Blas::Dscal(phystot, 1.0 / m_diffCoeff[i], &(Forcing[i])[0], 1);
941 }
942}
static void Dscal(const int &n, const double &alpha, double *x, const int &incx)
BLAS level 1: x = alpha x.
Definition Blas.hpp:124
static void Daxpy(const int &n, const double &alpha, const double *x, const int &incx, const double *y, const int &incy)
BLAS level 1: y = alpha x plus y.
Definition Blas.hpp:117

References Blas::Daxpy(), Blas::Dscal(), m_diffCoeff, Nektar::SolverUtils::EquationSystem::m_fields, Nektar::IncNavierStokes::m_nConvectiveFields, Nektar::IncNavierStokes::m_pressure, Nektar::IncNavierStokes::m_velocity, and Vmath::Zero().

Referenced by SetUpViscousForcing().

◆ v_SolvePressure()

void Nektar::VelocityCorrectionScheme::v_SolvePressure ( const Array< OneD, NekDouble > &  Forcing)
protectedvirtual

Solve pressure system

Reimplemented in Nektar::VCSMapping, Nektar::VCSImplicit, and Nektar::VCSWeakPressure.

Definition at line 947 of file VelocityCorrectionScheme.cpp.

949{
951 // Setup coefficient for equation
953
954 // Solver Pressure Poisson Equation
955 m_pressure->HelmSolve(Forcing, m_pressure->UpdateCoeffs(), factors);
956
957 // Add presure to outflow bc if using convective like BCs
958 m_extrapolation->AddPressureToOutflowBCs(m_kinvis);
959}
std::map< ConstFactorType, NekDouble > ConstFactorMap

References Nektar::StdRegions::eFactorLambda, Nektar::IncNavierStokes::m_extrapolation, Nektar::IncNavierStokes::m_kinvis, and Nektar::IncNavierStokes::m_pressure.

Referenced by SolvePressure(), and Nektar::VCSMapping::v_SolvePressure().

◆ v_SolveSolid()

void Nektar::VelocityCorrectionScheme::v_SolveSolid ( NekDouble  time)
protectedvirtual

Reimplemented in Nektar::PressDecompVCSFSI, and Nektar::VCSFSI.

Definition at line 864 of file VelocityCorrectionScheme.cpp.

865{
866 UpdateVelocityBCs(time);
867}

References UpdateVelocityBCs().

Referenced by SolveSolid().

◆ v_SolveUnsteadyStokesSystem()

void Nektar::VelocityCorrectionScheme::v_SolveUnsteadyStokesSystem ( const Array< OneD, const Array< OneD, NekDouble > > &  inarray,
Array< OneD, Array< OneD, NekDouble > > &  outarray,
const NekDouble  time,
const NekDouble  aii_Dt 
)
protectedvirtual

Implicit part of the method - Poisson + nConv*Helmholtz

Reimplemented in Nektar::SmoothedProfileMethod.

Definition at line 799 of file VelocityCorrectionScheme.cpp.

803{
804 // Set up flowrate if we're starting for the first time or the value of
805 // aii_Dt has changed.
806 if (m_flowrate > 0.0 && (aii_Dt != m_flowrateAiidt))
807 {
808 SetupFlowrate(aii_Dt);
809 }
810
811 size_t physTot = m_fields[0]->GetTotPoints();
812
813 // Substep the pressure boundary condition if using substepping
814 m_extrapolation->SubStepSetPressureBCs(inarray, aii_Dt, m_kinvis);
815
816 // Set up forcing term for pressure Poisson equation
817 LibUtilities::Timer timer;
818 timer.Start();
819 SetUpPressureForcing(inarray, m_F, aii_Dt);
820 timer.Stop();
821 timer.AccumulateRegion("Pressure Forcing");
822
823 // Solve Pressure System
824 timer.Start();
825 SolvePressure(m_F[0]);
826 timer.Stop();
827 timer.AccumulateRegion("Pressure Solve");
828
829 // Set up forcing term for Helmholtz problems
830 timer.Start();
831 SolveSolid(time);
832 SetUpViscousForcing(inarray, m_F, aii_Dt);
833 timer.Stop();
834 timer.AccumulateRegion("Viscous Forcing");
835
836 // Solve velocity system
837 timer.Start();
838 SolveViscous(m_F, inarray, outarray, aii_Dt);
839 timer.Stop();
840 timer.AccumulateRegion("Viscous Solve");
841
842 // Apply flowrate correction
843 if (m_flowrate > 0.0 &&
844 m_greenFlux != std::numeric_limits<NekDouble>::max())
845 {
846 NekDouble currentFlux = MeasureFlowrate(outarray);
847 m_alpha = (m_flowrate - currentFlux) / m_greenFlux;
848
849 for (int i = 0; i < m_spacedim; ++i)
850 {
851 Vmath::Svtvp(physTot, m_alpha, m_flowrateStokes[i], 1, outarray[i],
852 1, outarray[i], 1);
853 // Enusre coeff space is updated for next time step
854 m_fields[i]->FwdTransLocalElmt(outarray[i],
855 m_fields[i]->UpdateCoeffs());
856 // Impsoe symmetry of flow on coeff space (good to enfore
857 // periodicity).
858 m_fields[i]->LocalToGlobal();
859 m_fields[i]->GlobalToLocal();
860 }
861 }
862}
void SetUpViscousForcing(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &Forcing, const NekDouble aii_Dt)
void SetupFlowrate(NekDouble aii_dt)
Set up the Stokes solution used to impose constant flowrate through a boundary.
void SetUpPressureForcing(const Array< OneD, const Array< OneD, NekDouble > > &fields, Array< OneD, Array< OneD, NekDouble > > &Forcing, const NekDouble aii_Dt)
void SolveViscous(const Array< OneD, const Array< OneD, NekDouble > > &Forcing, const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble aii_Dt)
void SolvePressure(const Array< OneD, NekDouble > &Forcing)
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::LibUtilities::Timer::AccumulateRegion(), m_alpha, Nektar::IncNavierStokes::m_extrapolation, m_F, Nektar::SolverUtils::EquationSystem::m_fields, m_flowrate, m_flowrateAiidt, m_flowrateStokes, m_greenFlux, Nektar::IncNavierStokes::m_kinvis, Nektar::SolverUtils::EquationSystem::m_spacedim, MeasureFlowrate(), SetupFlowrate(), SetUpPressureForcing(), SetUpViscousForcing(), SolvePressure(), SolveSolid(), SolveViscous(), Nektar::LibUtilities::Timer::Start(), Nektar::LibUtilities::Timer::Stop(), and Vmath::Svtvp().

Referenced by SolveUnsteadyStokesSystem(), and Nektar::SmoothedProfileMethod::v_SolveUnsteadyStokesSystem().

◆ v_SolveViscous()

void Nektar::VelocityCorrectionScheme::v_SolveViscous ( const Array< OneD, const Array< OneD, NekDouble > > &  Forcing,
const Array< OneD, const Array< OneD, NekDouble > > &  inarray,
Array< OneD, Array< OneD, NekDouble > > &  outarray,
const NekDouble  aii_Dt 
)
protectedvirtual

Solve velocity system

Reimplemented in Nektar::VCSMapping, and Nektar::VCSImplicit.

Definition at line 964 of file VelocityCorrectionScheme.cpp.

968{
972
973 AppendSVVFactors(factors, varFactorsMap);
974 ComputeGJPNormalVelocity(inarray, varCoeffMap);
975
976 // Solve Helmholtz system and put in Physical space
977 for (int i = 0; i < m_nConvectiveFields; ++i)
978 {
979 // Add diffusion coefficient to GJP matrix operator (Implicit part)
981 {
983 }
984
985 // Setup coefficients for equation
986 factors[StdRegions::eFactorLambda] = 1.0 / aii_Dt / m_diffCoeff[i];
987 m_fields[i]->HelmSolve(Forcing[i], m_fields[i]->UpdateCoeffs(), factors,
988 varCoeffMap, varFactorsMap);
989 m_fields[i]->BwdTrans(m_fields[i]->GetCoeffs(), outarray[i]);
990 }
991}
void AppendSVVFactors(StdRegions::ConstFactorMap &factors, StdRegions::VarFactorsMap &varFactorsMap)
void ComputeGJPNormalVelocity(const Array< OneD, const Array< OneD, NekDouble > > &inarray, StdRegions::VarCoeffMap &varcoeffs)
std::map< StdRegions::ConstFactorType, Array< OneD, NekDouble > > VarFactorsMap
static VarFactorsMap NullVarFactorsMap
std::map< StdRegions::VarCoeffType, VarCoeffEntry > VarCoeffMap

References AppendSVVFactors(), ComputeGJPNormalVelocity(), Nektar::StdRegions::eFactorGJP, Nektar::StdRegions::eFactorLambda, m_diffCoeff, Nektar::SolverUtils::EquationSystem::m_fields, m_GJPJumpScale, Nektar::IncNavierStokes::m_nConvectiveFields, m_useGJPStabilisation, Nektar::StdRegions::NullVarCoeffMap, and Nektar::StdRegions::NullVarFactorsMap.

Referenced by SolveViscous(), and Nektar::VCSMapping::v_SolveViscous().

◆ v_TransCoeffToPhys()

void Nektar::VelocityCorrectionScheme::v_TransCoeffToPhys ( void  )
overrideprotectedvirtual

Virtual function for transformation to physical space.

Reimplemented from Nektar::IncNavierStokes.

Definition at line 710 of file VelocityCorrectionScheme.cpp.

711{
712 size_t nfields = m_fields.size() - 1;
713 for (size_t k = 0; k < nfields; ++k)
714 {
715 // Backward Transformation in physical space for time evolution
716 m_fields[k]->BwdTrans(m_fields[k]->GetCoeffs(),
717 m_fields[k]->UpdatePhys());
718 }
719}

References Nektar::SolverUtils::EquationSystem::m_fields.

◆ v_TransPhysToCoeff()

void Nektar::VelocityCorrectionScheme::v_TransPhysToCoeff ( void  )
overrideprotectedvirtual

Virtual function for transformation to coefficient space.

Reimplemented from Nektar::IncNavierStokes.

Definition at line 724 of file VelocityCorrectionScheme.cpp.

725{
726
727 size_t nfields = m_fields.size() - 1;
728 for (size_t k = 0; k < nfields; ++k)
729 {
730 // Forward Transformation in physical space for time evolution
731 m_fields[k]->FwdTransLocalElmt(m_fields[k]->GetPhys(),
732 m_fields[k]->UpdateCoeffs());
733 }
734}

References Nektar::SolverUtils::EquationSystem::m_fields.

Friends And Related Symbol Documentation

◆ MemoryManager< VelocityCorrectionScheme >

friend class MemoryManager< VelocityCorrectionScheme >
friend

Definition at line 262 of file VelocityCorrectionScheme.h.

Member Data Documentation

◆ className

std::string Nektar::VelocityCorrectionScheme::className
static
Initial value:
=
"VelocityCorrectionScheme", VelocityCorrectionScheme::create)
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
static SolverUtils::EquationSystemSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
Creates an instance of this class.
EquationSystemFactory & GetEquationSystemFactory()

Name of class.

Definition at line 60 of file VelocityCorrectionScheme.h.

◆ m_alpha

NekDouble Nektar::VelocityCorrectionScheme::m_alpha
protected

Current flowrate correction.

Definition at line 148 of file VelocityCorrectionScheme.h.

Referenced by v_PostIntegrate(), and v_SolveUnsteadyStokesSystem().

◆ m_diffCoeff

Array<OneD, NekDouble> Nektar::VelocityCorrectionScheme::m_diffCoeff
protected

◆ m_F

Array<OneD, Array<OneD, NekDouble> > Nektar::VelocityCorrectionScheme::m_F
protected

◆ m_flowrate

NekDouble Nektar::VelocityCorrectionScheme::m_flowrate
protected

Desired volumetric flowrate.

Definition at line 140 of file VelocityCorrectionScheme.h.

Referenced by v_InitObject(), and v_SolveUnsteadyStokesSystem().

◆ m_flowrateAiidt

NekDouble Nektar::VelocityCorrectionScheme::m_flowrateAiidt
protected

Value of aii_dt used to compute Stokes flowrate solution.

Definition at line 164 of file VelocityCorrectionScheme.h.

Referenced by SetupFlowrate(), v_DoInitialise(), and v_SolveUnsteadyStokesSystem().

◆ m_flowrateArea

NekDouble Nektar::VelocityCorrectionScheme::m_flowrateArea
protected

Area of the boundary through which we are measuring the flowrate.

Definition at line 142 of file VelocityCorrectionScheme.h.

Referenced by MeasureFlowrate(), and SetupFlowrate().

◆ m_flowrateBnd

MultiRegions::ExpListSharedPtr Nektar::VelocityCorrectionScheme::m_flowrateBnd
protected

Flowrate reference surface.

Definition at line 154 of file VelocityCorrectionScheme.h.

Referenced by MeasureFlowrate(), and SetupFlowrate().

◆ m_flowrateBndID

int Nektar::VelocityCorrectionScheme::m_flowrateBndID
protected

Boundary ID of the flowrate reference surface.

Definition at line 150 of file VelocityCorrectionScheme.h.

Referenced by MeasureFlowrate(), and SetupFlowrate().

◆ m_flowrateSteps

int Nektar::VelocityCorrectionScheme::m_flowrateSteps
protected

Interval at which to record flowrate data.

Definition at line 160 of file VelocityCorrectionScheme.h.

Referenced by SetupFlowrate(), v_InitObject(), and v_PostIntegrate().

◆ m_flowrateStepsPrecision

int Nektar::VelocityCorrectionScheme::m_flowrateStepsPrecision
protected

Decimal precision of flow rate (alpha)

Definition at line 162 of file VelocityCorrectionScheme.h.

Referenced by v_InitObject(), and v_PostIntegrate().

◆ m_flowrateStokes

Array<OneD, Array<OneD, NekDouble> > Nektar::VelocityCorrectionScheme::m_flowrateStokes
protected

Stokes solution used to impose flowrate.

Definition at line 156 of file VelocityCorrectionScheme.h.

Referenced by SetupFlowrate(), and v_SolveUnsteadyStokesSystem().

◆ m_flowrateStream

std::ofstream Nektar::VelocityCorrectionScheme::m_flowrateStream
protected

Output stream to record flowrate.

Definition at line 158 of file VelocityCorrectionScheme.h.

Referenced by SetupFlowrate(), and v_PostIntegrate().

◆ m_GJPJumpScale

NekDouble Nektar::VelocityCorrectionScheme::m_GJPJumpScale
protected

◆ m_greenFlux

NekDouble Nektar::VelocityCorrectionScheme::m_greenFlux
protected

Flux of the Stokes function solution.

Definition at line 146 of file VelocityCorrectionScheme.h.

Referenced by SetupFlowrate(), and v_SolveUnsteadyStokesSystem().

◆ m_homd1DFlowinPlane

bool Nektar::VelocityCorrectionScheme::m_homd1DFlowinPlane
protected

Definition at line 144 of file VelocityCorrectionScheme.h.

Referenced by MeasureFlowrate(), and SetupFlowrate().

◆ m_IsSVVPowerKernel

bool Nektar::VelocityCorrectionScheme::m_IsSVVPowerKernel
protected

Identifier for Power Kernel otherwise DG kernel.

Definition at line 131 of file VelocityCorrectionScheme.h.

Referenced by AppendSVVFactors(), SetUpSVV(), v_GenerateSummary(), and Nektar::VCSImplicit::v_GenerateSummary().

◆ m_planeID

int Nektar::VelocityCorrectionScheme::m_planeID
protected

Plane ID for cases with homogeneous expansion.

Definition at line 152 of file VelocityCorrectionScheme.h.

Referenced by MeasureFlowrate(), and SetupFlowrate().

◆ m_sVVCutoffRatio

NekDouble Nektar::VelocityCorrectionScheme::m_sVVCutoffRatio
protected

◆ m_sVVCutoffRatioHomo1D

NekDouble Nektar::VelocityCorrectionScheme::m_sVVCutoffRatioHomo1D
protected

◆ m_sVVDiffCoeff

NekDouble Nektar::VelocityCorrectionScheme::m_sVVDiffCoeff
protected

◆ m_sVVDiffCoeffHomo1D

NekDouble Nektar::VelocityCorrectionScheme::m_sVVDiffCoeffHomo1D
protected

Diffusion coefficient of SVV modes in homogeneous 1D Direction.

Definition at line 127 of file VelocityCorrectionScheme.h.

Referenced by SetUpSVV(), v_GenerateSummary(), and Nektar::VCSImplicit::v_GenerateSummary().

◆ m_svvVarDiffCoeff

Array<OneD, NekDouble> Nektar::VelocityCorrectionScheme::m_svvVarDiffCoeff
protected

Array of coefficient if power kernel is used in SVV.

Definition at line 129 of file VelocityCorrectionScheme.h.

Referenced by AppendSVVFactors(), SetUpSVV(), v_GenerateSummary(), and Nektar::VCSImplicit::v_GenerateSummary().

◆ m_useGJPNormalVel

bool Nektar::VelocityCorrectionScheme::m_useGJPNormalVel
protected

bool to identify if GJP normal Velocity should be applied in explicit approach

Definition at line 118 of file VelocityCorrectionScheme.h.

Referenced by ComputeGJPNormalVelocity(), and v_InitObject().

◆ m_useGJPStabilisation

bool Nektar::VelocityCorrectionScheme::m_useGJPStabilisation
protected

◆ m_useHomo1DSpecVanVisc

bool Nektar::VelocityCorrectionScheme::m_useHomo1DSpecVanVisc
protected

bool to identify if spectral vanishing viscosity is active.

Definition at line 111 of file VelocityCorrectionScheme.h.

Referenced by SetUpSVV(), v_GenerateSummary(), Nektar::VCSImplicit::v_GenerateSummary(), and Nektar::VCSWeakPressure::v_GenerateSummary().

◆ m_useSpecVanVisc

bool Nektar::VelocityCorrectionScheme::m_useSpecVanVisc
protected

◆ m_varCoeffLap

StdRegions::VarCoeffMap Nektar::VelocityCorrectionScheme::m_varCoeffLap
protected

Variable Coefficient map for the Laplacian which can be activated as part of SVV or otherwise.

Definition at line 137 of file VelocityCorrectionScheme.h.

◆ solverTypeLookupId

std::string Nektar::VelocityCorrectionScheme::solverTypeLookupId
staticprotected
Initial value:
=
"SolverType", "VelocityCorrectionScheme", eVelocityCorrectionScheme)
static std::string RegisterEnumValue(std::string pEnum, std::string pString, int pEnumValue)
Registers an enumeration value.
@ eVelocityCorrectionScheme

Definition at line 168 of file VelocityCorrectionScheme.h.