|
Nektar++
|
#include <UnsteadyADR.h>
Static Public Member Functions | |
| static EquationSystemSharedPtr | create (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph) |
| Creates an instance of this class. | |
Static Public Attributes | |
| static std::string | className0 |
| Name of class. | |
| static std::string | className1 |
| static std::string | className2 |
Static Public Attributes inherited from Nektar::SolverUtils::UnsteadySystem | |
| static std::string | cmdSetStartTime |
| static std::string | cmdSetStartChkNum |
Protected Member Functions | |
| UnsteadyADR (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph) | |
| ~UnsteadyADR () override=default | |
| void | DoProjection (LibUtilities::Field< double, FieldState::Phys > &in, LibUtilities::Field< double, FieldState::Phys > &out, const double &time) |
| Project onto the solution space: a copy for DG, a forward and backward transform with the Dirichlet values at time for CG. | |
| void | DoImplicit (LibUtilities::Field< double, FieldState::Phys > &inout, LibUtilities::Field< double, FieldState::Phys > &out, const double &time, const double &lambda) |
| void | DoExplicitRhs (LibUtilities::Field< double, FieldState::Phys > &in, LibUtilities::Field< double, FieldState::Phys > &out, const double &time, const double &dt) |
| void | v_InitObject (bool declareExpansionLists=true) override |
| Initialisation object for the UnsteadyADR problem. | |
| CFLVelocity | v_GetCFLVelocity () override |
| Offer the advection velocity to the Courant estimate. | |
| void | v_GenerateSummary (SummaryList &s) override |
| Virtual function for generating summary information. | |
| void | LoadSessionParameters () |
| void | SetAdvectionVel () |
| void | SetDiffusionCoeff () |
| Set the diffusion Coeff. the diff. coeff., diffCoeff_{ij} := \epslion * D_{ij} where, \epslion is scalar part D_{ij} is a 2D tensor for enforcing anisotropy Note, it is assumed that, diffCoeff_{ij} = diffCoeff_{ji}. | |
| void | v_InitialiseOperators () override |
| CoefficientFieldViews | v_GetOutputFieldViews () override |
| Project the solution to coefficients and return views of them. | |
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_InitObject (bool DeclareField=true) override |
| Init object for UnsteadySystem class. | |
| 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. | |
| SOLVER_UTILS_EXPORT void | v_DoInitialise (bool dumpInitialConditions=true) override |
| Sets up initial conditions. | |
| SOLVER_UTILS_EXPORT void | v_GenerateSummary (SummaryList &s) override |
| Print a summary of time stepping parameters. | |
| 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 bool | v_PreIntegrate (int step) |
| virtual SOLVER_UTILS_EXPORT bool | v_PostIntegrate (int step) |
| virtual SOLVER_UTILS_EXPORT bool | v_RequireFwdTrans () |
| 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_TransCoeffToPhys () |
| Virtual function for transformation to physical space. | |
| virtual SOLVER_UTILS_EXPORT void | v_TransPhysToCoeff () |
| Virtual function for transformation to coefficient space. | |
| 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 MultiRegions::ExpListSharedPtr | v_GetPressure (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 | |
| double | m_epsilon |
| std::vector< double > | m_diffCoeff |
| LibUtilities::Field< double, FieldState::Phys > | m_varDiffCoeff |
| SessionFunctionSharedPtr | m_varDiffCoeffFunction |
| bool | m_isTimeDependentDiffCoeff = false |
| double | m_lambda |
| bool | m_advection = false |
| bool | m_diffusion = false |
| bool | m_explicitAdvection = false |
| bool | m_explicitDiffusion = false |
| bool | m_implicitAdvection = false |
| bool | m_implicitDiffusion = false |
| LibUtilities::Field< double, FieldState::Phys > | m_advectionVel |
| LibUtilities::Field< double, FieldState::Phys > | m_traceAdvVel |
| The advection velocity on the local trace, which the trace flux operator reads through a pointer; kept here so that it outlives it. | |
| std::shared_ptr< BwdTransOp< double > > | m_bwdTransOp |
| std::shared_ptr< FwdTransOp< double > > | m_fwdTransOp |
| std::shared_ptr< IProductWRTBaseOp< double > > | m_iProductWRTBaseOp |
| std::shared_ptr< MultiplyByElmtInvMassOp< double > > | m_multiplyByElmtInvMassOp |
| std::shared_ptr< AdvectionOp< double > > | m_advectionCGOp |
| std::shared_ptr< AdvectionWeakDGOp< double > > | m_advectionWeakDGOp |
| std::shared_ptr< LinearAdvVolumeFluxOp< double > > | m_volumeFluxOp |
| std::shared_ptr< SolverCore::TraceFluxOp< double > > | m_traceFluxOp |
| std::shared_ptr< DiffusionIPOp< double > > | m_diffusionIPOp |
| std::shared_ptr< LinearSystemOp< double > > | m_linearSystemOp |
| std::shared_ptr< LinearSolverOp< double > > | m_linearSolverOp |
| std::map< double, std::shared_ptr< PreconOp< double > > > | m_preconOp |
| std::vector< ForcingSharedPtr > | m_forcing |
Protected Attributes inherited from Nektar::SolverUtils::UnsteadySystem | |
| LibUtilities::TimeIntegrationSchemeSharedPtr | m_intScheme |
| Wrapper to the time integration scheme. | |
| LibUtilities::TimeIntegrationSchemeOperators | m_ode |
| The time integration scheme operators to use. | |
| Array< OneD, Array< OneD, NekDouble > > | m_previousSolution |
| Storage for previous solution for steady-state check. | |
| std::vector< int > | m_intVariables |
| NekDouble | m_cflSafetyFactor |
| CFL safety factor (comprise between 0 to 1). | |
| NekDouble | m_CFLGrowth |
| CFL growth rate. | |
| NekDouble | m_CFLEnd |
| Maximun cfl in cfl growth. | |
| int | m_abortSteps |
| Number of steps between checks for abort conditions. | |
| bool | m_explicitDiffusion |
| Indicates if explicit or implicit treatment of diffusion is used. | |
| bool | m_explicitAdvection |
| Indicates if explicit or implicit treatment of advection is used. | |
| bool | m_explicitReaction |
| Indicates if explicit or implicit treatment of reaction is used. | |
| int | m_steadyStateSteps |
| Check for steady state at step interval. | |
| NekDouble | m_steadyStateTol |
| Tolerance to which steady state should be evaluated at. | |
| int | m_filtersInfosteps |
| Number of time steps between outputting filters information. | |
| std::vector< std::pair< std::string, FilterSharedPtr > > | m_filters |
| bool | m_homoInitialFwd |
| Flag to determine if simulation should start in homogeneous forward transformed state. | |
| std::ofstream | m_errFile |
| NekDouble | m_epsilon |
| Diffusion coefficient. | |
Protected Attributes inherited from Nektar::SolverUtils::EquationSystem | |
| LibUtilities::CommSharedPtr | m_comm |
| Communicator. | |
| bool | m_verbose |
| LibUtilities::SessionReaderSharedPtr | m_session |
| The session reader. | |
| std::map< std::string, SolverUtils::SessionFunctionSharedPtr > | m_sessionFunctions |
| Map of known SessionFunctions. | |
| LibUtilities::FieldIOSharedPtr | m_fld |
| Field input/output. | |
| Array< OneD, MultiRegions::ExpListSharedPtr > | m_fields |
| Array holding all dependent variables. | |
| SpatialDomains::BoundaryConditionsSharedPtr | m_boundaryConditions |
| Pointer to boundary conditions object. | |
| SpatialDomains::MeshGraphSharedPtr | m_graph |
| Pointer to graph defining mesh. | |
| std::string | m_sessionName |
| Name of the session. | |
| NekDouble | m_time |
| Current time of simulation. | |
| int | m_initialStep |
| Number of the step where the simulation should begin. | |
| NekDouble | m_fintime |
| Finish time of the simulation. | |
| NekDouble | m_timestep |
| Time step size. | |
| NekDouble | m_lambda |
| Lambda constant in real system if one required. | |
| NekDouble | m_checktime |
| Time between checkpoints. | |
| NekDouble | m_lastCheckTime |
| NekDouble | m_TimeIncrementFactor |
| int | m_nchk |
| Number of checkpoints written so far. | |
| int | m_steps |
| Number of steps to take. | |
| int | m_checksteps |
| Number of steps between checkpoints. | |
| int | m_infosteps |
| Number of time steps between outputting status information. | |
| int | m_iterPIT = 0 |
| Number of parallel-in-time time iteration. | |
| int | m_windowPIT = 0 |
| Index of windows for parallel-in-time time iteration. | |
| int | m_spacedim |
| Spatial dimension (>= expansion dim). | |
| int | m_expdim |
| Expansion dimension. | |
| bool | m_singleMode |
| Flag to determine if single homogeneous mode is used. | |
| bool | m_halfMode |
| Flag to determine if half homogeneous mode is used. | |
| bool | m_multipleModes |
| Flag to determine if use multiple homogenenous modes are used. | |
| bool | m_useFFT |
| Flag to determine if FFT is used for homogeneous transform. | |
| bool | m_homogen_dealiasing |
| Flag to determine if dealiasing is used for homogeneous simulations. | |
| bool | m_specHP_dealiasing |
| Flag to determine if dealisising is usde for the Spectral/hp element discretisation. | |
| enum MultiRegions::ProjectionType | m_projectionType |
| Type of projection; e.g continuous or discontinuous. | |
| Array< OneD, Array< OneD, NekDouble > > | m_traceNormals |
| Array holding trace normals for DG simulations in the forwards direction. | |
| Array< OneD, bool > | m_checkIfSystemSingular |
| Flag to indicate if the fields should be checked for singularity. | |
| LibUtilities::FieldMetaDataMap | m_fieldMetaDataMap |
| Map to identify relevant solver info to dump in output fields. | |
| Array< OneD, NekDouble > | m_movingFrameData |
| Moving reference frame status in the body frame X, Y, Z, Theta_x, Theta_y, Theta_z, [inertial] U, V, W, Omega_x, Omega_y, Omega_z, [body] A_x, A_y, A_z, DOmega_x, DOmega_y, DOmega_z, [body] pivot_x, pivot_y, pivot_z [body]. | |
| std::vector< std::string > | m_strFrameData |
| variable name in m_movingFrameData | |
| std::vector< bool > | m_movableDoFs |
| int | m_NumQuadPointsError |
| Number of Quadrature points used to work out the error. | |
| enum HomogeneousType | m_HomogeneousType |
| NekDouble | m_LhomX |
| physical length in X direction (if homogeneous) | |
| NekDouble | m_LhomY |
| physical length in Y direction (if homogeneous) | |
| NekDouble | m_LhomZ |
| physical length in Z direction (if homogeneous) | |
| int | m_npointsX |
| number of points in X direction (if homogeneous) | |
| int | m_npointsY |
| number of points in Y direction (if homogeneous) | |
| int | m_npointsZ |
| number of points in Z direction (if homogeneous) | |
| int | m_HomoDirec |
| number of homogenous directions | |
Protected Attributes inherited from Nektar::SolverUtils::ALEHelper | |
| Array< OneD, MultiRegions::ExpListSharedPtr > | m_fieldsALE |
| Array< OneD, Array< OneD, NekDouble > > | m_gridVelocity |
| Array< OneD, Array< OneD, NekDouble > > | m_gridVelocityTrace |
| std::vector< ALEBaseShPtr > | m_ALEs |
| bool | m_ALESolver = false |
| bool | m_meshDistorted = false |
| bool | m_implicitALESolver = false |
| bool | m_updateNormals = false |
| NekDouble | m_prevStageTime = 0.0 |
| int | m_spaceDim |
Friends | |
| class | MemoryManager< UnsteadyADR > |
Definition at line 70 of file UnsteadyADR.h.
|
protected |
Definition at line 73 of file UnsteadyADR.cpp.
|
overrideprotecteddefault |
|
inlinestatic |
Creates an instance of this class.
Definition at line 76 of file UnsteadyADR.h.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr().
|
protected |
Definition at line 258 of file UnsteadyADR.cpp.
|
protected |
Definition at line 157 of file UnsteadyADR.cpp.
References m_bwdTransOp, and m_fwdTransOp.
|
protected |
Project onto the solution space: a copy for DG, a forward and backward transform with the Dirichlet values at time for CG.
Definition at line 128 of file UnsteadyADR.cpp.
|
protected |
Definition at line 340 of file UnsteadyADR.cpp.
References m_advectionVel.
Referenced by v_InitObject().
|
protected |
Definition at line 394 of file UnsteadyADR.cpp.
References m_diffCoeff, and Nektar::SolverUtils::EquationSystem::m_session.
Referenced by v_InitObject().
|
protected |
Set the diffusion Coeff. the diff. coeff., diffCoeff_{ij} := \epslion * D_{ij} where, \epslion is scalar part D_{ij} is a 2D tensor for enforcing anisotropy Note, it is assumed that, diffCoeff_{ij} = diffCoeff_{ji}.
Let, Vec be a Vector<double> storing a flatten \diffCoeff_{ij}, then Case 1: For 1D Vec[0] = D_{00} Case 2: For 2D Vec[0] = D_{00} Vec[1] = D_{01} Vec[2] = D_{11} Case 3: For 3D Vec[0] = D_{00} Vec[1] = D_{01} Vec[2] = D_{11} Vec[3] = D_{02} Vec[4] = D_{12} Vec[5] = D_{22}
Definition at line 445 of file UnsteadyADR.cpp.
References ASSERTL0, Nektar::MultiRegions::GetBlockAttributes< double, FieldState::Phys >(), m_diffCoeff, m_diffusion, m_epsilon, m_implicitDiffusion, m_isTimeDependentDiffCoeff, Nektar::SolverUtils::EquationSystem::m_npointsZ, Nektar::SolverUtils::EquationSystem::m_session, Nektar::SolverUtils::EquationSystem::m_time, m_varDiffCoeff, and m_varDiffCoeffFunction.
Referenced by v_InitObject().
|
overrideprotectedvirtual |
Virtual function for generating summary information.
Reimplemented from Nektar::SolverUtils::EquationSystem.
Definition at line 103 of file UnsteadyADR.cpp.
References Nektar::SolverUtils::AddSummaryItem(), m_advection, m_diffusion, m_explicitAdvection, m_explicitDiffusion, and Nektar::SolverUtils::UnsteadySystem::v_GenerateSummary().
|
overrideprotected |
Offer the advection velocity to the Courant estimate.
Without advection this field is never constructed, and ComputeCFLInvTimeScale() skips the estimate when the returned field is not instantiated.
Definition at line 333 of file UnsteadyADR.cpp.
|
overrideprotected |
Project the solution to coefficients and return views of them.
Definition at line 653 of file UnsteadyADR.cpp.
|
overrideprotected |
Definition at line 498 of file UnsteadyADR.cpp.
References m_diffCoeff, and m_epsilon.
Referenced by v_InitObject().
|
overrideprotectedvirtual |
Initialisation object for the UnsteadyADR problem.
Load parameters from session
Create Fields for solution m_phys, m_coeff and others
Reimplemented from Nektar::SolverUtils::EquationSystem.
Definition at line 82 of file UnsteadyADR.cpp.
References LoadSessionParameters(), SetAdvectionVel(), SetDiffusionCoeff(), v_InitialiseOperators(), and Nektar::SolverUtils::UnsteadySystem::v_InitObject().
|
friend |
Definition at line 1 of file UnsteadyADR.h.
|
static |
Name of class.
Definition at line 87 of file UnsteadyADR.h.
|
static |
Definition at line 88 of file UnsteadyADR.h.
|
static |
Definition at line 89 of file UnsteadyADR.h.
|
protected |
Definition at line 103 of file UnsteadyADR.h.
Referenced by v_GenerateSummary().
|
protected |
Definition at line 123 of file UnsteadyADR.h.
|
protected |
Definition at line 111 of file UnsteadyADR.h.
Referenced by LoadSessionParameters().
|
protected |
Definition at line 124 of file UnsteadyADR.h.
|
protected |
Definition at line 117 of file UnsteadyADR.h.
Referenced by DoImplicit().
|
protected |
Definition at line 94 of file UnsteadyADR.h.
Referenced by SetAdvectionVel(), SetDiffusionCoeff(), and v_InitialiseOperators().
|
protected |
Definition at line 104 of file UnsteadyADR.h.
Referenced by SetDiffusionCoeff(), and v_GenerateSummary().
|
protected |
Definition at line 127 of file UnsteadyADR.h.
|
protected |
Definition at line 93 of file UnsteadyADR.h.
Referenced by SetDiffusionCoeff(), and v_InitialiseOperators().
|
protected |
Definition at line 105 of file UnsteadyADR.h.
Referenced by v_GenerateSummary().
|
protected |
Definition at line 106 of file UnsteadyADR.h.
Referenced by v_GenerateSummary().
|
protected |
Definition at line 131 of file UnsteadyADR.h.
|
protected |
Definition at line 119 of file UnsteadyADR.h.
Referenced by DoImplicit().
|
protected |
Definition at line 107 of file UnsteadyADR.h.
|
protected |
Definition at line 108 of file UnsteadyADR.h.
Referenced by SetDiffusionCoeff().
|
protected |
Definition at line 121 of file UnsteadyADR.h.
|
protected |
Definition at line 99 of file UnsteadyADR.h.
Referenced by SetDiffusionCoeff().
|
protected |
Definition at line 102 of file UnsteadyADR.h.
|
protected |
Definition at line 129 of file UnsteadyADR.h.
|
protected |
Definition at line 128 of file UnsteadyADR.h.
|
protected |
Definition at line 122 of file UnsteadyADR.h.
|
protected |
Definition at line 130 of file UnsteadyADR.h.
|
protected |
The advection velocity on the local trace, which the trace flux operator reads through a pointer; kept here so that it outlives it.
Definition at line 114 of file UnsteadyADR.h.
|
protected |
Definition at line 126 of file UnsteadyADR.h.
|
protected |
Definition at line 96 of file UnsteadyADR.h.
Referenced by SetDiffusionCoeff().
|
protected |
Definition at line 97 of file UnsteadyADR.h.
Referenced by SetDiffusionCoeff().
|
protected |
Definition at line 125 of file UnsteadyADR.h.