Plugins
incompressible_navier_stokes_base.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010-2017: G-CSC, Goethe University Frankfurt
3  * Author: Andreas Vogel
4  *
5  * This file is part of UG4.
6  *
7  * UG4 is free software: you can redistribute it and/or modify it under the
8  * terms of the GNU Lesser General Public License version 3 (as published by the
9  * Free Software Foundation) with the following additional attribution
10  * requirements (according to LGPL/GPL v3 §7):
11  *
12  * (1) The following notice must be displayed in the Appropriate Legal Notices
13  * of covered and combined works: "Based on UG4 (www.ug4.org/license)".
14  *
15  * (2) The following notice must be displayed at a prominent place in the
16  * terminal output of covered works: "Based on UG4 (www.ug4.org/license)".
17  *
18  * (3) The following bibliography is recommended for citation and must be
19  * preserved in all covered files:
20  * "Reiter, S., Vogel, A., Heppner, I., Rupp, M., and Wittum, G. A massively
21  * parallel geometric multigrid solver on hierarchically distributed grids.
22  * Computing and visualization in science 16, 4 (2013), 151-164"
23  * "Vogel, A., Reiter, S., Rupp, M., Nägel, A., and Wittum, G. UG4 -- a novel
24  * flexible software system for simulating pde based models on high performance
25  * computers. Computing and visualization in science 16, 4 (2013), 165-179"
26  *
27  * This program is distributed in the hope that it will be useful,
28  * but WITHOUT ANY WARRANTY; without even the implied warranty of
29  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30  * GNU Lesser General Public License for more details.
31  */
32 
33 #ifndef __H__UG__PLUGINS__NAVIER_STOKES__INCOMPRESSIBLE__INCOMPRESSIBLE_NAVIER_STOKES_BASE__
34 #define __H__UG__PLUGINS__NAVIER_STOKES__INCOMPRESSIBLE__INCOMPRESSIBLE_NAVIER_STOKES_BASE__
35 
36 // other ug4 modules
37 #include "common/common.h"
38 #include "lib_grid/lg_base.h"
39 
40 // library intern headers
44 
45 #include "../navier_stokes_base.h"
46 
47 namespace ug{
48 namespace NavierStokes{
49 
52 
54 
143 template< typename TDomain>
145  : public NavierStokesBase<TDomain>
146 {
147  protected:
150 
153 
154  public:
156  static const int dim = base_type::dim;
157 
158  public:
161  IncompressibleNavierStokesBase(const char* functions, const char* subsets);
162  IncompressibleNavierStokesBase(const std::vector<std::string>& vFct, const std::vector<std::string>& vSubset);
164 
166 
173 
176 
178 
185  void set_density(number val);
186 #ifdef UG_FOR_LUA
187  void set_density(const char* fctName);
188 #endif
190 
193 
195 
200  virtual void set_source(SmartPtr<CplUserData<MathVector<dim>, dim> > user) = 0;
201 
203 
206  void set_stokes(bool Stokes) {m_bStokes = Stokes;}
207  bool stokes() {return m_bStokes;}
208 
210 
221  void set_laplace(bool bLaplace) {m_bLaplace = bLaplace;}
222  bool laplace() {return m_bLaplace;}
223 
225  void set_peclet_blend(bool pecletBlend) {m_bPecletBlend = pecletBlend;}
226 
227  void set_grad_div(number factor){ m_gradDivFactor = factor; }
228 
229  public:
231  virtual bool requests_local_time_series() {return true;}
232 
234  virtual std::string disc_type() const = 0;
235 
238 
241 
242  protected:
245 
248 
251 
253  bool m_bStokes;
254 
257 
260 
263 };
264 
266 
267 } // namespace NavierStokes
268 } // end namespace ug
269 
270 #endif /*__H__UG__PLUGINS__NAVIER_STOKES__INCOMPRESSIBLE__INCOMPRESSIBLE_NAVIER_STOKES_BASE__*/
271 
function NavierStokes(fcts, subsets, discType)
Finite Volume Element Discretization for the incompressible Navier-Stokes Equation.
Definition: incompressible_navier_stokes_base.h:146
void set_grad_div(number factor)
flag if using Peclet Blending
Definition: incompressible_navier_stokes_base.h:227
SmartPtr< DataExport< MathMatrix< dim, dim >, dim > > m_exVelocityGrad
Export for the velocity gradient.
Definition: incompressible_navier_stokes_base.h:262
SmartPtr< CplUserData< MathVector< dim >, dim > > velocity()
returns the export of the velocity
Definition: incompressible_navier_stokes_base.h:237
void set_peclet_blend(bool pecletBlend)
sets if peclet blending is used in momentum equation
Definition: incompressible_navier_stokes_base.h:225
NavierStokesBase< TDomain > base_type
Base class type.
Definition: incompressible_navier_stokes_base.h:149
void set_stokes(bool Stokes)
switches the convective terms off (to solve the Stokes equation)
Definition: incompressible_navier_stokes_base.h:206
virtual bool requests_local_time_series()
returns if local time series is needed
Definition: incompressible_navier_stokes_base.h:231
virtual void set_kinematic_viscosity(SmartPtr< CplUserData< number, dim > > user)=0
sets the kinematic viscosity
SmartPtr< CplUserData< MathMatrix< dim, dim >, dim > > velocity_grad()
returns the export of the velocity gradient
Definition: incompressible_navier_stokes_base.h:240
bool m_bLaplace
flag if using only laplace term
Definition: incompressible_navier_stokes_base.h:256
SmartPtr< DataExport< MathVector< dim >, dim > > m_exVelocity
Export for the velocity.
Definition: incompressible_navier_stokes_base.h:259
bool m_bStokes
flag if solving the Stokes equation
Definition: incompressible_navier_stokes_base.h:253
virtual void set_source(SmartPtr< CplUserData< MathVector< dim >, dim > > user)=0
sets the source function
bool m_bPecletBlend
flag if using Peclet Blending
Definition: incompressible_navier_stokes_base.h:244
virtual SmartPtr< CplUserData< number, dim > > density()=0
returns density
virtual std::string disc_type() const =0
returns string identifying disc type
bool stokes()
flag if using Peclet Blending
Definition: incompressible_navier_stokes_base.h:207
IncompressibleNavierStokesBase(const char *functions, const char *subsets)
Definition: incompressible_navier_stokes_base.cpp:54
number m_gradDivFactor
factor for div grad stabilization
Definition: incompressible_navier_stokes_base.h:250
virtual void set_density(SmartPtr< CplUserData< number, dim > > user)=0
sets the density
bool laplace()
flag if using Peclet Blending
Definition: incompressible_navier_stokes_base.h:222
void set_laplace(bool bLaplace)
sets assembling of diffusive term to laplace
Definition: incompressible_navier_stokes_base.h:221
static const int dim
World dimension.
Definition: incompressible_navier_stokes_base.h:156
IncompressibleNavierStokesBase< TDomain > this_type
own type
Definition: incompressible_navier_stokes_base.h:152
virtual SmartPtr< CplUserData< number, dim > > kinematic_viscosity()=0
returns kinematic viscosity
Finite Volume Element Discretization for the incompressible Navier-Stokes Equation.
Definition: navier_stokes_base.h:144
static const int dim
World dimension.
Definition: navier_stokes_base.h:154
number m_bFullNewtonFactor
factor for exact jacobian, (1 for exact jacobian, 0 for fix point)
Definition: navier_stokes_base.h:207
double number