Nektar++
|
#include <CoupledLinearNS.h>
Static Public Member Functions | |
static SolverUtils::EquationSystemSharedPtr | create (const LibUtilities::SessionReaderSharedPtr &pSession) |
Creates an instance of this class. More... | |
Public Attributes | |
Array< OneD, Array< OneD, NekDouble > > | m_ForcingTerm |
Array< OneD, Array< OneD, NekDouble > > | m_ForcingTerm_Coeffs |
Array< OneD, CoupledLocalToGlobalC0ContMapSharedPtr > | m_locToGloMap |
Public Attributes inherited from Nektar::SolverUtils::UnsteadySystem | |
NekDouble | m_cflSafetyFactor |
CFL safety factor (comprise between 0 to 1). More... | |
Static Public Attributes | |
static std::string | className = SolverUtils::GetEquationSystemFactory().RegisterCreatorFunction("CoupledLinearisedNS", CoupledLinearNS::create) |
Name of class. More... | |
Protected Member Functions | |
CoupledLinearNS (const LibUtilities::SessionReaderSharedPtr &pSesssion) | |
virtual void | v_InitObject () |
Init object for UnsteadySystem class. More... | |
Protected Member Functions inherited from Nektar::IncNavierStokes | |
IncNavierStokes (const LibUtilities::SessionReaderSharedPtr &pSession) | |
Constructor. More... | |
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 More... | |
void | SetRadiationBoundaryForcing (int fieldid) |
Set Radiation forcing term. More... | |
void | SetZeroNormalVelocity () |
Set Normal Velocity Component to Zero. More... | |
bool | CalcSteadyState (void) |
evaluate steady state More... | |
virtual MultiRegions::ExpListSharedPtr | v_GetPressure () |
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. More... | |
SOLVER_UTILS_EXPORT NekDouble | MaxTimeStepEstimator () |
Get the maximum timestep estimator for cfl control. More... | |
virtual SOLVER_UTILS_EXPORT void | v_AppendOutput1D (Array< OneD, Array< OneD, NekDouble > > &solution1D) |
Print the solution at each solution point in a txt file. More... | |
virtual SOLVER_UTILS_EXPORT 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. More... | |
virtual SOLVER_UTILS_EXPORT bool | v_SteadyStateCheck (int step) |
SOLVER_UTILS_EXPORT void | CheckForRestartTime (NekDouble &time) |
SOLVER_UTILS_EXPORT void | SVVVarDiffCoeff (const Array< OneD, Array< OneD, NekDouble > > vel, StdRegions::VarCoeffMap &varCoeffMap) |
Evaluate the SVV diffusion coefficient according to Moura's paper where it should proportional to h time velocity. More... | |
Protected Member Functions inherited from Nektar::SolverUtils::EquationSystem | |
SOLVER_UTILS_EXPORT | EquationSystem (const LibUtilities::SessionReaderSharedPtr &pSession) |
Initialises EquationSystem class members. More... | |
int | nocase_cmp (const std::string &s1, const std::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. More... | |
virtual SOLVER_UTILS_EXPORT NekDouble | v_L2Error (unsigned int field, const Array< OneD, NekDouble > &exactsoln=NullNekDouble1DArray, bool Normalised=false) |
Virtual function for the L_2 error computation between fields and a given exact solution. More... | |
virtual SOLVER_UTILS_EXPORT void | v_SetInitialConditions (NekDouble initialtime=0.0, bool dumpInitialConditions=true, const int domain=0) |
virtual SOLVER_UTILS_EXPORT void | v_EvaluateExactSolution (unsigned int field, Array< OneD, NekDouble > &outfield, const NekDouble time) |
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_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) |
Print a summary of time stepping parameters. More... | |
virtual void | v_DoInitialise (void) |
Sets up initial conditions. More... | |
virtual void | v_DoSolve (void) |
Solves an unsteady problem. More... | |
virtual bool | v_NegatedOp (void) |
virtual void | v_TransCoeffToPhys (void) |
Virtual function for transformation to physical space. More... | |
virtual void | v_TransPhysToCoeff (void) |
Virtual function for transformation to coefficient space. More... | |
virtual void | v_Output (void) |
virtual int | v_GetForceDimension (void) |
Private Attributes | |
bool | m_zeroMode |
Id to identify when single mode is mean mode (i.e. beta=0);. More... | |
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 More... | |
bool | m_SmoothAdvection |
bool to identify if advection term smoothing is requested More... | |
std::vector < SolverUtils::ForcingSharedPtr > | m_forcing |
Forcing terms. More... | |
int | m_nConvectiveFields |
Number of fields to be convected;. More... | |
Array< OneD, int > | m_velocity |
int which identifies which components of m_fields contains the velocity (u,v,w); More... | |
MultiRegions::ExpListSharedPtr | m_pressure |
Pointer to field holding pressure field. More... | |
NekDouble | m_kinvis |
Kinematic viscosity. More... | |
int | m_energysteps |
dump energy to file at steps time More... | |
int | m_cflsteps |
dump cfl estimate More... | |
int | m_steadyStateSteps |
Check for steady state at step interval. More... | |
NekDouble | m_steadyStateTol |
Tolerance to which steady state should be evaluated at. More... | |
EquationType | m_equationType |
equation type; More... | |
Array< OneD, Array< OneD, int > > | m_fieldsBCToElmtID |
Mapping from BCs to Elmt IDs. More... | |
Array< OneD, Array< OneD, int > > | m_fieldsBCToTraceID |
Mapping from BCs to Elmt Edge IDs. More... | |
Array< OneD, Array< OneD, NekDouble > > | m_fieldsRadiationFactor |
RHS Factor for Radiation Condition. More... | |
int | m_intSteps |
Number of time integration steps AND Order of extrapolation for pressure boundary conditions. More... | |
Protected Attributes inherited from Nektar::SolverUtils::AdvectionSystem | |
SolverUtils::AdvectionSharedPtr | m_advObject |
Advection term. More... | |
Protected Attributes inherited from Nektar::SolverUtils::UnsteadySystem | |
int | m_infosteps |
Number of time steps between outputting status information. More... | |
LibUtilities::TimeIntegrationWrapperSharedPtr | m_intScheme |
Wrapper to the time integration scheme. More... | |
LibUtilities::TimeIntegrationSchemeOperators | m_ode |
The time integration scheme operators to use. More... | |
LibUtilities::TimeIntegrationSolutionSharedPtr | m_intSoln |
NekDouble | m_epsilon |
bool | m_explicitDiffusion |
Indicates if explicit or implicit treatment of diffusion is used. More... | |
bool | m_explicitAdvection |
Indicates if explicit or implicit treatment of advection is used. More... | |
bool | m_explicitReaction |
Indicates if explicit or implicit treatment of reaction is used. More... | |
bool | m_homoInitialFwd |
Flag to determine if simulation should start in homogeneous forward transformed state. More... | |
std::vector< int > | m_intVariables |
std::vector< FilterSharedPtr > | m_filters |
Protected Attributes inherited from Nektar::SolverUtils::EquationSystem | |
LibUtilities::CommSharedPtr | m_comm |
Communicator. More... | |
LibUtilities::SessionReaderSharedPtr | m_session |
The session reader. More... | |
LibUtilities::FieldIOSharedPtr | m_fld |
Field input/output. More... | |
std::map< std::string, Array < OneD, Array< OneD, float > > > | m_interpWeights |
Map of the interpolation weights for a specific filename. More... | |
std::map< std::string, Array < OneD, Array< OneD, unsigned int > > > | m_interpInds |
Map of the interpolation indices for a specific filename. More... | |
Array< OneD, MultiRegions::ExpListSharedPtr > | m_fields |
Array holding all dependent variables. More... | |
Array< OneD, MultiRegions::ExpListSharedPtr > | m_base |
Base fields. More... | |
Array< OneD, MultiRegions::ExpListSharedPtr > | m_derivedfields |
Array holding all dependent variables. More... | |
SpatialDomains::BoundaryConditionsSharedPtr | m_boundaryConditions |
Pointer to boundary conditions object. More... | |
SpatialDomains::MeshGraphSharedPtr | m_graph |
Pointer to graph defining mesh. More... | |
std::string | m_sessionName |
Name of the session. More... | |
NekDouble | m_time |
Current time of simulation. More... | |
int | m_initialStep |
Number of the step where the simulation should begin. More... | |
NekDouble | m_fintime |
Finish time of the simulation. More... | |
NekDouble | m_timestep |
Time step size. More... | |
NekDouble | m_lambda |
Lambda constant in real system if one required. More... | |
std::set< std::string > | m_loadedFields |
NekDouble | m_checktime |
Time between checkpoints. More... | |
int | m_nchk |
Number of checkpoints written so far. More... | |
int | m_steps |
Number of steps to take. More... | |
int | m_checksteps |
Number of steps between checkpoints. More... | |
int | m_spacedim |
Spatial dimension (>= expansion dim). More... | |
int | m_expdim |
Expansion dimension. More... | |
bool | m_singleMode |
Flag to determine if single homogeneous mode is used. More... | |
bool | m_halfMode |
Flag to determine if half homogeneous mode is used. More... | |
bool | m_multipleModes |
Flag to determine if use multiple homogenenous modes are used. More... | |
bool | m_useFFT |
Flag to determine if FFT is used for homogeneous transform. More... | |
bool | m_homogen_dealiasing |
Flag to determine if dealiasing is used for homogeneous simulations. More... | |
bool | m_specHP_dealiasing |
Flag to determine if dealisising is usde for the Spectral/hp element discretisation. More... | |
enum MultiRegions::ProjectionType | m_projectionType |
Type of projection; e.g continuous or discontinuous. More... | |
Array< OneD, Array< OneD, NekDouble > > | m_traceNormals |
Array holding trace normals for DG simulations in the forwards direction. More... | |
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > | m_gradtan |
1 x nvariable x nq More... | |
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > | m_tanbasis |
2 x m_spacedim x nq More... | |
Array< OneD, bool > | m_checkIfSystemSingular |
Flag to indicate if the fields should be checked for singularity. More... | |
LibUtilities::FieldMetaDataMap | m_fieldMetaDataMap |
Map to identify relevant solver info to dump in output fields. More... | |
int | m_NumQuadPointsError |
Number of Quadrature points used to work out the error. More... | |
enum HomogeneousType | m_HomogeneousType |
NekDouble | m_LhomX |
physical length in X direction (if homogeneous) More... | |
NekDouble | m_LhomY |
physical length in Y direction (if homogeneous) More... | |
NekDouble | m_LhomZ |
physical length in Z direction (if homogeneous) More... | |
int | m_npointsX |
number of points in X direction (if homogeneous) More... | |
int | m_npointsY |
number of points in Y direction (if homogeneous) More... | |
int | m_npointsZ |
number of points in Z direction (if homogeneous) More... | |
int | m_HomoDirec |
number of homogenous directions More... | |
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 59 of file CoupledLinearNS.cpp.
Definition at line 1657 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.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr().
Definition at line 1529 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 1352 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 1732 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 1773 of file CoupledLinearNS.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), 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 1699 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 1716 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 180 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, Nektar::SolverUtils::EquationSystem::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 376 of file CoupledLinearNS.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), 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, Nektar::SolverUtils::EquationSystem::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 1503 of file CoupledLinearNS.cpp.
References Nektar::SolverUtils::EquationSystem::m_fields, Nektar::IncNavierStokes::m_forcing, 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 1873 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 1912 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, Nektar::SolverUtils::EquationSystem::m_singleMode, Nektar::IncNavierStokes::m_velocity, Nektar::Transpose(), and Vmath::Zero().
Definition at line 1559 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 1366 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().
Sets up initial conditions.
Sets the initial conditions.
Reimplemented from Nektar::SolverUtils::UnsteadySystem.
Definition at line 1207 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().
Solves an unsteady problem.
Initialises the time integration scheme (as specified in the session file), and perform the time integration.
Reimplemented from Nektar::SolverUtils::UnsteadySystem.
Definition at line 1429 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(), Nektar::Timer::TimePerTest(), and Nektar::SolverUtils::UnsteadySystem::v_DoSolve().
|
privatevirtual |
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 1202 of file CoupledLinearNS.cpp.
References Nektar::SolverUtils::AddSummaryItem().
|
privatevirtual |
Implements Nektar::IncNavierStokes.
Definition at line 2227 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 66 of file CoupledLinearNS.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL0, ASSERTL1, Nektar::LibUtilities::NekFactory< tKey, tBase, >::CreateInstance(), Nektar::SolverUtils::EquationSystem::eHomogeneous1D, Nektar::eUnsteadyNavierStokes, GenPressureExp(), Nektar::GetExtrapolateFactory(), Nektar::SolverUtils::AdvectionSystem::m_advObject, Nektar::SolverUtils::EquationSystem::m_boundaryConditions, Nektar::IncNavierStokes::m_equationType, Nektar::IncNavierStokes::m_extrapolation, 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, Nektar::SolverUtils::EquationSystem::m_singleMode, Nektar::SolverUtils::EquationSystem::m_useFFT, Nektar::IncNavierStokes::m_velocity, m_zeroMode, and Nektar::IncNavierStokes::v_InitObject().
|
privatevirtual |
Virtual function to define if operator in DoSolve is negated with regard to the strong form. This is currently only used in Arnoldi solves. For Coupledd solver this is true since Stokes operator is set up as a LHS rather than RHS operation
Reimplemented from Nektar::SolverUtils::EquationSystem.
Definition at line 1498 of file CoupledLinearNS.cpp.
Write the field data to file. The file is named according to the session name with the extension .fld appended.
Reimplemented from Nektar::SolverUtils::EquationSystem.
Definition at line 2189 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, Nektar::SolverUtils::EquationSystem::m_singleMode, and Nektar::SolverUtils::EquationSystem::WriteFld().
Virtual function for transformation to physical space.
Reimplemented from Nektar::IncNavierStokes.
Definition at line 1405 of file CoupledLinearNS.cpp.
References Nektar::SolverUtils::EquationSystem::m_fields.
Virtual function for transformation to coefficient space.
Reimplemented from Nektar::IncNavierStokes.
Definition at line 1417 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 172 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 173 of file CoupledLinearNS.h.
Referenced by SolveLinearNS(), SolveSteadyNavierStokes(), and v_DoInitialise().
|
private |
Definition at line 178 of file CoupledLinearNS.h.
Referenced by v_DoInitialise(), and v_DoSolve().
|
private |
Definition at line 180 of file CoupledLinearNS.h.
Referenced by Continuation(), and v_DoInitialise().
|
private |
Definition at line 179 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 185 of file CoupledLinearNS.h.
Referenced by SetUpCoupledMatrix(), and SolveLinearNS().
|
private |
Definition at line 177 of file CoupledLinearNS.h.
Referenced by SolveSteadyNavierStokes(), and v_DoInitialise().
|
private |
Definition at line 175 of file CoupledLinearNS.h.
Referenced by v_DoInitialise().
|
private |
Definition at line 176 of file CoupledLinearNS.h.
Referenced by v_DoInitialise().
|
private |
Definition at line 174 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 170 of file CoupledLinearNS.h.
Referenced by SetUpCoupledMatrix(), and v_InitObject().