-
Notifications
You must be signed in to change notification settings - Fork 142
Add Allam cycle module #772
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
Conversation
| if setup["ParameterScale"] ==1 | ||
| dfCapAllam.StartCap_sCO2turbine_MW_gross = dfCapAllam.StartCap_sCO2turbine_MW_gross* ModelScalingFactor | ||
| dfCapAllam.RetCap_sCO2turbine_MW_gross = dfCapAllam.RetCap_sCO2turbine_MW_gross * ModelScalingFactor | ||
| dfCapAllam.NewCap_sCO2turbine_MW_gross = dfCapAllam.NewCap_sCO2turbine_MW_gross * ModelScalingFactor | ||
| dfCapAllam.EndCap_sCO2turbine_MW_gross = dfCapAllam.EndCap_sCO2turbine_MW_gross * ModelScalingFactor | ||
|
|
||
| dfCapAllam.StartCap_ASU_MW_gross = dfCapAllam.StartCap_ASU_MW_gross* ModelScalingFactor | ||
| dfCapAllam.RetCap_ASU_MW_gross = dfCapAllam.RetCap_ASU_MW_gross * ModelScalingFactor | ||
| dfCapAllam.NewCap_ASU_MW_gross = dfCapAllam.NewCap_ASU_MW_gross * ModelScalingFactor | ||
| dfCapAllam.EndCap_ASU_MW_gross = dfCapAllam.EndCap_ASU_MW_gross * ModelScalingFactor | ||
|
|
||
| dfCapAllam.StartCap_LOX_t = dfCapAllam.StartCap_LOX_t * ModelScalingFactor | ||
| dfCapAllam.RetCap_LOX_t = dfCapAllam.RetCap_LOX_t * ModelScalingFactor | ||
| dfCapAllam.NewCap_LOX_t = dfCapAllam.NewCap_LOX_t * ModelScalingFactor | ||
| dfCapAllam.EndCap_LOX_t = dfCapAllam.EndCap_LOX_t * ModelScalingFactor | ||
| end |
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.
Consider using the scale_columns! function like you did in scale_allamcycle_data!.
| capAllam_sco2turbine = zeros(size(inputs["RESOURCE_NAMES"])) | ||
| capAllam_asu = zeros(size(inputs["RESOURCE_NAMES"])) | ||
| capAllam_lox = zeros(size(inputs["RESOURCE_NAMES"])) |
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.
Consider using G = inputs["G"] and then zeros(G) instead of size(inputs["RESOURCE_NAMES"]).
| [inputs["RESOURCE_NAMES"][ALLAM_CYCLE_LOX] .*"_sco2turbine_gross_power_mw"; | ||
| inputs["RESOURCE_NAMES"][ALLAM_CYCLE_LOX] .*"_sco2turbine_commit"; | ||
| inputs["RESOURCE_NAMES"][ALLAM_CYCLE_LOX] .*"_asu_gross_power_mw"; | ||
| inputs["RESOURCE_NAMES"][ALLAM_CYCLE_LOX] .*"_asu_commit"; | ||
| inputs["RESOURCE_NAMES"][ALLAM_CYCLE_LOX] .*"_net_power_output_mw"; | ||
| inputs["RESOURCE_NAMES"][ALLAM_CYCLE_LOX] .*"_storage_lox_t"; | ||
| inputs["RESOURCE_NAMES"][ALLAM_CYCLE_LOX] .*"_lox_in_t"; | ||
| inputs["RESOURCE_NAMES"][ALLAM_CYCLE_LOX] .*"_lox_out_t"; | ||
| inputs["RESOURCE_NAMES"][ALLAM_CYCLE_LOX] .*"_gox_t"]) |
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.
Consider assigning a variable name like allam_resources = inputs["RESOURCE_NAMES"][ALLAM_CYCLE_LOX] for brevity.
| @constraints(EP, begin | ||
| # cUpTimeInterior: Constraint looks back over last n hours, where n = allam_dict[y, "up_time"][i]) | ||
| [t in setdiff(INTERIOR_SUBPERIODS,Up_Time_HOURS)], vCOMMIT_Allam[y,i,t] >= sum(vSTART_Allam[y,i,e] for e=(t-allam_dict[y, "up_time"][i]):t) | ||
|
|
||
| # cUpTimeWrap: If n is greater than the number of subperiods left in the period, constraint wraps around to first hour of time series | ||
| # cUpTimeWrap constraint equivalant to: sum(vSTART_Allam[y,e] for e=(t-((t%hours_per_subperiod)-1):t))+sum(vSTART_Allam[y,e] for e=(hours_per_subperiod_max-(allam_dict[y, "up_time"][i])-(t%hours_per_subperiod))):hours_per_subperiod_max) | ||
| [t in Up_Time_HOURS], vCOMMIT_Allam[y,i,t] >= sum(vSTART_Allam[y,i,e] for e=(t-((t%hours_per_subperiod)-1):t))+sum(vSTART_Allam[y,i,e] for e=((t+hours_per_subperiod-(t%hours_per_subperiod))-(allam_dict[y, "up_time"][i]-(t%hours_per_subperiod))):(t+hours_per_subperiod-(t%hours_per_subperiod))) | ||
|
|
||
| # cUpTimeStart: | ||
| # NOTE: Expression t+hours_per_subperiod-(t%hours_per_subperiod) is equivalant to "hours_per_subperiod_max" | ||
| [t in START_SUBPERIODS], vCOMMIT_Allam[y,i,t] >= vSTART_Allam[y,i,t]+sum(vSTART_Allam[y,i,e] for e=((t+hours_per_subperiod-1)-(allam_dict[y, "up_time"][i]-1)):(t+hours_per_subperiod-1)) | ||
| end) | ||
|
|
||
| ## down time | ||
| Down_Time = Int(floor(allam_dict[y, "down_time"][i])) | ||
| Down_Time_HOURS = [] # Set of hours in the summation term of the maximum down time constraint for the first subperiod of each representative period | ||
| for s in START_SUBPERIODS | ||
| Down_Time_HOURS = union(Down_Time_HOURS, (s+1):(s+Down_Time-1)) | ||
| end |
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.
Here and elsewhere, consider using hoursbefore and hoursafter in order to simplify formulation of the constraints. It should be possible to write a single constraint over [t in 1:T].
| START_SUBPERIODS = inputs["START_SUBPERIODS"] #start | ||
| INTERIOR_SUBPERIODS = inputs["INTERIOR_SUBPERIODS"] #interiors |
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.
These two lines are not used in this function.
345eb8a to
27bed48
Compare
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.
Thanks, @qluo0320github, for adding this new module and the documentation!
* Add Allam Cycle with Liquid Oxygen Storage * Add duration constraints on LOX of allam cycle * Add policy-related constraints to allam cycle; add UC * Add doc for Allam Cycle inputs * Add test for Allam Cycle module --------- Co-authored-by: Fangwei Cheng <[email protected]>
Description
This module adds a new resource "Allam Cycle with Oxygen Storage" to GenX.
An allam cycle includes three components: sCO2 turbine, air separation unit, and liquid O2 storage. Each of them is subject to its own investment decisions and operational constraints.
What type of PR is this? (check all applicable)
Related Tickets & Documents
Checklist
How this can be tested
Using the new example case "three_zone_w_allam_cycle_lox"
Post-approval checklist for GenX core developers
After the PR is approved