Feb-08-2024, 07:12 PM
(This post was last modified: Feb-08-2024, 07:19 PM by Gribouillis.)
Good day to all! I'm asking for help. How to derive the graphical dependence of Rmin, Rmax from P1-Pmax with the following mathematical dependencies:
elif Kg == 3 and Kz == 3:
print('Expected cloud combustion mode - 4')
Upl = 200 # visible flame front velocity 200 m/s
for R in np.arange(Rmin, Rmax, Ri):
Rx1 = R / ((E1/Ratm)**0.333)
Rcr1 = 0.34
if 0 < Rx1 <= Rcp1:
Px1 = ((Upl ** 2) / (340 ** 2)) * ((7 - 1) / 7) * ((0.83 / 0.34) - (0.14 / (0.34 ** 2)))
Ix1 = ((Upl / 340) * ((7 - 1) / 7)) * (1 - 0.4 * (( Upl / 340) * ((7 - 1) / 7))) * ((0.06 / 0.34) + (0.01 / (0.34 ** 2)) - (0.0025 / (0.34 ** 3)))
P1 = Px1 * Ratm
I1 = Ix1 * (Ratm ** 1 / 3 ) * ((E1 ** 1 / 3 ) / 340)
else:
Px1 = ((Upl ** 2) / (340 ** 2)) * ((7 - 1) / 7) * ((0.83 / Rx1) - (0.14 / (Rx1 ** 2)))
Ix1 = ((Upl / 340) * ((7 - 1) / 7)) * (1 - 0.4 * (( Upl / 340) * ((7 - 1) / 7))) * ((0.06 / Rx1) + (0.01 / (Rx1 ** 2)) - (0.0025 / (Rx1 ** 3)))
P1 = Px1 * Ratm
I1 = Ix1 * (Ratm ** 1 / 3 ) * ((E1 ** 1 / 3 ) / 340)
Rx2 = R / ((E2/Ratm)**0.333)
Rcr2 = 0.34
if 0 < Rx2 <= Rcr2:
Px2 = ((Upl ** 2) / (340 ** 2)) * ((7 - 1) / 7) * ((0.83 / 0.34) - (0.14 / (0.34 ** 2)))
Ix2 = ((Upl / 340) * ((7 - 1) / 7)) * (1 - 0.4 * (( Upl / 340) * ((7 - 1) / 7))) * ((0.06 / 0.34) + (0.01 / (0.34 ** 2)) - (0.0025 / (0.34 ** 3)))
P2 = Px2 * Ratm
I2 = Ix2 * (Ratm ** 1 / 3 ) * ((E2 ** 1 / 3 ) / 340)
else:
Px2 = ((Upl ** 2) / (340 ** 2)) * ((7 - 1) / 7) * ((0.83 / Rx2) - (0.14 / (Rx2 ** 2)))
Ix2 = ((Upl / 340) * ((7 - 1) / 7)) * (1 - 0.4 * (( Upl / 340) * ((7 - 1) / 7))) * ((0.06 / Rx2) + (0.01 / (Rx2 ** 2)) - (0.0025 / (Rx2 ** 3)))
P2 = Px2 * Ratm
I2 = Ix2 * (Ratm ** 1 / 3 ) * ((E2 ** 1 / 3 ) / 340)
Rx3 = R / ((E3 / Ratm) ** 0.333)
Rcr3 = 0.34
if 0 < Rx3 <= Rcr3:
Px3 = ((Upl ** 2) / (340 ** 2)) * ((7 - 1) / 7) * ((0.83 / 0.34) - (0.14 / (0.34 ** 2)))
Ix3 = ((Upl / 340) * ((7 - 1) / 7)) * (1 - 0.4 * (( Upl / 340) * ((7 - 1) / 7))) * ((0.06 / 0.34) + (0.01 / (0.34 ** 2)) - (0.0025 / (0.34 ** 3)))
P3 = Px3 * Ratm
I3 = Ix3 * (Ratm ** 1 / 3 ) * ((E3 ** 1 / 3 ) / 340)
else:
Px3 = ((Upl ** 2) / (340 ** 2)) * ((7 - 1) / 7) * ((0.83 / Rx3) - (0.14 / (Rx3 ** 2)))
Ix3 = ((Upl / 340) * ((7 - 1) / 7)) * (1 - 0.4 * (( Upl / 340) * ((7 - 1) / 7))) * ((0.06 / Rx3) + (0.01 / (Rx3 ** 2)) - (0.0025 / (Rx3 ** 3)))
P3 = Px3 * Ratm
I3 = Ix3 * (Ratm ** 1 / 3 ) * ((E3 ** 1 / 3 ) / 340)
Rx4 = R / ((E4/Ratm)**0.333)
Rcp4 = 0.34
if 0 < Rx4 <= Rcp4:
Px4 = ((Upl ** 2) / (340 ** 2)) * ((7 - 1) / 7) * ((0.83 / 0.34) - (0.14 / (0.34 ** 2)))
Ix4 = ((Upl / 340) * ((7 - 1) / 7)) * (1 - 0.4 * (( Upl / 340) * ((7 - 1) / 7))) * ((0.06 / 0.34) + (0.01 / (0.34 ** 2)) - (0.0025 / (0.34 ** 3)))
P4 = Px4 * Ratm
I4 = Ix4 * (Ratm ** 1 / 3 ) * ((E4 ** 1 / 3 ) / 340)
else:
Px4 = ((Upl ** 2) / (340 ** 2)) * ((7 - 1) / 7) * ((0.83 / Rx4) - (0.14 / (Rx4 ** 2)))
Ix4 = ((Upl / 340) * ((7 - 1) / 7)) * (1 - 0.4 * (( Upl / 340) * ((7 - 1) / 7))) * ((0.06 / Rx4) + (0.01 / (Rx4 ** 2)) - (0.0025 / (Rx4 ** 3)))
P4 = Px4 * Ratm
I4 = Ix4 * (Ratm ** 1 / 3 ) * ((E4 ** 1 / 3 ) / 340)
Rxmax = R / ((Emax / Ratm) ** 0.333)
Rxmax = 0.34
if 0 < Rxmax <= Rxmax:
Pxmax = ((Upl ** 2) / (340 ** 2)) * ((7 - 1) / 7) * ((0.83 / 0.34) - (0.14 / (0.34 ** 2)))
Ixmax = ((Upl / 340) * ((7 - 1) / 7)) * (1 - 0.4 * (( Upl / 340) * ((7 - 1) / 7))) * ((0.06 / 0.34) + (0.01 / (0.34 ** 2)) - (0.0025 / (0.34 ** 3)))
Pmax = Pxmax * Ratm
Imax = Ixmax * (Ratm ** 1 / 3 ) * ((Emax ** 1 / 3 ) / 340)
else:
Pxmax = ((Upl ** 2) / (340 ** 2)) * ((7 - 1) / 7) * ((0.83 / Rxmax) - (0.14 / (Rxmax ** 2)))
Ixmax = ((Upl / 340) * ((7 - 1) / 7)) * (1 - 0.4 * (( Upl / 340) * ((7 - 1) / 7))) * ((0.06 / Rxmax) + (0.01 / (Rxmax ** 2)) - (0.0025 / (Rxmax ** 3)))
Pmax = Pxmax * Ratm
Imax = Ixmax * (Ratm ** 1 / 3 ) * ((Emax ** 1 / 3 ) / 340)
print(f"at {dot1} m R = {R} m, Rx1 = {Rx1}, P1 = {P1/1000} kPa, I1 = {I1} Pa * s,\
\ppri {dot2} m and R = {R} m, Rx2 = {Rx2}, P2 = {P2/1000} kPa, I2 = {I2} Pa * s,\
\ppri {dot3} m and R = {R} m, Rx3 = {Rx3}, P3 = {P3/1000} kPa, I3 = {I3} Pa * s,\
\ppri {dot4} m and R = {R} m, Rx4 = {Rx4}, P4 = {P4/1000} kPa, I4 = {I4} Pa * s,\
\ppri {dmax} m and R = {R} m, Rxmax = {Rxmax}, Pmax = {Pmax/1000} kPa, Imax = {Imax} Pa*s")
Gribouillis write Feb-08-2024, 07:19 PM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
