waves
Basic FE playground
wF1Ct.h
Go to the documentation of this file.
1 /*
2  * Copyright 2022 University of Liège
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef WF1CT_H
18 #define WF1CT_H
19 
20 #include "flow.h"
21 #include "wObserver.h"
22 #include <Eigen/Dense>
23 
24 namespace flow
25 {
26 
30 class FLOW_API F1Ct : public fwk::Observer
31 {
32 public:
33  F1Ct() : Observer() {}
34  virtual ~F1Ct() {}
35 
36  virtual Eigen::Vector3d eval() const = 0;
37  virtual Eigen::Vector3d evalGrad() const = 0;
38 };
39 
43 class FLOW_API F1CtDrag : public F1Ct
44 {
45  int nDim;
46  double sRef;
47  double beta;
48  Eigen::Vector3d v;
49  Eigen::Vector3d dv;
50 
51 public:
52  F1CtDrag(int _nDim, double _sRef, double alpha, double _beta = 0);
53  void update(double alpha);
54 
55  virtual Eigen::Vector3d eval() const override;
56  virtual Eigen::Vector3d evalGrad() const override;
57 };
58 
62 class FLOW_API F1CtSide : public F1Ct
63 {
64  int nDim;
65  double sRef;
66  double beta;
67  Eigen::Vector3d v;
68  Eigen::Vector3d dv;
69 
70 public:
71  F1CtSide(int _nDim, double _sRef, double alpha, double _beta = 0);
72  void update(double alpha);
73 
74  virtual Eigen::Vector3d eval() const override;
75  virtual Eigen::Vector3d evalGrad() const override;
76 };
77 
81 class FLOW_API F1CtLift : public F1Ct
82 {
83  int nDim;
84  double sRef;
85  double beta;
86  Eigen::Vector3d v;
87  Eigen::Vector3d dv;
88 
89 public:
90  F1CtLift(int _nDim, double _sRef, double alpha, double _beta = 0);
91  void update(double alpha);
92 
93  virtual Eigen::Vector3d eval() const override;
94  virtual Eigen::Vector3d evalGrad() const override;
95 };
96 
97 } // namespace flow
98 
99 #endif //WF1CT_H
flow::F1Ct::F1Ct
F1Ct()
Definition: wF1Ct.h:33
flow::F1CtSide::beta
double beta
angle of sideslip
Definition: wF1Ct.h:66
flow::F1Ct
Constant vector function.
Definition: wF1Ct.h:30
flow::F1CtSide
Sideforce direction.
Definition: wF1Ct.h:62
FLOW_API
#define FLOW_API
Definition: flow.h:29
flow::F1Ct::~F1Ct
virtual ~F1Ct()
Definition: wF1Ct.h:34
flow
Namespace for flow module.
Definition: flow.h:37
flow::F1CtDrag
Drag direction.
Definition: wF1Ct.h:43
flow::F1CtSide::v
Eigen::Vector3d v
sideforce direction unit vector
Definition: wF1Ct.h:67
flow::F1CtDrag::nDim
int nDim
number of dimensions
Definition: wF1Ct.h:45
flow::F1CtLift::v
Eigen::Vector3d v
lift direction unit vector
Definition: wF1Ct.h:86
flow::F1CtLift::nDim
int nDim
number of dimensions
Definition: wF1Ct.h:83
flow::F1CtLift::sRef
double sRef
reference area
Definition: wF1Ct.h:84
flow::F1CtSide::nDim
int nDim
number of dimensions
Definition: wF1Ct.h:64
flow::F1CtLift::beta
double beta
angle of sideslip
Definition: wF1Ct.h:85
flow::F1CtLift::dv
Eigen::Vector3d dv
gradient of lift direction unit vector (wrt alpha)
Definition: wF1Ct.h:87
flow::F1CtDrag::dv
Eigen::Vector3d dv
gradient of drag direction unit vector (wrt alpha)
Definition: wF1Ct.h:49
flow::F1CtSide::dv
Eigen::Vector3d dv
gradient of sideforce direction unit vector (wrt alpha)
Definition: wF1Ct.h:68
flow::F1CtDrag::sRef
double sRef
reference area
Definition: wF1Ct.h:46
flow::F1CtLift
Lift direction.
Definition: wF1Ct.h:81
flow::F1CtDrag::v
Eigen::Vector3d v
drag direction unit vector
Definition: wF1Ct.h:48
flow.h
flow::F1CtSide::sRef
double sRef
reference area
Definition: wF1Ct.h:65
flow::F1CtDrag::beta
double beta
angle of sideslip
Definition: wF1Ct.h:47