All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
elastic_line_galerkin.h
1 /* Copyright (C) 2004-2009 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: markus.ms.schneider@gmail.com
18  */
19 
20 #ifndef _ELASTIC_LINE_GALERKIN_H_
21 #define _ELASTIC_LINE_GALERKIN_H_
22 
23 #include "hline.h"
24 
25 class ansatz_function;
26 
27 namespace MBSimHydraulics {
28 
30  class ElasticLineGalerkin : public HLine {
31 
32  public:
33 
34  enum AnsatzTypes {
35  BSplineOrd4,
36  BSplineOrd3,
37  Polynom,
38  Harmonic
39  };
40 
42  ElasticLineGalerkin(const std::string &name="");
43  virtual std::string getType() const { return "ElasticLineGalerkin"; }
44 
46  void setp0(double p0_) {p0=p0_; }
48  void setFracAir(double fracAir_) {fracAir=fracAir_; }
50  void setdh(double dh_) {delta_h=dh_; }
52  void setDLehr(double DLehr_) {DLehr=DLehr_; }
54  //void setAnsatzFunction(std::string method_, int nAnsatz_);
55  void setAnsatzFunction(AnsatzTypes method_, int nAnsatz_);
57  void setFlow2D(bool flow2d=true){Flow2D=flow2d; }
59  void setRelativePlotPoints(const fmatvec::Vec &rPP) {relPlotPoints=rPP; }
60  void setDiameter(double d_) {d=d_; }
61  void setLength(double l_) {l=l_; }
62 
63  void setQ0(double Q0_) {Q0=Q0_; }
64 
65  fmatvec::Vec getQIn() {return QIn; }
66  fmatvec::Vec getQOut() {return QOut; }
67  fmatvec::Vec getInflowFactor() {return -Area*wE; }
68  fmatvec::Vec getOutflowFactor() {return Area*wA; }
69 
70  void init(InitStage stage);
71  void calcqSize() {qSize=mdim; }
72  void calcuSize(int j) {uSize[j]=mdim; }
73 
74  void updateStateDependentVariables(double t);
75  void updateh(double t, int j=0);
76  void updateT(double t);
77  void updateM(double t, int j=0);
78 
79  void plot(double t, double dt);
80  void plotParameters();
81 
82  void initializeUsingXML(xercesc::DOMElement * element);
83 
84  private:
85  int mdim, plotdim;
86  double nu, g, E, k;
87  fmatvec::Vec WInt, wA, wE, lambda;
88  fmatvec::SymMat MatIntWWT, MatIntWSWST, K, D, N, Omega, MFac;
89  fmatvec::SqrMat phi;
90  ansatz_function * ansatz;
91  fmatvec::Mat plotVecW, plotVecWS;
92  fmatvec::Vec QIn, QOut;
93  double l, d, Area;
94 
95  protected:
96  AnsatzTypes ansatzType;
97  bool Flow2D;
98  int nAnsatz;
99  double p0, Q0, fracAir, delta_h, DLehr;
100  fmatvec::Vec relPlotPoints;
101  };
102 }
103 
104 
105 #endif /* ----- #ifndef _HYDLINEGALERKIN_H_ ----- */
106 
void setAnsatzFunction(AnsatzTypes method_, int nAnsatz_)
Definition: elastic_line_galerkin.cc:42
Definition: hline.h:41
void setRelativePlotPoints(const fmatvec::Vec &rPP)
Definition: elastic_line_galerkin.h:59
void setFlow2D(bool flow2d=true)
Definition: elastic_line_galerkin.h:57
Definition: elastic_line_galerkin.h:30
void setdh(double dh_)
Definition: elastic_line_galerkin.h:50
ElasticLineGalerkin(const std::string &name="")
Definition: elastic_line_galerkin.cc:39
void setFracAir(double fracAir_)
Definition: elastic_line_galerkin.h:48
void setDLehr(double DLehr_)
Definition: elastic_line_galerkin.h:52
void setp0(double p0_)
Definition: elastic_line_galerkin.h:46

Impressum / Disclaimer / Datenschutz Generated by doxygen 1.8.5 Valid HTML