MAST
pk_flutter_root.cpp
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 
21 // MAST includes
23 
24 
27 { }
28 
29 
30 
31 void
33  const Real v_ref_val,
34  const Real b_ref,
35  const Complex num,
36  const Complex den,
37  const RealMatrixX& Kmat,
38  const ComplexVectorX& evec_right,
39  const ComplexVectorX& evec_left) {
40 
41  kr = k_red_val;
42  V = v_ref_val;
43 
44  if (std::abs(den) > 0.) {
45 
46  root = num/den;
47  g = std::real(root);
48  omega = std::imag(root);
49  }
50 
51  // calculate the modal participation vector
52  // Since PK flutter solver works with complex matrices, we cannot look at
53  // roots only in the upper or lower half of the complex domain. Here,
54  // however, we only are interested in the modal participation vector.
55  const unsigned int
56  nvals = (int)Kmat.rows();
57  eig_vec_right = evec_right.topRows(nvals);
58  eig_vec_left = evec_left.topRows(nvals);
59 
60  // use the stiffness matrix and the first half of the eigenvectors to
61  // calculate the modal participation based on strain energy
62 
64  k_q = Kmat * eig_vec_right;
65  modal_participation.resize(nvals, 1);
66 
67  for (unsigned int i=0; i<nvals; i++)
68  modal_participation(i) = std::abs(std::conj(eig_vec_right(i)) * k_q(i));
69 
71 }
72 
73 
74 
75 //bool
76 //MAST::PKFlutterRoot::is_similar(MAST::FlutterRootBase &r) const {
77 //
78 // const Real tol = 1.0e-6;
79 // bool similar = false;
80 //
81 // // currently only the modal participation is used to check for
82 // // similarity
83 // RealVectorX
84 // diff = (modal_participation - r.modal_participation) * (omega-r.omega);
85 //
86 // if (diff.norm() <= tol)
87 // similar = true;
88 //
89 // return similar;
90 //}
91 
92 
93 
94 
ComplexVectorX eig_vec_left
Matrix< Complex, Dynamic, 1 > ComplexVectorX
libMesh::Real Real
libMesh::Complex Complex
Matrix< Real, Dynamic, Dynamic > RealMatrixX
virtual void init(const Real k_red_val, const Real V_ref, const Real b_ref, const Complex num, const Complex den, const RealMatrixX &Kmat, const ComplexVectorX &evec_right, const ComplexVectorX &evec_left)
RealVectorX modal_participation
ComplexVectorX eig_vec_right
right and left eigenvevtors