Skip to content

Conversation

@farid-zare
Copy link
Collaborator

Please include a short description of enhancement here

I hereby confirm that I have:

  • Tested my code on my own machine
  • Followed the guidelines in the Contributing Guide
  • Selected develop as a target branch (top left drop-down menu)

(Note: You may replace [ ] with [X] to check the box)

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +22 to +26
% S° = standard entropy (J/mol*K)
S = A*log(t) + B*t + C*(t^2)/2 + D*(t^3)/3 - E/(2*t^2) + G;
% TS° = standard entropy (kJ/mol)
TS = T*1000*S;

Choose a reason for hiding this comment

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

P0 Badge Fix TS term scaling in Gibbs energy calculation

The newly added waterGibbsEnergyOfFormation computes S using the NASA polynomial coefficients, which return entropy in J/mol·K. To obtain the TS term in kJ/mol you need to multiply by T (K) and divide by 1000. The current code uses TS = T*1000*S, which multiplies by 1000 instead of dividing, producing a TS value that is three orders of magnitude too large (e.g., at 298 K the term is ~20 000 kJ/mol rather than ~20 kJ/mol). As a result dGf0 becomes grossly inaccurate and will propagate incorrect thermodynamic data wherever this helper is used. Consider changing the conversion to TS = T .* S / 1000.

Useful? React with 👍 / 👎.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@rmtfleming Hi Ronan,
This is a comment from ChatGPT Codex that I have added. Do you find this useful?
Best,
Farid

@github-actions
Copy link
Contributor

Summary:

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️
251 198 0 53

Failed Tests:

No failed tests ✨

Github Test Reporter by CTRF 💚

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