Skip to content

New Quantity: SpecificEntropy #322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Nov 24, 2017
Merged

New Quantity: SpecificEntropy #322

merged 13 commits into from
Nov 24, 2017

Conversation

gratestas
Copy link
Contributor

No description provided.

@gratestas gratestas changed the title Feature/add specific entropy [WIP] Feature/add specific entropy Nov 16, 2017
@0xferit 0xferit self-requested a review November 17, 2017 09:06
@0xferit 0xferit changed the title [WIP] Feature/add specific entropy [WIP] New Quantity: SpecificEntropy Nov 17, 2017
@0xferit
Copy link
Contributor

0xferit commented Nov 17, 2017

I reverted bf96253, which is an irrelevant commit, and fixed conflicts. There is another issue with SpecificEntropy conversions and @gratestas is working on it.

detected an error during convertion from kilocalories to joule unit base
Copy link
Contributor

@0xferit 0xferit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks fine except consistency in scientific notation. AFAIK we prefer using lower-case e without zero padding.

@gratestas gratestas changed the title [WIP] New Quantity: SpecificEntropy New Quantity: SpecificEntropy Nov 17, 2017
"Name": "SpecificEntropy",
"BaseUnit": "JoulePerKilogramKelvin",
"XmlDoc": "The SpecificEntropy",
"XmlDocRemarks": "Specific entropy is an amount of energy required to raise temperature of a substance by 1 Kelvin per unit mass",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

XmlDocRemarks is not supported, move this into XmlDoc.

"SingularName": "CaloriePerGramKelvin",
"PluralName": "CaloriesPerGramKelvin",
"FromUnitToBaseFunc": "x*4.184e3",
"FromBaseToUnitFunc": "x/4.184e3",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just asking to prevent any potential misunderstanding: Do you suggest to change the 2.39005e-4 with what you got, 2.390057e-4, in SpecificEntropyTests.cs?

Copy link
Owner

@angularsen angularsen Nov 23, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use the must accurate value found in a reference source 0.0002390057361377 in the test.
Then these JSON functions must also be updated as they seem wrong, but I don't know if they should be represented as some calculation or as the same constant.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't spot the error in JSON function :/

Fixed values in tests.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, https://www.translatorscafe.com/unit-converter/en/specific-heat-capacity/1-6/joule%2Fkilogram%2FK-calorie%20(IT)%2Fgram%2F%C2%B0C/ gives 0.000238845896627 not 0.0002390057361377.

I updated values in the test as 0.0002390057.

I would like to leave this p.r. to you and @gratestas to finalize before merging, as I'm a bit confused.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Careful, you linked to the IT calorie unit. It is slightly different than Th calories. I think we should add both and name them explicitly to avoid ambiguity.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, yeah, but I copied your link :)

I agree that we should fix this ambiguity in the entire library soon.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, my bad. The JSON functions are probably good, at least they match the constant pretty well.

@0xferit
Copy link
Contributor

0xferit commented Nov 24, 2017

I changed the abbreviations according to https://www.princeton.edu/~maelabs/mae324/glos324/entropy.htm

Copy link
Owner

@angularsen angularsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell, this looks good to go.

@0xferit 0xferit merged commit 139fb65 into angularsen:master Nov 24, 2017
@angularsen
Copy link
Owner

Nice, @ferittuncer do you want to do the honors of releasing a new nuget?

@0xferit
Copy link
Contributor

0xferit commented Nov 25, 2017

Sure @angularsen, 3.80.0 is on its way! :)

@angularsen
Copy link
Owner

Wohoo! :-)

@angularsen
Copy link
Owner

angularsen commented Nov 26, 2017

@ferittuncer I noticed you didn't push the git tag UnitsNet/3.80.0, so I've updated the wiki with a missing parameter git push --follow-tags that auto-pushes the tags when you push the code. I use a bash alias gpu='git push --follow-tags --set-upstream' that does this for me, so I forgot about it.

If you just want to push tags, and not code, you can run git push --tags.

If you could run either of these two commands to push the tag you have locally, that would be great!

@0xferit
Copy link
Contributor

0xferit commented Nov 26, 2017

Thanks for information. I am going to do just as you described next time @angularsen. I see that you released 3.81.0 now, so do I have to take any action for now?

@angularsen
Copy link
Owner

angularsen commented Nov 26, 2017

Yes, please push tag 3.80.0 so that the repository has a tag for the release. I could create the tag, but then you and me/others would have different versions of the same tag.

git push --tags

The tags then show under Releases: https://github.com/angularsen/UnitsNet/releases

I also try to add the changes to the tag text, but I've not been strict about this and often forgot or didn't bother. The advantage is that the Releases page would list the changes per release. This can be edited from the github website too.

@0xferit
Copy link
Contributor

0xferit commented Nov 27, 2017

@angularsen I did push the tags but it seems I pushed a wrong tag mistakenly too. Sorry, I'm not experienced with tags. What should we do about this? 7bdd0f0

This tag was created in my local repo when I mistakenly bumped JsonNet version, I dropped that commit but it seems the tag remained, so when I pushed all the tags, you know...

@angularsen
Copy link
Owner

No biggie, just delete the tag both locally and on remote.

git push --delete origin tagname   #remote 
git tag --delete tagname                #locally

The only thing is that if anyone else has pulled from the repo, they will also have the tag locally and if they are a collaborator they will re-push the same tag back up again. Git is a bit messy on these things.

@0xferit
Copy link
Contributor

0xferit commented Nov 27, 2017

Yup, tags corrected. : )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants