Python Forum
plotting based on the results of mathematical formulas
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
plotting based on the results of mathematical formulas
#1
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.
Reply
#2
(Feb-08-2024, 07:12 PM)Timur Wrote: How to derive the graphical dependence of Rmin, Rmax from P1-Pmax
What is the meaning of this question?
« We can solve any problem by introducing an extra level of indirection »
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Updating formulas in Excel - best solution MasterOfDestr 4 682 Mar-11-2024, 01:02 PM
Last Post: MasterOfDestr
  Taking Mathematical Expressions from Strings quest 2 718 Jul-02-2023, 01:38 PM
Last Post: Pedroski55
  openpyxl insert list with formulas Irv1n 1 1,561 Sep-16-2021, 08:10 AM
Last Post: Irv1n
  Help with a query - to show possible formulas Yanos 1 1,777 Nov-02-2020, 12:18 AM
Last Post: jefsummers
  About mathematical equations seyidcemkarakas 3 2,061 Oct-04-2020, 01:21 PM
Last Post: Gribouillis
  Search Results Web results Printing the number of days in a given month and year afefDXCTN 1 2,245 Aug-21-2020, 12:20 PM
Last Post: DeaD_EyE
  Recognising mathematical expressions from word and pdf file Preeti15 0 1,802 Aug-19-2020, 09:06 AM
Last Post: Preeti15
  Mathematical Conversion Scripts for Weather Station Mickey53usa 11 4,651 Jun-24-2020, 03:14 AM
Last Post: buran
  Mathematical Operators in String AgileAVS 1 2,401 Mar-04-2020, 04:14 PM
Last Post: Gribouillis
  How to append one function1 results to function2 results SriRajesh 5 3,177 Jan-02-2020, 12:11 PM
Last Post: Killertjuh

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020