MAST
pk_flutter_solver.h
Go to the documentation of this file.
1 /*
2  * MAST: Multidisciplinary-design Adaptation and Sensitivity Toolkit
3  * Copyright (C) 2013-2019 Manav Bhatia
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
20 #ifndef __mast__pk_flutter_solver_h__
21 #define __mast__pk_flutter_solver_h__
22 
23 // C++ includes
24 #include <memory>
25 
26 
27 // MAST includes
29 
30 
31 namespace MAST {
32 
33  // Forward declerations
34  class Parameter;
35 
37  {
38  public:
40 
41 
42  virtual ~PKFlutterSolver();
43 
44 
48  virtual void clear();
49 
50 
54  virtual void clear_solutions();
55 
56 
60  void initialize(MAST::Parameter& V_param,
61  MAST::Parameter& kr_param,
62  MAST::Parameter& bref_param,
63  Real rho,
64  Real V_lower,
65  Real V_upper,
66  unsigned int n_V_divs,
67  Real kr_lower,
68  Real kr_upper,
69  unsigned int n_kr_divs,
70  std::vector<libMesh::NumericVector<Real>*>& basis);
71 
72 
77  virtual unsigned int n_roots_found() const;
78 
79 
84  const MAST::FlutterRootBase& get_root(const unsigned int n) const;
85 
86 
94  virtual std::pair<bool, MAST::FlutterRootBase*>
95  find_next_root(const Real g_tol,
96  const unsigned int n_bisection_iters);
97 
98 
99 
105  virtual std::pair<bool, MAST::FlutterRootBase*>
106  find_critical_root(const Real g_tol,
107  const unsigned int n_bisection_iters);
108 
109 
113  virtual void print_sorted_roots();
114 
115 
120  virtual void print_crossover_points();
121 
127  virtual void scan_for_roots();
128 
129 
134  virtual void calculate_sensitivity(MAST::FlutterRootBase& root,
135  const MAST::FunctionBase& f);
136 
137 
138  protected:
139 
140 
141  void _insert_new_solution(const Real k_red_ref,
143 
144 
145  virtual std::pair<bool, MAST::FlutterSolutionBase*>
147  MAST::FlutterSolutionBase*>& ref_sol_range,
148  const unsigned int root_num,
149  const Real g_tol,
150  const unsigned int max_iters);
151 
152 
153 
157  /*virtual std::pair<bool, MAST::FlutterSolutionBase*>
158  newton_search(const MAST::FlutterSolutionBase& init_sol,
159  const unsigned int root_num,
160  const Real tol,
161  const unsigned int max_iters);*/
162 
169  virtual std::unique_ptr<MAST::FlutterSolutionBase>
170  _analyze(const Real k_red,
171  const Real v_ref,
172  const MAST::FlutterSolutionBase* prev_sol=nullptr);
173 
174 
175 
180  void _initialize_matrices(const Real k_red,
181  const Real v_ref,
182  ComplexMatrixX& L, // stiff, aero, damp
183  ComplexMatrixX& R, // mass
184  RealMatrixX& stiff); // stiffness
185 
186 
191  void
193  const Real k_red,
194  const Real U_inf,
195  ComplexMatrixX& L, // stiff, aero, damp
196  ComplexMatrixX& R); // mass
197 
198 
203  virtual void _identify_crossover_points();
204 
209 
214 
219 
224 
228  std::pair<Real, Real> _V_range;
229 
234  unsigned int _n_V_divs;
235 
239  std::pair<Real, Real> _kr_range;
240 
245  unsigned int _n_k_red_divs;
246 
250  std::map<Real, MAST::FlutterSolutionBase*> _flutter_solutions;
251 
256  std::multimap<Real, MAST::FlutterRootCrossoverBase*> _flutter_crossovers;
257 
258 
259  };
260 }
261 
262 
263 #endif // __mast__pk_flutter_solver_h__
void _insert_new_solution(const Real k_red_ref, MAST::FlutterSolutionBase *sol)
virtual std::unique_ptr< MAST::FlutterSolutionBase > _analyze(const Real k_red, const Real v_ref, const MAST::FlutterSolutionBase *prev_sol=nullptr)
Newton method to look for cross-over point method search.
void _initialize_matrices(const Real k_red, const Real v_ref, ComplexMatrixX &L, ComplexMatrixX &R, RealMatrixX &stiff)
initializes the matrices for the specified k_red.
virtual std::pair< bool, MAST::FlutterSolutionBase * > _bisection_search(const std::pair< MAST::FlutterSolutionBase *, MAST::FlutterSolutionBase * > &ref_sol_range, const unsigned int root_num, const Real g_tol, const unsigned int max_iters)
unsigned int _n_k_red_divs
number of division in the reference value range for initial scanning
Real _rho
flight density
This is a scalar function whose value can be changed and one that can be used as a design variable in...
Definition: parameter.h:35
std::pair< Real, Real > _kr_range
range of reference values within which to find flutter roots
std::multimap< Real, MAST::FlutterRootCrossoverBase * > _flutter_crossovers
the map of flutter crossover points versus average velocity of the two bounding roots ...
libMesh::Real Real
void _initialize_matrix_sensitivity_for_param(const MAST::FunctionBase &f, const Real k_red, const Real U_inf, ComplexMatrixX &L, ComplexMatrixX &R)
Assembles the reduced order system structural and aerodynmaic matrices for specified flight velocity ...
virtual std::pair< bool, MAST::FlutterRootBase * > find_next_root(const Real g_tol, const unsigned int n_bisection_iters)
Looks through the list of flutter cross-over points and iteratively zooms in to find the cross-over p...
unsigned int _n_V_divs
number of division in the reference value range for initial scanning
virtual void calculate_sensitivity(MAST::FlutterRootBase &root, const MAST::FunctionBase &f)
Calculate the sensitivity of the flutter root with respect to the parameter f.
virtual void clear_solutions()
clears the solutions stored from a previous analysis.
virtual void scan_for_roots()
Scans for flutter roots in the analyzed points, and identified the divergence (if k_red = 0...
virtual void clear()
clears the solution and other data from this solver
Matrix< Real, Dynamic, Dynamic > RealMatrixX
Matrix< Complex, Dynamic, Dynamic > ComplexMatrixX
virtual void print_crossover_points()
Prints the crossover points output.
virtual void print_sorted_roots()
Prints the sorted roots to the output.
virtual unsigned int n_roots_found() const
finds the number of critical points already identified in the procedure.
virtual void _identify_crossover_points()
identifies all cross-over and divergence points from analyzed roots
const MAST::FlutterRootBase & get_root(const unsigned int n) const
returns the n th root in terms of ascending velocity that is found by the solver
MAST::Parameter * _kred_param
Parameter that define the reduced frequency.
MAST::Parameter * _velocity_param
Parameter that define the velocity.
std::pair< Real, Real > _V_range
range of reference values within which to find flutter roots
virtual std::pair< bool, MAST::FlutterRootBase * > find_critical_root(const Real g_tol, const unsigned int n_bisection_iters)
This method checks if the flutter root corresponding to the lowest velocity crossover has been calcul...
MAST::Parameter * _bref_param
reference chord
std::map< Real, MAST::FlutterSolutionBase * > _flutter_solutions
map of velocity sorted flutter solutions
void initialize(MAST::Parameter &V_param, MAST::Parameter &kr_param, MAST::Parameter &bref_param, Real rho, Real V_lower, Real V_upper, unsigned int n_V_divs, Real kr_lower, Real kr_upper, unsigned int n_kr_divs, std::vector< libMesh::NumericVector< Real > * > &basis)
initializes the data structres for a flutter solution.