Skip to content

Market Surrogate Workflow #4

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
wants to merge 192 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
192 commits
Select commit Hold shift + click to select a range
3d0779a
Merge branch 'thermal_oil' into toy_problem
Jan 19, 2021
8ab3b6a
simple rankine cycle model for 100 MW
Jan 20, 2021
74350be
updating turbine pressure ratio from 0.2 to 0.05 to get the outlet pr…
Jan 27, 2021
b2ab48a
Add files via upload
klfrick2 Feb 5, 2021
9ecaa40
adding capital cost correlations from power plant library
Feb 8, 2021
5e21440
adding capital cost for fwh system
Feb 8, 2021
1227dd0
adding operating cost for coal feed
Feb 8, 2021
ce4ceba
adding constraint to close loop linking enth and pressure
Feb 9, 2021
01b3b8d
Add files via upload
klfrick2 Feb 15, 2021
2aeb9a4
Merge branch 'main' into h2turbine
Feb 15, 2021
a65888d
moving files to the correct folders and adding test folder within nuc…
Feb 15, 2021
409c0a4
adding init files
Feb 15, 2021
65ee900
Merge branch 'main' into toy_problem
Feb 17, 2021
417d937
adding functionality to add opex and capex separately
Feb 19, 2021
282ef77
working simple stochastic case
Feb 19, 2021
390ff0b
adding cases to simulate case0A and case0B - demand and lmp given
Mar 3, 2021
b7ef5cb
Addition of improved Hydrogen Turbine Model
klfrick2 Apr 8, 2021
f6eed96
Adding a logo, favicon and version to Sphinx docs
ksbeattie Apr 14, 2021
eaaabba
Merge branch 'h2turbine' of https://github.com/klfrick2/dispatches-1 …
Apr 16, 2021
24e4292
Merge branch 'main' into h2turbine
Apr 16, 2021
9305125
updates to hydrogen turbine
Apr 16, 2021
d1afcc5
folder reorg
Apr 16, 2021
7c6642b
removing duplicate files
Apr 16, 2021
f90abd6
updating path to tests
Apr 16, 2021
e9374ce
updating path
Apr 16, 2021
5d10675
Merge pull request #1 from gmlc-dispatches/main
nareshsusarla Apr 17, 2021
60f0f48
hydrogen storage tank model and test
Apr 17, 2021
305e873
updating import in test_chgtank.py
Apr 17, 2021
8fae548
adding updated bounds on pressure to allow model convergence
Apr 17, 2021
159057b
updating path
Apr 21, 2021
20b44f1
Addition of Nuclear based Flowsheet
klfrick2 Apr 22, 2021
e2db3e7
copy over wind model and test
dguittet Apr 22, 2021
8b8565a
copy battery files from old PR
dguittet Apr 22, 2021
3960eeb
super().build()
dguittet Apr 23, 2021
aabe272
update solver import
Apr 26, 2021
9f45831
Merge branch 'h2turbine' of https://github.com/klfrick2/dispatches-1 …
Apr 26, 2021
3b5b16e
add license
dguittet Apr 26, 2021
37dca4a
fix time step handling-- do not use time domain
dguittet Apr 26, 2021
8b4135c
remove time domain from model
dguittet Apr 26, 2021
fc105cb
add license
dguittet Apr 26, 2021
b93e96d
Removing unneeded files, moving favicon into _static/
ksbeattie Apr 27, 2021
8b987f5
added translator between pem and hydrogen turbine.
May 1, 2021
941e4ba
working nuclear flowsheet with translator and mixer blocks
May 3, 2021
71a7e3b
adding flowsheets folder
May 3, 2021
d739a71
adding unit models folder
May 3, 2021
90a55f3
updating path to new folder structure
May 3, 2021
312243f
Ultra-supercritical power plant model
May 4, 2021
d68fbfd
pfd file for ultra supercritical power plant for reporting results
May 5, 2021
485ba7c
adding test file for usc powerplant model
May 5, 2021
7675531
updated flowsheet to reflect the latest unit numbers
May 5, 2021
a052396
remove wind files from this PR
dguittet May 10, 2021
2173b67
reset requirements.txt to main branch
dguittet May 10, 2021
c147c6d
Merge pull request #33 from ksbeattie/docs_icons_7
dangunter May 10, 2021
6149e15
add elec splitter unit model & clean up pem code a bit
dguittet May 10, 2021
60c93b1
Add solver status test
dguittet May 10, 2021
cebd4ae
Add comments and more tests
dguittet May 10, 2021
5c9fcc4
add bounds to battery power and energy
dguittet May 10, 2021
0ea19c8
add bounds to split_frac
dguittet May 10, 2021
2555088
Updates to hydrogen turbine and cleaning of thermal oil tests for pyt…
klfrick2 May 11, 2021
cc7eb4e
remving value in h2 production expression
May 11, 2021
225e655
Modification and addition of nuclear flowsheet models
klfrick2 May 11, 2021
6a8939a
updating ultra supercritical model and its test to reflect the change…
May 11, 2021
62e3551
updating test to resolve some warnings
May 12, 2021
fb0acc9
resolving warnings regarding values
May 12, 2021
6dca75c
consolidating code by using dicts and removing redundant comments
May 12, 2021
a0c4686
Merge branch 'main' into toy_problem
May 12, 2021
2b51dc9
updating defualt solver import and adding a few arguments for build m…
May 12, 2021
afa7958
Merge branch 'main' into battery
May 12, 2021
2cc6903
Merge pull request #37 from dguittet/battery
andrewlee94 May 12, 2021
3ff904f
Merge branch 'main' into elec_splitter
May 12, 2021
f7c1fbd
Merge pull request #39 from dguittet/elec_splitter
May 12, 2021
2ed05c4
addressing comment on syntax and redundant comment
May 12, 2021
eb02bb0
Merge remote-tracking branch 'upstream/main' into wind
dguittet May 12, 2021
115f399
fix merge conflict
dguittet May 12, 2021
71e76b8
Merge branch 'main' into usc
nareshsusarla May 12, 2021
0a8c2b4
adding heat recovery; improved cycle efficiency
May 14, 2021
43c10ec
adding separate file for stochastic problems, changing objective to c…
May 20, 2021
d5c27de
price taker approach
May 21, 2021
01f5758
updating turbine efficiency
May 24, 2021
2254f77
Merge pull request #38 from nareshsusarla/usc
andrewlee94 May 24, 2021
845ac26
Merge branch 'main' into wind
andrewlee94 May 24, 2021
d785809
Merge pull request #36 from dguittet/wind
andrewlee94 May 24, 2021
42ae578
updating loss for generator
May 24, 2021
a401548
adding lower bound for p_max
May 24, 2021
0785373
Stubbing out the doc structure for several new models.
ksbeattie May 24, 2021
fc28444
Typos and adding link to github repo
ksbeattie May 24, 2021
a8823c9
almost have surrogate version working
May 25, 2021
3a13e31
got surrogate version working
May 25, 2021
55972c2
Merge remote-tracking branch 'upstream/toy_problem' into toy_problem
May 25, 2021
a80f32c
typos & renaming suggestions from @andrewlee94
ksbeattie May 25, 2021
28a7a3e
Adding a RTD config to see if I can get it to fail on warnings
ksbeattie May 25, 2021
354dbe8
fixing links
ksbeattie May 25, 2021
5de6059
got surrogate results
May 25, 2021
c609273
Merge pull request #42 from ksbeattie/docs_model_stubs_ksb
andrewlee94 May 26, 2021
1b2027e
updated model and test for hydrogen tank
May 27, 2021
15bf445
updating hydrogen tank test to fix property package error
May 27, 2021
9588785
stochastic results
May 28, 2021
a702e55
Merge branch 'main' of https://github.com/gmlc-dispatches/dispatches …
May 28, 2021
50bdc96
Merge branch 'h2turbine' of https://github.com/klfrick2/dispatches-1 …
May 28, 2021
5c891ae
upadting test to address review comments
May 28, 2021
bcab1bc
updating thermal oil test files
May 28, 2021
5ffedcb
updating thermal oil prop test file
May 28, 2021
4da5fee
updating tests for hydrogen turbine and h2 prop pack
Jun 1, 2021
eb30af0
address review comments on test files for nuclear flowsheet
Jun 1, 2021
bcd0f77
updating test files for thermal oil charge and discharge hxs
Jun 1, 2021
bb74634
updated material units and removed depricated test marks
Jun 1, 2021
16bffc6
Merge branch 'main' into h2tank
Jun 1, 2021
00e41ff
Merge pull request #34 from nareshsusarla/h2tank
Jun 1, 2021
8ad58e0
updating usage of get solver
Jun 1, 2021
d32b942
Merge branch 'main' into h2turbine
Jun 1, 2021
76a7dc9
updating imports and moving hydrogen tank to unit_models folder
Jun 1, 2021
03d2f49
Revert "Hydrogen Storage Tank model"
Jun 1, 2021
eeebc60
Merge pull request #43 from gmlc-dispatches/revert-34-h2tank
Jun 1, 2021
c4b99d3
Revert "updating imports and moving hydrogen tank to unit_models folder"
Jun 1, 2021
effa735
Merge branch 'main' into h2turbine
Jun 1, 2021
cd868d4
Merge pull request #27 from klfrick2/h2turbine
Jun 1, 2021
95d4d6b
updated imports and run tests
Jun 1, 2021
e78b719
cleaning up toy problem models
Jun 3, 2021
9ba8fea
remove figures
Jun 3, 2021
d797c24
remove zone files
Jun 3, 2021
90e2804
Merge pull request #44 from nareshsusarla/h2tank
andrewlee94 Jun 10, 2021
f10ac76
Merge pull request #1 from jalving/toy_problem
Jun 11, 2021
ce0d76a
adding pytest marker list and ignoring pytest logs in gitignore
Jul 1, 2021
04bc579
Merge pull request #46 from jghouse88/pytest_markers
Jul 7, 2021
f59b177
Create PULL_REQUEST_TEMPLATE.md
ksbeattie Jul 8, 2021
10fc9af
Merge branch 'main' into toy_problem
Jul 9, 2021
f2e773f
Merge branch 'toy_problem' of https://github.com/jghouse88/dispatches…
Jul 9, 2021
ebf1a45
adding efficiency curve to model
Jul 14, 2021
13b63ff
improved build times with loading a saved json for initialized state
Jul 24, 2021
fbdab2f
Merge branch 'toy_problem' of https://github.com/jghouse88/dispatches…
Jul 26, 2021
677308a
Merge branch 'toy_problem' of https://github.com/jghouse88/dispatches…
Jul 26, 2021
c3fa1ee
updating error in boiler eff function and setting up json initializat…
Aug 11, 2021
524120f
add check in initialize for heat recovery
Sep 12, 2021
0ee7453
update
Sep 13, 2021
cd122e6
Merge pull request #3 from jghouse88/toy_problem_update
Sep 13, 2021
3228aac
got surrogate problem working
Jul 20, 2021
d3586f9
fixed surrogates
Jul 20, 2021
d983fd6
update surrogate model
Sep 14, 2021
4ec72cd
add revenue models
Sep 14, 2021
239e072
wip running prescient verification
Sep 17, 2021
6d00c8b
backup files
Sep 17, 2021
695049f
add prescient simulation data
Sep 20, 2021
a360dd0
remove symlinks
Sep 20, 2021
49c3763
update run_stochastic_surrogate
Sep 22, 2021
895c31a
update binning price taker
Sep 22, 2021
6b50fbc
updating prescient scripts
Sep 23, 2021
6519e75
add base case rts prices
Sep 23, 2021
057d54b
add surrogate test
Sep 23, 2021
7bf2fc9
surrogate is more consistent now
Oct 5, 2021
6c8ef4a
add neural network surrogates
Oct 7, 2021
6cda91f
fixed cost in surrogate objective
Oct 11, 2021
7473d01
integer up/down times
Oct 11, 2021
873f634
add new surrogate
Oct 14, 2021
e7f7cf0
new surrogate results
Oct 14, 2021
a9ff883
updating surrogate results
Dec 3, 2021
c13c0d8
setting up prescient sweep
Dec 9, 2021
27f6df7
add result folder
Dec 9, 2021
e31c1cd
updated scikit surrogates
Dec 10, 2021
c0dce8b
update run scripts
Dec 21, 2021
a22f420
update plugin script
Dec 22, 2021
57769ab
update driver
Dec 22, 2021
9fc630e
fix plugin file
Dec 22, 2021
f701a85
fix pmax sweep plugin
Dec 23, 2021
2a9b392
updating surrogate model
Jan 5, 2022
816af26
update basecase
Jan 14, 2022
d4f36a2
update driver
Jan 14, 2022
2323591
update driver
Jan 15, 2022
4c9e41f
add basecase results
Jan 16, 2022
206e68b
update plotting script
Jan 16, 2022
1e7d019
cleanup for verification
Jan 22, 2022
c6d1627
fix verification plugin
Jan 22, 2022
01223dc
fix drivers
Jan 22, 2022
375b9cb
fix plugin
Jan 22, 2022
a552bab
add low marginal cost test
Jan 23, 2022
c88453e
update alamo design problem
Jan 27, 2022
cc18e36
update driver for alamo
Jan 27, 2022
1d1889a
fix design problems
Jan 28, 2022
ad6ffa8
add test pmax
Jan 30, 2022
d28f048
start grid search
Jan 30, 2022
2642796
add mrg-cst sweep
Feb 9, 2022
03ca5f0
forgot to add index
Feb 9, 2022
c3b2de8
directory cleanup
Feb 17, 2022
b59f7cb
clean up directory
Feb 18, 2022
bf29ee1
move files to workflow
Feb 23, 2022
c83cf2a
update manuscript
Feb 25, 2022
0cc2e54
delete files
Feb 25, 2022
cc45424
remove manuscript folder
Mar 3, 2022
e96a051
update plotting scripts
Mar 8, 2022
33e5268
add keras models and notebook
Mar 9, 2022
aad579f
add headers to notebook
Mar 9, 2022
4106c87
update plotting scripts
jalving Dec 15, 2022
0f9d999
backup manuscript code
jalving Dec 29, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 14 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Addresses issue:

## 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.md and COPYRIGHT.md 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.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,9 @@ docs/_build/
*.elc
auto-save-list
.\#*

# MacOS
.DS_Store

# log
*.log
10 changes: 10 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
fail_on_warning: true
Empty file.
Empty file.
91 changes: 0 additions & 91 deletions dispatches/models/fossil_case/thermal_oil/charge_heat_exchanger.py

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
##############################################################################
# DISPATCHES was produced under the DOE Design Integration and Synthesis
# Platform to Advance Tightly Coupled Hybrid Energy Systems program (DISPATCHES),
# and is copyright (c) 2021 by the software owners: The Regents of the University
# of California, through Lawrence Berkeley National Laboratory, National
# Technology & Engineering Solutions of Sandia, LLC, Alliance for Sustainable
# Energy, LLC, Battelle Energy Alliance, LLC, University of Notre Dame du Lac, et
# al. All rights reserved.
#
# Please see the files COPYRIGHT.md and LICENSE.md for full copyright and license
# information, respectively. Both files are also available online at the URL:
# "https://github.com/gmlc-dispatches/dispatches".
#
##############################################################################
"""
Charge heat exchanger model.

Heating source: steam
Thermal material: thermal oil
Author: Konor Frick and Jaffer Ghouse
Date: February 16, 2021
"""


# Import Pyomo libraries
import pytest
from pyomo.environ import ConcreteModel, SolverFactory, units, value, \
TerminationCondition, SolverStatus

# Import IDAES components
from idaes.core import FlowsheetBlock

# Import heat exchanger unit model
from idaes.generic_models.unit_models.heat_exchanger import (
HeatExchanger,
HeatExchangerFlowPattern)

# Import steam property package
from idaes.generic_models.properties.iapws95 import htpx, Iapws95ParameterBlock
from dispatches.models.fossil_case.thermal_oil.thermal_oil \
import ThermalOilParameterBlock
from idaes.core.util.model_statistics import degrees_of_freedom
from idaes.core.util import get_solver


def test_charge():
m = ConcreteModel()

m.fs = FlowsheetBlock(default={"dynamic": False})

m.fs.steam_prop = Iapws95ParameterBlock()
m.fs.therminol66_prop = ThermalOilParameterBlock()

m.fs.charge_hx = HeatExchanger(
default={"shell": {"property_package": m.fs.steam_prop},
"tube": {"property_package": m.fs.therminol66_prop},
"flow_pattern": HeatExchangerFlowPattern.countercurrent})

# Set inputs
# Steam
m.fs.charge_hx.inlet_1.flow_mol[0].fix(4163)
m.fs.charge_hx.inlet_1.enth_mol[0].fix(htpx(T=573.15*units.K,
P=5.0e+6*units.Pa))
m.fs.charge_hx.inlet_1.pressure[0].fix(5.0e+6)

# Thermal Oil
m.fs.charge_hx.inlet_2.flow_mass[0].fix(833.3)
m.fs.charge_hx.inlet_2.temperature[0].fix(200 + 273.15)
m.fs.charge_hx.inlet_2.pressure[0].fix(101325)

m.fs.charge_hx.area.fix(12180)
m.fs.charge_hx.overall_heat_transfer_coefficient.fix(432.677)

m.fs.charge_hx.initialize()
m.fs.charge_hx.heat_duty.fix(1.066e+08)

# Needed to make the system solve.
m.fs.charge_hx.overall_heat_transfer_coefficient.unfix()

solver = get_solver()
results = solver.solve(m)

# Check for optimal solution
assert results.solver.termination_condition == \
TerminationCondition.optimal
assert results.solver.status == SolverStatus.ok

# Testing the exit values of the heat exchanger.
assert value(m.fs.charge_hx.outlet_2.temperature[0]) == \
pytest.approx(528.83, rel=1e-1)
assert value(m.fs.charge_hx.outlet_1.enth_mol[0]) == \
pytest.approx(27100.28, rel=1e-1)




Loading