1 /**********************************************************************
3 FILENAME: uiuc_betaprobe.cpp
5 ----------------------------------------------------------------------
7 DESCRIPTION: Computes flow angle, beta, for use in ice detection
10 ----------------------------------------------------------------------
14 ----------------------------------------------------------------------
18 ----------------------------------------------------------------------
20 HISTORY: 05/15/2000 initial release
22 ----------------------------------------------------------------------
24 AUTHOR(S): Jeff Scott <jscott@mail.com>
26 ----------------------------------------------------------------------
30 ----------------------------------------------------------------------
37 ----------------------------------------------------------------------
39 OUTPUTS: Dbeta_flow_wing
42 ----------------------------------------------------------------------
44 CALLED BY: uiuc_wrapper
46 ----------------------------------------------------------------------
50 ----------------------------------------------------------------------
52 COPYRIGHT: (C) 2000 by Michael Selig
54 This program is free software; you can redistribute it and/or
55 modify it under the terms of the GNU General Public License
56 as published by the Free Software Foundation.
58 This program is distributed in the hope that it will be useful,
59 but WITHOUT ANY WARRANTY; without even the implied warranty of
60 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
61 GNU General Public License for more details.
63 You should have received a copy of the GNU General Public License
64 along with this program; if not, write to the Free Software
65 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
66 USA or view http://www.gnu.org/copyleft/gpl.html.
68 **********************************************************************/
70 #include "uiuc_betaprobe.h"
77 CLclean_wing = CXclean_wing * sin(Alpha) - CZclean_wing * cos(Alpha);
78 CLiced_wing = CXiced_wing * sin(Alpha) - CZiced_wing * cos(Alpha);
79 CLclean_tail = CXclean_tail * sin(Alpha) - CZclean_tail * cos(Alpha);
80 CLiced_tail = CXiced_tail * sin(Alpha) - CZiced_tail * cos(Alpha);
83 /* calculate lift per unit span*/
84 Lift_clean_wing = CLclean_wing * Dynamic_pressure * Sw / bw;
85 Lift_iced_wing = CLiced_wing * Dynamic_pressure * Sw / bw;
86 Lift_clean_tail = CLclean_tail * Dynamic_pressure * Sh / bh;
87 Lift_iced_tail = CLiced_tail * Dynamic_pressure * Sh / bh;
89 Gamma_clean_wing = Lift_clean_wing / (Density * V_rel_wind);
90 Gamma_iced_wing = Lift_iced_wing / (Density * V_rel_wind);
91 Gamma_clean_tail = Lift_clean_tail / (Density * V_rel_wind);
92 Gamma_iced_tail = Lift_iced_tail / (Density * V_rel_wind);
94 w_clean_wing = Gamma_clean_wing / (2 * LS_PI * x_probe_wing);
95 w_iced_wing = Gamma_iced_wing / (2 * LS_PI * x_probe_wing);
96 w_clean_tail = Gamma_clean_tail / (2 * LS_PI * x_probe_tail);
97 w_iced_tail = Gamma_iced_tail / (2 * LS_PI * x_probe_tail);
99 V_total_clean_wing = sqrt(w_clean_wing*w_clean_wing +
100 V_rel_wind*V_rel_wind -
101 2*w_clean_wing*V_rel_wind *
102 cos(LS_PI/2 + Alpha));
103 V_total_iced_wing = sqrt(w_iced_wing*w_iced_wing +
104 V_rel_wind*V_rel_wind -
105 2*w_iced_wing*V_rel_wind *
106 cos(LS_PI/2 + Alpha));
107 V_total_clean_tail = sqrt(w_clean_tail*w_clean_tail +
108 V_rel_wind*V_rel_wind -
109 2*w_clean_tail*V_rel_wind *
110 cos(LS_PI/2 + Alpha));
111 V_total_iced_tail = sqrt(w_iced_tail*w_iced_tail +
112 V_rel_wind*V_rel_wind -
113 2*w_iced_tail*V_rel_wind *
114 cos(LS_PI/2 + Alpha));
116 beta_flow_clean_wing = asin((w_clean_wing / V_total_clean_wing) *
117 sin (LS_PI/2 + Alpha));
118 beta_flow_iced_wing = asin((w_iced_wing / V_total_iced_wing) *
119 sin (LS_PI/2 + Alpha));
120 beta_flow_clean_tail = asin((w_clean_tail / V_total_clean_tail) *
121 sin (LS_PI/2 + Alpha));
122 beta_flow_iced_tail = asin((w_iced_tail / V_total_iced_tail) *
123 sin (LS_PI/2 + Alpha));
125 Dbeta_flow_wing = fabs(beta_flow_clean_wing - beta_flow_iced_wing);
126 Dbeta_flow_tail = fabs(beta_flow_clean_tail - beta_flow_iced_tail);
128 pct_beta_flow_wing = beta_flow_iced_wing / beta_flow_clean_wing;
129 pct_beta_flow_tail = beta_flow_iced_tail / beta_flow_clean_tail;
132 //end uiuc_betaprobe.cpp