Use Advanced Search to search the entire archive.
[jsr363-experts] Re: Request for clarification on Unit commensurability
- From: Werner Keil <
>
- To: "
" <
>
- Subject: [jsr363-experts] Re: Request for clarification on Unit commensurability
- Date: Tue, 16 Dec 2014 12:56:58 +0100
(...snip...)
http://www.dagego.de/info_waermebedarf.html (...snip...)
>
where
>
Quantity<Energy> energy = (Quantity<Energy>) volume.multiply(temperature);
>
>
*Wrong:* the dimensions are clearly incompatibles. I suspect that the
>
equations given in the above page have a hidden constant, something like
>
the Boltzmann constant. In any case the above Java code is invalid and must
>
be rejected. Indeed, I already deleted this example from the specification
>
yesterday (and was horrified when I saw it).
>
>
To make the above code example valid, you would probably need to multiply
>
by the units of the Boltzmann constant, or something along that line.
>
>
Martin
>
>
The example quotes
>
Gesetz von der Erhaltung der Energie ( in voller Allgemeinheit aufgestellt
von Robert Mayer 1842)
referring to
http://en.wikipedia.org/wiki/First_law_of_thermodynamics
Sorry, I won't translate all of these, but the formulas are likely
self-explaining anyway.
*P = Q * Delta T * c / 3600* kennengelernt. Dort lesen Sie bitte auch die
Erklärung über die Parameter nach. Die Formel besagt, welche Leistung P
nötig ist um eine Wasser*strom* von T1 auf T2 zu erhitzen.
Um auszurechnen welche Arbeit nötig ist um eine Wasser*menge* von T1 auf T2
zu erhitzen muss die Formel erweitert werden um die Zeiteinheit t.
*P*t = t*Q * Delta T * c / 3600*
P*t ist Leistung mal Zeiteinheit; gleich Arbeit. Leistung wird in KW
(Kilowatt) angegeben. Arbeit wird in KWh (Kilowattstunden) angegeben. Da
*P * t = W*
folgt:
*W = t*Q * Delta T * c / 3600*
Eine Vereinfachung is noch nötig. Der Förderstrom Q ist definiert durch
Masse pro Zeiteinheit. Q=m/t. Ersetzen Sie in der Formel Q durch m/t.
Kürzen Sie dann t raus. Es ergibt sich die sehr einfache Formel:
*W = m * Delta T * c / 3600*
*W = 1000l * 20K * 4200 / 3600W = 23230Wh = 23,33KWh*
Which is why 22.33 KWh is likely <Energy> or what would you call it from
our available vocabulary?;-)
That's precisely (well we have formatting issues not just in this case that
need to be improved) the correct number the SmartHome brief demo shows.
A key reason why JSR-275 was dismissed by EC Members like Google was the
"geeky" "5th Grade High School Teacher" (that was literally one of the PDR
comments;-) attitude they saw in the spec and also the JSR at the time.
If we don't want to follow the same fate, we need to provide those who are
interested (e.g. Eclipse SmartHome, Opower's Open Source efforts or others)
useful answers to questions like "How could JSR 363 help me save energy and
money in my home?" not "What's the Boltzmann Constant?"
If you feel, either of the two lines
Quantity<Energy> energy = (Quantity<Energy>) volume.multiply(temperature);
Quantity<Energy> result = (energy.multiply(4200)).divide(3600);
in
https://github.com/unitsofmeasurement/uom-demos/blob/master/console/ri/src/main/java/tec/uom/demo/SmartHomeDemo.java
needed tweak, e.g. that constant "c" (whatever it is, the document refers
to Mayer's work but does not name it, and nobody who wants to save money on
gas cares, they only want to know the end result;-) please go ahead, but
under no circumstance delete the demo, it is a small but important example
for a real live use case like Smart Home and Energy Saving;-)
Regards,
Werner