I'm working on modifying a program I am using for iteration in regards to some compressible/thermodynamics topics. I'm now modifying some isentropic relations to account for a Mach variable, but my sheet goes haywire with unitless declarations and "value must be scalar". I've attached both sheets below for comparison to how it should run and then what I want to do. Any immediate help would be appreciated.
Solved! Go to Solution.
You define the p.t function with two parameters (gamma and M).
When you call it to define pt, you supply only one parameter.
Same for T.t
Correct that and see what happens.
Success!
Luc
You define the p.t function with two parameters (gamma and M).
When you call it to define pt, you supply only one parameter.
Same for T.t
Correct that and see what happens.
Success!
Luc
As far as I see from the pic you defined T.t and p.t as functions with two arguments but you only call them with on single argument. The result of doing so is a function, not a scalar value.
See the difference:
Solutions: Either define those function with just one argument and it will use the formerly defined value of M, OR if you want to keep M variable in future usages of the functions, you call the functions with both arguments when you use them later.