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 Public Member Functions inherited from Nektar::SolverUtils::Forcing | |
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 | Update (const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time) |
Updates the forcing array with the current required forcing. More... | |
void | UpdateRotMat () |
void | CheckForRestartTime (const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, NekDouble &time) |
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, const int dim, const int rank, const NekDouble time) |
void | SolveBodyMotion (Array< OneD, Array< OneD, NekDouble > > &bodyVel, const Array< OneD, NekDouble > &forcebody, std::map< int, NekDouble > &Dirs) |
void | LoadParameters (const TiXmlElement *pForce, const NekDouble time) |
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... | |
Friends | |
class | MemoryManager< ForcingMovingReferenceFrame > |
Additional Inherited Members | |
Public Member Functions inherited from Nektar::SolverUtils::Forcing | |
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 () |
Protected Attributes inherited from Nektar::SolverUtils::Forcing | |
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 100 of file ForcingMovingReferenceFrame.h.
|
private |
pSession | |
pEquation |
Definition at line 66 of file ForcingMovingReferenceFrame.cpp.
|
overrideprivate |
Definition at line 73 of file ForcingMovingReferenceFrame.cpp.
References m_outputStream, and m_rank.
|
private |
outarray = inarray0 + angVelScale Omega x inarray1
Definition at line 840 of file ForcingMovingReferenceFrame.cpp.
References ASSERTL0, m_hasOmega, m_omegaxyz, m_spacedim, Vmath::Svtvp(), and Vmath::Vcopy().
Referenced by v_Apply(), and v_PreApply().
|
private |
Definition at line 949 of file ForcingMovingReferenceFrame.cpp.
References Nektar::LibUtilities::FieldIO::CreateForFile(), Nektar::LibUtilities::eFunctionTypeFile, Nektar::SolverUtils::Forcing::m_session, Nektar::LibUtilities::NullFieldMetaDataMap, and Nektar::LibUtilities::PortablePath().
Referenced by v_InitObject().
|
inlinestatic |
Creates an instance of this class.
Definition at line 107 of file ForcingMovingReferenceFrame.h.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), Nektar::SolverUtils::ForcingSharedPtr, and CellMLToNektar.cellml_metadata::p.
|
private |
Definition at line 204 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 363 of file ForcingMovingReferenceFrame.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL0, Nektar::LibUtilities::beta, Nektar::eFULL, EvaluateExpression(), Nektar::ParseUtils::GenerateVector(), m_bodySolver, m_bodyVel, m_DirDoFs, m_disp, m_frameVelFunction, m_hasFreeMotion, m_hasOmega, m_hasVel, m_index, m_outputFrequency, m_outputStream, Nektar::SolverUtils::Forcing::m_session, m_spacedim, m_timestep, and Nektar::SolverUtils::Newmark_BetaSolver::SetNewmarkBeta().
Referenced by v_InitObject().
|
private |
Definition at line 996 of file ForcingMovingReferenceFrame.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL0, m_aeroforceFilter, and Nektar::SolverUtils::Forcing::m_equ.
Referenced by v_InitObject().
|
private |
Definition at line 221 of file ForcingMovingReferenceFrame.cpp.
References ASSERTL0, EvaluateExpression(), Nektar::ParseUtils::GenerateVector(), Nektar::NekConstants::kNekMachineEpsilon, m_disp, m_expdim, m_extForceFunction, m_frameVelFunction, m_hasOmega, m_hasRotation, m_hasVel, m_pivotPoint, Nektar::SolverUtils::Forcing::m_session, m_spacedim, and m_travelWave.
Referenced by v_InitObject().
|
private |
Definition at line 637 of file ForcingMovingReferenceFrame.cpp.
References Nektar::SolverUtils::FrameTransform::BodyToInerital(), m_bodySolver, m_extForceXYZ, m_frame, m_hasRotation, m_spacedim, m_timestep, Nektar::SolverUtils::FrameTransform::SetAngle(), Nektar::SolverUtils::Newmark_BetaSolver::Solve(), and Vmath::Vcopy().
Referenced by Update(), and UpdateBoundaryConditions().
|
private |
Updates the forcing array with the current required forcing.
pFields | |
time |
Definition at line 550 of file ForcingMovingReferenceFrame.cpp.
References ASSERTL0, CellMLToNektar.pycml::format, Nektar::SolverUtils::FrameTransform::IneritalToBody(), m_aeroforceFilter, m_bodyVel, m_DirDoFs, m_disp, Nektar::SolverUtils::Forcing::m_equ, m_extForceFunction, m_extForceXYZ, m_frame, m_frameVelFunction, m_hasFreeMotion, m_hasRotation, m_index, m_omegaXYZ, m_omegaxyz, m_outputFrequency, m_outputStream, m_rank, m_spacedim, m_startTime, m_travelWave, m_velXYZ, m_velxyz, Nektar::NullNekDouble1DArray, Nektar::SolverUtils::FrameTransform::SetAngle(), SolveBodyMotion(), and UpdateRotMat().
Referenced by v_PreApply().
|
private |
Set velocity boundary condition at the next time step.
Definition at line 741 of file ForcingMovingReferenceFrame.cpp.
References ASSERTL0, Nektar::SolverUtils::FrameTransform::IneritalToBody(), m_bodyVel, m_DirDoFs, m_disp, Nektar::SolverUtils::Forcing::m_equ, m_extForceFunction, m_extForceXYZ, m_frame, m_frameVelFunction, m_hasRotation, m_omegaXYZ, m_ProjMatZ, m_spacedim, m_timestep, m_travelWave, m_velXYZ, Nektar::SolverUtils::FrameTransform::SetAngle(), SolveBodyMotion(), UpdateRotMat(), and Vmath::Vcopy().
Referenced by v_Apply().
|
private |
Definition at line 702 of file ForcingMovingReferenceFrame.cpp.
References m_disp, and m_ProjMatZ.
Referenced by Update(), and UpdateBoundaryConditions().
|
overrideprotectedvirtual |
Adds the body force, -Omega X u.
fields | |
inarray | |
outarray | |
time |
Implements Nektar::SolverUtils::Forcing.
Definition at line 723 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 87 of file ForcingMovingReferenceFrame.cpp.
References ASSERTL0, CheckForRestartTime(), InitBodySolver(), InitialiseFilter(), LoadParameters(), m_coords, m_disp, Nektar::SolverUtils::Forcing::m_equ, m_expdim, m_extForceXYZ, m_hasFreeMotion, m_hasOmega, m_hasPlane0, m_hasRotation, m_hasVel, m_isH1d, m_isH2d, Nektar::SolverUtils::Forcing::m_NumVariable, m_omegaXYZ, m_omegaxyz, m_pivotPoint, m_ProjMatZ, m_rank, Nektar::SolverUtils::Forcing::m_session, m_spacedim, m_startTime, m_travelWave, m_velXYZ, m_velxyz, and Vmath::Sadd().
|
overrideprotectedvirtual |
Reimplemented from Nektar::SolverUtils::Forcing.
Definition at line 892 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(), Update(), Vmath::Vadd(), and Vmath::Vcopy().
|
friend |
Definition at line 97 of file ForcingMovingReferenceFrame.h.
|
static |
Name of the class.
Definition at line 121 of file ForcingMovingReferenceFrame.h.
|
private |
Definition at line 200 of file ForcingMovingReferenceFrame.h.
Referenced by InitialiseFilter(), and Update().
|
private |
Definition at line 197 of file ForcingMovingReferenceFrame.h.
Referenced by InitBodySolver(), and SolveBodyMotion().
|
private |
Definition at line 198 of file ForcingMovingReferenceFrame.h.
Referenced by InitBodySolver(), Update(), and UpdateBoundaryConditions().
|
private |
Definition at line 174 of file ForcingMovingReferenceFrame.h.
Referenced by v_InitObject(), and v_PreApply().
|
private |
Definition at line 199 of file ForcingMovingReferenceFrame.h.
Referenced by InitBodySolver(), Update(), and UpdateBoundaryConditions().
Definition at line 179 of file ForcingMovingReferenceFrame.h.
Referenced by InitBodySolver(), LoadParameters(), Update(), UpdateBoundaryConditions(), UpdateRotMat(), and v_InitObject().
|
private |
Definition at line 194 of file ForcingMovingReferenceFrame.h.
Referenced by LoadParameters(), and v_InitObject().
|
private |
Definition at line 151 of file ForcingMovingReferenceFrame.h.
Referenced by LoadParameters(), Update(), and UpdateBoundaryConditions().
Definition at line 176 of file ForcingMovingReferenceFrame.h.
Referenced by SolveBodyMotion(), Update(), UpdateBoundaryConditions(), and v_InitObject().
|
private |
Definition at line 147 of file ForcingMovingReferenceFrame.h.
Referenced by SolveBodyMotion(), Update(), and UpdateBoundaryConditions().
|
private |
Definition at line 150 of file ForcingMovingReferenceFrame.h.
Referenced by InitBodySolver(), LoadParameters(), Update(), and UpdateBoundaryConditions().
|
private |
Definition at line 192 of file ForcingMovingReferenceFrame.h.
Referenced by InitBodySolver(), Update(), and v_InitObject().
Definition at line 160 of file ForcingMovingReferenceFrame.h.
Referenced by addRotation(), InitBodySolver(), LoadParameters(), and v_InitObject().
|
private |
Definition at line 190 of file ForcingMovingReferenceFrame.h.
Referenced by v_InitObject(), and v_PreApply().
|
private |
Definition at line 188 of file ForcingMovingReferenceFrame.h.
Referenced by LoadParameters(), SolveBodyMotion(), Update(), UpdateBoundaryConditions(), v_Apply(), v_InitObject(), and v_PreApply().
Definition at line 159 of file ForcingMovingReferenceFrame.h.
Referenced by InitBodySolver(), LoadParameters(), v_InitObject(), and v_PreApply().
|
private |
Definition at line 195 of file ForcingMovingReferenceFrame.h.
Referenced by InitBodySolver(), and Update().
|
private |
Definition at line 189 of file ForcingMovingReferenceFrame.h.
Referenced by v_InitObject(), and v_PreApply().
|
private |
Definition at line 191 of file ForcingMovingReferenceFrame.h.
Referenced by v_InitObject(), and v_PreApply().
Definition at line 169 of file ForcingMovingReferenceFrame.h.
Referenced by Update(), UpdateBoundaryConditions(), and v_InitObject().
Definition at line 172 of file ForcingMovingReferenceFrame.h.
Referenced by addRotation(), Update(), and v_InitObject().
|
private |
Definition at line 196 of file ForcingMovingReferenceFrame.h.
Referenced by InitBodySolver(), and Update().
|
private |
Definition at line 152 of file ForcingMovingReferenceFrame.h.
Referenced by InitBodySolver(), Update(), and ~ForcingMovingReferenceFrame().
Definition at line 145 of file ForcingMovingReferenceFrame.h.
Referenced by LoadParameters(), and v_InitObject().
|
private |
Definition at line 183 of file ForcingMovingReferenceFrame.h.
Referenced by UpdateBoundaryConditions(), UpdateRotMat(), and v_InitObject().
|
private |
Definition at line 153 of file ForcingMovingReferenceFrame.h.
Referenced by Update(), v_InitObject(), and ~ForcingMovingReferenceFrame().
|
private |
Definition at line 193 of file ForcingMovingReferenceFrame.h.
Referenced by addRotation(), InitBodySolver(), LoadParameters(), SolveBodyMotion(), Update(), UpdateBoundaryConditions(), v_InitObject(), and v_PreApply().
|
private |
Definition at line 185 of file ForcingMovingReferenceFrame.h.
Referenced by Update(), and v_InitObject().
|
private |
Definition at line 186 of file ForcingMovingReferenceFrame.h.
Referenced by InitBodySolver(), SolveBodyMotion(), and UpdateBoundaryConditions().
Definition at line 146 of file ForcingMovingReferenceFrame.h.
Referenced by LoadParameters(), Update(), UpdateBoundaryConditions(), v_InitObject(), and v_PreApply().
Definition at line 163 of file ForcingMovingReferenceFrame.h.
Referenced by Update(), UpdateBoundaryConditions(), and v_InitObject().
Definition at line 166 of file ForcingMovingReferenceFrame.h.
Referenced by Update(), v_InitObject(), and v_PreApply().