Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Often in engineering calculations we want to be able to work with material prope

ID: 658359 • Letter: O

Question

Often in engineering calculations we want to be able to work with material properties that vary with extensive properties like Temperature and Pressure. For example the specific heat of air varies appreciably with temperature. As in that link, these property variations are determined from experiments and tabulated for specific temperature intervals.

The table represents a numerical function, i.e. it gives cp(T).

What I'm looking for is a module to code this in python. Is there a scipy or numpy function which takes a pair of arrays, and returns a function which, when called with a Temperature argument, will return the corresponding heat capacity (linearly interpolating where necessary).

To be clear, I don't want to curve fit the data. It's cumbersome and some accuracy is lost.

Explanation / Answer

The module I was looking for is scipy.interpolate.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote