GRINS-0.8.0
averaged_turbine_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-2017 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_TURBINE_BASE_H
27 #define GRINS_AVERAGED_TURBINE_BASE_H
28 
29 // GRINS
30 #include "grins_config.h"
32 
33 
34 // libMesh
35 #include "libmesh/getpot.h"
36 #include "libmesh/parsed_function.h"
37 #include "libmesh/tensor_value.h"
38 
39 // C++
40 #include <string>
41 
42 namespace GRINS
43 {
44 
45  template<class Viscosity>
47  {
48  public:
49 
50  AveragedTurbineBase( const std::string& physics_name, const GetPot& input );
51 
53 
55  virtual void set_time_evolving_vars( libMesh::FEMSystem* system );
56 
57  bool compute_force ( const libMesh::Point& point,
58  const libMesh::Real time,
59  const libMesh::NumberVectorValue& U,
60  libMesh::Number s,
61  libMesh::NumberVectorValue& U_B_1,
62  libMesh::NumberVectorValue& F,
63  libMesh::NumberTensorValue *dFdU = NULL,
64  libMesh::NumberVectorValue *dFds = NULL);
65 
66  VariableIndex fan_speed_var() const { return _var.var(); }
67 
68  protected:
69 
70  // ``Base'' velocity of the moving fan blades as a function of x,y,z
71  //
72  // This velocity will be scaled by the fan_speed variable
73  // during the simulation; values in base_velocity_function should
74  // therefore correspond to a fan speed of 1 radian per second.
75  // Iff there are no fan blades moving past a location, the
76  // base velocity there is specified as zero.
78 
79  // "Up" direction of fan airflow, as a function of x,y,z
80  // For most fans this will be a constant, the axis of rotation.
82 
83  // Coefficients of lift and drag as a function of angle "t" in
84  // radians. Should be well defined on [-pi, pi].
85  //
86  // No, "t" is not time in these functions.
87  // Yes, I'm abusing FunctionBase.
90 
91  // Mechanical driving torque function (*including* non-fluid
92  // friction losses!) on the turbine (signed, measured in
93  // Newton-meters) as a function of angular velocity turbine speed
94  // "t" (measured in rad/s).
95  //
96  // Should probably be carefully defined for t>0 and t<0 to avoid
97  // potential unstable startup.
98  //
99  // Should theoretically be useable as power input (same sign as t)
100  // to model propeller fans or output (opposite sign from t) to
101  // model turbine fans.
102  //
103  // No, "t" is not time or angle of attack in this function.
104  // Yes, I'm really abusing FunctionBase.
106 
107  // Moment of inertia of the spinning component of the turbine
108  // (measured in kg-m^2)
109  libMesh::Number moment_of_inertia;
110 
111  // Initial speed of the spinning component of the turbine
112  // (measured in rad/s)
113  libMesh::Number initial_speed;
114 
115  // The chord length of the fan wing cross-section. For fan blades
116  // with constant cross-section this will be a constant.
118 
119  // The area swept out by the local fan wing cross-section. For
120  // cylindrical areas swept out by N fan blades, this is just
121  // pi*r^2*h/N
123 
124  // The angle-of-attack between the fan wing chord line and the fan
125  // velocity vector, in radians. For fan blades with no "twist"
126  // this will be a constant.
128 
130 
131  private:
132 
134  void read_input_options( const GetPot& input );
135 
137  };
138 
139 } // end namespace block
140 
141 #endif // GRINS_AVERAGED_TURBINE_BASE_H
libMesh::ParsedFunction< libMesh::Number > area_swept_function
unsigned int VariableIndex
More descriptive name of the type used for variable indices.
Definition: var_typedefs.h:42
virtual void set_time_evolving_vars(libMesh::FEMSystem *system)
Sets turbine_speed and velocity variables to be time-evolving.
libMesh::ParsedFunction< libMesh::Number > base_velocity_function
Physics class for Incompressible Navier-Stokes.
libMesh::ParsedFunction< libMesh::Number > aoa_function
VariableIndex var() const
libMesh::ParsedFunction< libMesh::Number > torque_function
GRINS namespace.
libMesh::ParsedFunction< libMesh::Number > local_vertical_function
libMesh::ParsedFunction< libMesh::Number > drag_function
Variables with a single SCALAR component.
libMesh::ParsedFunction< libMesh::Number > lift_function
bool compute_force(const libMesh::Point &point, const libMesh::Real time, const libMesh::NumberVectorValue &U, libMesh::Number s, libMesh::NumberVectorValue &U_B_1, libMesh::NumberVectorValue &F, libMesh::NumberTensorValue *dFdU=NULL, libMesh::NumberVectorValue *dFds=NULL)
VariableIndex fan_speed_var() const
void read_input_options(const GetPot &input)
Read options from GetPot input file.
libMesh::ParsedFunction< libMesh::Number > chord_function

Generated on Tue Dec 19 2017 12:47:27 for GRINS-0.8.0 by  doxygen 1.8.9.1