Skip to content

Commit

Permalink
Elements backup (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
andoludo authored Aug 31, 2024
2 parents a651344 + 45cf834 commit 74a72bb
Show file tree
Hide file tree
Showing 154 changed files with 8,010 additions and 7,507 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ instance/
# Scrapy stuff:
.scrapy

# Sphinx documentation
# Sphinx reporting
docs/_build/

# PyBuilder
Expand Down Expand Up @@ -142,7 +142,7 @@ venv.bak/
# Rope project settings
.ropeproject

# mkdocs documentation
# mkdocs reporting
/site

# mypy
Expand Down
142 changes: 111 additions & 31 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ linkml = "^1.8.1"
cruft = "^2.15.0"
rdflib = "^7.0.0"
owlready2 = "^0.46"
pyyaml-include = "^2.1"


[tool.poetry.group.dev.dependencies]
Expand All @@ -43,6 +44,7 @@ types-beautifulsoup4 = "^4.12.0.20240229"
pytest-mongo = "^3.1.0"
networkx-stubs = "^0.0.1"
pytest-ordering = "^0.6"
types-pyyaml = "^6.0.12.20240808"

[build-system]
requires = ["poetry-core"]
Expand Down
95 changes: 95 additions & 0 deletions tests/ahu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
components:
- component_template:
bus:
integer_outputs:
- component: fanSup
name: u1SupFan
port: y_actual
target: element.name
real_inputs:
- component: fanSup1
input_model: ''
name: ySupFan
port: y
target: element.name
- component: fanSup
input_model: ''
name: ySupFan
port: y
target: element.name
- component: damRet
input_model: ''
name: yRetDam
port: y
target: element.name
- component: damOut
input_model: ''
name: yOutDam
port: y
target: element.name
- component: damExh
input_model: ''
name: yOutDam
port: y
target: element.name
real_outputs:
- component: TOut
input_model: ''
name: TOut
port: T
target: element.control.name
- component: VOut1
input_model: ''
name: VAirOut_flow
port: V_flow
target: element.control.name
- component: TSup
input_model: ''
name: TAirSup
port: T
target: element.control.name
- component: TMix
input_model: ''
name: TAirMix
port: T
target: element.control.name
- component: dpDisSupFan
input_model: ''
name: dpDuc
port: p_rel
target: element.control.name
category: ventilation
template: "\n model Ahu{{ element.name | capitalize}}\n extends {{ package_name\
\ }}.Common.Fluid.Ventilation.PartialAhu;\n {{bus_template}}\n equation\n\
\ {{bus_ports | safe}}\n end Ahu{{ element.name | capitalize}};\n \
\ "
ports:
- flow: inlet
multi_connection: true
names:
- port_a
targets:
- System
- Space
use_counter: false
- flow: outlet
multi_connection: true
names:
- port_b
targets:
- System
- Space
use_counter: false
- names:
- ports
targets:
- BaseBoundary
- names:
- dataBus
targets:
- AhuControl
template: "{{package_name}}.Common.Fluid.\n Ventilation.Ahu{{ element.name |\
\ capitalize}}\n {{ element.name }}\n (redeclare package MediumA = Medium,\n\
\ {% raw %}\n VRoo={100,100},\n AFlo={20,20},\n mCooVAV_flow_nominal={0.01,0.01}{%\
\ endraw %})"
variant: default
52 changes: 52 additions & 0 deletions tests/boiler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
ideas:
- template: |
{{package_name}}.Common.Fluid.Boilers.
BoilerWithStorage{{ element.name | capitalize}} {{ element.name }}(
{{ macros.render_parameters(parameters) | safe}},
redeclare package MediumW = MediumW) "Boiler"
ports:
- targets:
- Control
- DataBus
names:
- dataBus
multi_connection: True
use_counter: False
- names:
- port_a
flow: inlet
multi_connection: True
use_counter: False
- names:
- port_b
flow: outlet
multi_connection: True
use_counter: False
component_template:
template: |
model BoilerWithStorage{{ element.name | capitalize}}
extends {{ package_name }}.Common.Fluid.Boilers.PartialBoilerWithStorage;
{{bus_template}}
equation
{{bus_ports | safe}}
end BoilerWithStorage{{ element.name | capitalize}};
category: boiler
bus:
real_inputs:
- name: yBoiCon
target: element.name
component: Boiy
port: y
- name: yPumBoi
target: element.name
component: pumBoi
port: y
real_outputs:
- name: TStoBot
target: element.name
component: tanTemBot
port: T
- name: TStoTop
target: element.name
component: tanTemTop
port: T
Loading

0 comments on commit 74a72bb

Please sign in to comment.