MAST
ug_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 
33 { }
34 
35 
36 
37 
38 void
40  const Real b_ref,
41  const Complex num,
42  const Complex den,
43  const ComplexMatrixX& Bmat,
44  const ComplexVectorX& evec_right,
45  const ComplexVectorX& evec_left) {
46 
47  kr = kr_ref_val;
48 
49  if (std::abs(den) > 0.) {
50 
51  root = num/den;
52  if (std::real(root) > 0.) {
53 
54  V = sqrt(1./std::real(root));
55  g = std::imag(root)/std::real(root);
56  omega = kr*V/b_ref;
57  if_nonphysical_root = false;
58  }
59  else {
60 
61  V = 0.;
62  g = 0.;
63  omega = 0.;
64  if_nonphysical_root = true;
65  }
66  }
67 
68  // calculate the modal participation vector
69  const unsigned int
70  nvals = (int)Bmat.rows();
71  eig_vec_right = evec_right;
72  eig_vec_left = evec_left;
74  k_q = Bmat * evec_right;
75  modal_participation.resize(nvals, 1);
76 
77  for (unsigned int i=0; i<nvals; i++)
78  modal_participation(i) = std::abs(std::conj(evec_right(i)) * k_q(i));
79 
81 }
82 
83 
ComplexVectorX eig_vec_left
virtual void init(const Real kr_ref_val, const Real b_ref, const Complex num, const Complex den, const ComplexMatrixX &Bmat, const ComplexVectorX &evec_right, const ComplexVectorX &evec_left)
initializes the data
Matrix< Complex, Dynamic, 1 > ComplexVectorX
libMesh::Real Real
libMesh::Complex Complex
Matrix< Complex, Dynamic, Dynamic > ComplexMatrixX
UGFlutterRoot()
default constructor
RealVectorX modal_participation
ComplexVectorX eig_vec_right
right and left eigenvevtors