MadsKirkFoged / EngineeringUnits

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

Specific Heat #18

Closed hbadi closed 8 months ago

hbadi commented 2 years ago

Hi,

I didn't find the specific heat Cp [J.kg.K], did i miss something ? If no, is there a way to extend or derive this new unit as power/(surface*temperature) ?

Best regards.

MadsKirkFoged commented 2 years ago

There is SpecificEntropy which have the same units [JoulePerKilogramKelvin]

Will that do it for you?

hbadi commented 2 years ago

Hello @MadsKirkFoged Yes it works ! Thanks. It'd be great to create a custom dimension using a formula created with existing variable. Best regards.

MadsKirkFoged commented 2 years ago

*Edit just rechanged the name to SpecificHeatCapacity

I have added SpecificHeatCapacity as an alias to SpecificEntropy

It can be used like this:

SpecificEntropy S1 = new SpecificEntropy(10, SpecificEntropyUnit.JoulePerKilogramKelvin);
SpecificHeatCapacity S2 = new SpecificEntropy(10, SpecificEntropyUnit.JoulePerKilogramKelvin);
SpecificHeatCapacity S3 = new SpecificHeatCapacity (10, SpecificEntropyUnit.JoulePerKilogramKelvin);
SpecificHeatCapacity S4 = S1;

You can find it in the newest version