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

#include <VelocityCorrectionScheme.h>

Inheritance diagram for Nektar::VelocityCorrectionScheme:
[legend]

Public Member Functions

 VelocityCorrectionScheme (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
 Constructor. More...
 
virtual ~VelocityCorrectionScheme ()
 
virtual void v_InitObject ()
 Init object for UnsteadySystem class. More...
 
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 SolveViscous (const Array< OneD, const Array< OneD, NekDouble > > &Forcing, 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
virtual ~IncNavierStokes ()
 
int GetNConvectiveFields (void)
 
Array< OneD, int > & GetVelocity (void)
 
void AddForcing (const SolverUtils::ForcingSharedPtr &pForce)
 
virtual void GetPressure (const Array< OneD, const Array< OneD, NekDouble > > &physfield, Array< OneD, NekDouble > &pressure)
 Extract array with pressure from physfield. More...
 
virtual void GetDensity (const Array< OneD, const Array< OneD, NekDouble > > &physfield, Array< OneD, NekDouble > &density)
 Extract array with density from physfield. More...
 
virtual bool HasConstantDensity ()
 
virtual void GetVelocity (const Array< OneD, const Array< OneD, NekDouble > > &physfield, Array< OneD, Array< OneD, NekDouble > > &velocity)
 Extract array with velocity from physfield. More...
 
- Public Member Functions inherited from Nektar::SolverUtils::AdvectionSystem
SOLVER_UTILS_EXPORT AdvectionSystem (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
 
virtual SOLVER_UTILS_EXPORT ~AdvectionSystem ()
 
SOLVER_UTILS_EXPORT AdvectionSharedPtr GetAdvObject ()
 Returns the advection object held by this instance. More...
 
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
virtual SOLVER_UTILS_EXPORT ~UnsteadySystem ()
 Destructor. More...
 
SOLVER_UTILS_EXPORT NekDouble GetTimeStep (const Array< OneD, const Array< OneD, NekDouble >> &inarray)
 Calculate the larger time-step mantaining the problem stable. More...
 
SOLVER_UTILS_EXPORT void SteadyStateResidual (int step, Array< OneD, NekDouble > &L2)
 
- Public Member Functions inherited from Nektar::SolverUtils::EquationSystem
virtual SOLVER_UTILS_EXPORT ~EquationSystem ()
 Destructor. More...
 
SOLVER_UTILS_EXPORT void SetUpTraceNormals (void)
 
SOLVER_UTILS_EXPORT void InitObject ()
 Initialises the members of this object. More...
 
SOLVER_UTILS_EXPORT void DoInitialise ()
 Perform any initialisation necessary before solving the problem. More...
 
SOLVER_UTILS_EXPORT void DoSolve ()
 Solve the problem. More...
 
SOLVER_UTILS_EXPORT void TransCoeffToPhys ()
 Transform from coefficient to physical space. More...
 
SOLVER_UTILS_EXPORT void TransPhysToCoeff ()
 Transform from physical to coefficient space. More...
 
SOLVER_UTILS_EXPORT void Output ()
 Perform output operations after solve. More...
 
SOLVER_UTILS_EXPORT NekDouble LinfError (unsigned int field, const Array< OneD, NekDouble > &exactsoln=NullNekDouble1DArray)
 Linf error computation. More...
 
SOLVER_UTILS_EXPORT std::string GetSessionName ()
 Get Session name. More...
 
template<class T >
std::shared_ptr< T > as ()
 
SOLVER_UTILS_EXPORT void ResetSessionName (std::string newname)
 Reset Session name. More...
 
SOLVER_UTILS_EXPORT LibUtilities::SessionReaderSharedPtr GetSession ()
 Get Session name. More...
 
SOLVER_UTILS_EXPORT MultiRegions::ExpListSharedPtr GetPressure ()
 Get pressure field if available. More...
 
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. More...
 
SOLVER_UTILS_EXPORT void SetLambda (NekDouble lambda)
 Set parameter m_lambda. More...
 
SOLVER_UTILS_EXPORT SessionFunctionSharedPtr GetFunction (std::string name, const MultiRegions::ExpListSharedPtr &field=MultiRegions::NullExpListSharedPtr, bool cache=false)
 Get a SessionFunction by name. More...
 
SOLVER_UTILS_EXPORT void SetInitialConditions (NekDouble initialtime=0.0, bool dumpInitialConditions=true, const int domain=0)
 Initialise the data in the dependent fields. More...
 
SOLVER_UTILS_EXPORT void EvaluateExactSolution (int field, Array< OneD, NekDouble > &outfield, const NekDouble time)
 Evaluates an exact solution. More...
 
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. More...
 
SOLVER_UTILS_EXPORT NekDouble L2Error (unsigned int field, bool Normalised=false)
 Compute the L2 error of the fields. More...
 
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]. More...
 
SOLVER_UTILS_EXPORT void Checkpoint_Output (const int n)
 Write checkpoint file of m_fields. More...
 
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. More...
 
SOLVER_UTILS_EXPORT void Checkpoint_BaseFlow (const int n)
 Write base flow file of m_fields. More...
 
SOLVER_UTILS_EXPORT void WriteFld (const std::string &outname)
 Write field data to the given filename. More...
 
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. More...
 
SOLVER_UTILS_EXPORT void ImportFld (const std::string &infile, Array< OneD, MultiRegions::ExpListSharedPtr > &pFields)
 Input field data from the given file. More...
 
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. More...
 
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. More...
 
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. More...
 
SOLVER_UTILS_EXPORT void SessionSummary (SummaryList &vSummary)
 Write out a session summary. More...
 
SOLVER_UTILS_EXPORT Array< OneD, MultiRegions::ExpListSharedPtr > & UpdateFields ()
 
SOLVER_UTILS_EXPORT LibUtilities::FieldMetaDataMapUpdateFieldMetaDataMap ()
 Get hold of FieldInfoMap so it can be updated. More...
 
SOLVER_UTILS_EXPORT NekDouble GetFinalTime ()
 Return final time. More...
 
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 NekDouble GetTimeStep ()
 
SOLVER_UTILS_EXPORT void CopyFromPhysField (const int i, Array< OneD, NekDouble > &output)
 
SOLVER_UTILS_EXPORT void CopyToPhysField (const int i, Array< OneD, NekDouble > &output)
 
SOLVER_UTILS_EXPORT void SetSteps (const int steps)
 
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 void SetTime (const NekDouble time)
 
SOLVER_UTILS_EXPORT void SetInitialStep (const int step)
 
SOLVER_UTILS_EXPORT void SetBoundaryConditions (NekDouble time)
 Evaluates the boundary conditions at the given time. More...
 
virtual SOLVER_UTILS_EXPORT bool v_NegatedOp ()
 Virtual function to identify if operator is negated in DoSolve. More...
 
- Public Member Functions inherited from Nektar::SolverUtils::FluidInterface
virtual ~FluidInterface ()=default
 

Static Public Member Functions

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

Static Public Attributes

static std::string className
 Name of class. More...
 

Protected Member Functions

void SetupFlowrate (NekDouble aii_dt)
 Set up the Stokes solution used to impose constant flowrate through a boundary. More...
 
NekDouble MeasureFlowrate (const Array< OneD, Array< OneD, NekDouble > > &inarray)
 Measure the volumetric flow rate through the volumetric flow rate reference surface. More...
 
virtual bool v_PostIntegrate (int step)
 
virtual void v_GenerateSummary (SolverUtils::SummaryList &s)
 Print a summary of time stepping parameters. More...
 
virtual void v_TransCoeffToPhys (void)
 Virtual function for transformation to physical space. More...
 
virtual void v_TransPhysToCoeff (void)
 Virtual function for transformation to coefficient space. More...
 
virtual void v_DoInitialise (void)
 Sets up initial conditions. More...
 
virtual Array< OneD, bool > v_GetSystemSingularChecks ()
 
virtual int v_GetForceDimension ()
 
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_SolveViscous (const Array< OneD, const Array< OneD, NekDouble > > &Forcing, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble aii_Dt)
 
virtual void v_EvaluateAdvection_SetPressureBCs (const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
 
virtual bool v_RequireFwdTrans ()
 
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, MultiRegions::VarFactorsMap &varFactorsMap)
 
- Protected Member Functions inherited from Nektar::IncNavierStokes
 IncNavierStokes (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
 Constructor. More...
 
EquationType GetEquationType (void)
 
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 More...
 
void SetRadiationBoundaryForcing (int fieldid)
 Set Radiation forcing term. More...
 
void SetZeroNormalVelocity ()
 Set Normal Velocity Component to Zero. More...
 
void SetWomersleyBoundary (const int fldid, const int bndid)
 Set Womersley Profile if specified. More...
 
void SetUpWomersley (const int fldid, const int bndid, std::string womstr)
 Set Up Womersley details. More...
 
virtual MultiRegions::ExpListSharedPtr v_GetPressure ()
 
virtual Array< OneD, NekDoublev_GetMaxStdVelocity (const NekDouble SpeedSoundFactor)
 
virtual bool v_PreIntegrate (int step)
 
- Protected Member Functions inherited from Nektar::SolverUtils::UnsteadySystem
SOLVER_UTILS_EXPORT UnsteadySystem (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
 Initialises UnsteadySystem class members. More...
 
SOLVER_UTILS_EXPORT NekDouble MaxTimeStepEstimator ()
 Get the maximum timestep estimator for cfl control. More...
 
virtual SOLVER_UTILS_EXPORT void v_DoSolve ()
 Solves an unsteady problem. More...
 
virtual SOLVER_UTILS_EXPORT void v_AppendOutput1D (Array< OneD, Array< OneD, NekDouble >> &solution1D)
 Print the solution at each solution point in a txt file. More...
 
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. More...
 
virtual SOLVER_UTILS_EXPORT void v_SteadyStateResidual (int step, Array< OneD, NekDouble > &L2)
 
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. More...
 
virtual SOLVER_UTILS_EXPORT bool UpdateTimeStepCheck ()
 
- Protected Member Functions inherited from Nektar::SolverUtils::EquationSystem
SOLVER_UTILS_EXPORT EquationSystem (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
 Initialises EquationSystem class members. More...
 
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. More...
 
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. More...
 
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 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. More...
 
bool m_useSpecVanVisc
 bool to identify if spectral vanishing viscosity is active. More...
 
NekDouble m_sVVCutoffRatio
 cutt off ratio from which to start decayhing modes More...
 
NekDouble m_sVVDiffCoeff
 Diffusion coefficient of SVV modes. More...
 
NekDouble m_sVVCutoffRatioHomo1D
 
NekDouble m_sVVDiffCoeffHomo1D
 Diffusion coefficient of SVV modes in homogeneous 1D Direction. More...
 
Array< OneD, NekDoublem_svvVarDiffCoeff
 Array of coefficient if power kernel is used in SVV. More...
 
bool m_IsSVVPowerKernel
 Identifier for Power Kernel otherwise DG kernel. More...
 
Array< OneD, NekDoublem_diffCoeff
 Diffusion coefficients (will be kinvis for velocities) More...
 
StdRegions::VarCoeffMap m_varCoeffLap
 Variable Coefficient map for the Laplacian which can be activated as part of SVV or otherwise. More...
 
NekDouble m_flowrate
 Desired volumetric flowrate. More...
 
NekDouble m_flowrateArea
 Area of the boundary through which we are measuring the flowrate. More...
 
bool m_homd1DFlowinPlane
 
NekDouble m_greenFlux
 Flux of the Stokes function solution. More...
 
NekDouble m_alpha
 Current flowrate correction. More...
 
int m_flowrateBndID
 Boundary ID of the flowrate reference surface. More...
 
int m_planeID
 Plane ID for cases with homogeneous expansion. More...
 
MultiRegions::ExpListSharedPtr m_flowrateBnd
 Flowrate reference surface. More...
 
Array< OneD, Array< OneD, NekDouble > > m_flowrateStokes
 Stokes solution used to impose flowrate. More...
 
std::ofstream m_flowrateStream
 Output stream to record flowrate. More...
 
int m_flowrateSteps
 Interval at which to record flowrate data. More...
 
NekDouble m_flowrateAiidt
 Value of aii_dt used to compute Stokes flowrate solution. More...
 
Array< OneD, Array< OneD, NekDouble > > m_F
 
- Protected Attributes inherited from Nektar::IncNavierStokes
ExtrapolateSharedPtr m_extrapolation
 
std::ofstream m_mdlFile
 modal energy file More...
 
bool m_SmoothAdvection
 bool to identify if advection term smoothing is requested More...
 
std::vector< SolverUtils::ForcingSharedPtrm_forcing
 Forcing terms. More...
 
int m_nConvectiveFields
 Number of fields to be convected;. More...
 
Array< OneD, int > m_velocity
 int which identifies which components of m_fields contains the velocity (u,v,w); More...
 
MultiRegions::ExpListSharedPtr m_pressure
 Pointer to field holding pressure field. More...
 
NekDouble m_kinvis
 Kinematic viscosity. More...
 
int m_energysteps
 dump energy to file at steps time More...
 
EquationType m_equationType
 equation type; More...
 
Array< OneD, Array< OneD, int > > m_fieldsBCToElmtID
 Mapping from BCs to Elmt IDs. More...
 
Array< OneD, Array< OneD, int > > m_fieldsBCToTraceID
 Mapping from BCs to Elmt Edge IDs. More...
 
Array< OneD, Array< OneD, NekDouble > > m_fieldsRadiationFactor
 RHS Factor for Radiation Condition. More...
 
int m_intSteps
 Number of time integration steps AND Order of extrapolation for pressure boundary conditions. More...
 
std::map< int, std::map< int, WomersleyParamsSharedPtr > > m_womersleyParams
 Womersley parameters if required. More...
 
- Protected Attributes inherited from Nektar::SolverUtils::AdvectionSystem
SolverUtils::AdvectionSharedPtr m_advObject
 Advection term. More...
 
- Protected Attributes inherited from Nektar::SolverUtils::UnsteadySystem
int m_infosteps
 Number of time steps between outputting status information. More...
 
int m_abortSteps
 Number of steps between checks for abort conditions. More...
 
int m_filtersInfosteps
 Number of time steps between outputting filters information. More...
 
int m_nanSteps
 
LibUtilities::TimeIntegrationSchemeSharedPtr m_intScheme
 Wrapper to the time integration scheme. More...
 
LibUtilities::TimeIntegrationSchemeOperators m_ode
 The time integration scheme operators to use. More...
 
NekDouble m_epsilon
 
bool m_explicitDiffusion
 Indicates if explicit or implicit treatment of diffusion is used. More...
 
bool m_explicitAdvection
 Indicates if explicit or implicit treatment of advection is used. More...
 
bool m_explicitReaction
 Indicates if explicit or implicit treatment of reaction is used. More...
 
bool m_homoInitialFwd
 Flag to determine if simulation should start in homogeneous forward transformed state. More...
 
NekDouble m_steadyStateTol
 Tolerance to which steady state should be evaluated at. More...
 
int m_steadyStateSteps
 Check for steady state at step interval. More...
 
NekDouble m_steadyStateRes = 1.0
 
NekDouble m_steadyStateRes0 = 1.0
 
Array< OneD, Array< OneD, NekDouble > > m_previousSolution
 Storage for previous solution for steady-state check. More...
 
std::ofstream m_errFile
 
std::vector< int > m_intVariables
 
std::vector< std::pair< std::string, FilterSharedPtr > > m_filters
 
NekDouble m_filterTimeWarning
 Number of time steps between outputting status information. More...
 
NekDouble m_TimeIntegLambda =0.0
 coefff of spacial derivatives(rhs or m_F in GLM) in calculating the residual of the whole equation(used in unsteady time integrations) More...
 
bool m_flagImplicitItsStatistics
 
bool m_flagImplicitSolver = false
 
Array< OneD, NekDoublem_magnitdEstimat
 estimate the magnitude of each conserved varibles More...
 
Array< OneD, NekDoublem_locTimeStep
 local time step(notice only for jfnk other see m_cflSafetyFactor) More...
 
NekDouble m_inArrayNorm =-1.0
 
int m_TotLinItePerStep =0
 
int m_StagesPerStep =1
 
bool m_flagUpdatePreconMat
 
int m_maxLinItePerNewton
 
int m_TotNewtonIts =0
 
int m_TotLinIts =0
 
int m_TotImpStages =0
 
bool m_CalcPhysicalAV = true
 flag to update artificial viscosity More...
 
- Protected Attributes inherited from Nektar::SolverUtils::EquationSystem
LibUtilities::CommSharedPtr m_comm
 Communicator. More...
 
bool m_verbose
 
bool m_root
 
LibUtilities::SessionReaderSharedPtr m_session
 The session reader. More...
 
std::map< std::string, SolverUtils::SessionFunctionSharedPtrm_sessionFunctions
 Map of known SessionFunctions. More...
 
LibUtilities::FieldIOSharedPtr m_fld
 Field input/output. More...
 
Array< OneD, MultiRegions::ExpListSharedPtrm_fields
 Array holding all dependent variables. More...
 
SpatialDomains::BoundaryConditionsSharedPtr m_boundaryConditions
 Pointer to boundary conditions object. More...
 
SpatialDomains::MeshGraphSharedPtr m_graph
 Pointer to graph defining mesh. More...
 
std::string m_sessionName
 Name of the session. More...
 
NekDouble m_time
 Current time of simulation. More...
 
int m_initialStep
 Number of the step where the simulation should begin. More...
 
NekDouble m_fintime
 Finish time of the simulation. More...
 
NekDouble m_timestep
 Time step size. More...
 
NekDouble m_timestepMax = -1.0
 Time step size. More...
 
NekDouble m_lambda
 Lambda constant in real system if one required. More...
 
NekDouble m_checktime
 Time between checkpoints. More...
 
NekDouble m_lastCheckTime
 
NekDouble m_TimeIncrementFactor
 
int m_nchk
 Number of checkpoints written so far. More...
 
int m_steps
 Number of steps to take. More...
 
int m_checksteps
 Number of steps between checkpoints. More...
 
int m_spacedim
 Spatial dimension (>= expansion dim). More...
 
int m_expdim
 Expansion dimension. More...
 
bool m_singleMode
 Flag to determine if single homogeneous mode is used. More...
 
bool m_halfMode
 Flag to determine if half homogeneous mode is used. More...
 
bool m_multipleModes
 Flag to determine if use multiple homogenenous modes are used. More...
 
bool m_useFFT
 Flag to determine if FFT is used for homogeneous transform. More...
 
bool m_homogen_dealiasing
 Flag to determine if dealiasing is used for homogeneous simulations. More...
 
bool m_specHP_dealiasing
 Flag to determine if dealisising is usde for the Spectral/hp element discretisation. More...
 
enum MultiRegions::ProjectionType m_projectionType
 Type of projection; e.g continuous or discontinuous. More...
 
Array< OneD, Array< OneD, NekDouble > > m_traceNormals
 Array holding trace normals for DG simulations in the forwards direction. More...
 
Array< OneD, bool > m_checkIfSystemSingular
 Flag to indicate if the fields should be checked for singularity. More...
 
LibUtilities::FieldMetaDataMap m_fieldMetaDataMap
 Map to identify relevant solver info to dump in output fields. More...
 
int m_NumQuadPointsError
 Number of Quadrature points used to work out the error. More...
 
enum HomogeneousType m_HomogeneousType
 
NekDouble m_LhomX
 physical length in X direction (if homogeneous) More...
 
NekDouble m_LhomY
 physical length in Y direction (if homogeneous) More...
 
NekDouble m_LhomZ
 physical length in Z direction (if homogeneous) More...
 
int m_npointsX
 number of points in X direction (if homogeneous) More...
 
int m_npointsY
 number of points in Y direction (if homogeneous) More...
 
int m_npointsZ
 number of points in Z direction (if homogeneous) More...
 
int m_HomoDirec
 number of homogenous directions More...
 

Additional Inherited Members

- Public Attributes inherited from Nektar::SolverUtils::UnsteadySystem
NekDouble m_cflSafetyFactor
 CFL safety factor (comprise between 0 to 1). More...
 
NekDouble m_cflNonAcoustic
 
NekDouble m_CFLGrowth
 CFL growth rate. More...
 
NekDouble m_CFLEnd
 maximun cfl in cfl growth More...
 
- Protected Types inherited from Nektar::SolverUtils::EquationSystem
enum  HomogeneousType { eHomogeneous1D , eHomogeneous2D , eHomogeneous3D , eNotHomogeneous }
 Parameter for homogeneous expansions. More...
 
- Static Protected Attributes inherited from Nektar::SolverUtils::EquationSystem
static std::string equationSystemTypeLookupIds []
 

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 
)

Constructor.

Constructor. Creates ...

Parameters

Definition at line 60 of file VelocityCorrectionScheme.cpp.

63  : UnsteadySystem(pSession, pGraph),
64  IncNavierStokes(pSession, pGraph),
66  {
67 
68  }
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
Definition: StdRegions.hpp:273

◆ ~VelocityCorrectionScheme()

Nektar::VelocityCorrectionScheme::~VelocityCorrectionScheme ( void  )
virtual

Destructor

Definition at line 499 of file VelocityCorrectionScheme.cpp.

500  {
501  }

Member Function Documentation

◆ AppendSVVFactors()

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

Definition at line 1100 of file VelocityCorrectionScheme.cpp.

1103  {
1104 
1105  if(m_useSpecVanVisc)
1106  {
1110  {
1111  if(m_IsSVVPowerKernel)
1112  {
1115  }
1116  else
1117  {
1118  varFactorsMap[StdRegions::eFactorSVVDGKerDiffCoeff] =
1120  }
1121  }
1122  }
1123 
1124  }
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.
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().

◆ 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 47 of file VelocityCorrectionScheme.h.

50  {
53  pSession, pGraph);
54  p->InitObject();
55  return p;
56  }
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.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), and CellMLToNektar.cellml_metadata::p.

◆ 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 105 of file VelocityCorrectionScheme.h.

109  {
110  v_EvaluateAdvection_SetPressureBCs( inarray, outarray, time);
111  }
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 424 of file VelocityCorrectionScheme.cpp.

426  {
427  NekDouble flowrate = 0.0;
428 
429  if (m_flowrateBnd && m_flowrateBndID >= 0)
430  {
431  // If we're an actual boundary, calculate the vector flux through
432  // the boundary.
433  Array<OneD, Array<OneD, NekDouble> > boundary(m_spacedim);
434 
436  {
437  // General case
438  for (int i = 0; i < m_spacedim; ++i)
439  {
440  m_fields[i]->ExtractPhysToBnd(m_flowrateBndID, inarray[i],
441  boundary[i]);
442  }
443  flowrate = m_flowrateBnd->VectorFlux(boundary);
444  }
445  else if(m_planeID == 0)
446  {
447  //Homogeneous with forcing in plane. Calculate flux only on
448  // the meanmode - calculateFlux necessary for hybrid
449  // parallelisation.
450  for (int i = 0; i < m_spacedim; ++i)
451  {
452  m_fields[i]->GetPlane(m_planeID)->ExtractPhysToBnd(
453  m_flowrateBndID, inarray[i], boundary[i]);
454  }
455 
456  // the flowrate is calculated on the mean mode so it needs to be
457  // multiplied by LZ to be consistent with the general case.
458  flowrate = m_flowrateBnd->VectorFlux(boundary) *
459  m_session->GetParameter("LZ");
460  }
461  }
462  else if (m_flowrateBnd && !m_homd1DFlowinPlane)
463  {
464  // 3DH1D case with no Flowrate boundary defined: compute flux
465  // through the zero-th (mean) plane.
466  flowrate = m_flowrateBnd->Integral(inarray[2]);
467  }
468 
469  // Communication to obtain the total flowrate
471  {
472  m_comm->GetColumnComm()->AllReduce(flowrate, LibUtilities::ReduceSum);
473  }
474  else
475  {
476  m_comm->AllReduce(flowrate, LibUtilities::ReduceSum);
477  }
478  return flowrate / m_flowrateArea;
479  }
int m_spacedim
Spatial dimension (>= expansion dim).
LibUtilities::CommSharedPtr m_comm
Communicator.
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
enum HomogeneousType m_HomogeneousType
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.
double NekDouble

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 SolveUnsteadyStokesSystem().

◆ SetUpExtrapolation()

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

Definition at line 126 of file VelocityCorrectionScheme.cpp.

127  {
128  // creation of the extrapolation object
131  {
132  std::string vExtrapolation = v_GetExtrapolateStr();
133  if (m_session->DefinesSolverInfo("Extrapolation"))
134  {
135  vExtrapolation = v_GetSubSteppingExtrapolateStr(
136  m_session->GetSolverInfo("Extrapolation"));
137  }
139  vExtrapolation,
140  m_session,
141  m_fields,
142  m_pressure,
143  m_velocity,
144  m_advObject);
145 
146  m_extrapolation->SetForcing(m_forcing);
147  m_extrapolation->SubSteppingTimeIntegration(m_intScheme);
148  m_extrapolation->GenerateHOPBCMap(m_session);
149  }
150  }
MultiRegions::ExpListSharedPtr m_pressure
Pointer to field holding pressure field.
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.
Definition: NekFactory.hpp:145
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)
@ eUnsteadyStokes
@ eUnsteadyNavierStokes
ExtrapolateFactory & GetExtrapolateFactory()
Definition: Extrapolate.cpp:49

References 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::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 200 of file VelocityCorrectionScheme.cpp.

201  {
202  m_flowrateBndID = -1;
203  m_flowrateArea = 0.0;
204 
205  const Array<OneD, const SpatialDomains::BoundaryConditionShPtr> &bcs =
206  m_fields[0]->GetBndConditions();
207 
208  std::string forces[] = { "X", "Y", "Z" };
209  Array<OneD, NekDouble> flowrateForce(m_spacedim, 0.0);
210 
211  // Set up flowrate forces.
212  bool defined = true;
213  for (int i = 0; i < m_spacedim; ++i)
214  {
215  std::string varName = std::string("Force") + forces[i];
216  defined = m_session->DefinesFunction("FlowrateForce", varName);
217 
218  if (!defined && m_HomogeneousType == eHomogeneous1D)
219  {
220  break;
221  }
222 
223  ASSERTL0(defined,
224  "A 'FlowrateForce' function must defined with components "
225  "[ForceX, ...] to define direction of flowrate forcing");
226 
228  = m_session->GetFunction("FlowrateForce", varName);
229  flowrateForce[i] = ffunc->Evaluate();
230  }
231 
232  // Define flag for case with homogeneous expansion and forcing not in the
233  // z-direction
234  m_homd1DFlowinPlane = false;
235  if (defined && m_HomogeneousType == eHomogeneous1D)
236  {
237  m_homd1DFlowinPlane = true;
238  }
239 
240  // For 3DH1D simulations, if force isn't defined then assume in
241  // z-direction.
242  if (!defined)
243  {
244  flowrateForce[2] = 1.0;
245  }
246 
247  // Find the boundary condition that is tagged as the flowrate boundary.
248  for (int i = 0; i < bcs.size(); ++i)
249  {
250  if (boost::iequals(bcs[i]->GetUserDefined(), "Flowrate"))
251  {
252  m_flowrateBndID = i;
253  break;
254  }
255  }
256 
257  int tmpBr = m_flowrateBndID;
258  m_comm->AllReduce(tmpBr, LibUtilities::ReduceMax);
259  ASSERTL0(tmpBr >= 0 || m_HomogeneousType == eHomogeneous1D,
260  "One boundary region must be marked using the 'Flowrate' "
261  "user-defined type to monitor the volumetric flowrate.");
262 
263  // Extract an appropriate expansion list to represents the boundary.
264  if (m_flowrateBndID >= 0)
265  {
266  // For a boundary, extract the boundary itself.
267  m_flowrateBnd = m_fields[0]->GetBndCondExpansions()[m_flowrateBndID];
268  }
270  {
271  // For 3DH1D simulations with no force specified, find the mean
272  // (0th) plane.
273  Array<OneD, unsigned int> zIDs = m_fields[0]->GetZIDs();
274  int tmpId = -1;
275 
276  for (int i = 0; i < zIDs.size(); ++i)
277  {
278  if (zIDs[i] == 0)
279  {
280  tmpId = i;
281  break;
282  }
283  }
284 
285  ASSERTL1(tmpId <= 0, "Should be either at location 0 or -1 if not "
286  "found");
287 
288  if (tmpId != -1)
289  {
290  m_flowrateBnd = m_fields[0]->GetPlane(tmpId);
291  }
292  }
293 
294  // At this point, some processors may not have m_flowrateBnd
295  // set if they don't contain the appropriate boundary. To
296  // calculate the area, we integrate 1.0 over the boundary
297  // (which has been set up with the appropriate subcommunicator
298  // to avoid deadlock), and then communicate this to the other
299  // processors with an AllReduce.
300  if (m_flowrateBnd)
301  {
302  Array<OneD, NekDouble> inArea(m_flowrateBnd->GetNpoints(), 1.0);
303  m_flowrateArea = m_flowrateBnd->Integral(inArea);
304  }
306 
307  // In homogeneous case with forcing not aligned to the z-direction,
308  // redefine m_flowrateBnd so it is a 1D expansion
311  {
312  // For 3DH1D simulations with no force specified, find the mean
313  // (0th) plane.
314  Array<OneD, unsigned int> zIDs = m_fields[0]->GetZIDs();
315  m_planeID = -1;
316 
317  for (int i = 0; i < zIDs.size(); ++i)
318  {
319  if (zIDs[i] == 0)
320  {
321  m_planeID = i;
322  break;
323  }
324  }
325 
326  ASSERTL1(m_planeID <= 0, "Should be either at location 0 or -1 if not "
327  "found");
328 
329  if (m_planeID != -1)
330  {
332  ->GetBndCondExpansions()[m_flowrateBndID]
333  ->GetPlane(m_planeID);
334  }
335  }
336 
337  // Set up some storage for the Stokes solution (to be stored in
338  // m_flowrateStokes) and its initial condition (inTmp), which holds the
339  // unit forcing.
340  int nqTot = m_fields[0]->GetNpoints();
341  Array<OneD, Array<OneD, NekDouble> > inTmp(m_spacedim);
342  m_flowrateStokes = Array<OneD, Array<OneD, NekDouble> >(m_spacedim);
343 
344  for (int i = 0; i < m_spacedim; ++i)
345  {
346  inTmp[i] = Array<OneD, NekDouble>(
347  nqTot, flowrateForce[i] * aii_dt);
348  m_flowrateStokes[i] = Array<OneD, NekDouble>(nqTot, 0.0);
349 
351  {
352  Array<OneD, NekDouble> inTmp2(nqTot);
353  m_fields[i]->HomogeneousFwdTrans(inTmp[i], inTmp2);
354  m_fields[i]->SetWaveSpace(true);
355  inTmp[i] = inTmp2;
356  }
357 
358  Vmath::Zero(
359  m_fields[i]->GetNcoeffs(), m_fields[i]->UpdateCoeffs(), 1);
360  }
361 
362  // Create temporary extrapolation object to avoid issues with
363  // m_extrapolation for HOPBCs using higher order timestepping schemes.
364  // Zero pressure BCs in Neumann boundaries that may have been
365  // set in the advection step.
366  Array<OneD, const SpatialDomains::BoundaryConditionShPtr>
367  PBndConds = m_pressure->GetBndConditions();
368  Array<OneD, MultiRegions::ExpListSharedPtr>
369  PBndExp = m_pressure->GetBndCondExpansions();
370  for(int n = 0; n < PBndConds.size(); ++n)
371  {
372  if(PBndConds[n]->GetBoundaryConditionType() ==
374  {
375  Vmath::Zero(PBndExp[n]->GetNcoeffs(),
376  PBndExp[n]->UpdateCoeffs(),1);
377  }
378  }
379 
380  // Finally, calculate the solution and the flux of the Stokes
381  // solution. We set m_greenFlux to maximum numeric limit, which signals
382  // to SolveUnsteadyStokesSystem that we don't need to apply a flowrate
383  // force.
384  m_greenFlux = numeric_limits<NekDouble>::max();
385  m_flowrateAiidt = aii_dt;
386 
387  // Save the number of convective field in case it is not set
388  // to spacedim. Only need velocity components for stokes forcing
389  int SaveNConvectiveFields = m_nConvectiveFields;
391  SolveUnsteadyStokesSystem(inTmp, m_flowrateStokes, 0.0, aii_dt);
392  m_nConvectiveFields = SaveNConvectiveFields;
394 
395  // If the user specified IO_FlowSteps, open a handle to store output.
396  if (m_comm->GetRank() == 0 && m_flowrateSteps &&
397  !m_flowrateStream.is_open())
398  {
399  std::string filename = m_session->GetSessionName();
400  filename += ".prs";
401  m_flowrateStream.open(filename.c_str());
402  m_flowrateStream.setf(ios::scientific, ios::floatfield);
403  m_flowrateStream << "# step time dP" << endl
404  << "# -------------------------------------------"
405  << endl;
406  }
407 
408  // Replace pressure BCs with those evaluated from advection step
409  m_extrapolation->CopyPressureHBCsToPbndExp();
410  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
Definition: ErrorUtil.hpp:250
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.cpp:436

References ASSERTL0, ASSERTL1, 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(), and Vmath::Zero().

Referenced by 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 70 of file VelocityCorrectionScheme.h.

74  {
75  v_SetUpPressureForcing( fields, Forcing, aii_Dt);
76  }
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 SolveUnsteadyStokesSystem().

◆ SetUpSVV()

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

Definition at line 877 of file VelocityCorrectionScheme.cpp.

878  {
879 
880  m_session->MatchSolverInfo("SpectralVanishingViscosity",
881  "PowerKernel", m_useSpecVanVisc, false);
882 
883  if(m_useSpecVanVisc)
884  {
885  m_useHomo1DSpecVanVisc = true;
886  }
887  else
888  {
889  m_session->MatchSolverInfo("SpectralVanishingViscositySpectralHP",
890  "PowerKernel", m_useSpecVanVisc, false);
891  }
892 
893  if(m_useSpecVanVisc)
894  {
895  m_IsSVVPowerKernel = true;
896  }
897  else
898  {
899  m_session->MatchSolverInfo("SpectralVanishingViscosity","DGKernel",
900  m_useSpecVanVisc, false);
901  if(m_useSpecVanVisc)
902  {
903  m_useHomo1DSpecVanVisc = true;
904  }
905  else
906  {
907  m_session->MatchSolverInfo("SpectralVanishingViscositySpectralHP",
908  "DGKernel", m_useSpecVanVisc, false);
909  }
910 
911  if(m_useSpecVanVisc)
912  {
913  m_IsSVVPowerKernel = false;
914  }
915  }
916 
917  //set up varcoeff kernel if PowerKernel or DG is specified
918  if(m_useSpecVanVisc)
919  {
920  Array<OneD, Array<OneD, NekDouble> > SVVVelFields = NullNekDoubleArrayOfArray;
921  if(m_session->DefinesFunction("SVVVelocityMagnitude"))
922  {
923  if (m_comm->GetRank() == 0)
924  {
925  cout << "Seting up SVV velocity from "
926  "SVVVelocityMagnitude section in session file" << endl;
927  }
928  int nvel = m_velocity.size();
929  int phystot = m_fields[0]->GetTotPoints();
930  SVVVelFields = Array<OneD, Array<OneD, NekDouble> >(nvel);
931  vector<string> vars;
932  for(int i = 0; i < nvel; ++i)
933  {
934  SVVVelFields[i] = Array<OneD, NekDouble>(phystot);
935  vars.push_back(m_session->GetVariable(m_velocity[i]));
936  }
937 
938  // Load up files into m_fields;
939  GetFunction("SVVVelocityMagnitude")
940  ->Evaluate(vars,SVVVelFields);
941  }
942 
943  m_svvVarDiffCoeff = Array<OneD, NekDouble>(m_fields[0]->GetNumElmts());
944  SVVVarDiffCoeff(1.0,m_svvVarDiffCoeff,SVVVelFields);
945  m_session->LoadParameter("SVVDiffCoeff", m_sVVDiffCoeff, 1.0);
946  }
947  else
948  {
950  m_session->LoadParameter("SVVDiffCoeff", m_sVVDiffCoeff, 0.1);
951  }
952 
953  // Load parameters for Spectral Vanishing Viscosity
954  if(m_useSpecVanVisc == false)
955  {
956  m_session->MatchSolverInfo("SpectralVanishingViscosity","True",
957  m_useSpecVanVisc, false);
958  if(m_useSpecVanVisc == false)
959  {
960  m_session->MatchSolverInfo("SpectralVanishingViscosity","ExpKernel",
961  m_useSpecVanVisc, false);
962  }
964 
965  if(m_useSpecVanVisc == false)
966  {
967  m_session->MatchSolverInfo("SpectralVanishingViscositySpectralHP","True",
968  m_useSpecVanVisc, false);
969  if(m_useSpecVanVisc == false)
970  {
971  m_session->MatchSolverInfo("SpectralVanishingViscositySpectralHP","ExpKernel",
972  m_useSpecVanVisc, false);
973  }
974  }
975  }
976 
977 
978  // Case of only Homo1D kernel
979  if(m_session->DefinesSolverInfo("SpectralVanishingViscosityHomo1D"))
980  {
981  m_session->MatchSolverInfo("SpectralVanishingViscosityHomo1D",
982  "True", m_useHomo1DSpecVanVisc, false);
983  if(m_useHomo1DSpecVanVisc == false)
984  {
985  m_session->MatchSolverInfo("SpectralVanishingViscosityHomo1D",
986  "ExpKernel", m_useHomo1DSpecVanVisc, false);
987  }
988  }
989 
990  m_session->LoadParameter("SVVCutoffRatio",m_sVVCutoffRatio,0.75);
991  m_session->LoadParameter("SVVCutoffRatioHomo1D",m_sVVCutoffRatioHomo1D,m_sVVCutoffRatio);
992  m_session->LoadParameter("SVVDiffCoeffHomo1D", m_sVVDiffCoeffHomo1D, m_sVVDiffCoeff);
993 
995  {
997  "Expect to have three velocity fields with homogenous expansion");
998 
1000  {
1001  Array<OneD, unsigned int> planes;
1002  planes = m_fields[0]->GetZIDs();
1003 
1004  int num_planes = planes.size();
1005  Array<OneD, NekDouble> SVV(num_planes,0.0);
1006  NekDouble fac;
1007  int kmodes = m_fields[0]->GetHomogeneousBasis()->GetNumModes();
1008  int pstart;
1009 
1010  pstart = m_sVVCutoffRatioHomo1D*kmodes;
1011 
1012  for(int n = 0; n < num_planes; ++n)
1013  {
1014  if(planes[n] > pstart)
1015  {
1016  fac = (NekDouble)((planes[n] - kmodes)*(planes[n] - kmodes))/
1017  ((NekDouble)((planes[n] - pstart)*(planes[n] - pstart)));
1018  SVV[n] = m_sVVDiffCoeffHomo1D*exp(-fac)/m_kinvis;
1019  }
1020  }
1021 
1022  for(int i = 0; i < m_velocity.size(); ++i)
1023  {
1024  m_fields[m_velocity[i]]->SetHomo1DSpecVanVisc(SVV);
1025  }
1026  }
1027  }
1028 
1029  }
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 78 of file VelocityCorrectionScheme.h.

82  {
83  v_SetUpViscousForcing( inarray, Forcing, aii_Dt);
84  }
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 SolveUnsteadyStokesSystem().

◆ SolvePressure()

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

Definition at line 86 of file VelocityCorrectionScheme.h.

87  {
88  v_SolvePressure( Forcing);
89  }
virtual void v_SolvePressure(const Array< OneD, NekDouble > &Forcing)

References v_SolvePressure().

Referenced by 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  aii_Dt 
)

Implicit part of the method - Poisson + nConv*Helmholtz

Definition at line 701 of file VelocityCorrectionScheme.cpp.

706  {
707  // Set up flowrate if we're starting for the first time or the value of
708  // aii_Dt has changed.
709  if (m_flowrate > 0.0 && (aii_Dt != m_flowrateAiidt))
710  {
711  SetupFlowrate(aii_Dt);
712  }
713 
714  int physTot = m_fields[0]->GetTotPoints();
715 
716  // Substep the pressure boundary condition if using substepping
717  m_extrapolation->SubStepSetPressureBCs(inarray,aii_Dt,m_kinvis);
718 
719  // Set up forcing term for pressure Poisson equation
720 LibUtilities::Timer timer;
721 timer.Start();
722  SetUpPressureForcing(inarray, m_F, aii_Dt);
723 timer.Stop();
724 timer.AccumulateRegion("Pressure Forcing");
725 
726  // Solve Pressure System
727 timer.Start();
728  SolvePressure (m_F[0]);
729 timer.Stop();
730 timer.AccumulateRegion("Pressure Solve");
731 
732  // Set up forcing term for Helmholtz problems
733 timer.Start();
734  SetUpViscousForcing(inarray, m_F, aii_Dt);
735 timer.Stop();
736 timer.AccumulateRegion("Viscous Forcing");
737 
738  // Solve velocity system
739 timer.Start();
740  SolveViscous( m_F, outarray, aii_Dt);
741 timer.Stop();
742 timer.AccumulateRegion("Viscous Solve");
743 
744  // Apply flowrate correction
745  if (m_flowrate > 0.0 && m_greenFlux != numeric_limits<NekDouble>::max())
746  {
747  NekDouble currentFlux = MeasureFlowrate(outarray);
748  m_alpha = (m_flowrate - currentFlux) / m_greenFlux;
749 
750  for (int i = 0; i < m_spacedim; ++i)
751  {
752  Vmath::Svtvp(physTot, m_alpha, m_flowrateStokes[i], 1,
753  outarray[i], 1, outarray[i], 1);
754  //Enusre coeff space is updated for next time step
755  m_fields[i]->FwdTrans_IterPerExp(outarray[i],
756  m_fields[i]->UpdateCoeffs());
757  // Impsoe symmetry of flow on coeff space (good to enfore periodicity).
758  m_fields[i]->LocalToGlobal();
759  m_fields[i]->GlobalToLocal();
760  }
761  }
762  }
NekDouble m_flowrate
Desired volumetric flowrate.
NekDouble m_alpha
Current flowrate correction.
Array< OneD, Array< OneD, NekDouble > > m_F
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, 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.cpp:565

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(), SolveViscous(), Nektar::LibUtilities::Timer::Start(), Nektar::LibUtilities::Timer::Stop(), and Vmath::Svtvp().

Referenced by SetupFlowrate(), v_InitObject(), and Nektar::SmoothedProfileMethod::v_SolveUnsteadyStokesSystem().

◆ SolveViscous()

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

Definition at line 91 of file VelocityCorrectionScheme.h.

95  {
96  v_SolveViscous( Forcing, outarray, aii_Dt);
97  }
virtual void v_SolveViscous(const Array< OneD, const Array< OneD, NekDouble > > &Forcing, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble aii_Dt)

References v_SolveViscous().

Referenced by 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 1031 of file VelocityCorrectionScheme.cpp.

1035  {
1036  int phystot = m_fields[0]->GetTotPoints();
1037  int nel = m_fields[0]->GetNumElmts();
1038  int nvel,cnt;
1039 
1040  Array<OneD, NekDouble> tmp;
1041 
1042  Vmath::Fill(nel,velmag,diffcoeff,1);
1043 
1044  if(vel != NullNekDoubleArrayOfArray)
1045  {
1046  Array<OneD, NekDouble> Velmag(phystot);
1047  nvel = vel.size();
1048  // calculate magnitude of v
1049  Vmath::Vmul(phystot,vel[0],1,vel[0],1,Velmag,1);
1050  for(int n = 1; n < nvel; ++n)
1051  {
1052  Vmath::Vvtvp(phystot,vel[n],1,vel[n],1,Velmag,1,
1053  Velmag,1);
1054  }
1055  Vmath::Vsqrt(phystot,Velmag,1,Velmag,1);
1056 
1057 
1058  cnt = 0;
1059  Array<OneD, NekDouble> tmp;
1060  // calculate mean value of vel mag.
1061  for(int i = 0; i < nel; ++i)
1062  {
1063  int nq = m_fields[0]->GetExp(i)->GetTotPoints();
1064  tmp = Velmag + cnt;
1065  diffcoeff[i] = m_fields[0]->GetExp(i)->Integral(tmp);
1066  Vmath::Fill(nq,1.0,tmp,1);
1067  NekDouble area = m_fields[0]->GetExp(i)->Integral(tmp);
1068  diffcoeff[i] = diffcoeff[i]/area;
1069  cnt += nq;
1070  }
1071  }
1072  else
1073  {
1074  nvel = m_expdim;
1075  }
1076 
1077 
1078  for (int e = 0; e < nel; e++)
1079  {
1080  LocalRegions::ExpansionSharedPtr exp = m_fields[0]->GetExp(e);
1081  NekDouble h = 0;
1082 
1083  // Find maximum length of edge.
1084  for(int i = 0; i < exp->GetGeom()->GetNumEdges(); ++i)
1085  {
1086  h = max(h, exp->GetGeom()->GetEdge(i)->GetVertex(0)->dist
1087  (*(exp->GetGeom()->GetEdge(i)->GetVertex(1))));
1088  }
1089 
1090  int p = 0;
1091  for(int i = 0; i < m_expdim; ++i)
1092  {
1093  p = max(p,exp->GetBasisNumModes(i)-1);
1094  }
1095 
1096  diffcoeff[e] *= h/p;
1097  }
1098  }
int m_expdim
Expansion dimension.
std::shared_ptr< Expansion > ExpansionSharedPtr
Definition: Expansion.h:68
void Vsqrt(int n, const T *x, const int incx, T *y, const int incy)
sqrt y = sqrt(x)
Definition: Vmath.cpp:475
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.cpp:192
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.cpp:513
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
Definition: Vmath.cpp:45

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

Referenced by SetUpSVV().

◆ v_DoInitialise()

void Nektar::VelocityCorrectionScheme::v_DoInitialise ( void  )
protectedvirtual

Sets up initial conditions.

Sets the initial conditions.

Reimplemented from Nektar::SolverUtils::UnsteadySystem.

Reimplemented in Nektar::VCSMapping.

Definition at line 578 of file VelocityCorrectionScheme.cpp.

579  {
580  m_F = Array<OneD, Array<OneD, NekDouble> > (m_nConvectiveFields);
581 
582  for (int i = 0; i < m_nConvectiveFields; ++i)
583  {
584  m_F[i] = Array< OneD, NekDouble> (m_fields[0]->GetTotPoints(), 0.0);
585  }
586 
587  m_flowrateAiidt = 0.0;
588 
590 
591  // Set up Field Meta Data for output files
592  m_fieldMetaDataMap["Kinvis"] =
593  boost::lexical_cast<std::string>(m_kinvis);
594  m_fieldMetaDataMap["TimeStep"] =
595  boost::lexical_cast<std::string>(m_timestep);
596 
597  // set boundary conditions here so that any normal component
598  // correction are imposed before they are imposed on initial
599  // field below
601 
602  // Ensure the initial conditions have correct BCs
603  for(int i = 0; i < m_fields.size(); ++i)
604  {
605  m_fields[i]->ImposeDirichletConditions(m_fields[i]->UpdateCoeffs());
606  m_fields[i]->LocalToGlobal();
607  m_fields[i]->GlobalToLocal();
608  m_fields[i]->BwdTrans(m_fields[i]->GetCoeffs(),
609  m_fields[i]->UpdatePhys());
610  }
611  }
void SetBoundaryConditions(NekDouble time)
time dependent boundary conditions updating
NekDouble m_timestep
Time step size.
NekDouble m_time
Current time of simulation.
LibUtilities::FieldMetaDataMap m_fieldMetaDataMap
Map to identify relevant solver info to dump in output fields.
SOLVER_UTILS_EXPORT int GetTotPoints()
virtual SOLVER_UTILS_EXPORT void v_DoInitialise()
Sets up initial conditions.

References Nektar::SolverUtils::EquationSystem::GetTotPoints(), m_F, Nektar::SolverUtils::EquationSystem::m_fieldMetaDataMap, Nektar::SolverUtils::EquationSystem::m_fields, m_flowrateAiidt, Nektar::IncNavierStokes::m_kinvis, Nektar::IncNavierStokes::m_nConvectiveFields, Nektar::SolverUtils::EquationSystem::m_time, Nektar::SolverUtils::EquationSystem::m_timestep, Nektar::IncNavierStokes::SetBoundaryConditions(), and Nektar::SolverUtils::UnsteadySystem::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.

Definition at line 665 of file VelocityCorrectionScheme.cpp.

669  {
670 LibUtilities::Timer timer;
671 timer.Start();
672  EvaluateAdvectionTerms(inarray, outarray, time);
673 timer.Stop();
674 timer.AccumulateRegion("Advection Terms");
675 
676  // Smooth advection
678  {
679  for(int i = 0; i < m_nConvectiveFields; ++i)
680  {
681  m_pressure->SmoothField(outarray[i]);
682  }
683  }
684 
685  // Add forcing terms
686  for (auto &x : m_forcing)
687  {
688  x->Apply(m_fields, inarray, outarray, time);
689  }
690 
691  // Calculate High-Order pressure boundary conditions
692 timer.Start();
693  m_extrapolation->EvaluatePressureBCs(inarray,outarray,m_kinvis);
694 timer.Stop();
695 timer.AccumulateRegion("Pressure BCs");
696  }
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(), Nektar::IncNavierStokes::EvaluateAdvectionTerms(), Nektar::IncNavierStokes::m_extrapolation, Nektar::SolverUtils::EquationSystem::m_fields, Nektar::IncNavierStokes::m_forcing, Nektar::IncNavierStokes::m_kinvis, Nektar::IncNavierStokes::m_nConvectiveFields, Nektar::IncNavierStokes::m_pressure, Nektar::IncNavierStokes::m_SmoothAdvection, Nektar::LibUtilities::Timer::Start(), and Nektar::LibUtilities::Timer::Stop().

Referenced by EvaluateAdvection_SetPressureBCs().

◆ v_GenerateSummary()

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

Print a summary of time stepping parameters.

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

Reimplemented from Nektar::SolverUtils::UnsteadySystem.

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

Definition at line 506 of file VelocityCorrectionScheme.cpp.

507  {
510  "Splitting Scheme", "Velocity correction (strong press. form)");
511 
512  if( m_extrapolation->GetSubStepName().size() )
513  {
514  SolverUtils::AddSummaryItem( s, "Substepping",
515  m_extrapolation->GetSubStepName() );
516  }
517 
518  string dealias = m_homogen_dealiasing ? "Homogeneous1D" : "";
520  {
521  dealias += (dealias == "" ? "" : " + ") + string("spectral/hp");
522  }
523  if (dealias != "")
524  {
525  SolverUtils::AddSummaryItem(s, "Dealiasing", dealias);
526  }
527 
528 
529  string smoothing = m_useSpecVanVisc ? "spectral/hp" : "";
530  if (smoothing != "")
531  {
533  {
535  s, "Smoothing-SpecHP", "SVV (" + smoothing +
536  " Exp Kernel(cut-off = "
537  + boost::lexical_cast<string>(m_sVVCutoffRatio)
538  + ", diff coeff = "
539  + boost::lexical_cast<string>(m_sVVDiffCoeff)+"))");
540  }
541  else
542  {
544  {
546  s, "Smoothing-SpecHP", "SVV (" + smoothing +
547  " Power Kernel (Power ratio ="
548  + boost::lexical_cast<string>(m_sVVCutoffRatio)
549  + ", diff coeff = "
550  + boost::lexical_cast<string>(m_sVVDiffCoeff)+"*Uh/p))");
551  }
552  else
553  {
555  s, "Smoothing-SpecHP", "SVV (" + smoothing +
556  " DG Kernel (diff coeff = "
557  + boost::lexical_cast<string>(m_sVVDiffCoeff)+"*Uh/p))");
558 
559  }
560  }
561 
562  }
563 
565  {
567  s, "Smoothing-Homo1D", "SVV (Homogeneous1D - Exp Kernel(cut-off = "
568  + boost::lexical_cast<string>(m_sVVCutoffRatioHomo1D)
569  + ", diff coeff = "
570  + boost::lexical_cast<string>(m_sVVDiffCoeffHomo1D)+"))");
571  }
572 
573  }
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.
virtual SOLVER_UTILS_EXPORT void v_GenerateSummary(SummaryList &s)
Print a summary of time stepping parameters.
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, Nektar::SolverUtils::EquationSystem::m_homogen_dealiasing, Nektar::SolverUtils::EquationSystem::m_HomogeneousType, m_IsSVVPowerKernel, Nektar::SolverUtils::EquationSystem::m_specHP_dealiasing, m_sVVCutoffRatio, m_sVVCutoffRatioHomo1D, m_sVVDiffCoeff, m_sVVDiffCoeffHomo1D, m_svvVarDiffCoeff, m_useHomo1DSpecVanVisc, m_useSpecVanVisc, Nektar::NullNekDouble1DArray, and Nektar::SolverUtils::UnsteadySystem::v_GenerateSummary().

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

◆ v_GetExtrapolateStr()

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

Reimplemented in Nektar::VCSWeakPressure.

Definition at line 206 of file VelocityCorrectionScheme.h.

207  {
208  return "Standard";
209  }

Referenced by SetUpExtrapolation().

◆ v_GetForceDimension()

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

Implements Nektar::IncNavierStokes.

Definition at line 657 of file VelocityCorrectionScheme.cpp.

658  {
659  return m_session->GetVariables().size() - 1;
660  }

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 211 of file VelocityCorrectionScheme.h.

213  {
214  return instr;
215  }

Referenced by SetUpExtrapolation().

◆ v_GetSystemSingularChecks()

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

Reimplemented from Nektar::SolverUtils::EquationSystem.

Definition at line 646 of file VelocityCorrectionScheme.cpp.

647  {
648  int vVar = m_session->GetVariables().size();
649  Array<OneD, bool> vChecks(vVar, false);
650  vChecks[vVar-1] = true;
651  return vChecks;
652  }

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

◆ v_InitObject()

void Nektar::VelocityCorrectionScheme::v_InitObject ( )
virtual

Init object for UnsteadySystem class.

Initialization object for UnsteadySystem class.

Reimplemented from Nektar::IncNavierStokes.

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

Definition at line 70 of file VelocityCorrectionScheme.cpp.

71  {
72  int n;
73 
75  m_explicitDiffusion = false;
76 
77  // Set m_pressure to point to last field of m_fields;
78  if (boost::iequals(m_session->GetVariable(m_fields.size()-1), "p"))
79  {
80  m_nConvectiveFields = m_fields.size()-1;
82  }
83  else
84  {
85  ASSERTL0(false,"Need to set up pressure field definition");
86  }
87 
88  // Determine diffusion coefficients for each field
89  m_diffCoeff = Array<OneD, NekDouble> (m_nConvectiveFields, m_kinvis);
90  for (n = 0; n < m_nConvectiveFields; ++n)
91  {
92  std::string varName = m_session->GetVariable(n);
93  if ( m_session->DefinesFunction("DiffusionCoefficient", varName))
94  {
96  = m_session->GetFunction("DiffusionCoefficient", varName);
97  m_diffCoeff[n] = ffunc->Evaluate();
98  }
99  }
100 
101  // Integrate only the convective fields
102  for (n = 0; n < m_nConvectiveFields; ++n)
103  {
104  m_intVariables.push_back(n);
105  }
106 
108  SetUpSVV();
109 
110  m_session->MatchSolverInfo("SmoothAdvection", "True",
111  m_SmoothAdvection, false);
112 
113  // set explicit time-intregration class operators
116 
117  // set implicit time-intregration class operators
120 
121  // Set up bits for flowrate.
122  m_session->LoadParameter("Flowrate", m_flowrate, 0.0);
123  m_session->LoadParameter("IO_FlowSteps", m_flowrateSteps, 0);
124  }
virtual void v_InitObject()
Init object for UnsteadySystem class.
void DefineOdeRhs(FuncPointerT func, ObjectPointerT obj)
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.
void EvaluateAdvection_SetPressureBCs(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
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, 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, SetUpExtrapolation(), SetUpSVV(), SolveUnsteadyStokesSystem(), and Nektar::IncNavierStokes::v_InitObject().

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

◆ v_PostIntegrate()

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

Reimplemented from Nektar::SolverUtils::AdvectionSystem.

Definition at line 481 of file VelocityCorrectionScheme.cpp.

482  {
483  if (m_flowrateSteps > 0)
484  {
485  if (m_comm->GetRank() == 0 && (step + 1) % m_flowrateSteps == 0)
486  {
487  m_flowrateStream << setw(8) << step << setw(16) << m_time
488  << setw(16) << m_alpha << endl;
489  }
490  }
491 
493  }
virtual SOLVER_UTILS_EXPORT bool v_PostIntegrate(int step)

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

◆ v_RequireFwdTrans()

virtual bool Nektar::VelocityCorrectionScheme::v_RequireFwdTrans ( )
inlineprotectedvirtual

Reimplemented from Nektar::SolverUtils::UnsteadySystem.

Definition at line 201 of file VelocityCorrectionScheme.h.

202  {
203  return false;
204  }

◆ 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::VCSWeakPressure, and Nektar::VCSMapping.

Definition at line 767 of file VelocityCorrectionScheme.cpp.

771  {
772  int i;
773  int physTot = m_fields[0]->GetTotPoints();
774  int nvel = m_velocity.size();
775 
776  m_fields[0]->PhysDeriv(eX,fields[0], Forcing[0]);
777 
778  for(i = 1; i < nvel; ++i)
779  {
780  // Use Forcing[1] as storage since it is not needed for the pressure
781  m_fields[i]->PhysDeriv(DirCartesianMap[i],fields[i],Forcing[1]);
782  Vmath::Vadd(physTot,Forcing[1],1,Forcing[0],1,Forcing[0],1);
783  }
784 
785  Vmath::Smul(physTot,1.0/aii_Dt,Forcing[0],1,Forcing[0],1);
786  }
MultiRegions::Direction const DirCartesianMap[]
Definition: ExpList.h:90
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.cpp:322
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.cpp:225

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.

Definition at line 791 of file VelocityCorrectionScheme.cpp.

795  {
796  NekDouble aii_dtinv = 1.0/aii_Dt;
797  int phystot = m_fields[0]->GetTotPoints();
798 
799  // Grad p
800  m_pressure->BwdTrans(m_pressure->GetCoeffs(),m_pressure->UpdatePhys());
801 
802  int nvel = m_velocity.size();
803  if(nvel == 2)
804  {
805  m_pressure->PhysDeriv(m_pressure->GetPhys(),
806  Forcing[m_velocity[0]],
807  Forcing[m_velocity[1]]);
808  }
809  else
810  {
811  m_pressure->PhysDeriv(m_pressure->GetPhys(),
812  Forcing[m_velocity[0]],
813  Forcing[m_velocity[1]],
814  Forcing[m_velocity[2]]);
815  }
816 
817  // zero convective fields.
818  for(int i = nvel; i < m_nConvectiveFields; ++i)
819  {
820  Vmath::Zero(phystot,Forcing[i],1);
821  }
822 
823  // Subtract inarray/(aii_dt) and divide by kinvis. Kinvis will
824  // need to be updated for the convected fields.
825  for(int i = 0; i < m_nConvectiveFields; ++i)
826  {
827  Blas::Daxpy(phystot,-aii_dtinv,inarray[i],1,Forcing[i],1);
828  Blas::Dscal(phystot,1.0/m_diffCoeff[i],&(Forcing[i])[0],1);
829  }
830  }
static void Dscal(const int &n, const double &alpha, double *x, const int &incx)
BLAS level 1: x = alpha x.
Definition: Blas.hpp:182
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:167

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::VCSWeakPressure, and Nektar::VCSMapping.

Definition at line 836 of file VelocityCorrectionScheme.cpp.

838  {
840  // Setup coefficient for equation
841  factors[StdRegions::eFactorLambda] = 0.0;
842 
843  // Solver Pressure Poisson Equation
844  m_pressure->HelmSolve(Forcing, m_pressure->UpdateCoeffs(), factors);
845 
846  // Add presure to outflow bc if using convective like BCs
847  m_extrapolation->AddPressureToOutflowBCs(m_kinvis);
848  }
std::map< ConstFactorType, NekDouble > ConstFactorMap
Definition: StdRegions.hpp:314

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_SolveViscous()

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

Solve velocity system

Reimplemented in Nektar::VCSMapping.

Definition at line 853 of file VelocityCorrectionScheme.cpp.

857  {
860  MultiRegions::VarFactorsMap varFactorsMap =
862 
863  AppendSVVFactors(factors,varFactorsMap);
864 
865  // Solve Helmholtz system and put in Physical space
866  for(int i = 0; i < m_nConvectiveFields; ++i)
867  {
868  // Setup coefficients for equation
869  factors[StdRegions::eFactorLambda] = 1.0/aii_Dt/m_diffCoeff[i];
870  m_fields[i]->HelmSolve(Forcing[i], m_fields[i]->UpdateCoeffs(),
871  factors, varCoeffMap,
872  varFactorsMap);
873  m_fields[i]->BwdTrans(m_fields[i]->GetCoeffs(),outarray[i]);
874  }
875  }
void AppendSVVFactors(StdRegions::ConstFactorMap &factors, MultiRegions::VarFactorsMap &varFactorsMap)
static VarFactorsMap NullVarFactorsMap
std::map< StdRegions::ConstFactorType, Array< OneD, NekDouble > > VarFactorsMap
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
Definition: StdRegions.hpp:272

References AppendSVVFactors(), Nektar::StdRegions::eFactorLambda, m_diffCoeff, Nektar::SolverUtils::EquationSystem::m_fields, Nektar::IncNavierStokes::m_nConvectiveFields, Nektar::StdRegions::NullVarCoeffMap, and Nektar::MultiRegions::NullVarFactorsMap.

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

◆ v_TransCoeffToPhys()

void Nektar::VelocityCorrectionScheme::v_TransCoeffToPhys ( void  )
protectedvirtual

Virtual function for transformation to physical space.

Reimplemented from Nektar::IncNavierStokes.

Definition at line 617 of file VelocityCorrectionScheme.cpp.

618  {
619  int nfields = m_fields.size() - 1;
620  for (int k=0 ; k < nfields; ++k)
621  {
622  //Backward Transformation in physical space for time evolution
623  m_fields[k]->BwdTrans_IterPerExp(m_fields[k]->GetCoeffs(),
624  m_fields[k]->UpdatePhys());
625  }
626  }

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

◆ v_TransPhysToCoeff()

void Nektar::VelocityCorrectionScheme::v_TransPhysToCoeff ( void  )
protectedvirtual

Virtual function for transformation to coefficient space.

Reimplemented from Nektar::IncNavierStokes.

Definition at line 631 of file VelocityCorrectionScheme.cpp.

632  {
633 
634  int nfields = m_fields.size() - 1;
635  for (int k=0 ; k < nfields; ++k)
636  {
637  //Forward Transformation in physical space for time evolution
638  m_fields[k]->FwdTrans_IterPerExp(m_fields[k]->GetPhys(),
639  m_fields[k]->UpdateCoeffs());
640  }
641  }

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

Member Data Documentation

◆ className

string Nektar::VelocityCorrectionScheme::className
static
Initial value:
=
"VelocityCorrectionScheme",
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
Definition: NekFactory.hpp:200
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 59 of file VelocityCorrectionScheme.h.

◆ m_alpha

NekDouble Nektar::VelocityCorrectionScheme::m_alpha
protected

Current flowrate correction.

Definition at line 144 of file VelocityCorrectionScheme.h.

Referenced by SolveUnsteadyStokesSystem(), and v_PostIntegrate().

◆ m_diffCoeff

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

Diffusion coefficients (will be kinvis for velocities)

Definition at line 130 of file VelocityCorrectionScheme.h.

Referenced by v_InitObject(), v_SetUpViscousForcing(), and v_SolveViscous().

◆ 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 136 of file VelocityCorrectionScheme.h.

Referenced by SolveUnsteadyStokesSystem(), and v_InitObject().

◆ m_flowrateAiidt

NekDouble Nektar::VelocityCorrectionScheme::m_flowrateAiidt
protected

Value of aii_dt used to compute Stokes flowrate solution.

Definition at line 158 of file VelocityCorrectionScheme.h.

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

◆ m_flowrateArea

NekDouble Nektar::VelocityCorrectionScheme::m_flowrateArea
protected

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

Definition at line 138 of file VelocityCorrectionScheme.h.

Referenced by MeasureFlowrate(), and SetupFlowrate().

◆ m_flowrateBnd

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

Flowrate reference surface.

Definition at line 150 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 146 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 156 of file VelocityCorrectionScheme.h.

Referenced by SetupFlowrate(), 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 152 of file VelocityCorrectionScheme.h.

Referenced by SetupFlowrate(), and SolveUnsteadyStokesSystem().

◆ m_flowrateStream

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

Output stream to record flowrate.

Definition at line 154 of file VelocityCorrectionScheme.h.

Referenced by SetupFlowrate(), and v_PostIntegrate().

◆ m_greenFlux

NekDouble Nektar::VelocityCorrectionScheme::m_greenFlux
protected

Flux of the Stokes function solution.

Definition at line 142 of file VelocityCorrectionScheme.h.

Referenced by SetupFlowrate(), and SolveUnsteadyStokesSystem().

◆ m_homd1DFlowinPlane

bool Nektar::VelocityCorrectionScheme::m_homd1DFlowinPlane
protected

Definition at line 140 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 128 of file VelocityCorrectionScheme.h.

Referenced by AppendSVVFactors(), SetUpSVV(), and v_GenerateSummary().

◆ m_planeID

int Nektar::VelocityCorrectionScheme::m_planeID
protected

Plane ID for cases with homogeneous expansion.

Definition at line 148 of file VelocityCorrectionScheme.h.

Referenced by MeasureFlowrate(), and SetupFlowrate().

◆ m_sVVCutoffRatio

NekDouble Nektar::VelocityCorrectionScheme::m_sVVCutoffRatio
protected

cutt off ratio from which to start decayhing modes

Definition at line 119 of file VelocityCorrectionScheme.h.

Referenced by AppendSVVFactors(), SetUpSVV(), v_GenerateSummary(), Nektar::VCSWeakPressure::v_GenerateSummary(), and Nektar::VCSMapping::v_SolveViscous().

◆ m_sVVCutoffRatioHomo1D

NekDouble Nektar::VelocityCorrectionScheme::m_sVVCutoffRatioHomo1D
protected

Definition at line 122 of file VelocityCorrectionScheme.h.

Referenced by SetUpSVV(), and v_GenerateSummary().

◆ 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 124 of file VelocityCorrectionScheme.h.

Referenced by SetUpSVV(), and 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 126 of file VelocityCorrectionScheme.h.

Referenced by AppendSVVFactors(), SetUpSVV(), and v_GenerateSummary().

◆ m_useHomo1DSpecVanVisc

bool Nektar::VelocityCorrectionScheme::m_useHomo1DSpecVanVisc
protected

bool to identify if spectral vanishing viscosity is active.

Definition at line 115 of file VelocityCorrectionScheme.h.

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

◆ m_useSpecVanVisc

bool Nektar::VelocityCorrectionScheme::m_useSpecVanVisc
protected

bool to identify if spectral vanishing viscosity is active.

Definition at line 117 of file VelocityCorrectionScheme.h.

Referenced by AppendSVVFactors(), SetUpSVV(), v_GenerateSummary(), Nektar::VCSWeakPressure::v_GenerateSummary(), and Nektar::VCSMapping::v_SolveViscous().

◆ 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 133 of file VelocityCorrectionScheme.h.