Nektar++
|
#include <AcousticSystem.h>
Protected Member Functions | |
AcousticSystem (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph) | |
Initialises UnsteadySystem class members. More... | |
virtual void | v_InitObject () |
Initialization object for the AcousticSystem class. More... | |
void | DoOdeRhs (const Array< OneD, const Array< OneD, NekDouble >> &inarray, Array< OneD, Array< OneD, NekDouble >> &outarray, const NekDouble time) |
Compute the right-hand side. More... | |
void | DoOdeProjection (const Array< OneD, const Array< OneD, NekDouble >> &inarray, Array< OneD, Array< OneD, NekDouble >> &outarray, const NekDouble time) |
Compute the projection and call the method for imposing the boundary conditions in case of discontinuous projection. More... | |
virtual void | v_GetFluxVector (const Array< OneD, Array< OneD, NekDouble >> &physfield, Array< OneD, Array< OneD, Array< OneD, NekDouble >>> &flux)=0 |
virtual void | v_AddLinTerm (const Array< OneD, const Array< OneD, NekDouble >> &inarray, Array< OneD, Array< OneD, NekDouble >> &outarray) |
virtual bool | v_PreIntegrate (int step) |
v_PreIntegrate More... | |
virtual void | v_Output () |
virtual Array< OneD, NekDouble > | v_GetMaxStdVelocity () |
Compute the advection velocity in the standard space for each element of the expansion. More... | |
virtual void | v_ExtraFldOutput (std::vector< Array< OneD, NekDouble >> &fieldcoeffs, std::vector< std::string > &variables) |
const Array< OneD, const Array< OneD, NekDouble > > & | GetNormals () |
Get the normal vectors. More... | |
const Array< OneD, const Array< OneD, NekDouble > > & | GetVecLocs () |
Get the locations of the components of the directed fields within the fields array. More... | |
const Array< OneD, const Array< OneD, NekDouble > > & | GetBasefieldFwdBwd () |
Get the baseflow field. More... | |
![]() | |
virtual SOLVER_UTILS_EXPORT bool | v_PostIntegrate (int step) |
![]() | |
SOLVER_UTILS_EXPORT | UnsteadySystem (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph) |
Initialises UnsteadySystem class members. More... | |
SOLVER_UTILS_EXPORT NekDouble | MaxTimeStepEstimator () |
Get the maximum timestep estimator for cfl control. More... | |
virtual SOLVER_UTILS_EXPORT void | v_DoSolve () |
Solves an unsteady problem. More... | |
virtual SOLVER_UTILS_EXPORT void | v_DoInitialise () |
Sets up initial conditions. More... | |
virtual SOLVER_UTILS_EXPORT void | v_GenerateSummary (SummaryList &s) |
Print a summary of time stepping parameters. More... | |
virtual SOLVER_UTILS_EXPORT void | v_AppendOutput1D (Array< OneD, Array< OneD, NekDouble >> &solution1D) |
Print the solution at each solution point in a txt file. More... | |
virtual SOLVER_UTILS_EXPORT NekDouble | v_GetTimeStep (const Array< OneD, const Array< OneD, NekDouble >> &inarray) |
Return the timestep to be used for the next step in the time-marching loop. More... | |
virtual SOLVER_UTILS_EXPORT bool | v_RequireFwdTrans () |
SOLVER_UTILS_EXPORT void | CheckForRestartTime (NekDouble &time, int &nchk) |
SOLVER_UTILS_EXPORT void | SVVVarDiffCoeff (const Array< OneD, Array< OneD, NekDouble >> vel, StdRegions::VarCoeffMap &varCoeffMap) |
Evaluate the SVV diffusion coefficient according to Moura's paper where it should proportional to h time velocity. More... | |
![]() | |
SOLVER_UTILS_EXPORT | EquationSystem (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph) |
Initialises EquationSystem class members. More... | |
virtual SOLVER_UTILS_EXPORT NekDouble | v_LinfError (unsigned int field, const Array< OneD, NekDouble > &exactsoln=NullNekDouble1DArray) |
Virtual function for the L_inf error computation between fields and a given exact solution. More... | |
virtual SOLVER_UTILS_EXPORT NekDouble | v_L2Error (unsigned int field, const Array< OneD, NekDouble > &exactsoln=NullNekDouble1DArray, bool Normalised=false) |
Virtual function for the L_2 error computation between fields and a given exact solution. More... | |
virtual SOLVER_UTILS_EXPORT void | v_TransCoeffToPhys () |
Virtual function for transformation to physical space. More... | |
virtual SOLVER_UTILS_EXPORT void | v_TransPhysToCoeff () |
Virtual function for transformation to coefficient space. More... | |
virtual SOLVER_UTILS_EXPORT void | v_SetInitialConditions (NekDouble initialtime=0.0, bool dumpInitialConditions=true, const int domain=0) |
virtual SOLVER_UTILS_EXPORT void | v_EvaluateExactSolution (unsigned int field, Array< OneD, NekDouble > &outfield, const NekDouble time) |
virtual SOLVER_UTILS_EXPORT MultiRegions::ExpListSharedPtr | v_GetPressure (void) |
virtual SOLVER_UTILS_EXPORT void | v_ExtraFldOutput (std::vector< Array< OneD, NekDouble > > &fieldcoeffs, std::vector< std::string > &variables) |
Protected Attributes | |
int | m_ip |
indices of the fields More... | |
int | m_irho |
int | m_iu |
bool | m_conservative |
we are dealing with a conservative formualtion More... | |
SolverUtils::CouplingSharedPtr | m_coupling |
SolverUtils::AdvectionSharedPtr | m_advection |
std::vector< SolverUtils::ForcingSharedPtr > | m_forcing |
SolverUtils::RiemannSolverSharedPtr | m_riemannSolver |
Array< OneD, Array< OneD, NekDouble > > | m_bfFwdBwd |
Array< OneD, Array< OneD, NekDouble > > | m_vecLocs |
Array< OneD, Array< OneD, NekDouble > > | m_bf |
std::vector< std::string > | m_bfNames |
![]() | |
SolverUtils::AdvectionSharedPtr | m_advObject |
Advection term. More... | |
![]() | |
int | m_infosteps |
Number of time steps between outputting status information. More... | |
int | m_abortSteps |
Number of steps between checks for abort conditions. More... | |
int | m_filtersInfosteps |
Number of time steps between outputting filters information. More... | |
int | m_nanSteps |
LibUtilities::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... | |
NekDouble | m_steadyStateTol |
Tolerance to which steady state should be evaluated at. More... | |
int | m_steadyStateSteps |
Check for steady state at step interval. More... | |
Array< OneD, Array< OneD, NekDouble > > | m_previousSolution |
Storage for previous solution for steady-state check. More... | |
std::ofstream | m_errFile |
std::vector< int > | m_intVariables |
std::vector< std::pair< std::string, FilterSharedPtr > > | m_filters |
NekDouble | m_filterTimeWarning |
Number of time steps between outputting status information. More... | |
![]() | |
LibUtilities::CommSharedPtr | m_comm |
Communicator. More... | |
LibUtilities::SessionReaderSharedPtr | m_session |
The session reader. More... | |
std::map< std::string, SolverUtils::SessionFunctionSharedPtr > | m_sessionFunctions |
Map of known SessionFunctions. More... | |
LibUtilities::FieldIOSharedPtr | m_fld |
Field input/output. More... | |
Array< OneD, MultiRegions::ExpListSharedPtr > | m_fields |
Array holding all dependent variables. More... | |
SpatialDomains::BoundaryConditionsSharedPtr | m_boundaryConditions |
Pointer to boundary conditions object. More... | |
SpatialDomains::MeshGraphSharedPtr | m_graph |
Pointer to graph defining mesh. More... | |
std::string | m_sessionName |
Name of the session. More... | |
NekDouble | m_time |
Current time of simulation. More... | |
int | m_initialStep |
Number of the step where the simulation should begin. More... | |
NekDouble | m_fintime |
Finish time of the simulation. More... | |
NekDouble | m_timestep |
Time step size. More... | |
NekDouble | m_lambda |
Lambda constant in real system if one required. More... | |
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, 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... | |
Private Member Functions | |
NekDouble | GetCFLEstimate () |
void | SetBoundaryConditions (Array< OneD, Array< OneD, NekDouble >> &physarray, NekDouble time) |
Apply the Boundary Conditions to the AcousticSystem equations. More... | |
virtual void | v_WallBC (int bcRegion, int cnt, Array< OneD, Array< OneD, NekDouble >> &Fwd, Array< OneD, Array< OneD, NekDouble >> &physarray) |
Wall boundary conditions for the AcousticSystem equations. More... | |
virtual void | v_RiemannInvariantBC (int bcRegion, int cnt, Array< OneD, Array< OneD, NekDouble >> &Fwd, Array< OneD, Array< OneD, NekDouble >> &BfFwd, Array< OneD, Array< OneD, NekDouble >> &physarray)=0 |
virtual void | v_WhiteNoiseBC (int bcRegion, int cnt, Array< OneD, Array< OneD, NekDouble >> &Fwd, Array< OneD, Array< OneD, NekDouble >> &BfFwd, Array< OneD, Array< OneD, NekDouble >> &physarray) |
Wall boundary conditions for the AcousticSystem equations. More... | |
void | CopyBoundaryTrace (const Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd) |
void | UpdateBasefieldFwdBwd () |
Private Attributes | |
std::map< int, boost::mt19937 > | m_rng |
NekDouble | m_whiteNoiseBC_lastUpdate |
NekDouble | m_whiteNoiseBC_p |
Friends | |
class | MemoryManager< AcousticSystem > |
Additional Inherited Members | |
![]() | |
NekDouble | m_cflSafetyFactor |
CFL safety factor (comprise between 0 to 1). More... | |
![]() | |
enum | HomogeneousType { eHomogeneous1D, eHomogeneous2D, eHomogeneous3D, eNotHomogeneous } |
Parameter for homogeneous expansions. More... | |
![]() | |
static std::string | equationSystemTypeLookupIds [] |
Definition at line 60 of file AcousticSystem.h.
|
virtual |
|
protected |
Initialises UnsteadySystem class members.
Definition at line 57 of file AcousticSystem.cpp.
|
private |
Definition at line 626 of file AcousticSystem.cpp.
References Nektar::SolverUtils::EquationSystem::m_fields, and Vmath::Vcopy().
Referenced by UpdateBasefieldFwdBwd().
|
protected |
Compute the projection and call the method for imposing the boundary conditions in case of discontinuous projection.
Definition at line 215 of file AcousticSystem.cpp.
References Nektar::SolverUtils::EquationSystem::m_fields, SetBoundaryConditions(), UpdateBasefieldFwdBwd(), and Vmath::Vcopy().
Referenced by Nektar::APE::v_InitObject(), and Nektar::LEE::v_InitObject().
|
protected |
Compute the right-hand side.
Definition at line 186 of file AcousticSystem.cpp.
References Nektar::SolverUtils::EquationSystem::GetTotPoints(), m_advection, Nektar::SolverUtils::EquationSystem::m_fields, m_forcing, Nektar::SolverUtils::EquationSystem::m_spacedim, Nektar::SolverUtils::EquationSystem::m_time, Vmath::Neg(), and v_AddLinTerm().
Referenced by Nektar::APE::v_InitObject(), and Nektar::LEE::v_InitObject().
|
protected |
Get the baseflow field.
Definition at line 611 of file AcousticSystem.cpp.
References m_bfFwdBwd.
Referenced by SetBoundaryConditions(), Nektar::APE::v_InitObject(), and Nektar::LEE::v_InitObject().
|
private |
|
protected |
Get the normal vectors.
Definition at line 593 of file AcousticSystem.cpp.
References Nektar::SolverUtils::EquationSystem::m_traceNormals.
Referenced by Nektar::APE::v_InitObject(), and Nektar::LEE::v_InitObject().
|
protected |
Get the locations of the components of the directed fields within the fields array.
Definition at line 602 of file AcousticSystem.cpp.
References m_vecLocs.
Referenced by Nektar::APE::v_InitObject(), and Nektar::LEE::v_InitObject().
|
private |
Apply the Boundary Conditions to the AcousticSystem equations.
Definition at line 236 of file AcousticSystem.cpp.
References ASSERTL0, GetBasefieldFwdBwd(), Nektar::SolverUtils::EquationSystem::GetTraceTotPoints(), Nektar::SolverUtils::EquationSystem::m_fields, Nektar::SolverUtils::EquationSystem::m_session, v_RiemannInvariantBC(), v_WallBC(), and v_WhiteNoiseBC().
Referenced by DoOdeProjection().
|
private |
Definition at line 616 of file AcousticSystem.cpp.
References CopyBoundaryTrace(), m_bf, m_bfFwdBwd, m_bfNames, and Nektar::SolverUtils::EquationSystem::m_fields.
Referenced by DoOdeProjection().
|
inlineprotectedvirtual |
Reimplemented in Nektar::LEE.
Definition at line 100 of file AcousticSystem.h.
Referenced by DoOdeRhs().
|
protectedvirtual |
Definition at line 563 of file AcousticSystem.cpp.
References Nektar::SolverUtils::EquationSystem::GetNcoeffs(), m_bf, m_bfNames, Nektar::SolverUtils::EquationSystem::m_fields, m_forcing, and Nektar::SolverUtils::EquationSystem::m_session.
|
protectedpure virtual |
Implemented in Nektar::LEE, and Nektar::APE.
Compute the advection velocity in the standard space for each element of the expansion.
Reimplemented from Nektar::SolverUtils::AdvectionSystem.
Definition at line 472 of file AcousticSystem.cpp.
References Nektar::SpatialDomains::eDeformed, m_bf, Nektar::SolverUtils::EquationSystem::m_fields, Nektar::SolverUtils::EquationSystem::m_spacedim, Vmath::Smul(), Vmath::Svtvp(), Vmath::Vmul(), and Vmath::Vvtvp().
|
protectedvirtual |
Initialization object for the AcousticSystem class.
Reimplemented from Nektar::SolverUtils::AdvectionSystem.
Reimplemented in Nektar::LEE, and Nektar::APE.
Definition at line 68 of file AcousticSystem.cpp.
References ASSERTL0, Nektar::MultiRegions::eDiscontinuous, Nektar::SolverUtils::GetCouplingFactory(), Nektar::SolverUtils::Forcing::Load(), m_bfNames, m_coupling, Nektar::SolverUtils::EquationSystem::m_fields, m_forcing, Nektar::SolverUtils::UnsteadySystem::m_homoInitialFwd, m_iu, Nektar::SolverUtils::EquationSystem::m_projectionType, Nektar::SolverUtils::EquationSystem::m_session, Nektar::SolverUtils::EquationSystem::m_spacedim, m_vecLocs, m_whiteNoiseBC_lastUpdate, m_whiteNoiseBC_p, and Nektar::SolverUtils::AdvectionSystem::v_InitObject().
Referenced by Nektar::APE::v_InitObject(), and Nektar::LEE::v_InitObject().
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 173 of file AcousticSystem.cpp.
References m_coupling, and Nektar::SolverUtils::EquationSystem::v_Output().
|
protectedvirtual |
v_PreIntegrate
Reimplemented from Nektar::SolverUtils::UnsteadySystem.
Definition at line 127 of file AcousticSystem.cpp.
References Nektar::SolverUtils::EquationSystem::GetFunction(), m_bf, m_bfNames, m_coupling, Nektar::SolverUtils::EquationSystem::m_fields, m_forcing, Nektar::SolverUtils::EquationSystem::m_session, Nektar::SolverUtils::EquationSystem::m_time, and Nektar::SolverUtils::UnsteadySystem::v_PreIntegrate().
|
privatepure virtual |
Implemented in Nektar::LEE, and Nektar::APE.
Referenced by SetBoundaryConditions().
|
privatevirtual |
Wall boundary conditions for the AcousticSystem equations.
Definition at line 306 of file AcousticSystem.cpp.
References Nektar::SolverUtils::EquationSystem::m_fields, m_iu, Nektar::SolverUtils::EquationSystem::m_spacedim, Nektar::SolverUtils::EquationSystem::m_traceNormals, Vmath::Smul(), Vmath::Vcopy(), and Vmath::Vvtvp().
Referenced by SetBoundaryConditions().
|
privatevirtual |
Wall boundary conditions for the AcousticSystem equations.
Definition at line 363 of file AcousticSystem.cpp.
References ASSERTL0, Nektar::SpatialDomains::eDirichlet, Nektar::LibUtilities::Equation::Evaluate(), Vmath::Fill(), Nektar::NekConstants::kNekZeroTol, m_conservative, Nektar::SolverUtils::EquationSystem::m_fields, m_ip, m_irho, m_iu, m_rng, Nektar::SolverUtils::EquationSystem::m_spacedim, Nektar::SolverUtils::EquationSystem::m_time, Nektar::SolverUtils::EquationSystem::m_traceNormals, m_whiteNoiseBC_lastUpdate, m_whiteNoiseBC_p, and Vmath::Vcopy().
Referenced by SetBoundaryConditions().
|
friend |
Definition at line 63 of file AcousticSystem.h.
|
protected |
Definition at line 74 of file AcousticSystem.h.
Referenced by DoOdeRhs(), Nektar::APE::v_InitObject(), and Nektar::LEE::v_InitObject().
Definition at line 79 of file AcousticSystem.h.
Referenced by UpdateBasefieldFwdBwd(), Nektar::LEE::v_AddLinTerm(), v_ExtraFldOutput(), Nektar::APE::v_GetFluxVector(), Nektar::LEE::v_GetFluxVector(), v_GetMaxStdVelocity(), Nektar::APE::v_InitObject(), Nektar::LEE::v_InitObject(), and v_PreIntegrate().
Definition at line 77 of file AcousticSystem.h.
Referenced by GetBasefieldFwdBwd(), UpdateBasefieldFwdBwd(), Nektar::APE::v_InitObject(), and Nektar::LEE::v_InitObject().
|
protected |
Definition at line 80 of file AcousticSystem.h.
Referenced by UpdateBasefieldFwdBwd(), v_ExtraFldOutput(), Nektar::APE::v_InitObject(), Nektar::LEE::v_InitObject(), v_InitObject(), and v_PreIntegrate().
|
protected |
we are dealing with a conservative formualtion
Definition at line 72 of file AcousticSystem.h.
Referenced by Nektar::APE::APE(), Nektar::LEE::LEE(), and v_WhiteNoiseBC().
|
protected |
Definition at line 73 of file AcousticSystem.h.
Referenced by v_InitObject(), v_Output(), and v_PreIntegrate().
|
protected |
Definition at line 75 of file AcousticSystem.h.
Referenced by DoOdeRhs(), v_ExtraFldOutput(), v_InitObject(), and v_PreIntegrate().
|
protected |
indices of the fields
Definition at line 70 of file AcousticSystem.h.
Referenced by Nektar::APE::APE(), Nektar::LEE::LEE(), Nektar::LEE::v_AddLinTerm(), Nektar::LEE::v_GetFluxVector(), Nektar::APE::v_RiemannInvariantBC(), Nektar::LEE::v_RiemannInvariantBC(), and v_WhiteNoiseBC().
|
protected |
Definition at line 70 of file AcousticSystem.h.
Referenced by Nektar::APE::APE(), Nektar::LEE::LEE(), Nektar::LEE::v_GetFluxVector(), Nektar::LEE::v_RiemannInvariantBC(), and v_WhiteNoiseBC().
|
protected |
Definition at line 70 of file AcousticSystem.h.
Referenced by Nektar::APE::APE(), Nektar::LEE::LEE(), Nektar::LEE::v_AddLinTerm(), Nektar::LEE::v_GetFluxVector(), v_InitObject(), Nektar::APE::v_RiemannInvariantBC(), Nektar::LEE::v_RiemannInvariantBC(), v_WallBC(), and v_WhiteNoiseBC().
|
protected |
Definition at line 76 of file AcousticSystem.h.
Referenced by Nektar::APE::v_InitObject(), and Nektar::LEE::v_InitObject().
|
private |
Definition at line 124 of file AcousticSystem.h.
Referenced by v_WhiteNoiseBC().
Definition at line 78 of file AcousticSystem.h.
Referenced by GetVecLocs(), and v_InitObject().
|
private |
Definition at line 125 of file AcousticSystem.h.
Referenced by v_InitObject(), and v_WhiteNoiseBC().
|
private |
Definition at line 126 of file AcousticSystem.h.
Referenced by v_InitObject(), and v_WhiteNoiseBC().