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

795 besmod examples without hydraulic #796

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 7 additions & 0 deletions teaser/data/output/besmod_output.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""This module contains function for BESMod model generation"""

import os
import warnings
from typing import Optional, Union, List, Dict
from mako.template import Template
from mako.lookup import TemplateLookup
Expand Down Expand Up @@ -103,6 +104,12 @@ def export_besmod(
"Examples 'HeatPumpMonoenergetic' and 'GasBoilerBuildingOnly' "
"require the `THydSup_nominal` parameter."
)
elif THydSup_nominal is None:
THydSup_nominal = 328.15
if custom_examples:
warnings.warn("If you set THydSup_nominal in your custom examples template, "
"please provide it in the export. "
"Otherwise, the default value of 328.15 K will be used.")

t_hyd_sup_nominal_bldg = convert_input(THydSup_nominal, buildings)
t_hyd_sup_old_design_bldg = (
Expand Down
3 changes: 3 additions & 0 deletions tests/test_besmod_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ def test_export_besmod(self):
with self.assertRaises(ValueError):
prj.export_besmod(examples=examples)

prj.export_besmod(examples=["TEASERHeatLoadCalculation"])

prj.export_besmod(examples=examples,
THydSup_nominal=55 + 273.15)

Expand Down Expand Up @@ -110,6 +112,7 @@ def test_export_besmod(self):
THydSupOld_design=t_hyd_sup_nominal_old,
custom_examples=custom_example_template,
custom_script=custom_script)
prj.export_besmod(custom_examples=custom_example_template)

def test_convert_heating_profile(self):
"""Test the conversion of heating profiles for BESMod"""
Expand Down
Loading