]> git.mxchange.org Git - flightgear.git/blob - src/FDM/UIUCModel/uiuc_ice.cpp
Updated to match changes in radiostack.[ch]xx
[flightgear.git] / src / FDM / UIUCModel / uiuc_ice.cpp
1 /**********************************************************************
2
3  FILENAME:     uiuc_ice.cpp
4
5 ----------------------------------------------------------------------
6
7  DESCRIPTION:  reads in clean coefficient and icing severity 
8                parameters and returns iced coefficient
9
10 ----------------------------------------------------------------------
11
12  STATUS:       alpha version
13
14 ----------------------------------------------------------------------
15
16  REFERENCES:   
17
18 ----------------------------------------------------------------------
19
20  HISTORY:      02/22/2000   initial release
21                04/25/2000   (JS) added uiuc_ice_eta function
22                             (removed from uiuc_coefficients)
23
24 ----------------------------------------------------------------------
25
26  AUTHOR(S):    Jeff Scott         <jscott@mail.com>
27
28 ----------------------------------------------------------------------
29
30  VARIABLES:
31
32 ----------------------------------------------------------------------
33
34  INPUTS:       uiuc_ice_eta:
35                -Simtime
36                -icing times
37                -final icing severity (eta_ice_final)
38
39                uiuc_ice_filter:
40                -clean aero coefficient
41                -icing parameter for that coefficient (kC)
42                -icing severity (eta_ice)
43
44 ----------------------------------------------------------------------
45
46  OUTPUTS:      uiuc_ice_eta:
47                -icing severity (eta_ice)
48
49                uiuc_ice_filter:
50                -iced aero coefficient
51
52 ----------------------------------------------------------------------
53
54  CALLED BY:    uiuc_coefficients
55                uiuc_coef_drag
56                uiuc_coef_lift
57                uiuc_coef_pitch
58                uiuc_coef_sideforce
59                uiuc_coef_roll
60                uiuc_coef_yaw
61
62 ----------------------------------------------------------------------
63
64  CALLS TO:     none
65
66 ----------------------------------------------------------------------
67
68  COPYRIGHT:    (C) 2000 by Michael Selig
69
70  This program is free software; you can redistribute it and/or
71  modify it under the terms of the GNU General Public License
72  as published by the Free Software Foundation.
73
74  This program is distributed in the hope that it will be useful,
75  but WITHOUT ANY WARRANTY; without even the implied warranty of
76  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
77  GNU General Public License for more details.
78
79  You should have received a copy of the GNU General Public License
80  along with this program; if not, write to the Free Software
81  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
82  USA or view http://www.gnu.org/copyleft/gpl.html.
83
84 **********************************************************************/
85
86 #include "uiuc_ice.h"
87
88
89 void uiuc_ice_eta()
90 {
91   double slope = 0;
92
93   if (Simtime >= iceTime)
94     {
95       // set ice_on flag
96       ice_on = true;
97
98       // slowly increase icing severity over period of transientTime
99       if (Simtime < (iceTime + transientTime))
100         {
101           slope = eta_ice_final / transientTime;
102           eta_ice = slope * (Simtime - iceTime);
103         }
104       else
105         {
106           eta_ice = eta_ice_final;
107         }
108     }
109   return;
110 }
111
112
113 double uiuc_ice_filter( double Ca_clean, double kCa )
114 {
115   double Ca_iced = 0;
116
117   //cout << "Ice Model Engaged" << endl;
118
119   Ca_iced = Ca_clean * (1 + kCa * eta_ice);
120
121   return Ca_iced;
122 }
123
124 // end uiuc_ice.cpp