Skip to content
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

ADM1 Documentation Update #1116

Merged
merged 3 commits into from
Sep 7, 2023
Merged

Conversation

MarcusHolly
Copy link
Contributor

Summary/Motivation:

Updates ADM1 and Modified ADM1 documentation based on changes made in #1038

Legal Acknowledgement

By contributing to this software project, I agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the license terms described in the LICENSE.txt file at the top level of this directory.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

@MarcusHolly MarcusHolly added documentation Improvements or additions to documentation Priority:Normal Normal Priority Issue or PR labels Aug 25, 2023
@MarcusHolly MarcusHolly self-assigned this Aug 25, 2023
@codecov
Copy link

codecov bot commented Aug 25, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.18% 🎉

Comparison is base (971dbce) 94.74% compared to head (c8e5cb7) 94.92%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1116      +/-   ##
==========================================
+ Coverage   94.74%   94.92%   +0.18%     
==========================================
  Files         331      331              
  Lines       32501    32501              
==========================================
+ Hits        30792    30852      +60     
+ Misses       1709     1649      -60     

see 7 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MarcusHolly MarcusHolly marked this pull request as ready for review August 25, 2023 20:16
@@ -139,13 +139,14 @@ Kinetic Parameters
"First-order decay rate for X_pro, k_dec_X_pro", ":math:`k_{dec,X_{pro}}`", "k_dec_X_pro", 0.02, ":math:`\text{d}^{-1}`"
"First-order decay rate for X_ac, k_dec_X_ac", ":math:`k_{dec,X_{ac}}`", "k_dec_X_ac", 0.02, ":math:`\text{d}^{-1}`"
"First-order decay rate for X_h2, k_dec_X_h2", ":math:`k_{dec,X_{h2}}`", "k_dec_X_h2", 0.02, ":math:`\text{d}^{-1}`"
"Water dissociation constant, KW", ":math:`KW`", "KW", 2.08e-14, ":math:`(\text{kmol/}\text{m}^3)^2`"
"Water dissociation constant, pKW", ":math:`pKW`", "pKW", 14, ":math:`\text{dimensionless}`"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"Water dissociation constant, pKW", ":math:`pKW`", "pKW", 14, ":math:`\text{dimensionless}`"
"Water dissociation constant, pKW", ":math:`pK_W`", "pKW", 14, ":math:`\text{dimensionless}`"

Copy link
Contributor

Choose a reason for hiding this comment

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

I was debating whether we should explicitly describe in terms of "negative logarithm of ..." but I see below in constraints that that gets spelled out, so perhaps this is good enough.

Comment on lines 209 to 214
"Mass concentration of valerate, va-", ":math:`C_{va,ref} = C_{va} (1 + \frac{S_{H}}{K_a_va})`"
"Mass concentration of butyrate, bu-", ":math:`C_{bu,ref} = C_{bu} (1 + \frac{S_{H}}{K_a_bu})`"
"Mass concentration of propionate, pro-", ":math:`C_{pro,ref} = C_{pro} (1 + \frac{S_{H}}{K_a_pro})`"
"Mass concentration of acetate, ac-", ":math:`C_{ac,ref} = C_{ac} (1 + \frac{S_{H}}{K_a_ac})`"
"Molar concentration of bicarbonate, HCO3", ":math:`pK_a_co2 = log(M_{co2}) - log(M_{hco3}) + pH`"
"Molar concentration of ammonia, NH3", ":math:`pK_a_IN = log(M_{nh4}) - log(M_{nh3}) + pH`"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you need curly braces for any math expressions that have more than one underscore. This is what is currently showing in readthedocs:
image

"Mass concentration of acetate, ac-", ":math:`C_{ac} = \frac{K_{a,ac} * C_{ac,ref}}{K_{a,ac} + S_{H}}`"
"Molar concentration of bicarbonate, HCO3", ":math:`M_{hco3} = \frac{K_{a,co2} * \frac{C_{S_{IC},ref}}{12}}{K_{a,co2} + S_{H}}`"
"Molar concentration of ammonia, NH3", ":math:`M_{nh3} = \frac{K_{a,IN} * \frac{C_{S_{IN},ref}}{14}}{K_{a,IN} + S_{H}}`"
"Water dissociation constant constraint", ":math:`log(10^{-pKW}) = log(1e-14) + (\frac{55900}{R} * (\frac{1}{T_{ref}} - \frac{1}{T}))`"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"Water dissociation constant constraint", ":math:`log(10^{-pKW}) = log(1e-14) + (\frac{55900}{R} * (\frac{1}{T_{ref}} - \frac{1}{T}))`"
"Water dissociation constant constraint", ":math:`log(10^{-pKW}) = log(10^{-14}) + (\frac{55900}{R} * (\frac{1}{T_{ref}} - \frac{1}{T}))`"

"Mass concentration of acetate, ac-", ":math:`C_{ac} = \frac{K_{a,ac} * C_{ac,ref}}{K_{a,ac} + S_{H}}`"
"Molar concentration of bicarbonate, HCO3", ":math:`M_{hco3} = \frac{K_{a,co2} * \frac{C_{S_{IC},ref}}{12}}{K_{a,co2} + S_{H}}`"
"Molar concentration of ammonia, NH3", ":math:`M_{nh3} = \frac{K_{a,IN} * \frac{C_{S_{IN},ref}}{14}}{K_{a,IN} + S_{H}}`"
"Water dissociation constant constraint", ":math:`log(10^{-pKW}) = log(1e-14) + (\frac{55900}{R} * (\frac{1}{T_{ref}} - \frac{1}{T}))`"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"Water dissociation constant constraint", ":math:`log(10^{-pKW}) = log(1e-14) + (\frac{55900}{R} * (\frac{1}{T_{ref}} - \frac{1}{T}))`"
"Water dissociation constant constraint", ":math:`log(10^{-pKW}) = log(10^{-14}) + (\frac{55900}{R} * (\frac{1}{T_{ref}} - \frac{1}{T}))`"

Comment on lines 281 to 286
"Mass concentration of valerate, va-", ":math:`C_{va,ref} = C_{va} (1 + \frac{S_{H}}{K_a_va})`"
"Mass concentration of butyrate, bu-", ":math:`C_{bu,ref} = C_{bu} (1 + \frac{S_{H}}{K_a_bu})`"
"Mass concentration of propionate, pro-", ":math:`C_{pro,ref} = C_{pro} (1 + \frac{S_{H}}{K_a_pro})`"
"Mass concentration of acetate, ac-", ":math:`C_{ac,ref} = C_{ac} (1 + \frac{S_{H}}{K_a_ac})`"
"Molar concentration of bicarbonate, HCO3", ":math:`pK_a_co2 = log(M_{co2}) - log(M_{hco3}) + pH`"
"Molar concentration of ammonia, NH3", ":math:`pK_a_IN = log(M_{nh4}) - log(M_{nh3}) + pH`"
Copy link
Contributor

Choose a reason for hiding this comment

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

Check these again for the issue with more than one underscore in certain math expressions, requiring curly braces for properly displaying in readthedocs (see previous comment)

Copy link
Contributor

@adam-a-a adam-a-a left a comment

Choose a reason for hiding this comment

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

Looks good- just some subtle changes to incorporate

Copy link
Contributor

@agarciadiego agarciadiego left a comment

Choose a reason for hiding this comment

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

LGTM

@bknueven bknueven enabled auto-merge (squash) September 7, 2023 15:39
@bknueven bknueven merged commit 3b37c9c into watertap-org:main Sep 7, 2023
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation Priority:Normal Normal Priority Issue or PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants