-
Notifications
You must be signed in to change notification settings - Fork 333
Develop #2578
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
Open
farid-zare
wants to merge
8
commits into
master
Choose a base branch
from
develop
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Develop #2578
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
02289ff
modification of mosek param
rmtfleming 61dc963
Merge branch 'develop' of github.com:rmtfleming/cobratoolbox into dev…
rmtfleming 78cad7c
getCorresponding updated
rmtfleming 29ad8b3
gitmoduels updated to follow master
rmtfleming c8483f3
gitmoduels updated to follow master or main for matgpt
rmtfleming e664689
papers submodule: track master; sync to origin/master
rmtfleming ce81ec0
this command should work: git submodule foreach git pull
rmtfleming 5ced9f6
Merge pull request #2576 from rmtfleming/develop
rmtfleming File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule papers
updated
92 files
28 changes: 28 additions & 0 deletions
28
src/analysis/thermo/reactantContribution/waterGibbsEnergyOfFormation.m
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| function dGf0=waterGibbsEnergyOfFormation(T) | ||
| %http://webbook.nist.gov/cgi/cbook.cgi?ID=C7732185&Units=SI&Mask=2#ref-2 | ||
| A =-203.6060; | ||
| B =1523.290; | ||
| C =-3196.413; | ||
| D =2474.455; | ||
| E =3.855326; | ||
| F =-256.5478; | ||
| G =-488.7163; | ||
| H =-285.8304; | ||
|
|
||
| % t = temperature (K) / 1000. | ||
| t=T/1000; | ||
|
|
||
| % Cp = heat capacity (J/mol*K) | ||
| %Cp = A + B*t + C*t2 + D*t3 + E/t2 | ||
|
|
||
| % H° = standard enthalpy (kJ/mol) | ||
| dHf_liquid = -285.83; % (kJ/mol) | ||
| H = dHf_liquid + A*t + B*((t^2)/2) + C*(t^3)/3 + D*(t^4)/4 - E/t + F - H; | ||
|
|
||
| % 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; | ||
|
|
||
| dGf0 = H - TS; | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule tutorials
updated
41 files
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The newly added
waterGibbsEnergyOfFormationcomputesSusing the NASA polynomial coefficients, which return entropy in J/mol·K. To obtain theTSterm in kJ/mol you need to multiply byT(K) and divide by 1000. The current code usesTS = T*1000*S, which multiplies by 1000 instead of dividing, producing aTSvalue 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 resultdGf0becomes grossly inaccurate and will propagate incorrect thermodynamic data wherever this helper is used. Consider changing the conversion toTS = T .* S / 1000.Useful? React with 👍 / 👎.
There was a problem hiding this comment.
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