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

Cooling Load into Job app, for /dev -> /v3 #388

Merged
merged 40 commits into from
Dec 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
c3ce88a
Add CoolingLoads model to job app
rathod-b Jun 29, 2022
aab3002
Merge branch 'develop' into cooling_loads
rathod-b Jul 14, 2022
e0e23a5
add coolingloads input model
rathod-b Jul 22, 2022
83b68a8
Update CHANGELOG.md
rathod-b Jul 25, 2022
7be929a
Merge branch 'develop' into cooling_loads
rathod-b Jul 25, 2022
181a396
add existingchiller, up reopt
rathod-b Aug 11, 2022
c33d013
Update CHANGELOG.md
rathod-b Aug 11, 2022
f400a7f
Merge branch 'develop' into cooling_loads
rathod-b Aug 11, 2022
dce4034
Merge branch 'develop' into cooling_loads
zolanaj Sep 8, 2022
fd4f321
minor documentation update
zolanaj Sep 8, 2022
c7ee997
fix merge bugs
zolanaj Sep 12, 2022
ddaf8c3
update database migrations for coolingloads
zolanaj Sep 12, 2022
3fa7015
Update descriptions to CoolingLoad and ExistingChiller
Bill-Becker Sep 21, 2022
fc965ee
Add CoolingLoadOutputs, HeatingLoadOutputs to models.py
zolanaj Nov 11, 2022
c1139f5
add clean to CoolingLoadOutputs
zolanaj Nov 11, 2022
08b2c03
Add HeatingLoadOutputs, CoolingLoadOutputs to process_results.py
zolanaj Nov 11, 2022
5ce5c99
Add heating, cooling load outputs to views endpoint
zolanaj Nov 11, 2022
dce775c
update migrations to include heating and cooling load outputs
zolanaj Nov 11, 2022
48f521b
Update CHANGELOG.md
zolanaj Nov 11, 2022
c46d534
Merge branch 'develop' into cooling_loads
zolanaj Nov 11, 2022
ea8b250
update migrations files
zolanaj Nov 11, 2022
a16e439
Update CHANGELOG.md
zolanaj Nov 11, 2022
5ce6e3f
Update CoolingLoad possible_sets, remove unused ExistingChiller input
Bill-Becker Nov 16, 2022
8cbe1bf
Add temp CoolingLoad test in test_job_endpoint
Bill-Becker Nov 16, 2022
0f66f7a
Merge branch 'develop' into cooling_loads
zolanaj Nov 29, 2022
1f61d62
update db migrations
zolanaj Nov 30, 2022
829eca2
Merge branch 'develop' into cooling_loads
zolanaj Dec 4, 2022
c08b023
rm check for ExistingChiller.loads_kw_thermal - internal only to Julia
zolanaj Dec 1, 2022
e03b3af
expand technology set of temporary test
zolanaj Dec 4, 2022
4f2e202
add details for ExistingBoiler in temporary test
zolanaj Dec 4, 2022
5d83bc7
add boiler fuel time series fields
zolanaj Dec 8, 2022
0a90ba9
fix: add units to ElectricChiller time series field
zolanaj Dec 8, 2022
e515c18
make model keys consistent with other technologies
zolanaj Dec 8, 2022
d78e4da
Add Heating, Cooling Load outputs to views.py
zolanaj Dec 8, 2022
38df533
update migrations
zolanaj Dec 9, 2022
a404875
update temporary test to check for outputs fields
zolanaj Dec 9, 2022
3a194b6
update annual Cooling load to reconcile with electric
zolanaj Dec 9, 2022
030572b
don't run BAU in temporary test (speed up testing)
zolanaj Dec 9, 2022
29ff9ba
Merge pull request #329 from NREL/cooling_loads
zolanaj Dec 16, 2022
e3509a1
Add version tag to changes
Bill-Becker Dec 19, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,26 @@ Classify the change according to the following categories:
##### Deprecated
##### Removed
### Patches


## v2.5.0
### Minor Updates
##### Added
- `0011_coolingloadinputs....` file used to add new models to the db
In `job/models.py`:
- added **ExistingChillerInputs** model
- added **ExistingChillerOutputs** model
- added **CoolingLoadInputs** model
- added **CoolingLoadOutputs** model
- added **HeatingLoadOutputs** model
In `job/process_results.py`:
- add **ExistingChillerOutputs**
- add **CoolingLoadOutputs**
- add **HeatingLoadOutputs**
In `job/validators.py:
- add time series length validation on **CoolingLoadInputs->thermal_loads_ton** and **CoolingLoadInputs->per_time_step_fractions_of_electric_load**
In `job/views.py`:
- add new input/output models to properly save the inputs/outputs

## v2.4.0
### Minor Updates
Expand All @@ -43,7 +63,6 @@ Classify the change according to the following categories:
### Minor Updates
##### Fixed
Lookback charge parameters expected from the URDB API call were changed to the non-caplitalized format, so they are now used properly.

## v2.3.0
##### Changed
The following name changes were made in the `job/` endpoint and `julia_src/http.jl`:
Expand All @@ -70,7 +89,6 @@ The following name changes were made in the `job/` endpoint and `julia_src/http.
##### Added
- `0005_boilerinputs....` file used to add new models to the db
- `job/` endpoint: Add inputs and validation to model off-grid wind
In `job/models.py`:
- added **ExistingBoilerInputs** model
- added **ExistingBoilerOutputs** model
- added **SpaceHeatingLoadInputs** model
Expand Down Expand Up @@ -102,6 +120,7 @@ In `job/test/test_job_endpoint.py`:
- add a testcase to validate that API is accepting/returning fields related to new models.
In `'job/validators.py`:
- add new input models
- added `update_pv_defaults_offgrid()` to prevent validation failure when PV is not provided as input
In `job/views.py`:
- Added **SiteInputs** to `help` endpoint
- Added **SiteOutputs** to `outputs` endpoint
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Generated by Django 4.0.7 on 2022-12-09 03:31

import django.contrib.postgres.fields
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import job.models


class Migration(migrations.Migration):

dependencies = [
('job', '0014_rename_thermal_to_tes_series_mmbtu_per_hour_existingboileroutputs_year_one_fuel_consumption_series_m'),
]

operations = [
migrations.CreateModel(
name='CoolingLoadInputs',
fields=[
('meta', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='CoolingLoadInputs', serialize=False, to='job.apimeta')),
('doe_reference_name', models.TextField(blank=True, choices=[('FastFoodRest', 'Fastfoodrest'), ('FullServiceRest', 'Fullservicerest'), ('Hospital', 'Hospital'), ('LargeHotel', 'Largehotel'), ('LargeOffice', 'Largeoffice'), ('MediumOffice', 'Mediumoffice'), ('MidriseApartment', 'Midriseapartment'), ('Outpatient', 'Outpatient'), ('PrimarySchool', 'Primaryschool'), ('RetailStore', 'Retailstore'), ('SecondarySchool', 'Secondaryschool'), ('SmallHotel', 'Smallhotel'), ('SmallOffice', 'Smalloffice'), ('StripMall', 'Stripmall'), ('Supermarket', 'Supermarket'), ('Warehouse', 'Warehouse'), ('FlatLoad', 'Flatload'), ('FlatLoad_24_5', 'Flatload 24 5'), ('FlatLoad_16_7', 'Flatload 16 7'), ('FlatLoad_16_5', 'Flatload 16 5'), ('FlatLoad_8_7', 'Flatload 8 7'), ('FlatLoad_8_5', 'Flatload 8 5')], help_text="Building type to use in selecting a simulated load profile from DOE <a href='https: //energy.gov/eere/buildings/commercial-reference-buildings' target='blank'>Commercial Reference Buildings</a>.By default, the doe_reference_name of the ElectricLoad is used.")),
('blended_doe_reference_names', django.contrib.postgres.fields.ArrayField(base_field=models.TextField(blank=True, choices=[('FastFoodRest', 'Fastfoodrest'), ('FullServiceRest', 'Fullservicerest'), ('Hospital', 'Hospital'), ('LargeHotel', 'Largehotel'), ('LargeOffice', 'Largeoffice'), ('MediumOffice', 'Mediumoffice'), ('MidriseApartment', 'Midriseapartment'), ('Outpatient', 'Outpatient'), ('PrimarySchool', 'Primaryschool'), ('RetailStore', 'Retailstore'), ('SecondarySchool', 'Secondaryschool'), ('SmallHotel', 'Smallhotel'), ('SmallOffice', 'Smalloffice'), ('StripMall', 'Stripmall'), ('Supermarket', 'Supermarket'), ('Warehouse', 'Warehouse'), ('FlatLoad', 'Flatload'), ('FlatLoad_24_5', 'Flatload 24 5'), ('FlatLoad_16_7', 'Flatload 16 7'), ('FlatLoad_16_5', 'Flatload 16 5'), ('FlatLoad_8_7', 'Flatload 8 7'), ('FlatLoad_8_5', 'Flatload 8 5')]), blank=True, default=list, help_text='Used in concert with blended_doe_reference_percents to create a blended load profile from multiple DoE Commercial Reference Buildings.', size=None)),
('blended_doe_reference_percents', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, null=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(1.0)]), blank=True, default=list, help_text='Used in concert with blended_doe_reference_names to create a blended load profile from multiple DoE Commercial Reference Buildings to simulate buildings/campuses. Must sum to 1.0.', size=None)),
('annual_tonhour', models.FloatField(blank=True, help_text="Annual electric chiller thermal energy production, in [Ton-Hour],used to scale simulated default electric chiller load profile for the site's climate zone", null=True, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(100000000.0)])),
('monthly_tonhour', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100000000.0)]), blank=True, default=list, help_text="Monthly site space cooling requirement in [Ton-Hour], used to scale simulated default building load profile for the site's climate zone", size=None)),
('thermal_loads_ton', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True), blank=True, default=list, help_text='Typical electric chiller thermal production to serve the load for all hours in one year. Must be hourly (8,760 samples), 30 minute (17,520 samples), or 15 minute (35,040 samples).', size=None)),
('annual_fraction_of_electric_load', models.FloatField(blank=True, help_text="Annual electric chiller energy consumption scalar as a fraction of total electric load applied to every time stepused to scale simulated default electric chiller load profile for the site's climate zone", null=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(1)])),
('monthly_fractions_of_electric_load', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(1)]), blank=True, default=list, help_text="Monthly fraction of site's total electric consumption used up by electric chiller, applied to every hour of each month,to scale simulated default building load profile for the site's climate zone", size=None)),
('per_time_step_fractions_of_electric_load', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True), blank=True, default=list, help_text="Per timestep fraction of site's total electric consumption used up by electric chiller.Must be hourly (8,760 samples), 30 minute (17,520 samples), or 15 minute (35,040 samples).", size=None)),
],
bases=(job.models.BaseModel, models.Model),
),
migrations.CreateModel(
name='CoolingLoadOutputs',
fields=[
('meta', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='CoolingLoadOutputs', serialize=False, to='job.apimeta')),
('load_series_ton', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100000000.0)]), blank=True, default=list, help_text='Hourly total cooling load [ton]', size=None)),
('electric_chiller_base_load_series_kw', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100000000.0)]), blank=True, default=list, help_text='Hourly total base load drawn from chiller [kW-electric]', size=None)),
('annual_calculated_tonhour', models.FloatField(blank=True, default=0, help_text='Annual site total cooling load [tonhr]', null=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100000000.0)])),
('annual_electric_chiller_base_load_kwh', models.FloatField(blank=True, default=0, help_text='Annual total base load drawn from chiller [kWh-electric]', null=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100000000.0)])),
],
bases=(job.models.BaseModel, models.Model),
),
migrations.CreateModel(
name='ExistingChillerInputs',
fields=[
('meta', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='ExistingChillerInputs', serialize=False, to='job.apimeta')),
('cop', models.FloatField(blank=True, help_text='Existing electric chiller system coefficient of performance (COP) (ratio of usable cooling thermal energy produced per unit electric energy consumed)', null=True, validators=[django.core.validators.MinValueValidator(0.01), django.core.validators.MaxValueValidator(20)])),
('max_thermal_factor_on_peak_load', models.FloatField(blank=True, default=1.25, help_text='Factor on peak thermal LOAD which the electric chiller can supply. This accounts for the assumed size of the electric chiller which typically has a safety factor above the peak load.This factor limits the max production which could otherwise be exploited with ColdThermalStorage', validators=[django.core.validators.MinValueValidator(0.0), django.core.validators.MaxValueValidator(5.0)])),
],
bases=(job.models.BaseModel, models.Model),
),
migrations.CreateModel(
name='ExistingChillerOutputs',
fields=[
('meta', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='ExistingChillerOutputs', serialize=False, to='job.apimeta')),
('year_one_to_tes_series_ton', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True), blank=True, default=list, help_text='Year one hourly time series of electric chiller thermal to cold TES [Ton]', null=True, size=None)),
('year_one_to_load_series_ton', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True), blank=True, default=list, help_text='Year one hourly time series of electric chiller thermal to cooling load [Ton]', null=True, size=None)),
('year_one_electric_consumption_series_kw', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True), blank=True, default=list, help_text='Year one hourly time series of chiller electric consumption [kW]', null=True, size=None)),
('year_one_electric_consumption_kwh', models.FloatField(blank=True, help_text='Year one chiller electric consumption [kWh]', null=True)),
('year_one_thermal_production_tonhour', models.FloatField(blank=True, help_text='Year one chiller thermal production [Ton Hour', null=True)),
],
bases=(job.models.BaseModel, models.Model),
),
migrations.CreateModel(
name='HeatingLoadOutputs',
fields=[
('meta', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='HeatingLoadOutputs', serialize=False, to='job.apimeta')),
('dhw_thermal_load_series_mmbtu_per_hour', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100000000.0)]), blank=True, default=list, help_text='Hourly domestic hot water load [MMBTU/hr]', size=None)),
('space_heating_thermal_load_series_mmbtu_per_hour', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100000000.0)]), blank=True, default=list, help_text='Hourly domestic space heating load [MMBTU/hr]', size=None)),
('total_heating_thermal_load_series_mmbtu_per_hour', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100000000.0)]), blank=True, default=list, help_text='Hourly total heating load [MMBTU/hr]', size=None)),
('dhw_boiler_fuel_load_series_mmbtu_per_hour', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100000000.0)]), blank=True, default=list, help_text='Hourly domestic hot water load [MMBTU/hr]', size=None)),
('space_heating_boiler_fuel_load_series_mmbtu_per_hour', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100000000.0)]), blank=True, default=list, help_text='Hourly domestic space heating load [MMBTU/hr]', size=None)),
('total_heating_boiler_fuel_load_series_mmbtu_per_hour', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100000000.0)]), blank=True, default=list, help_text='Hourly total heating load [MMBTU/hr]', size=None)),
('annual_calculated_dhw_thermal_load_mmbtu', models.FloatField(blank=True, default=0, help_text='Annual site DHW load [MMBTU]', null=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100000000.0)])),
('annual_calculated_space_heating_thermal_load_mmbtu', models.FloatField(blank=True, default=0, help_text='Annual site space heating load [MMBTU]', null=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100000000.0)])),
('annual_calculated_total_heating_thermal_load_mmbtu', models.FloatField(blank=True, default=0, help_text='Annual site total heating load [MMBTU]', null=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100000000.0)])),
('annual_calculated_dhw_boiler_fuel_load_mmbtu', models.FloatField(blank=True, default=0, help_text='Annual site DHW boiler fuel load [MMBTU]', null=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100000000.0)])),
('annual_calculated_space_heating_boiler_fuel_load_mmbtu', models.FloatField(blank=True, default=0, help_text='Annual site space heating boiler fuel load [MMBTU]', null=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100000000.0)])),
('annual_calculated_total_heating_boiler_fuel_load_mmbtu', models.FloatField(blank=True, default=0, help_text='Annual site total heating boiler fuel load [MMBTU]', null=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100000000.0)])),
],
bases=(job.models.BaseModel, models.Model),
),
migrations.AlterField(
model_name='domestichotwaterloadinputs',
name='blended_doe_reference_percents',
field=django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, null=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(1.0)]), blank=True, default=list, help_text='Used in concert with blended_doe_reference_names to create a blended load profile from multiple DoE Commercial Reference Buildings to simulate buildings/campuses. Must sum to 1.0.', size=None),
),
]
Loading