GRINS-0.6.0
averaged_fan_base.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // GRINS - General Reacting Incompressible Navier-Stokes
5 //
6 // Copyright (C) 2014-2015 Paul T. Bauman, Roy H. Stogner
7 // Copyright (C) 2010-2013 The PECOS Development Team
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the Version 2.1 GNU Lesser General
11 // Public License as published by the Free Software Foundation.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
21 // Boston, MA 02110-1301 USA
22 //
23 //-----------------------------------------------------------------------el-
24 
25 
26 #ifndef GRINS_AVERAGED_FAN_BASE_H
27 #define GRINS_AVERAGED_FAN_BASE_H
28 
29 // GRINS
30 #include "grins_config.h"
32 
33 // libMesh
34 #include "libmesh/function_base.h"
35 #include "libmesh/getpot.h"
36 #include "libmesh/tensor_value.h"
37 
38 // C++
39 #include <string>
40 
41 namespace GRINS
42 {
43 
44  template<class Viscosity>
46  {
47  public:
48 
49  AveragedFanBase( const std::string& physics_name, const GetPot& input );
50 
52 
54  virtual void read_input_options( const GetPot& input );
55 
56  bool compute_force ( const libMesh::Point& point,
57  const libMesh::Real time,
58  const libMesh::NumberVectorValue& U,
59  libMesh::NumberVectorValue& F,
60  libMesh::NumberTensorValue *dFdU = NULL);
61 
62  protected:
63 
64  // Velocity of the moving fan blades as a function of x,y,z
65  // Iff there are no fan blades moving past a location, the
66  // velocity there is specified as zero.
67  libMesh::AutoPtr<libMesh::FunctionBase<libMesh::Number> > base_velocity_function;
68 
69  // "Up" direction of fan airflow, as a function of x,y,z
70  // For most fans this will be a constant, the axis of rotation.
71  libMesh::AutoPtr<libMesh::FunctionBase<libMesh::Number> > local_vertical_function;
72 
73  // Coefficients of lift and drag as a function of angle "t" in
74  // radians. Should be well defined on [-pi, pi].
75  //
76  // No, "t" is not time in these functions.
77  // Yes, I'm abusing FunctionBase.
78  libMesh::AutoPtr<libMesh::FunctionBase<libMesh::Number> > lift_function;
79  libMesh::AutoPtr<libMesh::FunctionBase<libMesh::Number> > drag_function;
80 
81  // The chord length of the fan wing cross-section. For fan blades
82  // with constant cross-section this will be a constant.
83  libMesh::AutoPtr<libMesh::FunctionBase<libMesh::Number> > chord_function;
84 
85  // The area swept out by the local fan wing cross-section. For
86  // cylindrical areas swept out by N fan blades, this is just
87  // pi*r^2*h/N
88  libMesh::AutoPtr<libMesh::FunctionBase<libMesh::Number> > area_swept_function;
89 
90  // The angle-of-attack between the fan wing chord line and the fan
91  // velocity vector, in radians. For fan blades with no "twist"
92  // this will be a constant.
93  libMesh::AutoPtr<libMesh::FunctionBase<libMesh::Number> > aoa_function;
94 
95  private:
96 
98  };
99 
100 } // end namespace block
101 
102 #endif // GRINS_AVERAGED_FAN_BASE_H
libMesh::AutoPtr< libMesh::FunctionBase< libMesh::Number > > base_velocity_function
Physics class for Incompressible Navier-Stokes.
libMesh::AutoPtr< libMesh::FunctionBase< libMesh::Number > > chord_function
bool compute_force(const libMesh::Point &point, const libMesh::Real time, const libMesh::NumberVectorValue &U, libMesh::NumberVectorValue &F, libMesh::NumberTensorValue *dFdU=NULL)
libMesh::AutoPtr< libMesh::FunctionBase< libMesh::Number > > lift_function
libMesh::AutoPtr< libMesh::FunctionBase< libMesh::Number > > local_vertical_function
libMesh::AutoPtr< libMesh::FunctionBase< libMesh::Number > > drag_function
GRINS namespace.
libMesh::AutoPtr< libMesh::FunctionBase< libMesh::Number > > aoa_function
libMesh::AutoPtr< libMesh::FunctionBase< libMesh::Number > > area_swept_function
virtual void read_input_options(const GetPot &input)
Read options from GetPot input file.

Generated on Mon Jun 22 2015 21:32:20 for GRINS-0.6.0 by  doxygen 1.8.9.1