Nektar++
|
Defines a forcing term to be explicitly applied. More...
#include <Forcing.h>
Public Member Functions | |
virtual SOLVER_UTILS_EXPORT | ~Forcing () |
SOLVER_UTILS_EXPORT void | InitObject (const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const unsigned int &pNumForcingFields, const TiXmlElement *pForce) |
Initialise the forcing object. More... | |
SOLVER_UTILS_EXPORT void | Apply (const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble &time) |
Apply the forcing. More... | |
SOLVER_UTILS_EXPORT void | PreApply (const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble &time) |
Change the advection velocity before applying the forcing. For example, subtracting the frame velocity from the advection velocity in the MovingRefercenceFrame. More... | |
SOLVER_UTILS_EXPORT void | ApplyCoeff (const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble &time) |
Apply the forcing. More... | |
SOLVER_UTILS_EXPORT const Array< OneD, const Array< OneD, NekDouble > > & | GetForces () |
SOLVER_UTILS_EXPORT Array< OneD, Array< OneD, NekDouble > > & | UpdateForces () |
Static Public Member Functions | |
static SOLVER_UTILS_EXPORT std::vector< ForcingSharedPtr > | Load (const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr< EquationSystem > &pEquation, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const unsigned int &pNumForcingFields=0) |
Protected Attributes | |
LibUtilities::SessionReaderSharedPtr | m_session |
Session reader. More... | |
const std::weak_ptr< EquationSystem > | m_equ |
Weak pointer to equation system using this forcing. More... | |
Array< OneD, Array< OneD, NekDouble > > | m_Forcing |
Evaluated forcing function. More... | |
int | m_NumVariable |
Number of variables. More... | |
std::map< std::string, SolverUtils::SessionFunctionSharedPtr > | m_sessionFunctions |
Map of known SessionFunctions. More... | |
|
inlinevirtual |
|
protected |
Constructor.
Definition at line 48 of file Forcing.cpp.
void Nektar::SolverUtils::Forcing::Apply | ( | const Array< OneD, MultiRegions::ExpListSharedPtr > & | fields, |
const Array< OneD, Array< OneD, NekDouble > > & | inarray, | ||
Array< OneD, Array< OneD, NekDouble > > & | outarray, | ||
const NekDouble & | time | ||
) |
Apply the forcing.
fields | Expansion lists corresponding to input arrays |
inarray | u^n from previous timestep |
outarray | output array to append forcing to |
Definition at line 66 of file Forcing.cpp.
References v_Apply().
void Nektar::SolverUtils::Forcing::ApplyCoeff | ( | const Array< OneD, MultiRegions::ExpListSharedPtr > & | fields, |
const Array< OneD, Array< OneD, NekDouble > > & | inarray, | ||
Array< OneD, Array< OneD, NekDouble > > & | outarray, | ||
const NekDouble & | time | ||
) |
Apply the forcing.
fields | Expansion lists corresponding to input arrays |
inarray | u^n from previous timestep |
outarray | output array to append forcing to |
Definition at line 107 of file Forcing.cpp.
References v_ApplyCoeff().
|
protected |
Definition at line 182 of file Forcing.cpp.
|
protected |
Definition at line 168 of file Forcing.cpp.
References ASSERTL0, and EvaluateTimeFunction().
Referenced by EvaluateTimeFunction(), Nektar::SolverUtils::ForcingBody::v_Apply(), and Nektar::SolverUtils::ForcingBody::v_ApplyCoeff().
const Nektar::Array< OneD, const Array< OneD, NekDouble > > & Nektar::SolverUtils::Forcing::GetForces | ( | ) |
Definition at line 163 of file Forcing.cpp.
References m_Forcing.
|
protected |
Get a SessionFunction by name.
Definition at line 192 of file Forcing.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), and m_sessionFunctions.
Referenced by Nektar::SolverUtils::ForcingAbsorption::CalcAbsorption(), Nektar::SolverUtils::ForcingAbsorption::CalculateForcing(), Nektar::SolverUtils::ForcingBody::Update(), Nektar::ForcingMovingBody::v_Apply(), Nektar::SolverUtils::ForcingAbsorption::v_InitObject(), and Nektar::ForcingQuasi1D::v_InitObject().
void Nektar::SolverUtils::Forcing::InitObject | ( | const Array< OneD, MultiRegions::ExpListSharedPtr > & | pFields, |
const unsigned int & | pNumForcingFields, | ||
const TiXmlElement * | pForce | ||
) |
Initialise the forcing object.
Definition at line 54 of file Forcing.cpp.
References v_InitObject().
|
static |
Definition at line 118 of file Forcing.cpp.
References Nektar::SolverUtils::GetForcingFactory(), and Nektar::LibUtilities::SessionReader::GetXMLElementTimeLevel().
Referenced by Nektar::IncNavierStokes::v_InitObject(), Nektar::AcousticSystem::v_InitObject(), Nektar::UnsteadyAdvection::v_InitObject(), Nektar::UnsteadyInviscidBurgers::v_InitObject(), Nektar::UnsteadyReactionDiffusion::v_InitObject(), Nektar::CompressibleFlowSystem::v_InitObject(), and Nektar::Dummy::v_InitObject().
void Nektar::SolverUtils::Forcing::PreApply | ( | const Array< OneD, MultiRegions::ExpListSharedPtr > & | fields, |
const Array< OneD, Array< OneD, NekDouble > > & | inarray, | ||
Array< OneD, Array< OneD, NekDouble > > & | outarray, | ||
const NekDouble & | time | ||
) |
Change the advection velocity before applying the forcing. For example, subtracting the frame velocity from the advection velocity in the MovingRefercenceFrame.
Definition at line 74 of file Forcing.cpp.
References v_PreApply().
Nektar::Array< OneD, Array< OneD, NekDouble > > & Nektar::SolverUtils::Forcing::UpdateForces | ( | ) |
|
protectedpure virtual |
Implemented in Nektar::SolverUtils::ForcingAbsorption, Nektar::SolverUtils::ForcingBody, Nektar::SolverUtils::ForcingMovingReferenceFrame, Nektar::SolverUtils::ForcingNoise, Nektar::SolverUtils::ForcingProgrammatic, Nektar::ForcingAxiSymmetric, Nektar::ForcingQuasi1D, Nektar::ForcingMovingBody, Nektar::ForcingStabilityCoupledLNS, Nektar::SolverUtils::ForcingSyntheticEddy, Nektar::SolverUtils::ForcingCFSSyntheticEddy, and Nektar::SolverUtils::ForcingIncNSSyntheticEddy.
Referenced by Apply().
|
protectedvirtual |
Reimplemented in Nektar::SolverUtils::ForcingAbsorption, Nektar::SolverUtils::ForcingBody, Nektar::SolverUtils::ForcingSyntheticEddy, and Nektar::SolverUtils::ForcingCFSSyntheticEddy.
Definition at line 217 of file Forcing.cpp.
References ASSERTL0.
Referenced by ApplyCoeff().
|
protectedpure virtual |
Implemented in Nektar::SolverUtils::ForcingAbsorption, Nektar::SolverUtils::ForcingBody, Nektar::SolverUtils::ForcingMovingReferenceFrame, Nektar::SolverUtils::ForcingNoise, Nektar::SolverUtils::ForcingProgrammatic, Nektar::SolverUtils::ForcingSyntheticEddy, Nektar::ForcingAxiSymmetric, Nektar::ForcingQuasi1D, Nektar::ForcingMovingBody, and Nektar::ForcingStabilityCoupledLNS.
Referenced by InitObject().
|
protectedvirtual |
Reimplemented in Nektar::SolverUtils::ForcingMovingReferenceFrame.
Definition at line 82 of file Forcing.cpp.
References Vmath::Vcopy().
Referenced by PreApply().
|
protected |
Weak pointer to equation system using this forcing.
Definition at line 117 of file Forcing.h.
Referenced by Nektar::SolverUtils::ForcingMovingReferenceFrame::InitialiseFilter(), Nektar::ForcingMovingBody::InitialiseFilter(), Nektar::SolverUtils::ForcingMovingReferenceFrame::UpdateFluidInterface(), Nektar::SolverUtils::ForcingMovingReferenceFrame::UpdateFrameVelocity(), and Nektar::SolverUtils::ForcingMovingReferenceFrame::v_InitObject().
Evaluated forcing function.
Definition at line 119 of file Forcing.h.
Referenced by Nektar::SolverUtils::ForcingAbsorption::CalculateForcing(), Nektar::SolverUtils::ForcingCFSSyntheticEddy::CalculateForcing(), Nektar::SolverUtils::ForcingIncNSSyntheticEddy::CalculateForcing(), GetForces(), Nektar::SolverUtils::ForcingSyntheticEddy::RemoveEddiesFromForcing(), Nektar::SolverUtils::ForcingBody::Update(), UpdateForces(), Nektar::SolverUtils::ForcingProgrammatic::UpdateForces(), Nektar::SolverUtils::ForcingAbsorption::v_Apply(), Nektar::SolverUtils::ForcingBody::v_Apply(), Nektar::SolverUtils::ForcingNoise::v_Apply(), Nektar::SolverUtils::ForcingProgrammatic::v_Apply(), Nektar::ForcingAxiSymmetric::v_Apply(), Nektar::ForcingQuasi1D::v_Apply(), Nektar::SolverUtils::ForcingCFSSyntheticEddy::v_Apply(), Nektar::SolverUtils::ForcingIncNSSyntheticEddy::v_Apply(), Nektar::SolverUtils::ForcingAbsorption::v_ApplyCoeff(), Nektar::SolverUtils::ForcingBody::v_ApplyCoeff(), Nektar::SolverUtils::ForcingCFSSyntheticEddy::v_ApplyCoeff(), Nektar::SolverUtils::ForcingAbsorption::v_InitObject(), Nektar::SolverUtils::ForcingBody::v_InitObject(), Nektar::SolverUtils::ForcingNoise::v_InitObject(), Nektar::SolverUtils::ForcingProgrammatic::v_InitObject(), Nektar::SolverUtils::ForcingSyntheticEddy::v_InitObject(), Nektar::ForcingAxiSymmetric::v_InitObject(), and Nektar::ForcingQuasi1D::v_InitObject().
|
protected |
Number of variables.
Definition at line 121 of file Forcing.h.
Referenced by Nektar::SolverUtils::ForcingAbsorption::CalcAbsorption(), Nektar::SolverUtils::ForcingAbsorption::CalculateForcing(), Nektar::SolverUtils::ForcingAbsorption::v_Apply(), Nektar::SolverUtils::ForcingNoise::v_Apply(), Nektar::SolverUtils::ForcingProgrammatic::v_Apply(), Nektar::ForcingAxiSymmetric::v_Apply(), Nektar::ForcingQuasi1D::v_Apply(), Nektar::SolverUtils::ForcingAbsorption::v_ApplyCoeff(), Nektar::SolverUtils::ForcingBody::v_ApplyCoeff(), Nektar::SolverUtils::ForcingAbsorption::v_InitObject(), Nektar::SolverUtils::ForcingBody::v_InitObject(), Nektar::SolverUtils::ForcingNoise::v_InitObject(), Nektar::SolverUtils::ForcingProgrammatic::v_InitObject(), Nektar::ForcingAxiSymmetric::v_InitObject(), and Nektar::ForcingQuasi1D::v_InitObject().
|
protected |
Session reader.
Definition at line 115 of file Forcing.h.
Referenced by Nektar::SolverUtils::ForcingAbsorption::CalcAbsorption(), Nektar::SolverUtils::ForcingAbsorption::CalculateForcing(), Nektar::SolverUtils::ForcingCFSSyntheticEddy::CalculateForcing(), Nektar::ForcingMovingBody::CheckIsFromFile(), Nektar::SolverUtils::ForcingMovingReferenceFrame::EvaluateExpression(), Nektar::ForcingMovingBody::EvaluateStructDynModel(), Nektar::SolverUtils::ForcingMovingReferenceFrame::InitBodySolver(), Nektar::ForcingMovingBody::InitialiseCableModel(), Nektar::SolverUtils::ForcingMovingReferenceFrame::LoadParameters(), Nektar::ForcingMovingBody::Newmark_betaSolver(), Nektar::ForcingMovingBody::SetDynEqCoeffMatrix(), Nektar::SolverUtils::ForcingMovingReferenceFrame::SetInitialConditions(), Nektar::SolverUtils::ForcingBody::Update(), Nektar::SolverUtils::ForcingSyntheticEddy::UpdateEddiesPositions(), Nektar::ForcingMovingBody::v_Apply(), Nektar::SolverUtils::ForcingAbsorption::v_InitObject(), Nektar::SolverUtils::ForcingBody::v_InitObject(), Nektar::SolverUtils::ForcingMovingReferenceFrame::v_InitObject(), Nektar::SolverUtils::ForcingNoise::v_InitObject(), Nektar::SolverUtils::ForcingSyntheticEddy::v_InitObject(), Nektar::ForcingAxiSymmetric::v_InitObject(), Nektar::ForcingQuasi1D::v_InitObject(), and Nektar::ForcingMovingBody::v_InitObject().
|
protected |
Map of known SessionFunctions.
Definition at line 124 of file Forcing.h.
Referenced by GetFunction().