Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
VelocityCorrectionScheme.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File VelocityCorrectionScheme.h
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 // License for the specific language governing rights and limitations under
14 // Permission is hereby granted, free of charge, to any person obtaining a
15 // copy of this software and associated documentation files (the "Software"),
16 // to deal in the Software without restriction, including without limitation
17 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
18 // and/or sell copies of the Software, and to permit persons to whom the
19 // Software is furnished to do so, subject to the following conditions:
20 //
21 // The above copyright notice and this permission notice shall be included
22 // in all copies or substantial portions of the Software.
23 //
24 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
27 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
30 // DEALINGS IN THE SOFTWARE.
31 //
32 // Description: Velocity Correction Scheme header
33 //
34 ///////////////////////////////////////////////////////////////////////////////
35 
36 #ifndef NEKTAR_SOLVERS_VELOCITYCORRECTIONSCHEME_H
37 #define NEKTAR_SOLVERS_VELOCITYCORRECTIONSCHEME_H
38 
40 
41 namespace Nektar
42 {
44  {
45  public:
46 
47  /// Creates an instance of this class
49  const LibUtilities::SessionReaderSharedPtr& pSession) {
52  AllocateSharedPtr(pSession);
53  p->InitObject();
54  return p;
55  }
56 
57  /// Name of class
58  static std::string className;
59 
60  /// Constructor.
62 
63  virtual ~VelocityCorrectionScheme();
64 
65  virtual void v_InitObject();
66 
68  const Array<OneD, const Array<OneD, NekDouble> > &fields,
70  const NekDouble aii_Dt)
71  {
72  v_SetUpPressureForcing( fields, Forcing, aii_Dt);
73  }
74 
76  const Array<OneD, const Array<OneD, NekDouble> > &inarray,
78  const NekDouble aii_Dt)
79  {
80  v_SetUpViscousForcing( inarray, Forcing, aii_Dt);
81  }
82 
84  {
85  v_SolvePressure( Forcing);
86  }
87 
89  const Array<OneD, const Array<OneD, NekDouble> > &Forcing,
90  Array<OneD, Array<OneD, NekDouble> > &outarray,
91  const NekDouble aii_Dt)
92  {
93  v_SolveViscous( Forcing, outarray, aii_Dt);
94  }
95 
97  const Array<OneD, const Array<OneD, NekDouble> > &inarray,
98  Array<OneD, Array<OneD, NekDouble> > &outarray,
99  const NekDouble time,
100  const NekDouble a_iixDt);
101 
103  const Array<OneD, const Array<OneD, NekDouble> > &inarray,
104  Array<OneD, Array<OneD, NekDouble> > &outarray,
105  const NekDouble time)
106  {
107  v_EvaluateAdvection_SetPressureBCs( inarray, outarray, time);
108  }
109 
110  protected:
111  /// bool to identify if spectral vanishing viscosity is active.
113  /// bool to identify if spectral vanishing viscosity is active.
115  /// cutt off ratio from which to start decayhing modes
117  /// Diffusion coefficient of SVV modes
119  /// Diffusion coefficients (will be kinvis for velocities)
121 
122  /// Variable Coefficient map for the Laplacian which can be activated as part of SVV or otherwise
124 
125  // Virtual functions
127 
128  virtual void v_TransCoeffToPhys(void);
129 
130  virtual void v_TransPhysToCoeff(void);
131 
132  virtual void v_DoInitialise(void);
133 
135 
136  virtual int v_GetForceDimension();
137 
138  virtual void v_SetUpPressureForcing(
139  const Array<OneD, const Array<OneD, NekDouble> > &fields,
141  const NekDouble aii_Dt);
142 
143  virtual void v_SetUpViscousForcing(
144  const Array<OneD, const Array<OneD, NekDouble> > &inarray,
146  const NekDouble aii_Dt);
147 
148  virtual void v_SolvePressure( const Array<OneD, NekDouble> &Forcing);
149 
150  virtual void v_SolveViscous(
151  const Array<OneD, const Array<OneD, NekDouble> > &Forcing,
152  Array<OneD, Array<OneD, NekDouble> > &outarray,
153  const NekDouble aii_Dt);
154 
156  const Array<OneD, const Array<OneD, NekDouble> > &inarray,
157  Array<OneD, Array<OneD, NekDouble> > &outarray,
158  const NekDouble time);
159 
160  virtual bool v_RequireFwdTrans()
161  {
162  return false;
163  }
164 
165  virtual std::string v_GetExtrapolateStr(void)
166  {
167  return "Standard";
168  }
169 
170  virtual std::string v_GetSubSteppingExtrapolateStr(
171  const std::string &instr)
172  {
173  return instr;
174  }
175 
177 
178  private:
179 
180  };
181 
182  typedef boost::shared_ptr<VelocityCorrectionScheme>
184 
185 } //end of namespace
186 
187 
188 #endif //VELOCITY_CORRECTION_SCHEME_H
static SolverUtils::EquationSystemSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession)
Creates an instance of this class.
virtual Array< OneD, bool > v_GetSystemSingularChecks()
virtual void v_DoInitialise(void)
Sets up initial conditions.
void EvaluateAdvection_SetPressureBCs(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
void SolveUnsteadyStokesSystem(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time, const NekDouble a_iixDt)
void SolvePressure(const Array< OneD, NekDouble > &Forcing)
VelocityCorrectionScheme(const LibUtilities::SessionReaderSharedPtr &pSession)
Constructor.
std::vector< std::pair< std::string, std::string > > SummaryList
Definition: Misc.h:47
virtual void v_GenerateSummary(SolverUtils::SummaryList &s)
Print a summary of time stepping parameters.
bool m_useHomo1DSpecVanVisc
bool to identify if spectral vanishing viscosity is active.
NekDouble m_sVVDiffCoeff
Diffusion coefficient of SVV modes.
boost::shared_ptr< VelocityCorrectionScheme > VelocityCorrectionSchemeSharedPtr
virtual std::string v_GetSubSteppingExtrapolateStr(const std::string &instr)
virtual std::string v_GetExtrapolateStr(void)
static std::string className
Name of class.
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
Definition: MeshPartition.h:51
void SolveViscous(const Array< OneD, const Array< OneD, NekDouble > > &Forcing, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble aii_Dt)
void SetUpViscousForcing(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &Forcing, const NekDouble aii_Dt)
boost::shared_ptr< EquationSystem > EquationSystemSharedPtr
A shared pointer to an EquationSystem object.
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
Definition: StdRegions.hpp:227
virtual void v_SetUpViscousForcing(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &Forcing, const NekDouble aii_Dt)
void SetUpPressureForcing(const Array< OneD, const Array< OneD, NekDouble > > &fields, Array< OneD, Array< OneD, NekDouble > > &Forcing, const NekDouble aii_Dt)
virtual void v_TransCoeffToPhys(void)
Virtual function for transformation to physical space.
double NekDouble
virtual void v_SolvePressure(const Array< OneD, NekDouble > &Forcing)
Array< OneD, Array< OneD, NekDouble > > m_F
virtual void v_SolveViscous(const Array< OneD, const Array< OneD, NekDouble > > &Forcing, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble aii_Dt)
NekDouble m_sVVCutoffRatio
cutt off ratio from which to start decayhing modes
bool m_useSpecVanVisc
bool to identify if spectral vanishing viscosity is active.
Array< OneD, NekDouble > m_diffCoeff
Diffusion coefficients (will be kinvis for velocities)
virtual void v_TransPhysToCoeff(void)
Virtual function for transformation to coefficient space.
This class is the base class for Navier Stokes problems.
virtual void v_InitObject()
Init object for UnsteadySystem class.
Defines a forcing term to be explicitly applied.
Definition: Forcing.h:70
virtual void v_SetUpPressureForcing(const Array< OneD, const Array< OneD, NekDouble > > &fields, Array< OneD, Array< OneD, NekDouble > > &Forcing, const NekDouble aii_Dt)
virtual void v_EvaluateAdvection_SetPressureBCs(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
StdRegions::VarCoeffMap m_varCoeffLap
Variable Coefficient map for the Laplacian which can be activated as part of SVV or otherwise...