MadsKirkFoged / EngineeringUnits

Working with units made easy with automatic unit-check and converting between units
MIT License
41 stars 10 forks source link

Support for specific thermal resistance / thermal resistivity (K⋅m/W) #9

Closed ikijano closed 2 years ago

ikijano commented 2 years ago

It would be nice if EngineeringUnits would support thermal resistivity unit (K⋅m/W) that would be helpful.

MadsKirkFoged commented 2 years ago

Hi Ikijano,

I have added SpecificThermalResistance to the library:

            SpecificThermalResistance STR = new SpecificThermalResistance(10,SpecificThermalResistanceUnit.MeterKelvinPerKilowatt);
            SpecificThermalResistance STR2 = (Length.FromMeters(3.2) * Temperature.FromKelvins(10)) / Power.FromWatts(23);

            ThermalConductivity TC = 1/STR;

Was this what you were looking for? Can you test the new version of the nuget and report back if you find a bug?

ikijano commented 2 years ago

Hi MadsKirkFoged,

I have played around a little bit. Seems to work OK, but with one addition. SI getter need to be added otherwise SI value is 1000 times smaller. I forked repo and made changes and unit test.

I made pull request #10