!copyright (C) 2001 MSC-RPN COMM %%%RPNPHY%%% *** S/P PROF5SUBROUTINE PROF5(EQ,EE,UD) 1 * * #include "impnone.cdk"
* * REAL A1,A2,A3,C1,C2,EE,EQ,EY,E45,FE,P,SIGMA,SQRT2P,T1,T2 REAL UD,X,Y * *AUTHOR * Jack Kain and JM Fritsch (Oct 14,1990) * *REVISION * 001 Stephane Belair (1994) * *OBJECT * integrates the area under the curve in the Gaussian * Distribution to determine the fractional entrainment * and detrainment rates given EQ, the critical fraction * of environmental air for neutral buoyancy. * *ARGUMENTS * * - Input - * EQ is the fraction between 0 and 1 given to the equation * * - Output - * EE fractional entrainment rate * UD fraction detrainment rate * *NOTES * * The numerical approximation to the integral is taken * from "Handbook of Mathematical Functions with formulas, * graphs and mathematical tables" ED. by Abramowitz * and Stegun, Nat'l Bureau of Standards Applied Mathematics * Series. June, 1964., May, 1968. Jack Kain * ** C DATA SQRT2P,A1,A2,A3,P,SIGMA,FE/2.506628,0.4361836,-0.1201676, *0.9372980,0.33267,0.166666667,0.202765151/ c X=(EQ-0.5)/SIGMA Y=6.*EQ-3. EY=EXP(Y*Y/(-2)) E45=EXP(-4.5) T2=1./(1.+P*ABS(Y)) T1=0.500498 C1=A1*T1+A2*T1*T1+A3*T1*T1*T1 C2=A1*T2+A2*T2*T2+A3*T2*T2*T2 * IF(Y.GE.0.)THEN EE=SIGMA*(0.5*(SQRT2P-E45*C1-EY*C2)+SIGMA*(E45-EY)) * -E45*EQ*EQ/2. UD=SIGMA*(0.5*(EY*C2-E45*C1)+SIGMA*(E45-EY)) * -E45*(0.5+EQ*EQ/2.-EQ) ELSE EE=SIGMA*(0.5*(EY*C2-E45*C1)+SIGMA*(E45-EY)) * -E45*EQ*EQ/2. UD=SIGMA*(0.5*(SQRT2P-E45*C1-EY*C2)+SIGMA*(E45-EY)) * -E45*(0.5+EQ*EQ/2.-EQ) ENDIF * EE=EE/FE UD=UD/FE * * RETURN END