Base: Add DynamicViscosity and SpecificEnergy units

This commit is contained in:
Oliver Oxtoby
2017-08-17 10:10:50 +02:00
committed by wmayer
parent 21fd2743a8
commit 38fa712032
4 changed files with 22 additions and 0 deletions

View File

@@ -167,6 +167,10 @@ QString UnitsSchemaInternal::schemaTranslate(const Quantity &quant, double &fact
unitString = QString::fromLatin1("W");
factor = 1000000;
}
else if (unit == Unit::SpecificEnergy) {
unitString = QString::fromLatin1("m^2/s^2");
factor = 1000000;
}
else if (unit == Unit::HeatFlux) {
unitString = QString::fromLatin1("W/m^2");
factor = 1.0;
@@ -175,6 +179,10 @@ QString UnitsSchemaInternal::schemaTranslate(const Quantity &quant, double &fact
unitString = QString::fromLatin1("mm/s");
factor = 1.0;
}
else if (unit == Unit::DynamicViscosity) {
unitString = QString::fromLatin1("kg/(m*s)");
factor = 0.001;
}
else {
// default action for all cases without special treatment:
unitString = quant.getUnit().getString();