Skip to content

Commit

Permalink
Merge pull request #529 from SPF-OST/proforma-to-ddck
Browse files Browse the repository at this point in the history
Proforma to ddck
  • Loading branch information
zuckerruebe authored Jul 30, 2024
2 parents 94aef9d + 87aa6fb commit 8e41925
Show file tree
Hide file tree
Showing 42 changed files with 3,804 additions and 487 deletions.
4 changes: 3 additions & 1 deletion requirements/release-3rd-party.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ typing_extensions
packaging

pydantic
pyyaml
pyyaml

xmlschema
6 changes: 5 additions & 1 deletion requirements/release-3rd-party.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SHA1:9d82ad464f04b0b0b3a59deb0d928af94dc2cd0a
# SHA1:c2d4f7c8829e3fe3cf7f2140842b3c64470bba1a
#
# This file is autogenerated by pip-compile-multi
# To update, run:
Expand Down Expand Up @@ -37,6 +37,8 @@ debugpy==1.8.0
# via ipykernel
decorator==5.1.1
# via ipython
elementpath==4.4.0
# via xmlschema
executing==2.0.1
# via stack-data
fonttools==4.46.0
Expand Down Expand Up @@ -201,5 +203,7 @@ tzdata==2023.3
# via pandas
wcwidth==0.2.12
# via prompt-toolkit
xmlschema==3.3.1
# via -r requirements\release-3rd-party.in
xyzservices==2023.10.1
# via bokeh
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def _getInstallRequirements():
"dev_template": _MASTER_VERSION_TEMPLATE,
"dirty_template": f"{_MASTER_VERSION_TEMPLATE}.dirty",
},
author_email="martin.neugebauer@ost.ch",
author_email="damian.birchler@ost.ch",
description="A GUI for Trnsys",
long_description=long_description,
long_description_content_type="text/markdown",
Expand All @@ -70,6 +70,7 @@ def _getInstallRequirements():
"templates/generic/*.ddck",
],
"trnsysGUI.components.plugin": ["data/*/*.svg", "data/*/*.yaml"],
"trnsysGUI.proforma": ["templates/ddck.jinja", "xmltmf.xsd"],
},
data_files=_getDataFilePairs(),
install_requires=_getInstallRequirements(),
Expand Down
Empty file.
Empty file.
141 changes: 141 additions & 0 deletions tests/trnsysGUI/proforma/data/expected/Type137.ddck
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
*******************************
** BEGIN Type137.ddck
*******************************

***************************************************************************
** Description:
** 4-Pipe Fan Coil: Heating and Cooling
***************************************************************************

***************************************************************************
** Details:
** This component models a fan coil where the air is heated or cooled as it passes across coils containing hot and cold
** liquid flow streams. This model relies on user-provided external data files which contain the performance of the
** coils as a function of the entering air and fluid conditions. Refer to the sample data files which accompany this
** model for the format of these external files.
***************************************************************************

***********************************
** inputs from hydraulic solver
***********************************

***********************************
** outputs to hydraulic solver
***********************************

***********************************
** outputs to other ddck
***********************************


******************************************************************************************
** outputs to energy balance in kWh and ABSOLUTE value
******************************************************************************************


***********************************
** Dependencies with other ddck
***********************************


***********************************
** Begin CONSTANTS
***********************************


***********************************
** Begin TYPE
***********************************
UNIT 1 TYPE 137
PARAMETERS 20
2.0 ! 1: Humidity Mode [-] ([2,2])
4.19 ! 2: Cooling Fluid Specific Heat [kJ/kg.K] ([0.0,+Inf])
4.19 ! 3: Heating Fluid Specific Heat [kJ/kg.K] ([0.0,+Inf])
943.89 ! 4: Rated Volumetric Air Flow Rate [l/s] ([0.,+Inf])
564.0 ! 5: Rated Fan Power [kJ/hr] ([0.,+Inf])
10.0 ! 6: Logical Unit - Cooling Performance [-] ([10,+Inf])
7.0 ! 7: Number of Drybulb Temperatures - Cooling [-] ([1,+Inf])
7.0 ! 8: Number of Wetbulb Temperatures - Cooling [-] ([1,+Inf])
6.0 ! 9: Number of Air Flows - Cooling [-] ([1,+Inf])
8.0 ! 10: Number of Liquid Temperatures - Cooling [-] ([1,+Inf])
2.0 ! 11: Number of Liquid Flow Rates - Cooling [-] ([1,+Inf])
11.0 ! 12: Logical Unit - Heating Performance [-] ([10,+Inf])
7.0 ! 13: Number of Air Temperatures - Heating [-] ([1,+Inf])
6.0 ! 14: Number of Air Flows - Heating [-] ([1,+Inf])
11.0 ! 15: Number of Liquid Temperatures - Heating [-] ([1,+Inf])
2.0 ! 16: Number of Liquid Flow Rates - Heating [-] ([1,+Inf])
12.0 ! 17: Logical Unit - Fan Corrections [-] ([10,+Inf])
11.0 ! 18: Number of Fan Speeds [-] ([1,+Inf])
0.9 ! 19: Efficiency of Fan Motor [-] ([0.,1.])
1.0 ! 20: Fraction of Fan Heat to Air [-] ([0.,1.])
INPUTS 17
0,0 ! 1: Cooling Fluid Inlet Temperature [C] ([-Inf,+Inf])
0,0 ! 2: Cooling Fluid Flow Rate [kg/hr] ([0.0,+Inf])
0,0 ! 3: Heating Fluid Inlet Temperature [C] ([-Inf,+Inf])
0,0 ! 4: Heating Fluid Flow Rate [kg/hr] ([0.0,+Inf])
0,0 ! 5: Return Air Temperature [C] ([-Inf,+Inf])
0,0 ! 6: Return Air Humidity Ratio [-] ([0.,+Inf])
0,0 ! 7: Return Air % Relative Humidity [% (base 100)] ([0,100])
0,0 ! 8: Return Air Pressure [atm] ([0.0,+Inf])
0,0 ! 9: Air-Side Pressure Rise: Fan [atm] ([0.0,+Inf])
0,0 ! 10: Air-Side Pressure Drop: Coils [atm] ([0.0,+Inf])
0,0 ! 11: Fresh Air Temperature [C] ([-Inf,+Inf])
0,0 ! 12: Fresh Air Humidity Ratio [-] ([0.,+Inf])
0,0 ! 13: Fresh Air % Relative Humidity [% (base 100)] ([0,100])
0,0 ! 14: Heating Control Signal [-] ([0.,1.])
0,0 ! 15: Cooling Control Signal [-] ([0.,1.])
0,0 ! 16: Fan Control Signal [-] ([0.,1.])
0,0 ! 17: Fraction of Outside Air [-] ([0.,1.])
** initial values
10.0 ! 1: Cooling Fluid Inlet Temperature initial value
0.0 ! 2: Cooling Fluid Flow Rate initial value
10.0 ! 3: Heating Fluid Inlet Temperature initial value
0.0 ! 4: Heating Fluid Flow Rate initial value
20.0 ! 5: Return Air Temperature initial value
0.002 ! 6: Return Air Humidity Ratio initial value
50.0 ! 7: Return Air % Relative Humidity initial value
1.0 ! 8: Return Air Pressure initial value
0.0 ! 9: Air-Side Pressure Rise: Fan initial value
0.0 ! 10: Air-Side Pressure Drop: Coils initial value
20.0 ! 11: Fresh Air Temperature initial value
0.002 ! 12: Fresh Air Humidity Ratio initial value
50.0 ! 13: Fresh Air % Relative Humidity initial value
0.0 ! 14: Heating Control Signal initial value
0.0 ! 15: Cooling Control Signal initial value
0.0 ! 16: Fan Control Signal initial value
0.0 ! 17: Fraction of Outside Air initial value

! EQUATIONS 18
! XXX = [1, 1] ! Cooling Fluid Outlet Temperature [C] ([-Inf,+Inf])
! XXX = [1, 2] ! Outlet Cooling Fluid Flow Rate [kg/hr] ([0.0,+Inf])
! XXX = [1, 3] ! Heating Fluid Outlet Temperature [C] ([-Inf,+Inf])
! XXX = [1, 4] ! Outlet Heating Fluid Flow Rate [kg/hr] ([0.0,+Inf])
! XXX = [1, 5] ! Outlet Air Temperature [C] ([-Inf,+Inf])
! XXX = [1, 6] ! Outlet Air Humidity Ratio [-] ([-Inf,+Inf])
! XXX = [1, 7] ! Outlet Air % Relative Humidity [% (base 100)] ([-Inf,+Inf])
! XXX = [1, 8] ! Outlet Air Flow Rate [kg/hr] ([-Inf,+Inf])
! XXX = [1, 9] ! Outlet Air Pressure [atm] ([-Inf,+Inf])
! XXX = [1, 10] ! Total Cooling Rate [kJ/hr] ([-Inf,+Inf])
! XXX = [1, 11] ! Sensible Cooling Rate [kJ/hr] ([-Inf,+Inf])
! XXX = [1, 12] ! Total Heating Rate [kJ/hr] ([-Inf,+Inf])
! XXX = [1, 13] ! Fan Power [kJ/hr] ([-Inf,+Inf])
! XXX = [1, 14] ! Fan Heat to Air Stream [kJ/hr] ([-Inf,+Inf])
! XXX = [1, 15] ! Fan Heat to Ambient [kJ/hr] ([-Inf,+Inf])
! XXX = [1, 16] ! Condensate Temperature [C] ([-Inf,+Inf])
! XXX = [1, 17] ! Condensate Flow Rate [kg/hr] ([0.0,+Inf])
! XXX = [1, 18] ! Conditioning Energy Rate [kJ/hr] ([-Inf,+Inf])

***********************************
** Monthly printer
***********************************


***********************************
** Hourly printer
***********************************


***********************************
** Online Plotter
***********************************

Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
*******************************
** BEGIN Type71-no-hydraulic-connections.ddck
*******************************

***************************************************************************
** Description:
** Solar Collector; Evacuated Tube
***************************************************************************

***************************************************************************
** Details:
** Because the Solar Ratings and Certification Commission (SRCC) defines the efficiency of an evacuated tube collector
** bank using the same equations as those for a flat plat, the main difference (from a modeling point of view) between
** an evacuated tube collector and a flat plate collector is in the treatment of incidence angle modifiers (IAMs). Type
** 71 is therefore based on the Type 1 code with the major difference being that Type 71 reads a text file containing a
** list of transverse and longitudinal IAMs. This component models the thermal performance of a variety of an evacuated
** tube collector types using theory. The total collector array may consist of collectors connected in series and in
** parallel. The thermal performance of the total collector array is determined by the number of modules in series and
** the characteristics of each module. The user must provide results from standard tests of efficiency versus a ratio of
** fluid temperature minus ambient temperature to radiation (DT/IT). The fluid temperature may be an inlet, average, or
** outlet temperature. The model assumes that the efficiency vs. DT/IT curve can be modeled as a quadratic equation.
** (Changed from version 13 where efficiency vs. DT/IT was assumed linear.) Corrections are applied to the slope,
** intercept, and curvature parameters to account for identical collectors in series, and flow rates other than those at
** test conditions. The effects of off-normal solar incidence are modeled by the provision of a bi-axial incidence angle
** modifier data file.
***************************************************************************

***********************************
** inputs from hydraulic solver
***********************************

***********************************
** outputs to hydraulic solver
***********************************

***********************************
** outputs to other ddck
***********************************


******************************************************************************************
** outputs to energy balance in kWh and ABSOLUTE value
******************************************************************************************


***********************************
** Dependencies with other ddck
***********************************


***********************************
** Begin CONSTANTS
***********************************


***********************************
** Begin TYPE
***********************************
UNIT 1 TYPE 71
PARAMETERS 11
1.0 ! 1: Number in series [-] ([1,+Inf])
2.0 ! 2: Collector area [m^2] ([0.0,+Inf])
4.19 ! 3: Fluid specific heat [kJ/kg.K] ([0.0,+Inf])
1.0 ! 4: Efficiency mode [-] ([1,3])
50.0 ! 5: Flow rate at test conditions [kg/hr.m^2] ([0.0,+Inf])
0.7 ! 6: Intercept efficiency [-] ([0.0,1.0])
10.0 ! 7: Negative of first order efficiency coeficient [kJ/hr.m^2.K] ([0.0,+Inf])
0.03 ! 8: Negative of second order efficiency coeficient [kJ/hr.m^2.K^2] ([0.0,+Inf])
13.0 ! 9: Logical unit of file containing biaxial IAM data [-] ([10,100])
7.0 ! 10: Number of longitudinal angles for which IAMs are provided [-] ([1,+Inf])
7.0 ! 11: Number of transverse angles for which IAMs are provided [-] ([1,+Inf])
INPUTS 10
0,0 ! 1: Inlet temperature [C] ([-Inf,+Inf])
0,0 ! 2: Inlet flowrate [kg/hr] ([0.0,+Inf])
0,0 ! 3: Ambient temperature [C] ([-Inf,+Inf])
0,0 ! 4: Incident radiation [kJ/hr.m^2] ([0.0,+Inf])
0,0 ! 5: Incident diffuse radiation [kJ/hr.m^2] ([0.0,+Inf])
0,0 ! 6: Solar incidence angle [degrees] ([-360,+360])
0,0 ! 7: Solar zenith angle [degrees] ([-360,+360])
0,0 ! 8: Solar azimuth angle [degrees] ([-360,+360])
0,0 ! 9: Collector slope [degrees] ([-360,+360])
0,0 ! 10: Collector azimuth [degrees] ([-360,+360])
** initial values
20.0 ! 1: Inlet temperature initial value
100.0 ! 2: Inlet flowrate initial value
10.0 ! 3: Ambient temperature initial value
0.0 ! 4: Incident radiation initial value
0.0 ! 5: Incident diffuse radiation initial value
0.0 ! 6: Solar incidence angle initial value
0.0 ! 7: Solar zenith angle initial value
0.0 ! 8: Solar azimuth angle initial value
45.0 ! 9: Collector slope initial value
0.0 ! 10: Collector azimuth initial value

! EQUATIONS 5
! XXX = [1, 1] ! Outlet temperature [C] ([-Inf,+Inf])
! XXX = [1, 2] ! Outlet flowrate [kg/hr] ([0.0,+Inf])
! XXX = [1, 3] ! Useful energy gain [kJ/hr] ([0.0,+Inf])
! XXX = [1, 4] ! Collector efficiency [-] ([-Inf,+Inf])
! XXX = [1, 5] ! Incidence angle modifier - overall [-] ([-Inf,+Inf])

***********************************
** Monthly printer
***********************************


***********************************
** Hourly printer
***********************************


***********************************
** Online Plotter
***********************************

Loading

0 comments on commit 8e41925

Please sign in to comment.