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

Add molar flows for precipitate and reagent to simplify reaktoro integration #1498

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

avdudchenko
Copy link
Contributor

Fixes/Resolves:

N/A
(replace this with the issue # fixed or resolved, if no issue exists then a brief statement of what this PR does)

Summary/Motivation:

Adds molar flows of reagents and precipitates to simplify integration with reaktoro.

Changes proposed in this PR:

  • adds flow_mol_precipitate and flow_mol_reagent as vars
  • minor updates to scaling and cofing

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.

@avdudchenko avdudchenko changed the title Update stoichiometric_reactor.py Add molar flows for precipitate and reagent to simplify reaktoro integration Sep 28, 2024
@ksbeattie ksbeattie added the Priority:Normal Normal Priority Issue or PR label Oct 3, 2024
@ksbeattie
Copy link
Contributor

@OOAmusat @zacharybinger can you review?

Copy link
Contributor

@OOAmusat OOAmusat left a comment

Choose a reason for hiding this comment

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

This looks fine to me.

@@ -334,21 +329,28 @@ def build(self):
self.reagent_dose = Var(
self.reagent_list,
initialize=1,
domain=NonNegativeReals,
domain=Reals,
Copy link
Contributor

Choose a reason for hiding this comment

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

@avdudchenko Why reals instead of non?

Copy link
Contributor

Choose a reason for hiding this comment

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

We can just find out if this ends up causing issues (unexpected and undesired negative values) later on.

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

@adam-a-a adam-a-a enabled auto-merge (squash) November 21, 2024 21:20
Copy link
Contributor

@zacharybinger zacharybinger left a comment

Choose a reason for hiding this comment

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

Tests pass and changes make sense. LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:Normal Normal Priority Issue or PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants