0% found this document useful (0 votes)
25 views2 pages

Boiling Curve Planning

Uploaded by

jlkelley101
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views2 pages

Boiling Curve Planning

Uploaded by

jlkelley101
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Names of Variables and Uses

● userTemperature - Used to store the temperature input from the user


● x1 - Stores the x value of the first point
● y1 - Stores the y value of the first point
● x2 - Stores the x value of the second point
● y2 - Stores the y value of the second point
● x3 - Stores the x value of the third point
● y3 - Stores the y value of the third point
● x4 - Stores the x value of the fourth point
● y4 - Stores the y value of the fourth point
● x5 - Stores the x value of the fifth point
● y5 - Stores the y value of the fifth point
● surfaceHeatFlux - Stores the value of the surface heat flux after it has been calculated

Steps:
1. Initiate variables for all points
2. Ask the user for input of a temperature
3. If the input is outside the bounds (userTermperature < x1 OR userTemperature > x5):
a. Display an error message
4. If the input is inside the bounds (userTermperature < x1 OR userTemperature > x5):
#Note: The correct formula for the formula is yInitial * (userTemperate / xInitial) ^ (log(yAfter /
yInitial) / log(xAfter / xInitial)). I didn’t know we were using a different linear interpolation
formula.
a. If the input is within the bounds (x1 <= userTemperature < x2):
i. surfaceHeatFlux = y1 + ((userTemperature - x1) * (y2 - y1) / (x2 - x1))
b. If the input is within the bounds (x2 <= userTemperature < x3):
i. surfaceHeatFlux = y2 + ((userTemperature - x2) * (y3 - y2) / (x3 - x2))
c. If the input is within the bounds (x3 <= userTemperature < x4):
i. surfaceHeatFlux = y3 + ((userTemperature - x3) * (y4 - y3) / (x4 - x3))
d. If the input is within the bounds (x4 <= userTemperature <= x5):
i. surfaceHeatFlux = y4 + ((userTemperature - x4) * (y5 - y4) / (x5 - x4))
e. Once surfaceHeatFlux is calculated, display it to the user
Test Cases:

User Input Value output

50 331798

100 42835

3 3347

420 231940

70 122826

1000 1084664

666 526509

777 692543

1.3 1000

30 1500000

120 25000

1200 1500000

-100 DNE

0 DNE

10000 DNE

Green = typical
Yellow = edge
Red = corner

You might also like