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

#include <VelocityCorrectionSchemeLevelSet.h>

Inheritance diagram for Nektar::VCSLevelSet:
[legend]

Static Public Member Functions

static SolverUtils::EquationSystemSharedPtr create (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
 Creates an instance of this class.
 
- Static Public Member Functions inherited from Nektar::VelocityCorrectionScheme
static SolverUtils::EquationSystemSharedPtr create (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
 Creates an instance of this class.
 
static 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::VelocityCorrectionScheme
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

 VCSLevelSet (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
 
 ~VCSLevelSet () override=default
 
void v_InitObject (bool DeclareField=true) override
 Initialisation object for EquationSystem.
 
void v_GenerateSummary (SolverUtils::SummaryList &s) override
 Print a summary of time stepping parameters.
 
void v_SolveUnsteadyStokesSystem (const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time, const NekDouble a_iixDt) override
 
void SetUpLevelSetForcing (const Array< OneD, NekDouble > &fields, Array< OneD, NekDouble > &Forcing, const NekDouble aii_Dt)
 
void v_SetUpPressureForcing (const Array< OneD, const Array< OneD, NekDouble > > &fields, Array< OneD, Array< OneD, NekDouble > > &Forcing, const NekDouble aii_Dt) override
 
void v_SetUpViscousForcing (const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &Forcing, const NekDouble aii_Dt) override
 
void SolveLevelSet (const Array< OneD, NekDouble > &Forcing, const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarrayPhi, Array< OneD, NekDouble > &outarrayRho, Array< OneD, NekDouble > &outarrayVisc, const NekDouble aii_Dt)
 
void v_SolvePressure (const Array< OneD, NekDouble > &Forcing) override
 
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) override
 
- Protected Member Functions inherited from Nektar::VelocityCorrectionScheme
 VelocityCorrectionScheme (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
 
 ~VelocityCorrectionScheme () override=default
 
void v_InitObject (bool DeclareField=true) override
 Initialisation object for the unsteady diffusion problem.
 
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_SolveSolid (NekDouble time)
 
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)
 
void SetEPInsulatorBCs (const Array< OneD, Array< OneD, NekDouble > > &movEfield)
 
 VelocityCorrectionScheme (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
 
 ~VelocityCorrectionScheme () override=default
 
void DoProjection (LibUtilities::Field< double, FieldState::Phys > &in, LibUtilities::Field< double, FieldState::Phys > &out, const double &time)
 Project the velocity onto the continuous space with its Dirichlet values at time. The coefficients are left in m_coeff[m_velocityIndex], of which out is then the backward transform, as after a velocity solve.
 
void SolveUnsteadyStokesSystem (LibUtilities::Field< double, FieldState::Phys > &in, LibUtilities::Field< double, FieldState::Phys > &out, const double &time, const double &lambda, const ExplicitWeights &weights)
 
void SolveUnsteadyStokesSystemWithoutHistory (LibUtilities::Field< double, FieldState::Phys > &in, LibUtilities::Field< double, FieldState::Phys > &out, const double &time, const double &lambda)
 SolveUnsteadyStokesSystem() for a solver that keeps no histories.
 
void EvaluateAdvection_SetPressureBCs (LibUtilities::Field< double, FieldState::Phys > &in, LibUtilities::Field< double, FieldState::Phys > &out, const double &time, const double &dt, const ExplicitWeights &weights)
 
void EvaluateAdvection_SetPressureBCsWithoutHistory (LibUtilities::Field< double, FieldState::Phys > &in, LibUtilities::Field< double, FieldState::Phys > &out, const double &time, const double &dt)
 EvaluateAdvection_SetPressureBCs() for a solver that keeps no histories.
 
bool IsStartupStep () const
 Whether the multistep scheme is taking one of its start-up steps, whose implicit solves are start-up stages.
 
double GetStartupDivergenceWeight (const double dt_inv_gamma) const
 
void SetUpWeakPressureForcing (LibUtilities::Field< double, FieldState::Phys > &in, LibUtilities::Field< double, FieldState::Phys > &fieldRhs, const double dt_inv_gamma, const double startupDivergenceWeight, const ExplicitWeights &weights)
 
void EvaluateAdvectionContribution (LibUtilities::Field< double, FieldState::Phys > &in, LibUtilities::Field< double, FieldState::Phys > &out, const double &time, const double &dt)
 
std::deque< LibUtilities::Field< double, FieldState::Phys > > & GetAdvectionRhsHistory (const ExplicitWeights &weights)
 The history of the explicit advection contribution of the scheme that weights belong to, created on first use.
 
void FreeStartupHistories (unsigned int historyId)
 Free the histories of the startup schemes once the main scheme evaluates again.
 
std::deque< LibUtilities::Field< double, FieldState::Phys > > & GetVelocityHistory (const ExplicitWeights &weights)
 The history of the velocity of the scheme that weights belongs to, created on first use.
 
std::deque< LibUtilities::Field< double, FieldState::Phys > > & GetPressureBCRhsHistory (const ExplicitWeights &weights)
 The history of the explicit forcing of the scheme that weights belong to, created on first use.
 
void UpdateAdvectionRhsHistory (LibUtilities::Field< double, FieldState::Phys > &advRhs, const ExplicitWeights &weights)
 
void UpdateVelocityHistory (LibUtilities::Field< double, FieldState::Phys > &velocity, const ExplicitWeights &weights)
 
void UpdatePressureBCRhsHistory (LibUtilities::Field< double, FieldState::Phys > &rhs, const double dt, const ExplicitWeights &weights)
 
void CombineExplicitContributions (const ExplicitWeights &weights, std::deque< LibUtilities::Field< double, FieldState::Phys > > &history, LibUtilities::Field< double, FieldState::Phys > &out, const double scale=1.0)
 out = scale * sum_i c_i history[i], with the coefficients c_i of the explicit contributions of the implicit solve, in one pass over out; levels of zero coefficient are skipped.
 
void v_InitObject (bool declareExpansionLists=true) override
 Initialisation object for EquationSystem.
 
void v_SetExpansionVariables () override
 
CFLVelocity v_GetCFLVelocity () override
 Offer the advection velocity to the Courant estimate.
 
void v_GenerateSummary (SummaryList &s) override
 Print a summary of time stepping parameters.
 
std::vector< bool > v_GetSystemSingularChecks () override
 
MultiRegions::ExpListSharedPtr v_GetInitialConditionExpList (const size_t i) override
 
void v_InitialiseFields () override
 
void v_InitialiseOperators () override
 
void SetDiffusionCoeff ()
 Set the diffusion Coeff. the diff. coeff., diffCoeff_{ij} := \epslion * D_{ij} where, \epslion is scalar part D_{ij} is a 2D tensor for enforcing anisotropy Note, it is assumed that, diffCoeff_{ij} = diffCoeff_{ji}.
 
void LoadSessionParameters ()
 Load physical parameters from the session file.
 
FieldRegistry v_GetFieldRegistry () override
 
bool HasUserDefinedType (const std::string &userDefinedType, const std::vector< std::string > &variables) const
 Whether a boundary region of any rank has a condition of USERDEFINEDTYPE userDefinedType on one of variables.
 
- 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, NekDouble > v_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

NekDouble m_epsilon
 
NekDouble m_rhol
 
NekDouble m_rhof
 
NekDouble m_viscl
 
NekDouble m_viscf
 
NekDouble m_sigma
 
NekDouble m_gravity
 
Array< OneD, Array< OneD, NekDouble > > m_IntNorm
 
Array< OneD, Array< OneD, NekDouble > > m_SurfTen
 
- Protected Attributes inherited from Nektar::VelocityCorrectionScheme
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, NekDouble > m_svvVarDiffCoeff
 Array of coefficient if power kernel is used in SVV.
 
bool m_IsSVVPowerKernel
 Identifier for Power Kernel otherwise DG kernel.
 
Array< OneD, NekDouble > m_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.
 
MultiRegions::ExpListSharedPtr m_epotential
 Pointer to field holding electric potential field.
 
struct { 
 
   bool   hasLorentzForce = false 
 Whether ForcingLorentz is defined. More...
 
   NekDouble   implicitLorentzDamping = 0.0 
 Coefficient sigma |B|^2 treated in the velocity Helmholtz solve. More...
 
} m_MHD 
 Quasi-static MHD configuration.
 
Array< OneD, Array< OneD, NekDouble > > m_F
 
bool m_implicitAdvection = false
 
bool m_specHPDealiasing = false
 
bool m_weakPressure = false
 
bool m_hasHighOrderPressureBCs = false
 
bool m_hasPressureBCExplicitRhs = false
 
bool m_hasMultistepStartup = false
 
unsigned int m_startupSteps = 0
 
double m_startupImplicitCoefficient = 0.0
 
double m_kinvis
 
std::vector< double > m_diffCoeff
 
double m_lambda
 
const unsigned int m_velocityIndex = 0
 
const unsigned int m_pressureIndex = 1
 
std::vector< std::string > m_variablesVel
 
std::vector< std::string > m_variablesAddScalars
 
LibUtilities::Field< double, FieldState::Phys > m_advVel
 
LibUtilities::Field< double, FieldState::Phys > m_wsp_fields_rhs
 
LibUtilities::Field< double, FieldState::Phys > m_startupInitialSolution
 
LibUtilities::Field< double, FieldState::Phys > m_pressureBCVelocity
 
LibUtilities::Field< double, FieldState::Phys > m_pressureBCExplicitRhs
 
LibUtilities::Field< double, FieldState::Coeff > m_pressureBasisIntegrals
 
std::map< unsigned int, std::deque< LibUtilities::Field< double, FieldState::Phys > > > m_advectionRhsHistories
 
std::map< unsigned int, std::deque< LibUtilities::Field< double, FieldState::Phys > > > m_velocityHistories
 
std::map< unsigned int, std::deque< LibUtilities::Field< double, FieldState::Phys > > > m_pressureBCRhsHistories
 
std::shared_ptr< BwdTransOp< double > > m_bwdTransOp
 
std::shared_ptr< FwdTransOp< double > > m_fwdTransOp
 
std::shared_ptr< BwdTransOp< double > > m_bwdTransPressureOp
 
std::shared_ptr< AdvectionOp< double > > m_advectionOp
 
std::shared_ptr< AdvectionDealiasOp< double > > m_advectionDealiasOp
 
std::shared_ptr< PhysDerivOp< double > > m_physDerivPressureOp
 
std::shared_ptr< LinearSystemOp< double > > m_fieldsSolveOp
 
std::shared_ptr< LinearSolverOp< double > > m_linearSolverFieldsOp
 
std::shared_ptr< LinearSolverOp< double > > m_linearSolverPressureOp
 
std::map< double, std::shared_ptr< PreconOp< double > > > m_preconFieldsOpMap
 
std::shared_ptr< PreconOp< double > > m_preconFieldsOp
 
std::map< double, std::shared_ptr< PreconOp< double > > > m_preconPressureOpMap
 
std::shared_ptr< PoissonSolveOp< double > > m_poissonSolveOp
 
std::shared_ptr< HOPressureBndCondOp< double > > m_hoPressureBCOp
 
std::shared_ptr< HOutflowBndCondOp< double > > m_hOutflowBCOp
 
std::vector< ForcingSharedPtr > m_forcing
 
std::shared_ptr< DivergenceOp< double > > m_divergenceOp
 
std::shared_ptr< IProductWRTDerivBaseOp< FieldState::Coeff, double > > m_iprodDerivPressureOp
 
std::shared_ptr< IProductWRTBaseOp< double > > m_iprodPressureOp
 
- 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::ForcingSharedPtr > m_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, NekDouble > m_pivotPoint
 pivot point for moving reference frame
 
Array< OneD, NekDouble > m_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::SessionFunctionSharedPtr > m_sessionFunctions
 Map of known SessionFunctions.
 
LibUtilities::FieldIOSharedPtr m_fld
 Field input/output.
 
Array< OneD, MultiRegions::ExpListSharedPtr > m_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, NekDouble > m_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::ExpListSharedPtr > m_fieldsALE
 
Array< OneD, Array< OneD, NekDouble > > m_gridVelocity
 
Array< OneD, Array< OneD, NekDouble > > m_gridVelocityTrace
 
std::vector< ALEBaseShPtr > m_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::VelocityCorrectionScheme
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< VCSLevelSet >
 

Additional Inherited Members

- Public Member Functions inherited from Nektar::VelocityCorrectionScheme
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)
 
void SolveEfield (const Array< OneD, Array< OneD, NekDouble > > &movEfield, Array< OneD, Array< OneD, NekDouble > > &totEfield)
 
void SetImplicitLorentzDamping (NekDouble damping)
 
- 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, NekDouble > GetElmtCFLVals (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::TimeIntegrationSchemeSharedPtr & GetTimeIntegrationScheme ()
 Returns the time integration scheme.
 
SOLVER_UTILS_EXPORT LibUtilities::TimeIntegrationSchemeOperators & GetTimeIntegrationSchemeOperators ()
 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, NekDouble > ErrorExtraPoints (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::FieldMetaDataMap & UpdateFieldMetaDataMap ()
 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::FieldMetaDataMap & GetFieldMetaDataMap (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.
 
- Protected Types inherited from Nektar::VelocityCorrectionScheme
using ExplicitWeights = IMEXBaseOp< double >::ExplicitWeights
 
- Protected Types inherited from Nektar::SolverUtils::EquationSystem
enum  HomogeneousType { eHomogeneous1D , eHomogeneous2D , eHomogeneous3D , eNotHomogeneous }
 Parameter for homogeneous expansions. More...
 
- Static Protected Member Functions inherited from Nektar::VelocityCorrectionScheme
static double GetCoefficientSum (const ExplicitWeights &weights)
 Sum of the coefficients with which the implicit solve combines the explicit contributions. It is the implicit coefficient gamma of a multistep IMEX scheme but, in general, not that of an IMEXdirk stage, whose coefficients are quadrature weights.
 

Detailed Description

Definition at line 42 of file VelocityCorrectionSchemeLevelSet.h.

Constructor & Destructor Documentation

◆ VCSLevelSet()

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

Constructor. Creates ...

Parameters

param

Definition at line 64 of file VelocityCorrectionSchemeLevelSet.cpp.

66 : UnsteadySystem(pSession, pGraph),
67 VelocityCorrectionScheme(pSession, pGraph)
68{
69}
SOLVER_UTILS_EXPORT UnsteadySystem(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
Initialises UnsteadySystem class members.
VelocityCorrectionScheme(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)

◆ ~VCSLevelSet()

Nektar::VCSLevelSet::~VCSLevelSet ( )
overrideprotecteddefault

Member Function Documentation

◆ create()

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

Creates an instance of this class.

Definition at line 48 of file VelocityCorrectionSchemeLevelSet.h.

51 {
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.
std::vector< double > p(NPUPPER)

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

◆ SetUpLevelSetForcing()

void Nektar::VCSLevelSet::SetUpLevelSetForcing ( const Array< OneD, NekDouble > &  fields,
Array< OneD, NekDouble > &  Forcing,
const NekDouble  aii_Dt 
)
protected

Computes the forcing term that includes explicit artificial compression flux for level set solve.

Definition at line 159 of file VelocityCorrectionSchemeLevelSet.cpp.

162{
163
164 int i;
165 int nvel = m_velocity.size();
166 int physTot = m_fields[nvel]->GetTotPoints();
167
168 Vmath::Zero(physTot, Forcing, 1);
169
170 Array<OneD, Array<OneD, NekDouble>> gradPhi(nvel);
171 Array<OneD, Array<OneD, NekDouble>> IntNorm(nvel);
172 for (i = 0; i < nvel; ++i)
173 {
174 gradPhi[i] = Array<OneD, NekDouble>(physTot, 0.0);
175 IntNorm[i] = Array<OneD, NekDouble>(physTot, 0.0);
176 }
177
178 for (i = 0; i < nvel; ++i)
179 {
180 m_fields[nvel]->PhysDeriv(DirCartesianMap[i], fields, gradPhi[i]);
181 }
182
183 Array<OneD, NekDouble> gradPhiMag(physTot, 0.0);
184 Array<OneD, NekDouble> tmp(physTot, 0.0);
185 for (i = 0; i < nvel; ++i)
186 {
187 Vmath::Vpow(physTot, gradPhi[i], 1, 2.0, tmp, 1);
188 Vmath::Vadd(physTot, gradPhiMag, 1, tmp, 1, gradPhiMag, 1);
189 }
190 Vmath::Vsqrt(physTot, gradPhiMag, 1, gradPhiMag, 1);
191 Vmath::Vabs(physTot, gradPhiMag, 1, gradPhiMag, 1);
192
193 for (i = 0; i < nvel; ++i)
194 {
195 Vmath::Vdiv(physTot, gradPhi[i], 1, gradPhiMag, 1, IntNorm[i], 1);
196
197 for (int j = 0; j < physTot; ++j)
198 {
199 if (gradPhi[i][j] == 0 || gradPhiMag[j] == 0 ||
200 !std::isfinite(IntNorm[i][j]))
201 {
202 IntNorm[i][j] = 0;
203 }
204 }
205 }
206
207 Array<OneD, NekDouble> divIntNorm(physTot, 0.0);
208 Vmath::Zero(physTot, tmp, 1);
209 for (i = 0; i < nvel; ++i)
210 {
211 m_fields[nvel]->PhysDeriv(DirCartesianMap[i], IntNorm[i], tmp);
212 Vmath::Vadd(physTot, divIntNorm, 1, tmp, 1, divIntNorm, 1);
213 }
214
215 // phiOnePhiTwo = (phi)* (1-phi)
216 Array<OneD, NekDouble> oneMinusPhi(physTot, 0.0);
217 Array<OneD, NekDouble> phiOnephiTwo(physTot, 0.0);
218 Vmath::Ssub(physTot, 1.0, fields, 1, oneMinusPhi, 1);
219 Vmath::Vmul(physTot, fields, 1, oneMinusPhi, 1, phiOnephiTwo, 1);
220
221 // OneMinusTwoPhi = 1-2phi
222 Array<OneD, NekDouble> twoPhi(physTot, 0.0);
223 Array<OneD, NekDouble> oneMinusTwoPhi(physTot, 0.0);
224 Vmath::Smul(physTot, 2.0, fields, 1, twoPhi, 1);
225 Vmath::Ssub(physTot, 1.0, twoPhi, 1, oneMinusTwoPhi, 1);
226
227 // gDI = gradPhi(Dot)IntNorm
228 Array<OneD, NekDouble> gDI(physTot, 0.0);
229 Vmath::Zero(physTot, tmp, 1);
230 for (i = 0; i < nvel; ++i)
231 {
232 Vmath::Vmul(physTot, gradPhi[i], 1, IntNorm[i], 1, tmp, 1);
233 Vmath::Vadd(physTot, tmp, 1, gDI, 1, gDI, 1);
234 }
235
236 Array<OneD, NekDouble> Fc(physTot, 0.0);
237 Vmath::Vvtvvtp(physTot, phiOnephiTwo, 1, divIntNorm, 1, oneMinusTwoPhi, 1,
238 gDI, 1, Fc, 1);
239
240 NekDouble aii_dtinv = 1.0 / aii_Dt / m_epsilon;
241 Vmath::Svtsvtp(physTot, -aii_dtinv, fields, 1, 1.0 / m_epsilon, Fc, 1,
242 Forcing, 1);
243}
Array< OneD, int > m_velocity
int which identifies which components of m_fields contains the velocity (u,v,w);
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
MultiRegions::Direction const DirCartesianMap[]
Definition ExpList.h:95
void Vsqrt(int n, const T *x, const int incx, T *y, const int incy)
sqrt y = sqrt(x)
Definition Vmath.hpp:342
void Ssub(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Substract vector y = alpha - x.
Definition Vmath.hpp:250
void Svtsvtp(int n, const T alpha, const T *x, int incx, const T beta, const T *y, int incy, T *z, int incz)
Svtsvtp (scalar times vector plus scalar times vector):
Definition Vmath.hpp: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.hpp:74
void Vabs(int n, const T *x, const int incx, T *y, const int incy)
vabs: y = |x|
Definition Vmath.hpp:354
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:182
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:102
void Vdiv(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:128
void Zero(int n, T *x, const int incx)
Zero vector.
Definition Vmath.hpp:275
void Vvtvvtp(int n, const T *v, int incv, const T *w, int incw, const T *x, int incx, const T *y, int incy, T *z, int incz)
vvtvvtp (vector times vector plus vector times vector):
Definition Vmath.hpp:441
void Vpow(int n, const T *x, const int incx, const T f, T *y, const int incy)
pow y = pow(x, f)
Definition Vmath.hpp:329

References Nektar::MultiRegions::DirCartesianMap, m_epsilon, Nektar::SolverUtils::EquationSystem::m_fields, Nektar::IncNavierStokes::m_velocity, Vmath::Smul(), Vmath::Ssub(), Vmath::Svtsvtp(), Vmath::Vabs(), Vmath::Vadd(), Vmath::Vdiv(), Vmath::Vmul(), Vmath::Vpow(), Vmath::Vsqrt(), Vmath::Vvtvvtp(), and Vmath::Zero().

Referenced by v_SolveUnsteadyStokesSystem().

◆ SolveLevelSet()

void Nektar::VCSLevelSet::SolveLevelSet ( const Array< OneD, NekDouble > &  Forcing,
const Array< OneD, NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarrayPhi,
Array< OneD, NekDouble > &  outarrayRho,
Array< OneD, NekDouble > &  outarrayVisc,
const NekDouble  aii_Dt 
)
protected

Solve level set system using a Helmholtz-type operator.

Definition at line 428 of file VelocityCorrectionSchemeLevelSet.cpp.

433{
434 int nvel = m_velocity.size();
435 int physTot = m_fields[nvel]->GetTotPoints();
440
441 m_fields[nvel]->HelmSolve(Forcing, m_fields[nvel]->UpdateCoeffs(), factors,
442 varCoeffMap, varFactorsMap);
443 m_fields[nvel]->BwdTrans(m_fields[nvel]->GetCoeffs(), outarrayPhi);
444
445 // f= fluid(gas) l=liquid
446 // Rho = (rhol-rhof)*phi + rhof = rhol*phi +rhof*(1-phi)
447 Vmath::Smul(physTot, m_rhol - m_rhof, outarrayPhi, 1, outarrayRho, 1);
448 Vmath::Sadd(physTot, m_rhof, outarrayRho, 1, outarrayRho, 1);
449 m_fields[nvel + 1]->FwdTransLocalElmt(outarrayRho,
450 m_fields[nvel + 1]->UpdateCoeffs());
451
452 // DynVisc = (viscl/rhol - viscf/rhof)*phi + viscf/rhof
453 Vmath::Smul(physTot, m_viscl / m_rhol - m_viscf / m_rhof, outarrayPhi, 1,
454 outarrayVisc, 1);
455 Vmath::Sadd(physTot, m_viscf / m_rhof, outarrayVisc, 1, outarrayVisc, 1);
456 m_fields[nvel + 2]->FwdTransLocalElmt(outarrayVisc,
457 m_fields[nvel + 2]->UpdateCoeffs());
458}
std::map< StdRegions::ConstFactorType, Array< OneD, NekDouble > > VarFactorsMap
static VarFactorsMap NullVarFactorsMap
std::map< ConstFactorType, NekDouble > ConstFactorMap
static VarCoeffMap NullVarCoeffMap
std::map< StdRegions::VarCoeffType, VarCoeffEntry > VarCoeffMap
StdRegions::ConstFactorMap factors
void Sadd(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Add vector y = alpha + x.
Definition Vmath.hpp:196

References Nektar::StdRegions::eFactorLambda, m_epsilon, Nektar::SolverUtils::EquationSystem::m_fields, m_rhof, m_rhol, Nektar::IncNavierStokes::m_velocity, m_viscf, m_viscl, Nektar::StdRegions::NullVarCoeffMap, Nektar::StdRegions::NullVarFactorsMap, Vmath::Sadd(), and Vmath::Smul().

Referenced by v_SolveUnsteadyStokesSystem().

◆ v_GenerateSummary()

void Nektar::VCSLevelSet::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 88 of file VelocityCorrectionSchemeLevelSet.cpp.

89{
90 AdvectionSystem::v_GenerateSummary(s);
91 SolverUtils::AddSummaryItem(s, "Splitting Scheme",
92 "Velocity correction Level Set");
93}
void AddSummaryItem(SummaryList &l, const std::string &name, const std::string &value)
Adds a summary item to the summary info list.
Definition Misc.cpp:46

References Nektar::SolverUtils::AddSummaryItem().

◆ v_InitObject()

void Nektar::VCSLevelSet::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 71 of file VelocityCorrectionSchemeLevelSet.cpp.

72{
74
75 // Set up parameters for the Level set system
76 m_session->LoadParameter("epsilon", m_epsilon, 0.0);
77 m_session->LoadParameter("rhol", m_rhol, 1.0);
78 m_session->LoadParameter("rhof", m_rhof, 1.0);
79 m_session->LoadParameter("viscl", m_viscl, 1.0);
80 m_session->LoadParameter("viscf", m_viscf, 1.0);
81 m_session->LoadParameter("sigma", m_sigma, 0.0);
82 m_session->LoadParameter("gravity", m_gravity, 0.0);
83}
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
void v_InitObject(bool DeclareField=true) override
Initialisation object for the unsteady diffusion problem.

References m_epsilon, m_gravity, m_rhof, m_rhol, Nektar::SolverUtils::EquationSystem::m_session, m_sigma, m_viscf, m_viscl, and Nektar::VelocityCorrectionScheme::v_InitObject().

◆ v_SetUpPressureForcing()

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

Computes the forcing term that includes surface tension forces for the pressure poisson solve.

Reimplemented from Nektar::VelocityCorrectionScheme.

Definition at line 249 of file VelocityCorrectionSchemeLevelSet.cpp.

252{
253 size_t i;
254 size_t physTot = m_fields[0]->GetTotPoints();
255 size_t nvel = m_velocity.size();
256
257 m_fields[nvel]->BwdTrans(m_fields[nvel]->GetCoeffs(),
258 m_fields[nvel]->UpdatePhys());
259 // Surface tension components
260 Array<OneD, Array<OneD, NekDouble>> gradPhi(nvel);
261 Array<OneD, Array<OneD, NekDouble>> IntNorm(nvel);
262 Array<OneD, Array<OneD, NekDouble>> SurfTen(nvel);
263 m_SurfTen = Array<OneD, Array<OneD, NekDouble>>(nvel);
264 for (int i = 0; i < nvel; ++i)
265 {
266 m_SurfTen[i] = Array<OneD, NekDouble>(physTot, 0.0);
267 gradPhi[i] = Array<OneD, NekDouble>(physTot, 0.0);
268 IntNorm[i] = Array<OneD, NekDouble>(physTot, 0.0);
269 SurfTen[i] = Array<OneD, NekDouble>(physTot, 0.0);
270 }
271
272 for (int i = 0; i < nvel; ++i)
273 {
275 m_fields[nvel]->GetPhys(), gradPhi[i]);
276 }
277
278 Array<OneD, NekDouble> gradPhiMag(physTot, 0.0);
279 Array<OneD, NekDouble> tmp(physTot, 0.0);
280 for (int i = 0; i < nvel; ++i)
281 {
282 Vmath::Vpow(physTot, gradPhi[i], 1, 2.0, tmp, 1);
283 Vmath::Vadd(physTot, gradPhiMag, 1, tmp, 1, gradPhiMag, 1);
284 }
285
286 Vmath::Vsqrt(physTot, gradPhiMag, 1, gradPhiMag, 1);
287 Vmath::Vabs(physTot, gradPhiMag, 1, gradPhiMag, 1);
288 for (int i = 0; i < nvel; ++i)
289 {
290 Vmath::Vdiv(physTot, gradPhi[i], 1, gradPhiMag, 1, IntNorm[i], 1);
291
292 for (int j = 0; j < physTot; ++j)
293 {
294 if (gradPhi[i][j] == 0 || gradPhiMag[j] == 0 ||
295 !std::isfinite(IntNorm[i][j]))
296 {
297 IntNorm[i][j] = 0;
298 }
299 }
300 }
301 Array<OneD, NekDouble> divIntNorm(physTot, 0.0);
302 Vmath::Zero(physTot, tmp, 1);
303 for (int i = 0; i < nvel; ++i)
304 {
306 IntNorm[i], tmp);
307 Vmath::Vadd(physTot, divIntNorm, 1, tmp, 1, divIntNorm, 1);
308 }
309 m_fields[nvel + 1]->BwdTrans(m_fields[nvel + 1]->GetCoeffs(),
310 m_fields[nvel + 1]->UpdatePhys());
311
312 // Calculate Surface tension components
313 for (int i = 0; i < nvel; ++i)
314 {
315 Vmath::Vmul(physTot, gradPhi[i], 1, divIntNorm, 1, SurfTen[i], 1);
316 Vmath::Smul(physTot, m_sigma, SurfTen[i], 1, SurfTen[i], 1);
317 Vmath::Vdiv(physTot, SurfTen[i], 1, m_fields[nvel + 1]->GetPhys(), 1,
318 SurfTen[i], 1);
319 }
320
321 // Fwd and Bwd transfer to make the function continuous
322 int ncoeffs = m_fields[0]->GetNcoeffs();
323 for (int i = 0; i < nvel; ++i)
324 {
325 Array<OneD, NekDouble> coeffs(ncoeffs, 0.0);
326 m_fields[nvel]->FwdTrans(SurfTen[i], coeffs);
327 m_fields[nvel]->BwdTrans(coeffs, SurfTen[i]);
328 Vmath::Vcopy(physTot, SurfTen[i], 1, m_SurfTen[i], 1);
329 }
330
331 // div(u*[i])/dt - div(ST[i])
332 Vmath::Zero(physTot, tmp, 1);
333 Vmath::Zero(physTot, Forcing[1], 1);
334 for (int i = 0; i < nvel; ++i)
335 {
337 SurfTen[i], tmp);
338 Vmath::Vadd(physTot, Forcing[1], 1, tmp, 1, Forcing[1], 1);
339 }
340
341 m_fields[0]->PhysDeriv(eX, fields[0], Forcing[0]);
342 Vmath::Zero(physTot, tmp, 1);
343 for (i = 1; i < nvel; ++i)
344 {
345 m_fields[i]->PhysDeriv(DirCartesianMap[i], fields[i], tmp);
346 Vmath::Vadd(physTot, tmp, 1, Forcing[0], 1, Forcing[0], 1);
347 }
348 Vmath::Smul(physTot, 1.0 / aii_Dt, Forcing[0], 1, Forcing[0], 1);
349
350 Vmath::Vsub(physTot, Forcing[0], 1, Forcing[1], 1, Forcing[0], 1);
351}
Array< OneD, Array< OneD, NekDouble > > m_SurfTen
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition Vmath.hpp:828
void Vsub(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Subtract vector z = x-y.
Definition Vmath.hpp:222

References Nektar::MultiRegions::DirCartesianMap, Nektar::MultiRegions::eX, Nektar::SolverUtils::EquationSystem::m_fields, m_sigma, m_SurfTen, Nektar::IncNavierStokes::m_velocity, Vmath::Smul(), Vmath::Vabs(), Vmath::Vadd(), Vmath::Vcopy(), Vmath::Vdiv(), Vmath::Vmul(), Vmath::Vpow(), Vmath::Vsqrt(), Vmath::Vsub(), and Vmath::Zero().

◆ v_SetUpViscousForcing()

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

Computes the forcing term that includes the updated pressure gradient, and surface tension forces.

Reimplemented from Nektar::VelocityCorrectionScheme.

Definition at line 357 of file VelocityCorrectionSchemeLevelSet.cpp.

360{
361 NekDouble aii_dtinv = 1.0 / aii_Dt;
362 size_t physTot = m_fields[0]->GetTotPoints();
363
364 // Grad p
365 m_pressure->BwdTrans(m_pressure->GetCoeffs(), m_pressure->UpdatePhys());
366
367 int nvel = m_velocity.size();
368 m_fields[nvel + 1]->BwdTrans(m_fields[nvel + 1]->GetCoeffs(),
369 m_fields[nvel + 1]->UpdatePhys());
370 if (nvel == 2)
371 {
372 m_pressure->PhysDeriv(m_pressure->GetPhys(), Forcing[m_velocity[0]],
373 Forcing[m_velocity[1]]);
374 Vmath::Vdiv(physTot, Forcing[m_velocity[0]], 1,
375 m_fields[nvel + 1]->GetPhys(), 1, Forcing[m_velocity[0]],
376 1);
377 Vmath::Vdiv(physTot, Forcing[m_velocity[1]], 1,
378 m_fields[nvel + 1]->GetPhys(), 1, Forcing[m_velocity[1]],
379 1);
380 }
381 else
382 {
383 m_pressure->PhysDeriv(m_pressure->GetPhys(), Forcing[m_velocity[0]],
384 Forcing[m_velocity[1]], Forcing[m_velocity[2]]);
385 Vmath::Vdiv(physTot, Forcing[m_velocity[0]], 1,
386 m_fields[nvel + 1]->GetPhys(), 1, Forcing[m_velocity[0]],
387 1);
388 Vmath::Vdiv(physTot, Forcing[m_velocity[1]], 1,
389 m_fields[nvel + 1]->GetPhys(), 1, Forcing[m_velocity[1]],
390 1);
391 Vmath::Vdiv(physTot, Forcing[m_velocity[2]], 1,
392 m_fields[nvel + 1]->GetPhys(), 1, Forcing[m_velocity[2]],
393 1);
394 }
395
396 // Add Surface tension
397 for (int i = 0; i < nvel; ++i)
398 {
399 Vmath::Vadd(physTot, Forcing[i], 1, m_SurfTen[i], 1, Forcing[i], 1);
400 }
401
402 // zero convective fields.
403 for (int i = nvel; i < m_nConvectiveFields; ++i)
404 {
405 Vmath::Zero(physTot, Forcing[i], 1);
406 }
407
408 // calculate 1/nudt and 1/nu to multiply with inarray and forcing
409 // respectively
410 Array<OneD, NekDouble> aiiDtInvVisc(physTot, 0.0);
411 Array<OneD, NekDouble> InvVisc(physTot, 0.0);
412 m_fields[nvel + 2]->BwdTrans(m_fields[nvel + 2]->GetCoeffs(),
413 m_fields[nvel + 2]->UpdatePhys());
414 Vmath::Sdiv(physTot, -aii_dtinv, m_fields[nvel + 2]->GetPhys(), 1,
415 aiiDtInvVisc, 1);
416 Vmath::Sdiv(physTot, 1.0, m_fields[nvel + 2]->GetPhys(), 1, InvVisc, 1);
417
418 for (int i = 0; i < nvel; ++i)
419 {
420 Vmath::Vvtvvtp(physTot, aiiDtInvVisc, 1, inarray[i], 1, InvVisc, 1,
421 Forcing[i], 1, Forcing[i], 1);
422 }
423}
MultiRegions::ExpListSharedPtr m_pressure
Pointer to field holding pressure field.
int m_nConvectiveFields
Number of fields to be convected;.
void Sdiv(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha/x.
Definition Vmath.hpp:156

References Nektar::SolverUtils::EquationSystem::m_fields, Nektar::IncNavierStokes::m_nConvectiveFields, Nektar::IncNavierStokes::m_pressure, m_SurfTen, Nektar::IncNavierStokes::m_velocity, Vmath::Sdiv(), Vmath::Vadd(), Vmath::Vdiv(), Vmath::Vvtvvtp(), and Vmath::Zero().

◆ v_SolvePressure()

void Nektar::VCSLevelSet::v_SolvePressure ( const Array< OneD, NekDouble > &  Forcing)
overrideprotectedvirtual

Solve pressure system via a variable-coefficient Poisson problem.

Reimplemented from Nektar::VelocityCorrectionScheme.

Definition at line 463 of file VelocityCorrectionSchemeLevelSet.cpp.

464{
468
469 // Setup coefficient for equation
471
472 int nvel = m_velocity.size();
473 int physTot = m_fields[nvel + 1]->GetTotPoints();
474
475 // Calculate 1/rho to use as laplacian coefficients
476 Array<OneD, NekDouble> InvRho(physTot, 0.0);
477 m_fields[nvel + 1]->BwdTrans(m_fields[nvel + 1]->GetCoeffs(),
478 m_fields[nvel + 1]->UpdatePhys());
479 Vmath::Sdiv(physTot, 1.0, m_fields[nvel + 1]->GetPhys(), 1, InvRho, 1);
480 varCoeffMap[StdRegions::eVarCoeffD00] = InvRho;
481 varCoeffMap[StdRegions::eVarCoeffD11] = InvRho;
482 if (nvel == 3)
483 {
484 varCoeffMap[StdRegions::eVarCoeffD22] = InvRho;
485 }
486
487 auto gkey = m_pressure->HelmSolve(Forcing, m_pressure->UpdateCoeffs(),
488 factors, varCoeffMap, varFactorsMap);
489 m_pressure->UnsetGlobalLinSys(gkey, true);
490
491 // Add presure to outflow bc if using convective like BCs
492 m_extrapolation->AddPressureToOutflowBCs(m_kinvis);
493}
ExtrapolateSharedPtr m_extrapolation

References Nektar::StdRegions::eFactorLambda, Nektar::StdRegions::eVarCoeffD00, Nektar::StdRegions::eVarCoeffD11, Nektar::StdRegions::eVarCoeffD22, Nektar::IncNavierStokes::m_extrapolation, Nektar::SolverUtils::EquationSystem::m_fields, Nektar::VelocityCorrectionScheme::m_kinvis, Nektar::IncNavierStokes::m_pressure, Nektar::IncNavierStokes::m_velocity, Nektar::StdRegions::NullVarCoeffMap, Nektar::StdRegions::NullVarFactorsMap, and Vmath::Sdiv().

◆ v_SolveUnsteadyStokesSystem()

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

Implicit part of the method - Poisson + nConv*Helmholtz

Reimplemented from Nektar::VelocityCorrectionScheme.

Definition at line 98 of file VelocityCorrectionSchemeLevelSet.cpp.

102{
103
104 // Check if user tries to setup flow rate in a multiphase context
105 if (m_flowrate > 0.0)
106 {
108 "Flow rate is not supported in multiphase flows. ");
109 }
110
111 int nvel = m_velocity.size();
112
113 // Substep the pressure boundary condition if using substepping
114 m_extrapolation->SubStepSetPressureBCs(inarray, aii_Dt, m_kinvis);
115
116 // Set up scalar(phi) forcing term for LS equation
117 LibUtilities::Timer timer;
118 timer.Start();
119 SetUpLevelSetForcing(inarray[nvel], m_F[nvel], aii_Dt);
120 timer.Stop();
121 timer.AccumulateRegion("Level Set Forcing");
122
123 // Solve Level Set System
124 timer.Start();
125 SolveLevelSet(m_F[nvel], inarray[nvel], outarray[nvel], outarray[nvel + 1],
126 outarray[nvel + 2], aii_Dt);
127 timer.Stop();
128 timer.AccumulateRegion("Level Set Solve");
129
130 // Set up forcing term for pressure Poisson equation
131 timer.Start();
132 SetUpPressureForcing(inarray, m_F, aii_Dt);
133 timer.Stop();
134 timer.AccumulateRegion("Pressure Forcing");
135
136 // Solve Pressure System
137 timer.Start();
138 SolvePressure(m_F[0]);
139 timer.Stop();
140 timer.AccumulateRegion("Pressure Solve");
141
142 // Set up forcing term for Helmholtz problems
143 timer.Start();
144 SetUpViscousForcing(inarray, m_F, aii_Dt);
145 timer.Stop();
146 timer.AccumulateRegion("Viscous Forcing");
147
148 // Solve velocity system
149 timer.Start();
150 SolveViscous(m_F, inarray, outarray, aii_Dt);
151 timer.Stop();
152 timer.AccumulateRegion("Viscous Solve");
153}
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
void SetUpLevelSetForcing(const Array< OneD, NekDouble > &fields, Array< OneD, NekDouble > &Forcing, const NekDouble aii_Dt)
void SolveLevelSet(const Array< OneD, NekDouble > &Forcing, const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarrayPhi, Array< OneD, NekDouble > &outarrayRho, Array< OneD, NekDouble > &outarrayVisc, 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 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)

References Nektar::LibUtilities::Timer::AccumulateRegion(), Nektar::ErrorUtil::efatal, Nektar::IncNavierStokes::m_extrapolation, Nektar::VelocityCorrectionScheme::m_F, Nektar::VelocityCorrectionScheme::m_flowrate, Nektar::VelocityCorrectionScheme::m_kinvis, Nektar::IncNavierStokes::m_velocity, NEKERROR, SetUpLevelSetForcing(), Nektar::VelocityCorrectionScheme::SetUpPressureForcing(), Nektar::VelocityCorrectionScheme::SetUpViscousForcing(), SolveLevelSet(), Nektar::VelocityCorrectionScheme::SolvePressure(), Nektar::VelocityCorrectionScheme::SolveViscous(), Nektar::LibUtilities::Timer::Start(), and Nektar::LibUtilities::Timer::Stop().

◆ v_SolveViscous()

void Nektar::VCSLevelSet::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 
)
overrideprotectedvirtual

Solve velocity system velocity system via variable-viscosity Helmholtz problems for each directional velocity component using a mass matrix variable coefficient.

Reimplemented from Nektar::VelocityCorrectionScheme.

Definition at line 500 of file VelocityCorrectionSchemeLevelSet.cpp.

504{
508
509 AppendSVVFactors(factors, varFactorsMap);
510 ComputeGJPNormalVelocity(inarray, varCoeffMap);
511
512 size_t nvel = m_velocity.size();
513 int physTot = m_fields[nvel + 2]->GetTotPoints();
514
515 // Calculate 1/nu to use as mass matrix coefficient
516 Array<OneD, NekDouble> InvVisc(physTot, 0.0);
517 m_fields[nvel + 2]->BwdTrans(m_fields[nvel + 2]->GetCoeffs(),
518 m_fields[nvel + 2]->UpdatePhys());
519 Vmath::Sdiv(physTot, 1.0, m_fields[nvel + 2]->GetPhys(), 1, InvVisc, 1);
520 varCoeffMap[StdRegions::eVarCoeffMass] = InvVisc;
521
522 // Solve Helmholtz system and put in Physical space
523 for (int i = 0; i < nvel; ++i)
524 {
525 // Add diffusion coefficient to GJP matrix operator (Implicit part)
527 {
529 {
531 }
532 else
533 {
536 }
537 }
538
539 // Setup coefficients for equation
540 factors[StdRegions::eFactorLambda] = 1.0 / aii_Dt;
541 auto gkey =
542 m_fields[i]->HelmSolve(Forcing[i], m_fields[i]->UpdateCoeffs(),
543 factors, varCoeffMap, varFactorsMap);
544 m_fields[i]->UnsetGlobalLinSys(gkey, true);
545 m_fields[i]->BwdTrans(m_fields[i]->GetCoeffs(), outarray[i]);
546 }
547}
bool m_useGJPStabilisation
bool to identify if GJP semi-implicit is active.
void AppendSVVFactors(StdRegions::ConstFactorMap &factors, StdRegions::VarFactorsMap &varFactorsMap)
Array< OneD, NekDouble > m_diffCoeff
Diffusion coefficients (will be kinvis for velocities)
bool m_useGJPNormalVel
bool to identify if GJP normal Velocity should be applied in explicit approach
void ComputeGJPNormalVelocity(const Array< OneD, const Array< OneD, NekDouble > > &inarray, StdRegions::VarCoeffMap &varcoeffs)

References Nektar::VelocityCorrectionScheme::AppendSVVFactors(), Nektar::VelocityCorrectionScheme::ComputeGJPNormalVelocity(), Nektar::StdRegions::eFactorGJP, Nektar::StdRegions::eFactorLambda, Nektar::StdRegions::eVarCoeffMass, Nektar::VelocityCorrectionScheme::m_diffCoeff, Nektar::SolverUtils::EquationSystem::m_fields, Nektar::VelocityCorrectionScheme::m_GJPJumpScale, Nektar::VelocityCorrectionScheme::m_useGJPNormalVel, Nektar::VelocityCorrectionScheme::m_useGJPStabilisation, Nektar::IncNavierStokes::m_velocity, Nektar::StdRegions::NullVarCoeffMap, Nektar::StdRegions::NullVarFactorsMap, and Vmath::Sdiv().

Friends And Related Symbol Documentation

◆ MemoryManager< VCSLevelSet >

friend class MemoryManager< VCSLevelSet >
friend

Definition at line 123 of file VelocityCorrectionSchemeLevelSet.h.

Member Data Documentation

◆ className

std::string Nektar::VCSLevelSet::className
static
Initial value:
=
"VCSLevelSet", VCSLevelSet::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 59 of file VelocityCorrectionSchemeLevelSet.h.

◆ m_epsilon

NekDouble Nektar::VCSLevelSet::m_epsilon
protected

◆ m_gravity

NekDouble Nektar::VCSLevelSet::m_gravity
protected

Definition at line 69 of file VelocityCorrectionSchemeLevelSet.h.

Referenced by v_InitObject().

◆ m_IntNorm

Array<OneD, Array<OneD, NekDouble> > Nektar::VCSLevelSet::m_IntNorm
protected

Definition at line 70 of file VelocityCorrectionSchemeLevelSet.h.

◆ m_rhof

NekDouble Nektar::VCSLevelSet::m_rhof
protected

Definition at line 65 of file VelocityCorrectionSchemeLevelSet.h.

Referenced by SolveLevelSet(), and v_InitObject().

◆ m_rhol

NekDouble Nektar::VCSLevelSet::m_rhol
protected

Definition at line 64 of file VelocityCorrectionSchemeLevelSet.h.

Referenced by SolveLevelSet(), and v_InitObject().

◆ m_sigma

NekDouble Nektar::VCSLevelSet::m_sigma
protected

Definition at line 68 of file VelocityCorrectionSchemeLevelSet.h.

Referenced by v_InitObject(), and v_SetUpPressureForcing().

◆ m_SurfTen

Array<OneD, Array<OneD, NekDouble> > Nektar::VCSLevelSet::m_SurfTen
protected

◆ m_viscf

NekDouble Nektar::VCSLevelSet::m_viscf
protected

Definition at line 67 of file VelocityCorrectionSchemeLevelSet.h.

Referenced by SolveLevelSet(), and v_InitObject().

◆ m_viscl

NekDouble Nektar::VCSLevelSet::m_viscl
protected

Definition at line 66 of file VelocityCorrectionSchemeLevelSet.h.

Referenced by SolveLevelSet(), and v_InitObject().

◆ solverTypeLookupId

std::string Nektar::VCSLevelSet::solverTypeLookupId
staticprotected
Initial value:
=
static std::string RegisterEnumValue(std::string pEnum, std::string pString, int pEnumValue)
Registers an enumeration value.

Definition at line 73 of file VelocityCorrectionSchemeLevelSet.h.