File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 218218function [phi_s_x ,phi_s_y ] = slope_adj(dzdx ,dzdy )
219219 beta= 0.01 ; % packing ratio (-), FDS default
220220 % Rothermel optimum packing ratio
221- phi_s_x = sign(dzdx )*5.275 * beta ^-0.3 * dzdx ^ 2 ;
222- phi_s_y = sign(dzdy )*5.275 * beta ^-0.3 * dzdy ^ 2 ;
221+ dzds = sqrt(dzdx ^ 2 + dzdy ^ 2 );
222+ phi_s_x = 5.275 * beta ^-0.3 * dzdx * dzds ;
223+ phi_s_y = 5.275 * beta ^-0.3 * dzdy * dzds ;
223224end
224225
225226% calculate virtual wind vector for slope
233234 C = 7.47 * exp(-0.8711 * sigma .^ 0.55 );
234235 B = 0.15988 * sigma .^ 0.54 ;
235236 E = 0.715 * exp(-0.01094 * sigma );
237+ phi_s= sqrt(phi_s_x ^ 2 + phi_s_y ^ 2 );
238+ if (phi_s > 0)
239+ uv_tmp = 0.3048 / phi_s *(phi_s / C * beta_ratio ^ E )^(1 / B );
240+ else
241+ uv_tmp = 0 ;
242+ end
236243 % divide by 60 to maintain units of m/s elsewhere
237- u_virtual = 0.3048 *( phi_s_x / C * beta_ratio ^ E )^( 1 / B ) /60 ;
238- v_virtual = 0.3048 *( phi_s_y / C * beta_ratio ^ E )^( 1 / B ) /60 ;
244+ u_virtual = uv_tmp * phi_s_x / 60 ;
245+ v_virtual = uv_tmp * phi_s_y / 60 ;
239246end
You can’t perform that action at this time.
0 commit comments