Nektar++
|
#include <CoupledLinearNS.h>
Public Member Functions | |
void | SetUpCoupledMatrix (const NekDouble lambda=0.0, const Array< OneD, Array< OneD, NekDouble > > &Advfield=NullNekDoubleArrayofArray, bool IsLinearNSEquation=true) |
const SpatialDomains::ExpansionMap & | GenPressureExp (const SpatialDomains::ExpansionMap &VelExp) |
void | Solve (void) |
void | SolveLinearNS (const Array< OneD, Array< OneD, NekDouble > > &forcing) |
void | SolveLinearNS (const Array< OneD, Array< OneD, NekDouble > > &forcing, Array< OneD, MultiRegions::ExpListSharedPtr > &fields, MultiRegions::ExpListSharedPtr &pressure, const int HomogeneousMode=0) |
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 (const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time) |
void | SolveSteadyNavierStokes (void) |
void | Continuation (void) |
void | EvaluateNewtonRHS (Array< OneD, Array< OneD, NekDouble > > &Velocity, Array< OneD, Array< OneD, NekDouble > > &outarray) |
void | InfNorm (Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, NekDouble > &outarray) |
void | L2Norm (Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, NekDouble > &outarray) |
void | DefineForcingTerm (void) |
Public Member Functions inherited from Nektar::IncNavierStokes | |
virtual | ~IncNavierStokes () |
virtual void | v_GetFluxVector (const int i, Array< OneD, Array< OneD, NekDouble > > &physfield, Array< OneD, Array< OneD, NekDouble > > &flux) |
virtual void | v_NumericalFlux (Array< OneD, Array< OneD, NekDouble > > &physfield, Array< OneD, Array< OneD, NekDouble > > &numflux) |
AdvectionTermSharedPtr | GetAdvObject (void) |
int | GetNConvectiveFields (void) |
Array< OneD, int > & | GetVelocity (void) |
Array< OneD, NekDouble > | GetElmtCFLVals (void) |
NekDouble | GetCFLEstimate (int &elmtid) |
void | AddForcing (const SolverUtils::ForcingSharedPtr &pForce) |
Public Member Functions inherited from Nektar::SolverUtils::UnsteadySystem | |
virtual SOLVER_UTILS_EXPORT | ~UnsteadySystem () |
Destructor. | |
SOLVER_UTILS_EXPORT NekDouble | GetTimeStep (const Array< OneD, const Array< OneD, NekDouble > > &inarray) |
Calculate the larger time-step mantaining the problem stable. | |
Public Member Functions inherited from Nektar::SolverUtils::EquationSystem | |
virtual SOLVER_UTILS_EXPORT | ~EquationSystem () |
Destructor. | |
SOLVER_UTILS_EXPORT void | SetUpTraceNormals (void) |
SOLVER_UTILS_EXPORT void | InitObject () |
Initialises the members of this object. | |
SOLVER_UTILS_EXPORT void | DoInitialise () |
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 NekDouble | LinfError (unsigned int field, const Array< OneD, NekDouble > &exactsoln=NullNekDouble1DArray) |
Linf error computation. | |
SOLVER_UTILS_EXPORT std::string | GetSessionName () |
Get Session name. | |
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 | 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 void | EvaluateFunction (Array< OneD, Array< OneD, NekDouble > > &pArray, std::string pFunctionName, const NekDouble pTime=0.0, const int domain=0) |
Evaluates a function as specified in the session file. | |
SOLVER_UTILS_EXPORT void | EvaluateFunction (std::vector< std::string > pFieldNames, Array< OneD, Array< OneD, NekDouble > > &pFields, const std::string &pName, const int domain=0) |
Populate given fields with the function from session. | |
SOLVER_UTILS_EXPORT void | EvaluateFunction (std::vector< std::string > pFieldNames, Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const std::string &pName, const int domain=0) |
Populate given fields with the function from session. | |
SOLVER_UTILS_EXPORT void | EvaluateFunction (std::string pFieldName, Array< OneD, NekDouble > &pArray, const std::string &pFunctionName, const NekDouble &pTime=0.0, const int domain=0) |
SOLVER_UTILS_EXPORT std::string | DescribeFunction (std::string pFieldName, const std::string &pFunctionName, const int domain) |
Provide a description of a function for a given field name. | |
SOLVER_UTILS_EXPORT void | InitialiseBaseFlow (Array< OneD, Array< OneD, NekDouble > > &base) |
Perform initialisation of the base flow. | |
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 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 | WeakAdvectionGreensDivergenceForm (const Array< OneD, Array< OneD, NekDouble > > &F, Array< OneD, NekDouble > &outarray) |
Compute the inner product . | |
SOLVER_UTILS_EXPORT void | WeakAdvectionDivergenceForm (const Array< OneD, Array< OneD, NekDouble > > &F, Array< OneD, NekDouble > &outarray) |
Compute the inner product . | |
SOLVER_UTILS_EXPORT void | WeakAdvectionNonConservativeForm (const Array< OneD, Array< OneD, NekDouble > > &V, const Array< OneD, const NekDouble > &u, Array< OneD, NekDouble > &outarray, bool UseContCoeffs=false) |
Compute the inner product . | |
f SOLVER_UTILS_EXPORT void | AdvectionNonConservativeForm (const Array< OneD, Array< OneD, NekDouble > > &V, const Array< OneD, const NekDouble > &u, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wk=NullNekDouble1DArray) |
Compute the non-conservative advection. | |
SOLVER_UTILS_EXPORT void | WeakDGAdvection (const Array< OneD, Array< OneD, NekDouble > > &InField, Array< OneD, Array< OneD, NekDouble > > &OutField, bool NumericalFluxIncludesNormal=true, bool InFieldIsInPhysSpace=false, int nvariables=0) |
Calculate the weak discontinuous Galerkin advection. | |
SOLVER_UTILS_EXPORT void | WeakDGDiffusion (const Array< OneD, Array< OneD, NekDouble > > &InField, Array< OneD, Array< OneD, NekDouble > > &OutField, bool NumericalFluxIncludesNormal=true, bool InFieldIsInPhysSpace=false) |
Calculate weak DG Diffusion in the LDG form. | |
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 | 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 | ScanForHistoryPoints () |
Builds map of which element holds each history point. | |
SOLVER_UTILS_EXPORT void | WriteHistoryData (std::ostream &out) |
Probe each history point and write to 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 | GetFinalTime () |
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 | GetNumElmVelocity () |
SOLVER_UTILS_EXPORT int | GetSteps () |
SOLVER_UTILS_EXPORT NekDouble | GetTimeStep () |
SOLVER_UTILS_EXPORT void | CopyFromPhysField (const int i, Array< OneD, NekDouble > &output) |
SOLVER_UTILS_EXPORT void | CopyToPhysField (const int i, Array< OneD, NekDouble > &output) |
SOLVER_UTILS_EXPORT void | SetStepsToOne () |
SOLVER_UTILS_EXPORT void | ZeroPhysFields () |
SOLVER_UTILS_EXPORT void | FwdTransFields () |
SOLVER_UTILS_EXPORT void | GetFluxVector (const int i, Array< OneD, Array< OneD, NekDouble > > &physfield, Array< OneD, Array< OneD, NekDouble > > &flux) |
SOLVER_UTILS_EXPORT void | GetFluxVector (const int i, Array< OneD, Array< OneD, NekDouble > > &physfield, Array< OneD, Array< OneD, NekDouble > > &fluxX, Array< OneD, Array< OneD, NekDouble > > &fluxY) |
SOLVER_UTILS_EXPORT void | GetFluxVector (const int i, const int j, Array< OneD, Array< OneD, NekDouble > > &physfield, Array< OneD, Array< OneD, NekDouble > > &flux) |
SOLVER_UTILS_EXPORT void | NumericalFlux (Array< OneD, Array< OneD, NekDouble > > &physfield, Array< OneD, Array< OneD, NekDouble > > &numflux) |
SOLVER_UTILS_EXPORT void | NumericalFlux (Array< OneD, Array< OneD, NekDouble > > &physfield, Array< OneD, Array< OneD, NekDouble > > &numfluxX, Array< OneD, Array< OneD, NekDouble > > &numfluxY) |
SOLVER_UTILS_EXPORT void | NumFluxforScalar (const Array< OneD, Array< OneD, NekDouble > > &ufield, Array< OneD, Array< OneD, Array< OneD, NekDouble > > > &uflux) |
SOLVER_UTILS_EXPORT void | NumFluxforVector (const Array< OneD, Array< OneD, NekDouble > > &ufield, Array< OneD, Array< OneD, Array< OneD, NekDouble > > > &qfield, Array< OneD, Array< OneD, NekDouble > > &qflux) |
SOLVER_UTILS_EXPORT void | SetModifiedBasis (const bool modbasis) |
SOLVER_UTILS_EXPORT int | NoCaseStringCompare (const string &s1, const string &s2) |
Perform a case-insensitive string comparison. |
Static Public Member Functions | |
static SolverUtils::EquationSystemSharedPtr | create (const LibUtilities::SessionReaderSharedPtr &pSession) |
Creates an instance of this class. |
Public Attributes | |
Array< OneD, Array< OneD, NekDouble > > | m_ForcingTerm |
Array< OneD, Array< OneD, NekDouble > > | m_ForcingTerm_Coeffs |
Array< OneD, CoupledLocalToGlobalC0ContMapSharedPtr > | m_locToGloMap |
Static Public Attributes | |
static std::string | className = SolverUtils::GetEquationSystemFactory().RegisterCreatorFunction("CoupledLinearisedNS", CoupledLinearNS::create) |
Name of class. |
Protected Member Functions | |
CoupledLinearNS (const LibUtilities::SessionReaderSharedPtr &pSesssion) | |
virtual void | v_InitObject () |
Init object for UnsteadySystem class. | |
Protected Member Functions inherited from Nektar::IncNavierStokes | |
IncNavierStokes (const LibUtilities::SessionReaderSharedPtr &pSession) | |
Constructor. | |
EquationType | GetEquationType (void) |
void | EvaluateAdvectionTerms (const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, Array< OneD, NekDouble > &wk=NullNekDouble1DArray) |
void | WriteModalEnergy (void) |
void | SetBoundaryConditions (NekDouble time) |
time dependent boundary conditions updating | |
void | SetRadiationBoundaryForcing (int fieldid) |
Set Radiation forcing term. | |
bool | CalcSteadyState (void) |
evaluate steady state | |
virtual MultiRegions::ExpListSharedPtr | v_GetPressure () |
virtual void | v_TransCoeffToPhys (void) |
Virtual function for transformation to physical space. | |
virtual void | v_TransPhysToCoeff (void) |
Virtual function for transformation to coefficient space. | |
virtual int | v_GetForceDimension ()=0 |
virtual bool | v_PreIntegrate (int step) |
virtual bool | v_PostIntegrate (int step) |
Protected Member Functions inherited from Nektar::SolverUtils::UnsteadySystem | |
SOLVER_UTILS_EXPORT | UnsteadySystem (const LibUtilities::SessionReaderSharedPtr &pSession) |
Initialises UnsteadySystem class members. | |
SOLVER_UTILS_EXPORT NekDouble | MaxTimeStepEstimator () |
Get the maximum timestep estimator for cfl control. | |
virtual SOLVER_UTILS_EXPORT void | v_DoSolve () |
Solves an unsteady problem. | |
virtual SOLVER_UTILS_EXPORT void | v_DoInitialise () |
Sets up initial conditions. | |
virtual SOLVER_UTILS_EXPORT void | v_GenerateSummary (SummaryList &s) |
Print a summary of time stepping parameters. | |
virtual SOLVER_UTILS_EXPORT void | v_AppendOutput1D (Array< OneD, Array< OneD, NekDouble > > &solution1D) |
Print the solution at each solution point in a txt file. | |
virtual SOLVER_UTILS_EXPORT void | v_NumericalFlux (Array< OneD, Array< OneD, NekDouble > > &physfield, Array< OneD, Array< OneD, NekDouble > > &numfluxX, Array< OneD, Array< OneD, NekDouble > > &numfluxY) |
virtual SOLVER_UTILS_EXPORT void | v_NumFluxforScalar (const Array< OneD, Array< OneD, NekDouble > > &ufield, Array< OneD, Array< OneD, Array< OneD, NekDouble > > > &uflux) |
virtual SOLVER_UTILS_EXPORT void | v_NumFluxforVector (const Array< OneD, Array< OneD, NekDouble > > &ufield, Array< OneD, Array< OneD, Array< OneD, NekDouble > > > &qfield, Array< OneD, Array< OneD, NekDouble > > &qflux) |
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. | |
SOLVER_UTILS_EXPORT void | CheckForRestartTime (NekDouble &time) |
Protected Member Functions inherited from Nektar::SolverUtils::EquationSystem | |
SOLVER_UTILS_EXPORT | EquationSystem (const LibUtilities::SessionReaderSharedPtr &pSession) |
Initialises EquationSystem class members. | |
int | nocase_cmp (const string &s1, const string &s2) |
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 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) |
SOLVER_UTILS_EXPORT void | SetUpBaseFields (SpatialDomains::MeshGraphSharedPtr &mesh) |
SOLVER_UTILS_EXPORT void | ImportFldBase (std::string pInfile, SpatialDomains::MeshGraphSharedPtr pGraph) |
virtual SOLVER_UTILS_EXPORT void | v_Output (void) |
virtual SOLVER_UTILS_EXPORT void | v_ExtraFldOutput (std::vector< Array< OneD, NekDouble > > &fieldcoeffs, std::vector< std::string > &variables) |
Private Member Functions | |
void | SetUpCoupledMatrix (const NekDouble lambda, const Array< OneD, Array< OneD, NekDouble > > &Advfield, bool IsLinearNSEquation, const int HomogeneousMode, CoupledSolverMatrices &mat, CoupledLocalToGlobalC0ContMapSharedPtr &locToGloMap, const NekDouble lambda_imag=NekConstants::kNekUnsetDouble) |
virtual void | v_GenerateSummary (SolverUtils::SummaryList &s) |
virtual void | v_DoInitialise (void) |
virtual void | v_DoSolve (void) |
virtual void | v_TransCoeffToPhys (void) |
virtual void | v_TransPhysToCoeff (void) |
virtual void | v_Output (void) |
virtual int | v_GetForceDimension (void) |
Private Attributes | |
bool | m_singleMode |
Identify if a single mode is required for stability analysis. | |
bool | m_zeroMode |
Id to identify when single mode is mean mode (i.e. beta=0);. | |
int | m_counter |
bool | m_initialStep |
NekDouble | m_tol |
int | m_maxIt |
int | m_Restart |
int | m_MatrixSetUpStep |
NekDouble | m_kinvisMin |
NekDouble | m_kinvisStep |
NekDouble | m_KinvisPercentage |
Array< OneD, CoupledSolverMatrices > | m_mat |
Friends | |
class | MemoryManager< CoupledLinearNS > |
Additional Inherited Members | |
Protected Types inherited from Nektar::SolverUtils::EquationSystem | |
enum | HomogeneousType { eHomogeneous1D, eHomogeneous2D, eHomogeneous3D, eNotHomogeneous } |
Parameter for homogeneous expansions. More... | |
Protected Attributes inherited from Nektar::IncNavierStokes | |
ExtrapolateSharedPtr | m_extrapolation |
std::ofstream | m_mdlFile |
modal energy file | |
bool | m_subSteppingScheme |
bool to identify if using a substepping scheme | |
bool | m_SmoothAdvection |
bool to identify if advection term smoothing is requested | |
LibUtilities::TimeIntegrationWrapperSharedPtr | m_subStepIntegrationScheme |
AdvectionTermSharedPtr | m_advObject |
Advection term. | |
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 | |
int | m_cflsteps |
dump cfl estimate | |
int | m_steadyStateSteps |
Check for steady state at step interval. | |
NekDouble | m_steadyStateTol |
Tolerance to which steady state should be evaluated at. | |
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. |
Set up expansion field for velocity and pressure, the local to global mapping arrays and the basic memory definitions for coupled matrix system
Definition at line 89 of file CoupledLinearNS.h.
|
protected |
Definition at line 57 of file CoupledLinearNS.cpp.
Definition at line 1633 of file CoupledLinearNS.cpp.
References Nektar::SolverUtils::EquationSystem::m_fields, Nektar::IncNavierStokes::m_kinvis, m_KinvisPercentage, Nektar::IncNavierStokes::m_velocity, SetUpCoupledMatrix(), Vmath::Smul(), SolveLinearNS(), and Vmath::Vadd().
Referenced by v_DoSolve().
|
inlinestatic |
Creates an instance of this class.
Definition at line 95 of file CoupledLinearNS.h.
Definition at line 1508 of file CoupledLinearNS.cpp.
References Nektar::SolverUtils::EquationSystem::EvaluateFunction(), Nektar::SolverUtils::EquationSystem::m_boundaryConditions, Nektar::SolverUtils::EquationSystem::m_fields, m_ForcingTerm, m_ForcingTerm_Coeffs, Nektar::SolverUtils::EquationSystem::m_session, and Nektar::IncNavierStokes::m_velocity.
Referenced by v_DoInitialise().
void Nektar::CoupledLinearNS::EvaluateAdvection | ( | const Array< OneD, const Array< OneD, NekDouble > > & | inarray, |
Array< OneD, Array< OneD, NekDouble > > & | outarray, | ||
const NekDouble | time | ||
) |
Definition at line 1333 of file CoupledLinearNS.cpp.
References Nektar::IncNavierStokes::EvaluateAdvectionTerms(), Nektar::SolverUtils::EquationSystem::m_fields, and Nektar::IncNavierStokes::m_forcing.
Referenced by v_DoInitialise().
void Nektar::CoupledLinearNS::EvaluateNewtonRHS | ( | Array< OneD, Array< OneD, NekDouble > > & | Velocity, |
Array< OneD, Array< OneD, NekDouble > > & | outarray | ||
) |
Definition at line 1708 of file CoupledLinearNS.cpp.
References Nektar::IncNavierStokes::EvaluateAdvectionTerms(), Nektar::SolverUtils::EquationSystem::m_fields, m_ForcingTerm, Nektar::IncNavierStokes::m_kinvis, Nektar::IncNavierStokes::m_velocity, Vmath::Smul(), Vmath::Vadd(), and Vmath::Vsub().
Referenced by SolveSteadyNavierStokes().
const SpatialDomains::ExpansionMap & Nektar::CoupledLinearNS::GenPressureExp | ( | const SpatialDomains::ExpansionMap & | VelExp | ) |
Definition at line 1749 of file CoupledLinearNS.cpp.
References ASSERTL0, Nektar::LibUtilities::BasisKey::GetBasisType(), Nektar::LibUtilities::BasisKey::GetNumModes(), Nektar::LibUtilities::BasisKey::GetPointsKey(), and Nektar::SolverUtils::EquationSystem::m_graph.
Referenced by v_InitObject().
void Nektar::CoupledLinearNS::InfNorm | ( | Array< OneD, Array< OneD, NekDouble > > & | inarray, |
Array< OneD, NekDouble > & | outarray | ||
) |
Definition at line 1675 of file CoupledLinearNS.cpp.
References Nektar::IncNavierStokes::m_velocity.
void Nektar::CoupledLinearNS::L2Norm | ( | Array< OneD, Array< OneD, NekDouble > > & | inarray, |
Array< OneD, NekDouble > & | outarray | ||
) |
Definition at line 1692 of file CoupledLinearNS.cpp.
References Nektar::IncNavierStokes::m_velocity.
Referenced by SolveSteadyNavierStokes().
void Nektar::CoupledLinearNS::SetUpCoupledMatrix | ( | const NekDouble | lambda = 0.0 , |
const Array< OneD, Array< OneD, NekDouble > > & | Advfield = NullNekDoubleArrayofArray , |
||
bool | IsLinearNSEquation = true |
||
) |
Generate the linearised Navier Stokes solver based on the static condensation of the interior velocity space and pressure modes.
Set up a coupled linearised Naviers-Stokes solve. Primarily a wrapper fuction around the full mode by mode version of SetUpCoupledMatrix.
Definition at line 160 of file CoupledLinearNS.cpp.
References ASSERTL1, Nektar::NekConstants::kNekUnsetDouble, Nektar::IncNavierStokes::m_kinvis, Nektar::SolverUtils::EquationSystem::m_LhomZ, m_locToGloMap, m_mat, Nektar::SolverUtils::EquationSystem::m_npointsZ, Nektar::SolverUtils::EquationSystem::m_session, m_singleMode, and m_zeroMode.
Referenced by Continuation(), SolveSteadyNavierStokes(), SolveUnsteadyStokesSystem(), and v_DoInitialise().
|
private |
Generate the linearised Navier Stokes solver based on the static condensation of the interior velocity space and pressure modes. This call also allows for a Fourier mode to be specified, however if HomogeneneousMode= 0 then can be used for a standared 2D and hopefully 3D (in the future).
Set up a coupled linearised Naviers-Stokes solve in the following manner:
Consider the linearised Navier-Stokes element matrix denoted as
where denote the degrees of freedom of the elemental velocities on the boundary of the element, denote the degrees of freedom of the elemental velocities on the interior of the element and is the piecewise continuous pressure. The matrices have the interpretation
where is the space of pressures typically at order and is the velocity vector space of polynomial order . (Note the above definitions for the transpose terms shoudl be interpreted with care since we have used a tensor differential for the terms)
Note if just considering the stokes operator and then is also symmetric. Also note that and are block diagonal in the Oseen equation when are zero.
Since is invertible we can premultiply the governing elemental equation by the following matrix:
which if we multiply out the matrix equation we obtain
In the above equation the degrees of freedom are decoupled and so we need to solve for the degrees of freedom. The final step is to perform a second level of static condensation but where we will lump the mean pressure mode (or a pressure degree of freedom containing a mean component) with the velocity boundary degrees of freedom. To do we define where is the mean pressure mode and to be the remainder of the pressure space. We now repartition the top block of matrices of previous matrix equation as
where
and
Since the is decoupled and invertible we can now statically condense the previous matrix equationto decouple from by solving the following system
The matrix has to be globally assembled and solved iteratively or directly. One we obtain the solution to we can use the second row of equation fourth matrix equation to solve for and finally the last row of equation second matrix equation to solve for .
Definition at line 357 of file CoupledLinearNS.cpp.
References Nektar::MultiRegions::DirCartesianMap, Nektar::eDIAGONAL, Nektar::StdRegions::eFactorLambda, Nektar::StdRegions::eHelmholtz, Nektar::SolverUtils::EquationSystem::eHomogeneous1D, Nektar::StdRegions::eLinearAdvectionReaction, Nektar::StdRegions::eMass, Nektar::SolverUtils::EquationSystem::GetTotPoints(), Nektar::NekConstants::kNekUnsetDouble, Nektar::coupledSolverMatrices::m_BCinv, Nektar::coupledSolverMatrices::m_Btilde, Nektar::coupledSolverMatrices::m_Cinv, Nektar::coupledSolverMatrices::m_CoupledBndSys, Nektar::coupledSolverMatrices::m_D_bnd, Nektar::coupledSolverMatrices::m_D_int, Nektar::SolverUtils::EquationSystem::m_fields, Nektar::SolverUtils::EquationSystem::m_HomogeneousType, Nektar::IncNavierStokes::m_kinvis, Nektar::SolverUtils::EquationSystem::m_LhomZ, Nektar::IncNavierStokes::m_pressure, m_singleMode, Nektar::IncNavierStokes::m_velocity, Vmath::Neg(), Nektar::NullNekDoubleArrayofArray, Vmath::Smul(), Nektar::Timer::Start(), Nektar::Timer::Stop(), Nektar::Timer::TimePerTest(), Nektar::Transpose(), Vmath::Vmul(), and Vmath::Zero().
Definition at line 1475 of file CoupledLinearNS.cpp.
References Nektar::SolverUtils::EquationSystem::eHomogeneous1D, Nektar::SolverUtils::EquationSystem::m_fields, Nektar::IncNavierStokes::m_forcing, Nektar::SolverUtils::EquationSystem::m_HomogeneousType, m_singleMode, Nektar::IncNavierStokes::m_velocity, and SolveLinearNS().
Referenced by v_DoInitialise(), and v_DoSolve().
void Nektar::CoupledLinearNS::SolveLinearNS | ( | const Array< OneD, Array< OneD, NekDouble > > & | forcing | ) |
Solve the coupled linear Navier-Stokes solve using matrix systems set up at construction. The solution is stored in m_velocity and m_pressure.
forcing | A list of forcing functions for each velocity component |
The routine involves two levels of static condensations. Initially we require a statically condensed forcing function which requires the following manipulation
Where denote the forcing degrees of freedom of the elemental velocities on the boundary of the element, denote the forcing degrees of freedom of the elemental velocities on the interior of the element. (see detailed description for more details).
This vector is further manipulated into
where which is corresponds to the mean mode of the pressure degrees of freedom and is now added to the boundary system and the remainder of the block becomes the interior forcing for the inner static condensation (see detailed description for more details) which is set up in a GlobalLinSysDirectStaticCond class.
Finally we perform the final maniplation of the forcing to using hte
We can now call the solver to the global coupled boundary system (through the call to #m_CoupledBndSys->Solve) to obtain the velocity boundary solution as the mean pressure solution, i.e.
Once we know the solution to the above the rest of the pressure modes are recoverable thorugh
We can now unpack (last elemental mode) and into m_pressure and and into a closed pack list of boundary velocoity degrees of freedom stored in .
Finally the interior velocity degrees of freedom are then obtained through the relationship
We then unpack the solution back to the MultiRegion structures m_velocity and m_pressure
Definition at line 1849 of file CoupledLinearNS.cpp.
References Nektar::SolverUtils::EquationSystem::eHomogeneous1D, Nektar::SolverUtils::EquationSystem::m_fields, Nektar::SolverUtils::EquationSystem::m_HomogeneousType, Nektar::SolverUtils::EquationSystem::m_npointsZ, Nektar::IncNavierStokes::m_pressure, and Nektar::IncNavierStokes::m_velocity.
Referenced by Continuation(), Solve(), SolveSteadyNavierStokes(), and SolveUnsteadyStokesSystem().
void Nektar::CoupledLinearNS::SolveLinearNS | ( | const Array< OneD, Array< OneD, NekDouble > > & | forcing, |
Array< OneD, MultiRegions::ExpListSharedPtr > & | fields, | ||
MultiRegions::ExpListSharedPtr & | pressure, | ||
const int | HomogeneousMode = 0 |
||
) |
Definition at line 1888 of file CoupledLinearNS.cpp.
References Nektar::SpatialDomains::eDirichlet, Nektar::SolverUtils::EquationSystem::eHomogeneous1D, Nektar::eSteadyNavierStokes, Nektar::eWrapper, Nektar::SolverUtils::EquationSystem::GetNcoeffs(), Nektar::IncNavierStokes::m_equationType, Nektar::SolverUtils::EquationSystem::m_fields, Nektar::SolverUtils::EquationSystem::m_HomogeneousType, m_initialStep, m_locToGloMap, m_mat, m_singleMode, Nektar::IncNavierStokes::m_velocity, Nektar::Transpose(), and Vmath::Zero().
Definition at line 1538 of file CoupledLinearNS.cpp.
References ASSERTL0, EvaluateNewtonRHS(), L2Norm(), m_counter, Nektar::SolverUtils::EquationSystem::m_fields, m_initialStep, Nektar::IncNavierStokes::m_kinvis, m_MatrixSetUpStep, m_tol, Nektar::IncNavierStokes::m_velocity, SetUpCoupledMatrix(), SolveLinearNS(), Nektar::Timer::Start(), Nektar::Timer::Stop(), Nektar::Timer::TimePerTest(), and Vmath::Vadd().
Referenced by v_DoSolve().
void Nektar::CoupledLinearNS::SolveUnsteadyStokesSystem | ( | const Array< OneD, const Array< OneD, NekDouble > > & | inarray, |
Array< OneD, Array< OneD, NekDouble > > & | outarray, | ||
const NekDouble | time, | ||
const NekDouble | a_iixDt | ||
) |
Definition at line 1347 of file CoupledLinearNS.cpp.
References Nektar::SolverUtils::EquationSystem::GetNcoeffs(), Nektar::SolverUtils::EquationSystem::m_fields, Nektar::IncNavierStokes::m_nConvectiveFields, Nektar::IncNavierStokes::m_velocity, Nektar::IncNavierStokes::SetBoundaryConditions(), SetUpCoupledMatrix(), Vmath::Smul(), and SolveLinearNS().
Referenced by v_DoInitialise().
Definition at line 1188 of file CoupledLinearNS.cpp.
References ASSERTL0, DefineForcingTerm(), Nektar::LibUtilities::TimeIntegrationSchemeOperators::DefineImplicitSolve(), Nektar::LibUtilities::TimeIntegrationSchemeOperators::DefineOdeRhs(), Nektar::eNoEquationType, Nektar::eSteadyLinearisedNS, Nektar::eSteadyNavierStokes, Nektar::eSteadyOseen, Nektar::eSteadyStokes, Nektar::eUnsteadyNavierStokes, Nektar::eUnsteadyStokes, EvaluateAdvection(), Nektar::SolverUtils::EquationSystem::EvaluateFunction(), Nektar::SolverUtils::EquationSystem::m_boundaryConditions, m_counter, Nektar::IncNavierStokes::m_equationType, Nektar::SolverUtils::EquationSystem::m_fields, m_initialStep, Nektar::IncNavierStokes::m_kinvis, m_kinvisMin, m_KinvisPercentage, Nektar::SolverUtils::EquationSystem::m_lambda, m_MatrixSetUpStep, m_maxIt, Nektar::SolverUtils::UnsteadySystem::m_ode, m_Restart, Nektar::SolverUtils::EquationSystem::m_session, m_tol, Nektar::IncNavierStokes::m_velocity, Nektar::SolverUtils::EquationSystem::SetInitialConditions(), SetUpCoupledMatrix(), Solve(), and SolveUnsteadyStokesSystem().
Definition at line 1410 of file CoupledLinearNS.cpp.
References ASSERTL0, Nektar::SolverUtils::EquationSystem::Checkpoint_Output(), Continuation(), Nektar::eNoEquationType, Nektar::eSteadyLinearisedNS, Nektar::eSteadyNavierStokes, Nektar::eSteadyOseen, Nektar::eSteadyStokes, Nektar::eUnsteadyNavierStokes, Nektar::eUnsteadyStokes, Nektar::IncNavierStokes::m_equationType, Nektar::IncNavierStokes::m_kinvis, m_kinvisMin, Solve(), SolveSteadyNavierStokes(), Nektar::Timer::Start(), Nektar::Timer::Stop(), and Nektar::Timer::TimePerTest().
|
privatevirtual |
Definition at line 1183 of file CoupledLinearNS.cpp.
References Nektar::SolverUtils::AddSummaryItem().
|
privatevirtual |
Definition at line 2203 of file CoupledLinearNS.cpp.
References Nektar::SolverUtils::EquationSystem::m_session.
|
protectedvirtual |
Init object for UnsteadySystem class.
Initialization object for UnsteadySystem class.
Reimplemented from Nektar::IncNavierStokes.
Definition at line 64 of file CoupledLinearNS.cpp.
References ASSERTL0, ASSERTL1, Nektar::SolverUtils::EquationSystem::eHomogeneous1D, GenPressureExp(), Nektar::SolverUtils::EquationSystem::m_boundaryConditions, Nektar::SolverUtils::EquationSystem::m_fields, Nektar::SolverUtils::EquationSystem::m_graph, Nektar::SolverUtils::EquationSystem::m_homogen_dealiasing, Nektar::SolverUtils::EquationSystem::m_HomogeneousType, Nektar::SolverUtils::EquationSystem::m_LhomZ, m_locToGloMap, Nektar::IncNavierStokes::m_nConvectiveFields, Nektar::SolverUtils::EquationSystem::m_npointsZ, Nektar::IncNavierStokes::m_pressure, Nektar::SolverUtils::EquationSystem::m_session, m_singleMode, Nektar::SolverUtils::EquationSystem::m_useFFT, Nektar::IncNavierStokes::m_velocity, and m_zeroMode.
Definition at line 2165 of file CoupledLinearNS.cpp.
References Nektar::SolverUtils::EquationSystem::GetNcoeffs(), Nektar::SolverUtils::EquationSystem::m_boundaryConditions, Nektar::SolverUtils::EquationSystem::m_fields, Nektar::IncNavierStokes::m_pressure, Nektar::SolverUtils::EquationSystem::m_sessionName, m_singleMode, and Nektar::SolverUtils::EquationSystem::WriteFld().
Definition at line 1386 of file CoupledLinearNS.cpp.
References Nektar::SolverUtils::EquationSystem::m_fields.
Definition at line 1398 of file CoupledLinearNS.cpp.
References Nektar::SolverUtils::EquationSystem::m_fields.
|
friend |
Definition at line 92 of file CoupledLinearNS.h.
|
static |
Name of class.
Definition at line 103 of file CoupledLinearNS.h.
|
private |
Definition at line 174 of file CoupledLinearNS.h.
Referenced by SolveSteadyNavierStokes(), and v_DoInitialise().
Definition at line 158 of file CoupledLinearNS.h.
Referenced by DefineForcingTerm(), and EvaluateNewtonRHS().
Definition at line 159 of file CoupledLinearNS.h.
Referenced by DefineForcingTerm().
|
private |
Definition at line 175 of file CoupledLinearNS.h.
Referenced by SolveLinearNS(), SolveSteadyNavierStokes(), and v_DoInitialise().
|
private |
Definition at line 180 of file CoupledLinearNS.h.
Referenced by v_DoInitialise(), and v_DoSolve().
|
private |
Definition at line 182 of file CoupledLinearNS.h.
Referenced by Continuation(), and v_DoInitialise().
|
private |
Definition at line 181 of file CoupledLinearNS.h.
Array<OneD, CoupledLocalToGlobalC0ContMapSharedPtr> Nektar::CoupledLinearNS::m_locToGloMap |
Definition at line 161 of file CoupledLinearNS.h.
Referenced by SetUpCoupledMatrix(), SolveLinearNS(), and v_InitObject().
|
private |
Definition at line 187 of file CoupledLinearNS.h.
Referenced by SetUpCoupledMatrix(), and SolveLinearNS().
|
private |
Definition at line 179 of file CoupledLinearNS.h.
Referenced by SolveSteadyNavierStokes(), and v_DoInitialise().
|
private |
Definition at line 177 of file CoupledLinearNS.h.
Referenced by v_DoInitialise().
|
private |
Definition at line 178 of file CoupledLinearNS.h.
Referenced by v_DoInitialise().
|
private |
Identify if a single mode is required for stability analysis.
Definition at line 170 of file CoupledLinearNS.h.
Referenced by SetUpCoupledMatrix(), Solve(), SolveLinearNS(), v_InitObject(), and v_Output().
|
private |
Definition at line 176 of file CoupledLinearNS.h.
Referenced by SolveSteadyNavierStokes(), and v_DoInitialise().
|
private |
Id to identify when single mode is mean mode (i.e. beta=0);.
Definition at line 172 of file CoupledLinearNS.h.
Referenced by SetUpCoupledMatrix(), and v_InitObject().