Skip to content

Commit

Permalink
Merge pull request #793 from RWTH-EBC/_fix_ibpsa_example
Browse files Browse the repository at this point in the history
fixes to let ipbsa example run
  • Loading branch information
FWuellhorst authored Dec 13, 2024
2 parents 085c991 + 47795bb commit 1a24adf
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/jupyter_notebooks/e3_export_ibpsa_models.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"cell_type": "markdown",
"metadata": {},
"source": "# Example 3: Export Modelica models for IBPSA library using TEASER API\nThis module contains an example how to export buildings from a TEASER\nproject to ready-to-run simulation models for Modelica library IBPSA. These\nmodels simulate in Dymola, OpenModelica and JModelica.\nYou can run this example using the [jupyter-notebook](https://mybinder.org/v2/gh/RWTH-EBC/TEASER/main?labpath=docs%2Fjupyter_notebooks)\n"
"source": "# Example 3: Export Modelica models for IBPSA library using TEASER API\nThis module contains an example how to export buildings from a TEASER\nproject to ready-to-run simulation models for Modelica library IBPSA. These\nmodels should simulate in Dymola, OpenModelica and JModelica.\nYou can run this example using the [jupyter-notebook](https://mybinder.org/v2/gh/RWTH-EBC/TEASER/main?labpath=docs%2Fjupyter_notebooks)\n"
},
{
"cell_type": "code",
Expand Down
2 changes: 1 addition & 1 deletion docs/source/examples/e3_export_ibpsa_models.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Example 3: Export Modelica models for IBPSA library using TEASER API
This module contains an example how to export buildings from a TEASER
project to ready-to-run simulation models for Modelica library IBPSA. These
models simulate in Dymola, OpenModelica and JModelica.
models should simulate in Dymola, OpenModelica and JModelica.
You can run this example using the [jupyter-notebook](https://mybinder.org/v2/gh/RWTH-EBC/TEASER/main?labpath=docs%2Fjupyter_notebooks)

```python
Expand Down
4 changes: 0 additions & 4 deletions teaser/data/output/modelicatemplate/IBPSA/IBPSA_FourElements
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ model ${zone.parent.name}_${zone.name}
${library}.BoundaryConditions.SolarIrradiation.DiffusePerez HDifTil[${min_orientations(zone.model_attr.n_outer)}]( each outSkyCon=true,
each outGroCon=true,
til=${get_list(deg_to_rad(zone.model_attr.tilt_facade))},
each lat = ${deg_to_rad(zone.parent.latitude)},
azi = ${get_list(azmiut_conv(zone.model_attr.orientation_facade))})
"Calculates diffuse solar radiation on titled surface for all directions"
annotation (Placement(transformation(extent={{-68,20},{-48,40}})));
${library}.BoundaryConditions.SolarIrradiation.DirectTiltedSurface HDirTil[${min_orientations(zone.model_attr.n_outer)}]( til=${get_list(deg_to_rad(zone.model_attr.tilt_facade))},
each lat = ${deg_to_rad(zone.parent.latitude)},
azi=${get_list(azmiut_conv(zone.model_attr.orientation_facade))})
"Calculates direct solar radiation on titled surface for all directions"
annotation (Placement(transformation(extent={{-68,52},{-48,72}})));
Expand Down Expand Up @@ -200,12 +198,10 @@ model ${zone.parent.name}_${zone.name}
"Sums up solar radiation of both directions"
annotation (Placement(transformation(extent={{4,76},{14,86}})));
${library}.BoundaryConditions.SolarIrradiation.DirectTiltedSurface HDirTilRoof[${min_orientations(zone.model_attr.n_rt)}]( til=${get_list(deg_to_rad(zone.model_attr.tilt_rt))},
each lat = ${deg_to_rad(zone.parent.latitude)},
azi=${get_list(azmiut_conv(zone.model_attr.orientation_rt))})
"Calculates direct solar radiation on titled surface for both directions"
annotation (Placement(transformation(extent={{-68,74},{-48,94}})));
${library}.BoundaryConditions.SolarIrradiation.DiffusePerez HDifTilRoof[${min_orientations(zone.model_attr.n_rt)}]( til=${get_list(deg_to_rad(zone.model_attr.tilt_rt))},
each lat = ${deg_to_rad(zone.parent.latitude)},
azi=${get_list(azmiut_conv(zone.model_attr.orientation_rt))})
"Calculates diffuse solar radiation on titled surface for both directions"
annotation (Placement(transformation(extent={{-68,48},{-48,68}})));
Expand Down
2 changes: 0 additions & 2 deletions teaser/data/output/modelicatemplate/IBPSA/IBPSA_OneElement
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ model ${zone.parent.name}_${zone.name}
${library}.BoundaryConditions.SolarIrradiation.DiffusePerez HDifTil[${min_orientations(zone.model_attr.n_outer)}]( each outSkyCon=true,
each outGroCon=true,
til=${get_list(deg_to_rad(zone.model_attr.tilt_facade))},
each lat = ${deg_to_rad(zone.parent.latitude)},
azi = ${get_list(azmiut_conv(zone.model_attr.orientation_facade))})
"Calculates diffuse solar radiation on titled surface for all directions"
annotation (Placement(transformation(extent={{-68,20},{-48,40}})));
${library}.BoundaryConditions.SolarIrradiation.DirectTiltedSurface HDirTil[${min_orientations(zone.model_attr.n_outer)}]( til=${get_list(deg_to_rad(zone.model_attr.tilt_facade))},
each lat = ${deg_to_rad(zone.parent.latitude)},
azi=${get_list(azmiut_conv(zone.model_attr.orientation_facade))})
"Calculates direct solar radiation on titled surface for all directions"
annotation (Placement(transformation(extent={{-68,52},{-48,72}})));
Expand Down
2 changes: 0 additions & 2 deletions teaser/data/output/modelicatemplate/IBPSA/IBPSA_ThreeElements
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ model ${zone.parent.name}_${zone.name}
${library}.BoundaryConditions.SolarIrradiation.DiffusePerez HDifTil[${min_orientations(zone.model_attr.n_outer)}]( each outSkyCon=true,
each outGroCon=true,
til=${get_list(deg_to_rad(zone.model_attr.tilt_facade))},
each lat = ${deg_to_rad(zone.parent.latitude)},
azi = ${get_list(azmiut_conv(zone.model_attr.orientation_facade))})
"Calculates diffuse solar radiation on titled surface for all directions"
annotation (Placement(transformation(extent={{-68,20},{-48,40}})));
${library}.BoundaryConditions.SolarIrradiation.DirectTiltedSurface HDirTil[${min_orientations(zone.model_attr.n_outer)}]( til=${get_list(deg_to_rad(zone.model_attr.tilt_facade))},
each lat = ${deg_to_rad(zone.parent.latitude)},
azi=${get_list(azmiut_conv(zone.model_attr.orientation_facade))})
"Calculates direct solar radiation on titled surface for all directions"
annotation (Placement(transformation(extent={{-68,52},{-48,72}})));
Expand Down
2 changes: 0 additions & 2 deletions teaser/data/output/modelicatemplate/IBPSA/IBPSA_TwoElements
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ model ${zone.parent.name}_${zone.name}
${library}.BoundaryConditions.SolarIrradiation.DiffusePerez HDifTil[${min_orientations(zone.model_attr.n_outer)}]( each outSkyCon=true,
each outGroCon=true,
til=${get_list(deg_to_rad(zone.model_attr.tilt_facade))},
each lat = ${deg_to_rad(zone.parent.latitude)},
azi = ${get_list(azmiut_conv(zone.model_attr.orientation_facade))})
"Calculates diffuse solar radiation on titled surface for all directions"
annotation (Placement(transformation(extent={{-68,20},{-48,40}})));
${library}.BoundaryConditions.SolarIrradiation.DirectTiltedSurface HDirTil[${min_orientations(zone.model_attr.n_outer)}]( til=${get_list(deg_to_rad(zone.model_attr.tilt_facade))},
each lat = ${deg_to_rad(zone.parent.latitude)},
azi=${get_list(azmiut_conv(zone.model_attr.orientation_facade))})
"Calculates direct solar radiation on titled surface for all directions"
annotation (Placement(transformation(extent={{-68,52},{-48,72}})));
Expand Down
2 changes: 1 addition & 1 deletion teaser/examples/e3_export_ibpsa_models.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# # Example 3: Export Modelica models for IBPSA library using TEASER API
# This module contains an example how to export buildings from a TEASER
# project to ready-to-run simulation models for Modelica library IBPSA. These
# models simulate in Dymola, OpenModelica and JModelica.
# models should simulate in Dymola, OpenModelica and JModelica.
# You can run this example using the [jupyter-notebook](https://mybinder.org/v2/gh/RWTH-EBC/TEASER/main?labpath=docs%2Fjupyter_notebooks)

import teaser.examples.e1_generate_archetype as e1
Expand Down
6 changes: 3 additions & 3 deletions teaser/logic/buildingobjects/calculation/ibpsa.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ def __init__(self, parent):
self.parent = parent
self.file_internal_gains = "InternalGains_" + self.parent.name + ".mat"
self.version = {
"AixLib": "1.0.0",
"Buildings": "7.0.0",
"AixLib": "2.1.0",
"Buildings": "11.0.0",
"BuildingSystems": "2.0.0-beta2",
"IDEAS": "2.1.0",
"IDEAS": "3.0.0",
}
self.consider_heat_capacity = True

Expand Down

0 comments on commit 1a24adf

Please sign in to comment.