All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
harmonic_response_analyzer.h
1 /* Copyright (C) 2004-2014 MBSim Development Team
2  *
3  * This library is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU Lesser General Public
5  * License as published by the Free Software Foundation; either
6  * version 2.1 of the License, or (at your option) any later version.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public
14  * License along with this library; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16  *
17  * Contact: martin.o.foerg@googlemail.com
18  */
19 
20 #ifndef _HARMONIC_RESPONSE_ANALYSER_H_
21 #define _HARMONIC_RESPONSE_ANALYSER_H_
22 
23 #include "fmatvec/fmatvec.h"
24 #include "mbsim/functions/function.h"
25 #include "mbsim/solver.h"
26 
27 namespace MBSim {
28 
34 
35  public:
36 
37  enum Task { frequencyResponse, unknown };
38 
42  HarmonicResponseAnalyzer() : tStart(0), dtPlot(1e-2), compEq(false), task(frequencyResponse) { }
43 
47  void execute();
48 
53  void setStartTime(double tStart_) { tStart=tStart_; }
54 
55  void setExcitationFrequencies(const fmatvec::VecV& fE_) { fE = fE_; }
56 
57  void setSystemFrequencies(const fmatvec::VecV& fS_) { fS = fS_; }
58 
63  void setPlotStepSize(double dtPlot_) { dtPlot = dtPlot_; }
64 
69  void setInitialState(const fmatvec::Vec &z0) { zEq = z0; }
70 
71  void setTask(Task task_) { task = task_; }
72 
73  const fmatvec::Vec& getInitialState() const { return zEq; }
74 
79  void setOutputFileName(const std::string &fileName_) { fileName = fileName_; }
80 
81  void initializeUsingXML(xercesc::DOMElement *element);
82 
83  protected:
84 
85  fmatvec::Vec zEq, zh;
86  fmatvec::VecV fE, fS;
87  fmatvec::Mat Zh;
88  double tStart, dtPlot;
89  bool compEq;
90  Task task;
91 
92  std::string fileName;
93 
94  void computeFrequencyResponse();
95  };
96 
97 }
98 
99 #endif
void setStartTime(double tStart_)
Set the start time for the analysis.
Definition: harmonic_response_analyzer.h:53
solver-interface for dynamic systems
Definition: solver.h:38
HarmonicResponseAnalyzer for dynamic systems.
Definition: harmonic_response_analyzer.h:33
void setInitialState(const fmatvec::Vec &z0)
Set the initital state for the analysis.
Definition: harmonic_response_analyzer.h:69
void setOutputFileName(const std::string &fileName_)
Set the name of the output file.
Definition: harmonic_response_analyzer.h:79
void setPlotStepSize(double dtPlot_)
Set the plot step size for the analysis.
Definition: harmonic_response_analyzer.h:63
HarmonicResponseAnalyzer()
Standard constructor.
Definition: harmonic_response_analyzer.h:42
void execute()
Perform a harmonic response analysis of the system.
Definition: harmonic_response_analyzer.cc:35

Impressum / Disclaimer / Datenschutz Generated by doxygen 1.8.5 Home