Nektar++
|
#include <ForcingMovingReferenceFrame.h>
Static Public Member Functions | |
static SOLVER_UTILS_EXPORT ForcingSharedPtr | create (const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr< EquationSystem > &pEquation, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const unsigned int &pNumForcingFields, const TiXmlElement *pForce) |
Creates an instance of this class. More... | |
![]() | |
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) |
Static Public Attributes | |
static std::string | classNameBody |
Name of the class. More... | |
Private Member Functions | |
ForcingMovingReferenceFrame (const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr< EquationSystem > &pEquation) | |
~ForcingMovingReferenceFrame (void) override | |
void | UpdatePrescribed (const NekDouble &time, std::map< int, NekDouble > &Dirs) |
void | UpdateFrameVelocity (const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time) |
Updates the forcing array with the current required forcing. More... | |
void | UpdateFluidInterface (Array< OneD, Array< OneD, NekDouble > > &bodyVel, const int step) |
void | SetInitialConditions () |
void | SetInitialConditions (std::map< int, NekDouble > &Dirs) |
void | addRotation (int npoints, const Array< OneD, Array< OneD, NekDouble > > &inarray0, NekDouble angVelScale, const Array< OneD, Array< OneD, NekDouble > > &inarray1, Array< OneD, Array< OneD, NekDouble > > &outarray) |
outarray = inarray0 + angVelScale Omega x inarray1 More... | |
void | InitBodySolver (const TiXmlElement *pForce) |
void | SolveBodyMotion (Array< OneD, Array< OneD, NekDouble > > &bodyVel, const Array< OneD, NekDouble > &forcebody, std::map< int, NekDouble > &Dirs) |
void | LoadParameters (const TiXmlElement *pForce) |
NekDouble | EvaluateExpression (std::string expression) |
void | InitialiseFilter (const LibUtilities::SessionReaderSharedPtr &pSession, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const TiXmlElement *pForce) |
void | UpdateBoundaryConditions (NekDouble time) |
Set velocity boundary condition at the next time step. More... | |
Private Attributes | |
Array< OneD, NekDouble > | m_pivotPoint |
Array< OneD, NekDouble > | m_travelWave |
FrameTransform | m_frame |
std::map< int, LibUtilities::EquationSharedPtr > | m_frameVelFunction |
std::ofstream | m_outputStream |
bool | m_isRoot |
Array< OneD, bool > | m_hasVel |
Array< OneD, bool > | m_hasOmega |
bool | m_hasRotation |
Array< OneD, NekDouble > | m_velxyz |
Array< OneD, NekDouble > | m_omegaxyz |
Array< OneD, Array< OneD, NekDouble > > | m_coords |
NekDouble | m_currentTime |
NekDouble | m_timestep |
bool | m_isH1d |
bool | m_hasPlane0 |
bool | m_isH2d |
int32_t | m_spacedim |
int32_t | m_expdim |
unsigned int | m_index |
unsigned int | m_outputFrequency |
struct { | |
Array< OneD, Array< OneD, NekDouble > > vel | |
bool hasFreeMotion | |
std::set< int > dirDoFs | |
bool isCircular | |
FilterAeroForcesSharedPtr aeroforceFilter | |
std::map< int, LibUtilities::EquationSharedPtr > extForceFunction | |
Array< OneD, NekDouble > extForceXYZ | |
Array< OneD, NekDouble > M | |
Array< OneD, NekDouble > C | |
Array< OneD, NekDouble > K | |
} | m_body |
Newmark_BetaSolver | m_bodySolver |
Friends | |
class | MemoryManager< ForcingMovingReferenceFrame > |
Additional Inherited Members | |
![]() | |
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 () |
![]() | |
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... | |
Definition at line 105 of file ForcingMovingReferenceFrame.h.
|
private |
pSession | |
pEquation |
Definition at line 65 of file ForcingMovingReferenceFrame.cpp.
|
overrideprivate |
Definition at line 72 of file ForcingMovingReferenceFrame.cpp.
References m_isRoot, and m_outputStream.
|
private |
outarray = inarray0 + angVelScale Omega x inarray1
Definition at line 771 of file ForcingMovingReferenceFrame.cpp.
References ASSERTL0, m_hasOmega, m_omegaxyz, m_spacedim, Vmath::Svtvp(), and Vmath::Vcopy().
Referenced by v_Apply(), and v_PreApply().
|
inlinestatic |
Creates an instance of this class.
Definition at line 112 of file ForcingMovingReferenceFrame.h.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), Nektar::SolverUtils::ForcingSharedPtr, and CellMLToNektar.cellml_metadata::p.
|
private |
Definition at line 170 of file ForcingMovingReferenceFrame.cpp.
References Nektar::ErrorUtil::efatal, Nektar::LibUtilities::Equation::Evaluate(), Nektar::SolverUtils::Forcing::m_session, and NEKERROR.
Referenced by InitBodySolver(), and LoadParameters().
|
private |
Definition at line 381 of file ForcingMovingReferenceFrame.cpp.
References ASSERTL0, Nektar::LibUtilities::beta, EvaluateExpression(), Nektar::ParseUtils::GenerateVector(), m_body, m_bodySolver, m_hasOmega, m_hasRotation, m_hasVel, Nektar::SolverUtils::Forcing::m_session, m_spacedim, m_timestep, SetInitialConditions(), Nektar::SolverUtils::Newmark_BetaSolver::SetNewmarkBeta(), and UpdateFluidInterface().
Referenced by v_InitObject().
|
private |
Definition at line 983 of file ForcingMovingReferenceFrame.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL0, m_body, and Nektar::SolverUtils::Forcing::m_equ.
Referenced by v_InitObject().
|
private |
Definition at line 187 of file ForcingMovingReferenceFrame.cpp.
References ASSERTL0, EvaluateExpression(), Nektar::ParseUtils::GenerateVector(), Nektar::NekConstants::kNekMachineEpsilon, m_body, m_frameVelFunction, m_hasOmega, m_hasRotation, m_hasVel, m_isRoot, m_outputFrequency, m_outputStream, m_pivotPoint, Nektar::SolverUtils::Forcing::m_session, m_spacedim, and m_travelWave.
Referenced by v_InitObject().
|
private |
Definition at line 883 of file ForcingMovingReferenceFrame.cpp.
References Nektar::LibUtilities::FieldIO::CreateForFile(), Nektar::LibUtilities::eFunctionTypeFile, m_body, Nektar::SolverUtils::Forcing::m_session, m_spacedim, Nektar::LibUtilities::NullFieldMetaDataMap, Nektar::LibUtilities::PortablePath(), SetInitialConditions(), and UpdatePrescribed().
Referenced by InitBodySolver(), SetInitialConditions(), and UpdateFrameVelocity().
|
private |
Definition at line 961 of file ForcingMovingReferenceFrame.cpp.
References m_body.
|
private |
Definition at line 658 of file ForcingMovingReferenceFrame.cpp.
References Nektar::SolverUtils::FrameTransform::BodyToInerital(), m_body, m_bodySolver, m_frame, m_hasRotation, m_spacedim, Nektar::SolverUtils::FrameTransform::SetAngle(), Nektar::SolverUtils::Newmark_BetaSolver::Solve(), Nektar::SolverUtils::Newmark_BetaSolver::SolveFree(), Nektar::SolverUtils::Newmark_BetaSolver::SolvePrescribed(), and Vmath::Vcopy().
Referenced by UpdateFrameVelocity().
|
private |
Set velocity boundary condition at the next time step.
Definition at line 751 of file ForcingMovingReferenceFrame.cpp.
References m_body, m_bodySolver, m_timestep, Nektar::SolverUtils::Newmark_BetaSolver::SolvePrescribed(), UpdateFluidInterface(), UpdatePrescribed(), and Vmath::Vcopy().
Referenced by v_Apply().
|
private |
Definition at line 621 of file ForcingMovingReferenceFrame.cpp.
References ASSERTL0, Nektar::SolverUtils::FrameTransform::IneritalToBody(), m_body, Nektar::SolverUtils::Forcing::m_equ, m_frame, m_hasRotation, m_spacedim, Nektar::SolverUtils::FrameTransform::SetAngle(), and vel.
Referenced by InitBodySolver(), UpdateBoundaryConditions(), and UpdateFrameVelocity().
|
private |
Updates the forcing array with the current required forcing.
pFields | |
time |
Definition at line 556 of file ForcingMovingReferenceFrame.cpp.
References ASSERTL0, CellMLToNektar.pycml::format, Nektar::SolverUtils::FrameTransform::IneritalToBody(), m_body, m_currentTime, Nektar::SolverUtils::Forcing::m_equ, m_frame, m_hasRotation, m_index, m_isRoot, m_omegaxyz, m_outputFrequency, m_outputStream, m_spacedim, m_velxyz, Nektar::NullNekDouble1DArray, Nektar::SolverUtils::FrameTransform::SetAngle(), SetInitialConditions(), SolveBodyMotion(), UpdateFluidInterface(), and UpdatePrescribed().
Referenced by v_PreApply().
|
private |
Definition at line 508 of file ForcingMovingReferenceFrame.cpp.
References m_body, m_frameVelFunction, and m_spacedim.
Referenced by SetInitialConditions(), UpdateBoundaryConditions(), and UpdateFrameVelocity().
|
overrideprotectedvirtual |
Adds the body force, -Omega X u.
fields | |
inarray | |
outarray | |
time |
Implements Nektar::SolverUtils::Forcing.
Definition at line 733 of file ForcingMovingReferenceFrame.cpp.
References addRotation(), m_hasRotation, and UpdateBoundaryConditions().
|
overrideprotectedvirtual |
Initialise the forcing module.
pFields | |
pNumForcingFields | |
pForce |
Implements Nektar::SolverUtils::Forcing.
Definition at line 86 of file ForcingMovingReferenceFrame.cpp.
References ASSERTL0, InitBodySolver(), InitialiseFilter(), LoadParameters(), m_body, m_coords, m_currentTime, Nektar::SolverUtils::Forcing::m_equ, m_expdim, m_hasOmega, m_hasPlane0, m_hasRotation, m_hasVel, m_index, m_isH1d, m_isH2d, m_isRoot, m_omegaxyz, m_pivotPoint, Nektar::SolverUtils::Forcing::m_session, m_spacedim, m_travelWave, m_velxyz, and Vmath::Sadd().
|
overrideprotectedvirtual |
Compute the moving frame velocity at given time.
Reimplemented from Nektar::SolverUtils::Forcing.
Definition at line 826 of file ForcingMovingReferenceFrame.cpp.
References addRotation(), m_coords, m_hasPlane0, m_hasRotation, m_hasVel, m_isH1d, m_isH2d, m_spacedim, m_travelWave, m_velxyz, Vmath::Sadd(), UpdateFrameVelocity(), Vmath::Vadd(), and Vmath::Vcopy().
|
friend |
Definition at line 102 of file ForcingMovingReferenceFrame.h.
FilterAeroForcesSharedPtr Nektar::SolverUtils::ForcingMovingReferenceFrame::aeroforceFilter |
Definition at line 193 of file ForcingMovingReferenceFrame.h.
Definition at line 198 of file ForcingMovingReferenceFrame.h.
|
static |
Name of the class.
Definition at line 126 of file ForcingMovingReferenceFrame.h.
std::set<int> Nektar::SolverUtils::ForcingMovingReferenceFrame::dirDoFs |
Definition at line 190 of file ForcingMovingReferenceFrame.h.
std::map<int, LibUtilities::EquationSharedPtr> Nektar::SolverUtils::ForcingMovingReferenceFrame::extForceFunction |
Definition at line 195 of file ForcingMovingReferenceFrame.h.
Definition at line 196 of file ForcingMovingReferenceFrame.h.
bool Nektar::SolverUtils::ForcingMovingReferenceFrame::hasFreeMotion |
Definition at line 189 of file ForcingMovingReferenceFrame.h.
bool Nektar::SolverUtils::ForcingMovingReferenceFrame::isCircular |
Definition at line 191 of file ForcingMovingReferenceFrame.h.
Definition at line 199 of file ForcingMovingReferenceFrame.h.
Definition at line 197 of file ForcingMovingReferenceFrame.h.
struct { ... } Nektar::SolverUtils::ForcingMovingReferenceFrame::m_body |
|
private |
Definition at line 201 of file ForcingMovingReferenceFrame.h.
Referenced by InitBodySolver(), SolveBodyMotion(), and UpdateBoundaryConditions().
|
private |
Definition at line 173 of file ForcingMovingReferenceFrame.h.
Referenced by v_InitObject(), and v_PreApply().
|
private |
Definition at line 175 of file ForcingMovingReferenceFrame.h.
Referenced by UpdateFrameVelocity(), and v_InitObject().
|
private |
Definition at line 182 of file ForcingMovingReferenceFrame.h.
Referenced by v_InitObject().
|
private |
Definition at line 152 of file ForcingMovingReferenceFrame.h.
Referenced by SolveBodyMotion(), UpdateFluidInterface(), and UpdateFrameVelocity().
|
private |
Definition at line 155 of file ForcingMovingReferenceFrame.h.
Referenced by LoadParameters(), and UpdatePrescribed().
Definition at line 164 of file ForcingMovingReferenceFrame.h.
Referenced by addRotation(), InitBodySolver(), LoadParameters(), and v_InitObject().
|
private |
Definition at line 179 of file ForcingMovingReferenceFrame.h.
Referenced by v_InitObject(), and v_PreApply().
|
private |
Definition at line 165 of file ForcingMovingReferenceFrame.h.
Referenced by InitBodySolver(), LoadParameters(), SolveBodyMotion(), UpdateFluidInterface(), UpdateFrameVelocity(), v_Apply(), v_InitObject(), and v_PreApply().
Definition at line 163 of file ForcingMovingReferenceFrame.h.
Referenced by InitBodySolver(), LoadParameters(), v_InitObject(), and v_PreApply().
|
private |
Definition at line 183 of file ForcingMovingReferenceFrame.h.
Referenced by UpdateFrameVelocity(), and v_InitObject().
|
private |
Definition at line 178 of file ForcingMovingReferenceFrame.h.
Referenced by v_InitObject(), and v_PreApply().
|
private |
Definition at line 180 of file ForcingMovingReferenceFrame.h.
Referenced by v_InitObject(), and v_PreApply().
|
private |
Definition at line 157 of file ForcingMovingReferenceFrame.h.
Referenced by LoadParameters(), UpdateFrameVelocity(), v_InitObject(), and ~ForcingMovingReferenceFrame().
Definition at line 171 of file ForcingMovingReferenceFrame.h.
Referenced by addRotation(), UpdateFrameVelocity(), and v_InitObject().
|
private |
Definition at line 184 of file ForcingMovingReferenceFrame.h.
Referenced by LoadParameters(), and UpdateFrameVelocity().
|
private |
Definition at line 156 of file ForcingMovingReferenceFrame.h.
Referenced by LoadParameters(), UpdateFrameVelocity(), and ~ForcingMovingReferenceFrame().
Definition at line 150 of file ForcingMovingReferenceFrame.h.
Referenced by LoadParameters(), and v_InitObject().
|
private |
Definition at line 181 of file ForcingMovingReferenceFrame.h.
Referenced by addRotation(), InitBodySolver(), LoadParameters(), SetInitialConditions(), SolveBodyMotion(), UpdateFluidInterface(), UpdateFrameVelocity(), UpdatePrescribed(), v_InitObject(), and v_PreApply().
|
private |
Definition at line 176 of file ForcingMovingReferenceFrame.h.
Referenced by InitBodySolver(), and UpdateBoundaryConditions().
Definition at line 151 of file ForcingMovingReferenceFrame.h.
Referenced by LoadParameters(), v_InitObject(), and v_PreApply().
Definition at line 168 of file ForcingMovingReferenceFrame.h.
Referenced by UpdateFrameVelocity(), v_InitObject(), and v_PreApply().
Definition at line 188 of file ForcingMovingReferenceFrame.h.
Referenced by UpdateFluidInterface().