funsdt
C FUNSDT SOURCE BECC 09/12/07 21:15:34 6579 & acv_b, Rgas_b, q, T_ag, T_bg, & P_r, T_r, u_r, & T_a, P_a, r_a, u_a, d, k0sdt, & T_b, P_b, r_b, u_b, & logan) C C INPUT C C nordpo = order of polynomial for cp and cv (see also C Tmaxcv) C C Tmaxcv = maximum temperature for cv polynomial expansion C cv(T) = cv(Tmaxcv) if T > Tmaxcv C C acv_r = to compute cv and ether for r (and rs); C vector such that C cv = \sum_{i=1,nordpo+1} acv(i) T^{i-1} C ether = \sum_{i=1,nordpo+1} acv(i) T^{i} / (i) C C Rgas_r = gas constant for r and (rs) C C acv_b = to compute cv and ether for rss; C vector such that C cv = \sum_{i=1,nordpo+1} acv(i) T^{i-1} C ether = \sum_{i=1,nordpo+1} acv(i) T^{i} / (i) C C Rgas_b = gas constant for rss C C q = released chemical energy C C T_ag = guess temperature for a (= rs, state ahead the C reactive shock and behind the non-reactive one C in the ZND model) C C T_bg = guess temperature for b (= rss, state behind the C reactive shock in the ZND model) C C T_a = temperature for rs C C C OUTPUT C C p_b, T_b, u_b, C r_b = pressure, temperature, velocity and density for C rss (burnt state behind the SDT) C C d = detonation speed C C k0sdt = fundamental speed of a WDF going from a to b C C p_a, u_a, C r_a = pressure, velocity and density for C rs (unburnt state ahead the SDT) C c implicit none integer nordpo real*8 Tmaxcv, acv_r(1:(nordpo+1)), Rgas_r & , acv_b(1:(nordpo+1)), Rgas_b, q, T_ag, T_bg & , r_r, P_r, T_r, u_r & , T_a, P_a, r_a, u_a, d & , T_b, P_b, r_b, u_b real*8 k0sdt, e_a, cv_a, h_a, gam_a & , gam_b, e_b, cv_b & , c, b, csi, m logical logan C C**** Unburnt state C r_r = P_r / (Rgas_r * T_r) & P_r, T_r, u_r, .true., & T_a, P_a, r_a, u_a, d) C C**** Now we search for the burnt state which travels with the C same speed C k0sdt = d - u_a gam_a = (cv_a + Rgas_r) / cv_a gam_b = (cv_b + Rgas_b) / cv_b C h_a = (gam_a / (gam_a - 1.0D0)) * Rgas_r * T_a c = h_a + q - (e_b - (cv_b * T_bg)) + & (e_a - (cv_a * T_ag)) c = 2.0D0 * c c = c / (k0sdt * k0sdt) c = c + 1.0D0 c = c * (gam_b - 1.0D0) / (gam_b + 1.0D0) if (c .lt. 0.0D0) then write(*,*) 'funsdt.f' write(*,*) 'c < 0' write(*,*) 'Anomaly detected' logan = .true. goto 9999 endif C b = Rgas_r * T_a b = b / (k0sdt * k0sdt) b = b + 1.0D0 b = b * gam_b / (gam_b + 1.0D0) csi = b * b - c if (csi .lt. 0.0D0) then C Non itersection between the rayleigh line C and the Hugoniot adiabatic if (csi .lt. 1.0D-3) then C csi can be considered as zero csi = 0.0D0 else write(*,*) 'csi = ', csi write(*,*) 'csi < 0' write(*,*) 'Anomaly detected' logan = .true. goto 9999 endif else csi = sqrt(csi) endif C Computation of the SDT solution C For the WDT solution, csi = b + csi csi = b - csi r_b = r_a / csi m = k0sdt * r_a p_b = p_a + ((m*m) * ((1.0D0 / r_a) - (1.0D0 / r_b))) t_b = P_b / (Rgas_b * r_b) u_b = d - (m / r_b) C 9999 continue return end
© Cast3M 2003 - Tous droits réservés.
Mentions légales