Nektar++
Loading...
Searching...
No Matches
VCSFSI.cpp
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: VCSFSI.cpp
4//
5// For more information, please see: http://www.nektar.info
6//
7// The MIT License
8//
9// Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10// Department of Aeronautics, Imperial College London (UK), and Scientific
11// Computing and Imaging Institute, University of Utah (USA).
12//
13// Permission is hereby granted, free of charge, to any person obtaining a
14// copy of this software and associated documentation files (the "Software"),
15// to deal in the Software without restriction, including without limitation
16// the rights to use, copy, modify, merge, publish, distribute, sublicense,
17// and/or sell copies of the Software, and to permit persons to whom the
18// Software is furnished to do so, subject to the following conditions:
19//
20// The above copyright notice and this permission notice shall be included
21// in all copies or substantial portions of the Software.
22//
23// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29// DEALINGS IN THE SOFTWARE.
30//
31// Description: Velocity Correction Scheme for fluid-structure interaction
32///////////////////////////////////////////////////////////////////////////////
33
37
38#include <boost/algorithm/string.hpp>
39
40namespace Nektar
41{
42std::string VCSFSI::className =
44 "VCSFSI", VCSFSI::create);
45
48 eVCSFSI);
49
50/**
51 * Constructor. Creates ...
52 *
53 * \param
54 * \param
55 */
58 : UnsteadySystem(pSession, pGraph),
59 VelocityCorrectionScheme(pSession, pGraph)
60{
61}
62
70
71/**
72 * Destructor
73 */
75{
76}
77
78void VCSFSI::v_DoInitialise(bool dumpInitialConditions)
79{
81 VelocityCorrectionScheme::v_DoInitialise(dumpInitialConditions);
82 Array<OneD, NekDouble> AddedMass;
84 Array<OneD, NekDouble> aeroforce(12, 0.);
85 InitialiseFilter(aeroforce);
86 m_rigidSolver.SetOldFvis(aeroforce);
87}
88
90{
92 {
93 return;
94 }
95 std::map<std::string, std::string> vParams;
97 vParams["OutputFile"] = ".dummyMRFForceFile";
100 m_session, shared_from_this(), vParams);
101 m_aeroforceFilter->Initialise(m_fields, 0.0);
103 GetAeroForce(aeroforce);
104}
105
107{
108 // call rigid solver
109 Array<OneD, NekDouble> aeroforce(12, 0.);
111 {
112 m_pressure->BwdTrans(m_pressure->GetCoeffs(), m_pressure->UpdatePhys());
114 GetAeroForce(aeroforce);
115 }
116 // 0-5 pressure force at n+1; 6-11 viscous force at n
118 // update velocity boundary condition
119 UpdateVelocityBCs(time);
120}
121
122} // namespace Nektar
MultiRegions::ExpListSharedPtr m_pressure
Pointer to field holding pressure field.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
static std::string RegisterEnumValue(std::string pEnum, std::string pString, int pEnumValue)
Registers an enumeration value.
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
void SetNewmarkBetaSolver(Array< OneD, NekDouble > &AddedMass)
void InitObject(const LibUtilities::SessionReaderSharedPtr session, const MultiRegions::ExpListSharedPtr &pField, Array< OneD, NekDouble > pivot)
void SetMovableDoFs(std::vector< bool > &moveDoFs)
void SetOldFvis(Array< OneD, NekDouble > force)
void SetInitialConditions(const LibUtilities::SessionReaderSharedPtr session, Array< OneD, NekDouble > MRFData)
void GetFilterInfo(const LibUtilities::SessionReaderSharedPtr session, std::map< std::string, std::string > &vParams)
void UpdateFrameVelocity(Array< OneD, NekDouble > &aeroforce, const NekDouble &time, Array< OneD, NekDouble > &MRFData)
Updates the forcing array with the current required forcing.
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
Array< OneD, NekDouble > m_movingFrameData
Moving reference frame status in the body frame X, Y, Z, Theta_x, Theta_y, Theta_z,...
SOLVER_UTILS_EXPORT void GetAeroForce(Array< OneD, NekDouble > forces)
Get aerodynamic force and moment.
Base class for unsteady solvers.
void InitialiseFilter(Array< OneD, NekDouble > aeroforce)
Definition VCSFSI.cpp:89
static std::string solverTypeLookupId
Definition VCSFSI.h:69
void v_DoInitialise(bool dumpInitialConditions=true) override
Sets up initial conditions.
Definition VCSFSI.cpp:78
VCSFSI(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
Constructor.
Definition VCSFSI.cpp:56
SolverUtils::FilterAeroForcesSharedPtr m_aeroforceFilter
Definition VCSFSI.h:80
~VCSFSI() override
Definition VCSFSI.cpp:74
void v_InitObject(bool DeclareField=true) override
Initialisation object for EquationSystem.
Definition VCSFSI.cpp:63
RigidSolver m_rigidSolver
Definition VCSFSI.h:79
void v_SolveSolid(NekDouble time) override
Definition VCSFSI.cpp:106
static std::string className
Name of class.
Definition VCSFSI.h:58
static SolverUtils::EquationSystemSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
Creates an instance of this class.
Definition VCSFSI.h:47
void v_InitObject(bool DeclareField=true) override
Initialisation object for EquationSystem.
void v_DoInitialise(bool dumpInitialConditions=true) override
Sets up initial conditions.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
EquationSystemFactory & GetEquationSystemFactory()
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
Definition MeshGraph.h:224
static Array< OneD, NekDouble > NullNekDouble1DArray