MAST
time_domain_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__time_domain_flutter_solver_h__
21 #define __mast__time_domain_flutter_solver_h__
22 
23 // C++ includes
24 #include <memory>
25 
26 
27 // MAST includes
29 
30 
31 
32 namespace MAST {
33 
34  // Forward declerations
35  class TimeDomainFlutterSolution;
36  class Parameter;
37 
38 
46 
47  public:
48 
53 
54 
55  virtual ~TimeDomainFlutterSolver();
56 
57 
58 
62  virtual void clear();
63 
64 
68  virtual void clear_solutions();
69 
70 
74  void initialize(MAST::Parameter& velocity_param,
75  Real V_lower,
76  Real V_upper,
77  unsigned int n_V_divs,
78  std::vector<libMesh::NumericVector<Real>*>& basis);
79 
80 
81 
86  virtual unsigned int n_roots_found() const;
87 
88 
93  const MAST::FlutterRootBase& get_root(const unsigned int n) const;
94 
95 
96 
104  virtual std::pair<bool, MAST::FlutterRootBase*>
105  find_next_root(const Real g_tol,
106  const unsigned int n_bisection_iters);
107 
108 
109 
115  virtual std::pair<bool, MAST::FlutterRootBase*>
116  find_critical_root(const Real g_tol,
117  const unsigned int n_bisection_iters);
118 
119 
120 
125  virtual std::pair<bool, MAST::FlutterRootBase*>
127  const unsigned int n_iters);
128 
129 
130 
141  virtual void
143  const MAST::FunctionBase& f,
144  libMesh::NumericVector<Real>* dXdp = nullptr,
145  libMesh::NumericVector<Real>* dXdV = nullptr);
146 
147 
151  virtual void print_sorted_roots();
152 
153 
158  virtual void print_crossover_points();
159 
160 
166  virtual void scan_for_roots();
167 
168 
169  protected:
170 
171 
177  virtual std::unique_ptr<MAST::TimeDomainFlutterSolution>
178  _analyze(const Real v_ref,
179  const MAST::FlutterSolutionBase* prev_sol=nullptr);
180 
181 
182 
186  virtual std::pair<bool, MAST::FlutterSolutionBase*>
188  MAST::FlutterSolutionBase*>& ref_sol_range,
189  const unsigned int root_num,
190  const Real g_tol,
191  const unsigned int max_iters);
192 
193 
198  void _initialize_matrices(Real U_inf,
199  RealMatrixX& A,
200  RealMatrixX& B);
201 
202 
207  void
209  const libMesh::NumericVector<Real>& dXdp,
210  Real U_inf,
211  RealMatrixX& A,
212  RealMatrixX& B);
213 
214 
219  virtual void _identify_crossover_points();
220 
221 
226 
227 
231  std::pair<Real, Real> _V_range;
232 
233 
238  unsigned int _n_V_divs;
239 
240 
244  std::map<Real, MAST::FlutterSolutionBase*> _flutter_solutions;
245 
250  std::multimap<Real, MAST::FlutterRootCrossoverBase*> _flutter_crossovers;
251 
252  };
253 }
254 
255 
256 #endif // __mast__time_domain_flutter_solver_h__
257 
virtual std::pair< bool, MAST::FlutterRootBase * > analyze_and_find_critical_root_without_tracking(const Real g_tol, const unsigned int n_iters)
This root starts with the lower velocity and increments the speed till a single unstable root is iden...
virtual void _identify_crossover_points()
identifies all cross-over and divergence points from analyzed roots
MAST::Parameter * _velocity_param
Parameter that define the velocity.
virtual void clear()
clears the solution and other data from this solver
virtual void calculate_sensitivity(MAST::FlutterRootBase &root, const MAST::FunctionBase &f, libMesh::NumericVector< Real > *dXdp=nullptr, libMesh::NumericVector< Real > *dXdV=nullptr)
Calculate the sensitivity of the flutter root with respect to the f parameter.
virtual void print_crossover_points()
Prints the crossover points output.
void initialize(MAST::Parameter &velocity_param, Real V_lower, Real V_upper, unsigned int n_V_divs, std::vector< libMesh::NumericVector< Real > * > &basis)
initializes the data structres for a flutter solution.
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
virtual std::unique_ptr< MAST::TimeDomainFlutterSolution > _analyze(const Real v_ref, const MAST::FlutterSolutionBase *prev_sol=nullptr)
performs an eigensolution at the specified reference value, and sort the roots based on the provided ...
libMesh::Real Real
std::multimap< Real, MAST::FlutterRootCrossoverBase * > _flutter_crossovers
the map of flutter crossover points versus average velocity of the two bounding roots ...
void _initialize_matrices(Real U_inf, RealMatrixX &A, RealMatrixX &B)
Assembles the reduced order system structural and aerodynmaic matrices for specified flight velocity ...
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)
bisection method search
virtual void print_sorted_roots()
Prints the sorted roots to the output.
Matrix< Real, Dynamic, Dynamic > RealMatrixX
virtual unsigned int n_roots_found() const
finds the number of critical points already identified in the procedure.
std::pair< Real, Real > _V_range
range of reference values within which to find flutter roots
virtual void scan_for_roots()
Scans for flutter roots in the analyzed points, and identified the divergence (if k_red = 0...
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...
This implements a solver for a single parameter instability problem, for example a flutter solver whe...
unsigned int _n_V_divs
number of division in the reference value range for initial scanning
virtual void clear_solutions()
clears the solutions stored from a previous analysis.
std::map< Real, MAST::FlutterSolutionBase * > _flutter_solutions
map of velocity sorted flutter solutions
void _initialize_matrix_sensitivity_for_param(const MAST::FunctionBase &f, const libMesh::NumericVector< Real > &dXdp, Real U_inf, RealMatrixX &A, RealMatrixX &B)
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...
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