Skip to content

Bsm generic np for comparison#2

Draft
dalyw wants to merge 14 commits into
mainfrom
bsm_generic_np
Draft

Bsm generic np for comparison#2
dalyw wants to merge 14 commits into
mainfrom
bsm_generic_np

Conversation

@dalyw

@dalyw dalyw commented Jan 6, 2026

Copy link
Copy Markdown
Owner

Fixes/Resolves:

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

Summary/Motivation:

Changes proposed in this PR:

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.

dalyw added 12 commits May 6, 2025 13:06
…ack changes

- unit model
- flowsheet
- costing model
- mass vs mole basis for specifying flows. (will use moles for IX, mass for this flowsheet)
- separately breaking out removal factors and electricity consumption for "S_PO4", "S_NH4", "S_NO3", "S_NO2" and updating functions like electricity_consumption accordingly
- adding molar mass parameters (there might be a better way to svae this)

Adding to genericNP.py costing
- ammonia_recovery_value
- cost_ammonia_flow argument and equation

BSM2_genericNP_no_bioP.py
- adding costing method (still debugging infeasibility errors)
- debugging print statements (temporary)
- specifying mass basis for genericNP
- adding parameter sweep on both NH4 removal and P removal, and helper functions (build_model, build outputs, run_analysis, etc)

Also adding create_dash_app function for visualization
Adding costing after initialization similar to BSM2.py. Updating multi_sweep.py to match

Making full WWTP unit model capex OPTIONAL in BSM2_genericNP_no_bioP.py

Applying recovery value of N and P products

Allowing either nh4_removal or n to p ratio for n removal fraction

Debugging multiprocessing in multi_sweep.py
WIP debuggin multi-N-limit sweep with optimize_design.py
dalyw pushed a commit that referenced this pull request May 3, 2026
* add python 3.12 and 3.13 to workflow as a test

* add user mode tests for 3.12 and 3.13

* Update BSM2-P tests

* Update numerical issues test

* Revert BSM2-P test changes

* Attempting to fix w/o taking the log of the condition number

* Attempt #2 w/o taking the log of the condition number

---------

Co-authored-by: Sufi Kaur <sufikaur@lbl.gov>
Co-authored-by: MarcusHolly <marcus.holly@keylogic.com>
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.

1 participant