36#ifndef NEKTAR_SOLVERUTILS_FORCINGMOVINGREFERENCEFRAME
37#define NEKTAR_SOLVERUTILS_FORCINGMOVINGREFERENCEFRAME
49#include <boost/numeric/ublas/io.hpp>
50#include <boost/numeric/ublas/matrix.hpp>
51#include <boost/numeric/ublas/vector.hpp>
57namespace bn = boost::numeric;
74 std::map<int, NekDouble> motionPrescribed);
79 std::map<int, NekDouble> motionPrescribed);
114 const std::weak_ptr<EquationSystem> &pEquation,
116 const unsigned int &pNumForcingFields,
const TiXmlElement *pForce)
120 pSession, pEquation);
121 p->InitObject(pFields, pNumForcingFields, pForce);
131 const unsigned int &pNumForcingFields,
132 const TiXmlElement *pForce)
override;
205 const std::weak_ptr<EquationSystem> &pEquation);
210 std::map<int, NekDouble> &Dirs);
227 std::map<int, NekDouble> &Dirs);
233 const TiXmlElement *pForce);
#define SOLVER_UTILS_EXPORT
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
Defines a forcing term to be explicitly applied.
SOLVER_UTILS_EXPORT void v_PreApply(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble &time) override
Compute the moving frame velocity at given time.
void InitBodySolver(const TiXmlElement *pForce)
Array< OneD, NekDouble > m_velxyz
static std::string classNameBody
Name of the class.
Array< OneD, bool > m_hasVel
~ForcingMovingReferenceFrame(void) override
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
NekDouble EvaluateExpression(std::string expression)
Newmark_BetaSolver m_bodySolver
std::map< int, LibUtilities::EquationSharedPtr > m_frameVelFunction
void SolveBodyMotion(Array< OneD, Array< OneD, NekDouble > > &bodyVel, const Array< OneD, NekDouble > &forcebody, std::map< int, NekDouble > &Dirs)
unsigned int m_outputFrequency
void UpdateFluidInterface(Array< OneD, Array< OneD, NekDouble > > &bodyVel, const int step)
void UpdatePrescribed(const NekDouble &time, std::map< int, NekDouble > &Dirs)
ForcingMovingReferenceFrame(const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr< EquationSystem > &pEquation)
Array< OneD, NekDouble > m_omegaxyz
Array< OneD, NekDouble > extForceXYZ
void SetInitialConditions()
std::ofstream m_outputStream
Array< OneD, NekDouble > m_pivotPoint
Array< OneD, Array< OneD, NekDouble > > vel
SOLVER_UTILS_EXPORT void v_Apply(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble &time) override
Adds the body force, -Omega X u.
void LoadParameters(const TiXmlElement *pForce)
std::map< int, LibUtilities::EquationSharedPtr > extForceFunction
SOLVER_UTILS_EXPORT void v_InitObject(const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const unsigned int &pNumForcingFields, const TiXmlElement *pForce) override
Initialise the forcing module.
void UpdateFrameVelocity(const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time)
Updates the forcing array with the current required forcing.
Array< OneD, NekDouble > C
void UpdateBoundaryConditions(NekDouble time)
Set velocity boundary condition at the next time step.
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.
struct Nektar::SolverUtils::ForcingMovingReferenceFrame::@2 m_body
FilterAeroForcesSharedPtr aeroforceFilter
Array< OneD, bool > m_hasOmega
Array< OneD, Array< OneD, NekDouble > > m_coords
Array< OneD, NekDouble > M
Array< OneD, NekDouble > m_travelWave
Array< OneD, NekDouble > K
void InitialiseFilter(const LibUtilities::SessionReaderSharedPtr &pSession, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const TiXmlElement *pForce)
void SetNewmarkBeta(NekDouble beta, NekDouble gamma, NekDouble dt, Array< OneD, NekDouble > M, Array< OneD, NekDouble > C, Array< OneD, NekDouble > K, std::set< int > DirDoFs)
Array< OneD, Array< OneD, NekDouble > > m_K
void SolveFree(Array< OneD, Array< OneD, NekDouble > > u, Array< OneD, NekDouble > force)
std::vector< int > m_index
void SolvePrescribed(Array< OneD, Array< OneD, NekDouble > > u, std::map< int, NekDouble > motionPrescribed)
Array< OneD, Array< OneD, NekDouble > > m_Matrix
Array< OneD, Array< OneD, NekDouble > > m_C
void Solve(Array< OneD, Array< OneD, NekDouble > > u, Array< OneD, NekDouble > force, std::map< int, NekDouble > motionPrescribed)
Array< OneD, NekDouble > m_coeffs
Array< OneD, Array< OneD, NekDouble > > m_M
std::shared_ptr< SessionReader > SessionReaderSharedPtr
@ beta
Gauss Radau pinned at x=-1,.
std::shared_ptr< FilterAeroForces > FilterAeroForcesSharedPtr
SOLVER_UTILS_EXPORT typedef std::shared_ptr< Forcing > ForcingSharedPtr
A shared pointer to an EquationSystem object.