Question

(Requirements)

Design, Code, Test a C program which will loop forever calculating the resultant saturated pressure of our mythical vessel of special fluid and air to a global variable; vesselPressPsi, from a temperature (degrees Fahrenheit, global variable vesselTempFahr). Temperature will be provided by using a random number generator. Use the modulus operator to place your random number closer to the range vesselTempFahr (45-1800F). [MDV1] This temperature represents an electrical sensor input that was converted to engineering units. The linear interpolation algorithm and corresponding data tables are based on degrees Celsius (local variable vesselTempCelsius). The program will use the data tables in Appendix A[MDV2] , which provide corresponding pressure for a given Celsius temperature. One data pair is the upper and lower degree Celsius and the other pair is the upper and lower relative saturated pressure for the corresponding temperature. Compute the saturated pressure from the temperature input.

Since temperature in this assignment represents an electrical sensor input, we need to understand some basic constraints with sensors. Sometimes sensors are saturated or at their limits of operations, the sensor may respond (signal) with unknown values outside its working range. This could cause erratic or catastrophic conditions for control systems. This is solved by placing limiter testing at saturation points of sensors. Saturation testing imposes upper and lower bounds on a signal. When the input signal is within the range specified by lower limit and upper limit parameters, the input signal passes through unchanged. When the input signal is outside these bounds, the signal is clipped to the upper or lower bound values.

(Algorithm)

Not every Temperature input will have a direct corresponding pressure. For example if vesselTempCelsius = 65, which is neither of the known Celsius limits in Appendix A. Linear interpolation is a way to fill in the “holes'' in tables. Linear Interpolation is a method of constructing new data points within the range of a discrete set of known data points. Linear interpolation is quick and easy, but at times not very precise, to increase precision is to increase the number of data points with in the know set of data points.

In this assignment, you only have two data points, which represent the upper and lower data range.

Interpolation example with Appendix A:

vesselTempFahr = 147.0

celsius -c lower psi = psi-lower +1 C_upper-c_lower c_upper -c lowepsupper-psi_lower (63 88-60 0 3631-02563) psi = 0.25634 1 63.86-60 psi 0.2563+ 70-60 0.3631-0.2563) Result of hand test is psi= 0.2978 psi

The question is clear in the requirements to design C file. read the *Algorithm* to convert from F to C and see the equation for the ivesselTempFahr. Please write the code in Microsoft word doc. NOT by hand.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

.tt, Inc tu蚁 tude eh float s cont int mAX 2b 120/140, 160 O 2bo, 212, 220,24D, 260/20, 05구 05069,049,,, δ.qq93.). 692,9886ル33Pant p l05 Pti-low e: Vp:/一tbl τ

Add a comment
Know the answer?
Add Answer to:
(Requirements) Design, Code, Test a C program which will loop forever calculating the resultant saturated pressure...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • summatize the following info and break them into differeng key points. write them in yojr own...

    summatize the following info and break them into differeng key points. write them in yojr own words   apartus 6.1 Introduction—The design of a successful hot box appa- ratus is influenced by many factors. Before beginning the design of an apparatus meeting this standard, the designer shall review the discussion on the limitations and accuracy, Section 13, discussions of the energy flows in a hot box, Annex A2, the metering box wall loss flow, Annex A3, and flanking loss, Annex...

  • summarizr the followung info and write them in your own words and break them into different...

    summarizr the followung info and write them in your own words and break them into different key points.   6.5 Metering Chamber: 6.5.1 The minimum size of the metering box is governed by the metering area required to obtain a representative test area for the specimen (see 7.2) and for maintenance of reasonable test accuracy. For example, for specimens incorporating air spaces or stud spaces, the metering area shall span an integral number of spaces (see 5.5). The depth of...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT