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

#include <PressDecompVCSFSI.h>

Inheritance diagram for Nektar::PressDecompVCSFSI:
[legend]

Public Member Functions

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

Static Public Member Functions

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

static std::string className
 Name of class.
 
- Static Public Attributes inherited from Nektar::VCSFSI
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

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

Protected Attributes

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

Static Protected Attributes

static std::string solverTypeLookupId
 
- Static Protected Attributes inherited from Nektar::VCSFSI
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 []
 

Additional Inherited Members

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

Detailed Description

Definition at line 43 of file PressDecompVCSFSI.h.

Constructor & Destructor Documentation

◆ PressDecompVCSFSI()

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

Constructor.

Constructor. Creates ...

Parameters

param

Definition at line 57 of file PressDecompVCSFSI.cpp.

60 : UnsteadySystem(pSession, pGraph), VCSFSI(pSession, pGraph)
61{
62}
SOLVER_UTILS_EXPORT UnsteadySystem(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
Initialises UnsteadySystem class members.
VCSFSI(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
Constructor.
Definition VCSFSI.cpp:56

◆ ~PressDecompVCSFSI()

Nektar::PressDecompVCSFSI::~PressDecompVCSFSI ( void  )
override

Destructor

Definition at line 76 of file PressDecompVCSFSI.cpp.

77{
78}

Member Function Documentation

◆ CalculateAddedMass()

void Nektar::PressDecompVCSFSI::CalculateAddedMass ( std::map< int, Array< OneD, NekDouble > > &  boundValues,
std::map< int, Array< OneD, NekDouble > > &  pPhys 
)

Definition at line 194 of file PressDecompVCSFSI.cpp.

197{
198 bool homo1D = false;
199 m_session->MatchSolverInfo("Homogeneous", "1D", homo1D, false);
200 NekDouble lz = 1.;
201 if (homo1D)
202 {
203 lz = m_fields[0]->GetHomoLen();
204 }
205 // number of physics points for each field
206 Array<OneD, const SpatialDomains::BoundaryConditionShPtr> BndConds =
207 m_pressure->GetBndConditions();
208 Array<OneD, MultiRegions::ExpListSharedPtr> BndExp =
209 m_pressure->GetBndCondExpansions();
210
211 int offset = 0;
212 int nfld = pPhys.size();
213 Array<OneD, NekDouble> value(nfld * nfld,
214 std::numeric_limits<NekDouble>::lowest());
215 for (int i = 0; i < BndConds.size(); ++i)
216 {
217 if (boost::iequals(BndConds[i]->GetUserDefined(), m_MRFABCname))
218 {
219 MultiRegions::ExpListSharedPtr edgeExplist = BndExp[i];
220 Array<OneD, Array<OneD, NekDouble>> phi(nfld);
222 m_pressure->GetBndElmtExpansion(i, BndElmtExp, false);
223 Array<OneD, NekDouble> phiElm(BndElmtExp->GetTotPoints(), 0.);
224 int j = 0;
225 for (auto it : pPhys)
226 {
227 m_pressure->ExtractPhysToBndElmt(i, it.second, phiElm);
228 m_pressure->ExtractElmtToBndPhys(i, phiElm, phi[j]);
229 ++j;
230 }
231 ////phi_0 n_0, phi_0 n_1, phi_1 n_0, phi_1 n_1
232 Array<OneD, NekDouble> mularray(edgeExplist->GetTotPoints(), 0.);
233 for (int j = 0; j < nfld; ++j)
234 {
235 int k = 0;
236 for (const auto &it : boundValues)
237 {
238 Vmath::Vmul(edgeExplist->GetTotPoints(), phi[j], 1,
239 it.second + offset, 1, mularray, 1);
240 NekDouble temp = edgeExplist->Integral(mularray) / lz;
241 if (std::numeric_limits<NekDouble>::lowest() ==
242 value[k + j * nfld])
243 {
244 value[k + j * nfld] = temp;
245 }
246 else
247 {
248 value[k + j * nfld] += temp;
249 }
250 ++k;
251 }
252 }
253 offset += edgeExplist->GetTotPoints();
254 }
255 }
256 m_session->GetComm()->AllReduce(value, LibUtilities::ReduceMax);
257 for (int j = 0; j < value.size(); ++j)
258 {
259 if (std::numeric_limits<NekDouble>::lowest() == value[j])
260 {
261 value[j] = 0;
262 }
263 }
264 int NumDofs = m_spacedim + 1;
265 m_addedMass = Array<OneD, NekDouble>(NumDofs * NumDofs, 0.);
266 int i = 0;
267 for (auto it : pPhys)
268 {
269 int i1 = std::min(it.first, m_spacedim);
270 int j = 0;
271 for (auto jt : pPhys)
272 {
273 int j1 = std::min(jt.first, m_spacedim);
274 m_addedMass[i1 + j1 * NumDofs] = value[i + nfld * j];
275 ++j;
276 }
277 ++i;
278 }
279 if (m_session->GetComm()->GetRank() == 0)
280 {
281 for (int j = 0; j < NumDofs; ++j)
282 {
283 for (int k = 0; k < NumDofs; ++k)
284 {
285 std::cout << "value[" << j << ", " << k
286 << "] = " << std::scientific << std::setprecision(7)
287 << m_addedMass[k + j * NumDofs] << std::endl;
288 }
289 }
290 }
291}
MultiRegions::ExpListSharedPtr m_pressure
Pointer to field holding pressure field.
Array< OneD, NekDouble > m_addedMass
int m_spacedim
Spatial dimension (>= expansion dim).
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
Definition Vmath.hpp:72

References m_addedMass, Nektar::SolverUtils::EquationSystem::m_fields, m_MRFABCname, Nektar::IncNavierStokes::m_pressure, Nektar::SolverUtils::EquationSystem::m_session, Nektar::SolverUtils::EquationSystem::m_spacedim, Nektar::LibUtilities::ReduceMax, and Vmath::Vmul().

Referenced by SolvePotentials().

◆ CalculateBCs()

void Nektar::PressDecompVCSFSI::CalculateBCs ( std::set< int > &  dofs,
std::map< int, Array< OneD, NekDouble > > &  bcs 
)

Definition at line 125 of file PressDecompVCSFSI.cpp.

127{
128 int ndim = m_fields[0]->GetCoordim(0);
129 // number of physics points for each field
130 int numpts = 0;
131 Array<OneD, const SpatialDomains::BoundaryConditionShPtr> BndConds =
132 m_pressure->GetBndConditions();
133 Array<OneD, MultiRegions::ExpListSharedPtr> BndExp =
134 m_pressure->GetBndCondExpansions();
135 for (int i = 0; i < BndConds.size(); ++i)
136 {
137 if (boost::iequals(BndConds[i]->GetUserDefined(), m_MRFABCname))
138 {
139 numpts += BndExp[i]->GetTotPoints();
140 }
141 }
142 // load pivot point
143 Array<OneD, NekDouble> pivot(3, 0.);
144 if (m_movingFrameData.size() >= 21)
145 {
146 pivot[0] = m_movingFrameData[18];
147 pivot[1] = m_movingFrameData[19];
148 pivot[2] = m_movingFrameData[20];
149 }
150 // allocate boundary condition storage
151 for (auto i : dofs)
152 {
153 bcs[i] = Array<OneD, NekDouble>(numpts, 0.);
154 }
155 // calculate values
156 int offset = 0;
157 for (int i = 0; i < BndConds.size(); ++i)
158 {
159 if (boost::iequals(BndConds[i]->GetUserDefined(), m_MRFABCname))
160 {
161 int npts = BndExp[i]->GetTotPoints();
162 Array<OneD, Array<OneD, NekDouble>> n(3);
163 Array<OneD, Array<OneD, NekDouble>> x(3);
164 for (int j = 0; j < 3; ++j)
165 {
166 n[j] = Array<OneD, NekDouble>(npts, 0.);
167 x[j] = Array<OneD, NekDouble>(npts, 0.);
168 }
169 BndExp[i]->GetNormals(n);
170 BndExp[i]->GetCoords(x[0], x[1], x[2]);
171 for (int j = 0; j < 3; ++j)
172 {
173 Vmath::Sadd(npts, -pivot[j], x[j], 1, x[j], 1);
174 }
175 Array<OneD, NekDouble> atmp;
176 for (int j = 0; j < ndim; ++j)
177 {
178 if (dofs.find(j) != dofs.end())
179 {
180 Vmath::Smul(npts, -1., n[j], 1, atmp = bcs[j] + offset, 1);
181 }
182 }
183 if (dofs.find(5) != dofs.end())
184 {
185 atmp = bcs[5] + offset;
186 Vmath::Vvtvvtm(npts, &x[1][0], 1, &n[0][0], 1, &x[0][0], 1,
187 &n[1][0], 1, &atmp[0], 1);
188 }
189 offset += npts;
190 }
191 }
192}
Array< OneD, NekDouble > m_movingFrameData
Moving reference frame status in the body frame X, Y, Z, Theta_x, Theta_y, Theta_z,...
void Vvtvvtm(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)
vvtvvtm (vector times vector minus vector times vector):
Definition Vmath.hpp:456
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*x.
Definition Vmath.hpp:100
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:194

References Nektar::SolverUtils::EquationSystem::m_fields, Nektar::SolverUtils::EquationSystem::m_movingFrameData, m_MRFABCname, Nektar::IncNavierStokes::m_pressure, Vmath::Sadd(), Vmath::Smul(), and Vmath::Vvtvvtm().

Referenced by SolvePotentials().

◆ CorrectPressure()

void Nektar::PressDecompVCSFSI::CorrectPressure ( )
protected

Correct pressure by adding potential terms

Definition at line 320 of file PressDecompVCSFSI.cpp.

321{
322 for (const auto &it : m_pCoef)
323 {
324 NekDouble acceleration = m_movingFrameData[it.first + 12];
325 if (std::fabs(acceleration) != 0.)
326 {
327 Vmath::Svtvp(m_pressure->GetNcoeffs(), acceleration, it.second, 1,
328 m_pressure->UpdateCoeffs(), 1,
329 m_pressure->UpdateCoeffs(), 1);
330 }
331 }
332}
std::map< int, Array< OneD, NekDouble > > m_pCoef
void Svtvp(int n, const T alpha, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Svtvp (scalar times vector plus vector): z = alpha*x + y.
Definition Vmath.hpp:396

References Nektar::SolverUtils::EquationSystem::m_movingFrameData, m_pCoef, Nektar::IncNavierStokes::m_pressure, and Vmath::Svtvp().

Referenced by v_SolveSolid().

◆ create()

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

Creates an instance of this class.

Definition at line 47 of file PressDecompVCSFSI.h.

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

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

◆ OutputPotentials()

void Nektar::PressDecompVCSFSI::OutputPotentials ( )

Definition at line 107 of file PressDecompVCSFSI.cpp.

108{
109 if (m_pCoef.size() == 0)
110 {
111 return;
112 }
113 std::string varname("phi0");
114 std::vector<std::string> vars;
115 std::vector<Array<OneD, NekDouble>> fields;
116 for (auto it : m_pCoef)
117 {
118 varname[3] = '0' + it.first;
119 vars.push_back(varname);
120 fields.push_back(it.second);
121 }
122 WriteFld("potential.fld", m_pressure, fields, vars);
123}
SOLVER_UTILS_EXPORT void WriteFld(const std::string &outname)
Write field data to the given filename.

References m_pCoef, Nektar::IncNavierStokes::m_pressure, and Nektar::SolverUtils::EquationSystem::WriteFld().

Referenced by v_DoInitialise().

◆ SolvePa()

void Nektar::PressDecompVCSFSI::SolvePa ( int  i,
Array< OneD, NekDouble bc,
Array< OneD, NekDouble pPhys 
)

Definition at line 293 of file PressDecompVCSFSI.cpp.

295{
296 Array<OneD, const SpatialDomains::BoundaryConditionShPtr> BndConds =
297 m_pressure->GetBndConditions();
298 Array<OneD, MultiRegions::ExpListSharedPtr> BndExp =
299 m_pressure->GetBndCondExpansions();
300 int offset = 0;
301 for (int i = 0; i < BndConds.size(); ++i)
302 {
303 if (boost::iequals(BndConds[i]->GetUserDefined(), m_MRFABCname))
304 {
305 BndExp[i]->IProductWRTBase(bc + offset, BndExp[i]->UpdateCoeffs());
306 offset += BndExp[i]->GetTotPoints();
307 }
308 }
311 Array<OneD, NekDouble> forcing(m_pressure->GetTotPoints(), 0.);
312 m_pCoef[i] = Array<OneD, NekDouble>(m_pressure->GetNcoeffs(), 0.);
313 m_pressure->HelmSolve(forcing, m_pCoef[i], factors);
314 m_pressure->BwdTrans(m_pCoef[i], pPhys);
315}
std::map< ConstFactorType, NekDouble > ConstFactorMap
StdRegions::ConstFactorMap factors

References Nektar::StdRegions::eFactorLambda, m_MRFABCname, m_pCoef, and Nektar::IncNavierStokes::m_pressure.

Referenced by SolvePotentials().

◆ SolvePotentials()

void Nektar::PressDecompVCSFSI::SolvePotentials ( std::set< int > &  dofs)

Definition at line 94 of file PressDecompVCSFSI.cpp.

95{
96 std::map<int, Array<OneD, NekDouble>> boundValues;
97 std::map<int, Array<OneD, NekDouble>> pPhys;
98 CalculateBCs(dofs, boundValues);
99 for (auto i : dofs)
100 {
101 pPhys[i] = Array<OneD, NekDouble>(m_pressure->GetTotPoints(), 0.);
102 SolvePa(i, boundValues[i], pPhys[i]);
103 }
104 CalculateAddedMass(boundValues, pPhys);
105}
void CalculateBCs(std::set< int > &dofs, std::map< int, Array< OneD, NekDouble > > &bcs)
void CalculateAddedMass(std::map< int, Array< OneD, NekDouble > > &boundValues, std::map< int, Array< OneD, NekDouble > > &pPhys)
void SolvePa(int i, Array< OneD, NekDouble > bc, Array< OneD, NekDouble > pPhys)

References CalculateAddedMass(), CalculateBCs(), Nektar::IncNavierStokes::m_pressure, and SolvePa().

Referenced by v_DoInitialise().

◆ v_DoInitialise()

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

Virtual function for initialisation implementation.

By default, nothing needs initialising at the EquationSystem level.

Reimplemented from Nektar::SolverUtils::EquationSystem.

Definition at line 80 of file PressDecompVCSFSI.cpp.

81{
83 VelocityCorrectionScheme::v_DoInitialise(dumpInitialConditions);
84 std::set<int> dofs; // 0,1,2;3,4,5 six dofs
85 GetMovableDoFs(dofs);
86 SolvePotentials(dofs);
89 Array<OneD, NekDouble> aeroforce(12, 0.);
90 InitialiseFilter(aeroforce);
91 m_rigidSolver.SetOldFvis(aeroforce);
92}
void SolvePotentials(std::set< int > &dofs)
void SetNewmarkBetaSolver(Array< OneD, NekDouble > &AddedMass)
void SetOldFvis(Array< OneD, NekDouble > force)
void SetInitialConditions(const LibUtilities::SessionReaderSharedPtr session, Array< OneD, NekDouble > MRFData)
SOLVER_UTILS_EXPORT void GetMovableDoFs(std::set< int > &dirDoFs)
void InitialiseFilter(Array< OneD, NekDouble > aeroforce)
Definition VCSFSI.cpp:89
RigidSolver m_rigidSolver
Definition VCSFSI.h:79
void v_DoInitialise(bool dumpInitialConditions=true) override
Sets up initial conditions.

References Nektar::SolverUtils::FluidInterface::GetMovableDoFs(), Nektar::VCSFSI::InitialiseFilter(), m_addedMass, Nektar::SolverUtils::EquationSystem::m_movingFrameData, Nektar::VCSFSI::m_rigidSolver, Nektar::SolverUtils::EquationSystem::m_session, OutputPotentials(), Nektar::RigidSolver::SetInitialConditions(), Nektar::RigidSolver::SetNewmarkBetaSolver(), Nektar::RigidSolver::SetOldFvis(), SolvePotentials(), and Nektar::VelocityCorrectionScheme::v_DoInitialise().

◆ v_InitObject()

void Nektar::PressDecompVCSFSI::v_InitObject ( bool  DeclareFeld = true)
overridevirtual

Initialisation object for EquationSystem.

Continuous field

Setting up the normals

Setting up the normals

Reimplemented from Nektar::IncNavierStokes.

Definition at line 64 of file PressDecompVCSFSI.cpp.

65{
67 Array<OneD, NekDouble> tmp = m_movingFrameData + 18;
70 m_MRFABCname = "MRFWallPressDecomp";
71}
void InitObject(const LibUtilities::SessionReaderSharedPtr session, const MultiRegions::ExpListSharedPtr &pField, Array< OneD, NekDouble > pivot)
void SetMovableDoFs(std::vector< bool > &moveDoFs)
void v_InitObject(bool DeclareField=true) override
Initialisation object for EquationSystem.

References Nektar::RigidSolver::InitObject(), Nektar::SolverUtils::EquationSystem::m_fields, Nektar::SolverUtils::EquationSystem::m_movableDoFs, Nektar::SolverUtils::EquationSystem::m_movingFrameData, m_MRFABCname, Nektar::VCSFSI::m_rigidSolver, Nektar::SolverUtils::EquationSystem::m_session, Nektar::RigidSolver::SetMovableDoFs(), and Nektar::VelocityCorrectionScheme::v_InitObject().

◆ v_SolveSolid()

void Nektar::PressDecompVCSFSI::v_SolveSolid ( NekDouble  time)
overrideprotectedvirtual

Reimplemented from Nektar::VelocityCorrectionScheme.

Definition at line 334 of file PressDecompVCSFSI.cpp.

335{
338}
void v_SolveSolid(NekDouble time) override
Definition VCSFSI.cpp:106

References CorrectPressure(), and Nektar::VCSFSI::v_SolveSolid().

Member Data Documentation

◆ className

std::string Nektar::PressDecompVCSFSI::className
static
Initial value:
=
"PressDecompVCSFSI", PressDecompVCSFSI::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 PressDecompVCSFSI.h.

◆ m_addedMass

Array<OneD, NekDouble> Nektar::PressDecompVCSFSI::m_addedMass
protected

Definition at line 91 of file PressDecompVCSFSI.h.

Referenced by CalculateAddedMass(), and v_DoInitialise().

◆ m_MRFABCname

std::string Nektar::PressDecompVCSFSI::m_MRFABCname
protected

Definition at line 90 of file PressDecompVCSFSI.h.

Referenced by CalculateAddedMass(), CalculateBCs(), SolvePa(), and v_InitObject().

◆ m_pCoef

std::map<int, Array<OneD, NekDouble> > Nektar::PressDecompVCSFSI::m_pCoef
protected

Definition at line 89 of file PressDecompVCSFSI.h.

Referenced by CorrectPressure(), OutputPotentials(), and SolvePa().

◆ m_verbose

bool Nektar::PressDecompVCSFSI::m_verbose
protected

Definition at line 82 of file PressDecompVCSFSI.h.

◆ solverTypeLookupId

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

Definition at line 80 of file PressDecompVCSFSI.h.