newRPL: Handling of units
|
09-28-2015, 01:50 PM
Post: #3
|
|||
|
|||
RE: newRPL: Handling of units
(09-27-2015 02:29 PM)Han Wrote: How would the system handle mixed units involving temperature? For example, what if the equation Q=m*C*(t2-t1) were instead written as Q=m*C*t2-m*C*t1? Good point. When there's mixed units involved, the system cannot convert from raw temperature to delta temperature automatically, so the user needs to be more careful with the units. In your example, the constant C would be defined in terms of Δt, so its unit would be ΔK (or compatible scale). If you provide just temperature (let's say in Celsius), when you evaluate each term, m*C*t2 would convert t2 to Kelvin automatically, then the second term would convert t1 to Kelvin. Each term would contain now an absolute temperature. Subtraction of mixed units would work, but the system would not be able to detect and convert to ΔK, so the final unit would remain with K, not ΔK, and it wouldn't cancel out with the unit in C. The result would be numerically correct, but the units would have the K/ΔK artifact, since the system cannot do that conversion for you. Now physically, m*C*t2 has no meaning unless t2 is seen as (t2-0), then you'd be subtracting the energy to heat that mass from 0 to t1 from the energy to heat up from zero to t2. This is what the 50g currently assumes: all temperatures are deltas when there's mixed units involved. Therefore, if you plan to use that type of expression, you really need to provide t1 and t2 already in Δ units, which would cancel out with the ΔK in the C constant to give you proper energy units. Why bother with all this Δ unit business? If the expression is properly formed to isolate the temperatures, (t2-t1) can be done in any temperatures, and the system would be able to convert automatically, something that the current system can't do. Try: << 1_°C 273.15_K - >> and you'll be surprised with an inconsistent units error. Also, when you use Celsius or Fahrenheit in an equation, the new system automatically converts to an absolute scale (Kelvin or Rankine respectively), to produce correct results in all cases, with the only "glitch" of the K/ΔK or °R/Δ°R if your constants were defined in terms of deltas. In short: With the old system: Q=m*C*(t2-t1) --> If you use different scale = Inconsistent units Q=m*C*t2-m*C*t1 --> If you use different scale --> Incorrect result, units OK E=σT⁴ --> Using any scale other than K or °R --> Incorrect result ΔE=σ(T2⁴-T1⁴) --> Using any scale other than K or °R --> Incorrect result With the proposed system: Q=m*C*(t2-t1) --> If you use different scale = Correct results, units OK Q=m*C*t2-m*C*t1 --> If you use different scale --> Correct result, K/ΔK glitch. Using delta units for t2 and t1 --> Correct result and units. E=σT⁴ --> Using any scale other than K or °R --> Correct result and units ΔE=σ(T2⁴-T1⁴) --> Using any scale other than K or °R --> Correct result and units In other words, the new system will never return an incorrect result, but can give you that K/ΔK glitch if you are not careful with your units. Otherwise you can mix and match temperature scales. I think that's an improvement, isn't it? |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)