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

expanded on open recent functionality #554

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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 tests/trnsysGUI/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import pathlib as _pl


PATH_TO_SETTINGS_JSON = "../data/settings.json"
PROJECT_1 = _pl.Path("../data/exampleProjects/example1/example1.json")
PROJECT_2 = _pl.Path("../data/exampleProjects/example2/example2.json")
PROJECT_3 = _pl.Path("../data/exampleProjects/example3/example3.json")
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
*******************************
**BEGIN Head.ddck
*******************************

*****************************************
** Contact person: Dani Carbonell
** Date: 30.09.2016
*****************************************

END

*******************************
**END End.ddck
*******************************
110 changes: 110 additions & 0 deletions tests/trnsysGUI/data/exampleProjects/example1/ddck/generic/head.ddck
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
*******************************
**BEGIN Head.ddck
*******************************

*****************************************
** Contact person: Dani Carbonell
** Date: 30.09.2016
*****************************************

***************************************************************************
** Description:
** Basic TRNSYS variables including fluid properties
***************************************************************************

VERSION 17

**************************************
***Simulation time ******
**************************************

CONSTANTS 3
START = 0
STOP = 8760
dtSim = 1/30. ! time step in hours

**************************************
***TRNSYS SIMULATION constants ******
**************************************

CONSTANTS 13
nIteTrnsys = 30 ! TRNSYS Limit of iterations
nWarnTrnsys = 12000 ! TRNSYS Limit of warnings
nCallTraceTrnys = 31 ! TRNSYS limit of calls to a component before it will be traced
FrInte_Tol = 0.003 ! TRNSYS solver tolerances
FrConv_Tol = 0.0005 ! TRNSYS solver tolerances
nan_check_bool = 1 ! TRNSYS nan check boolean
time_report = 1 ! TRNSYS time report
solver_equation = 0 ! TRNSYS EQUATION SOLVER statement
debug_statement = 0 ! TRNSYS Overwrite DEBUG statement
solver_statement = 0 ! TRNSYS Solver statement
min_relax_factor = 1 ! TRNSYS Minimum relaxation factor
max_relac_factor = 1 ! TRNSYS Maximum relaxation factor
solver_integration = 1 ! TRNSYS numerical integration solver method


**************************************
***TRNSYS SIMULATION SET-UP ******
**************************************

SIMULATION START STOP dtSim
TOLERANCES FrInte_Tol FrConv_Tol
LIMITS nIteTrnsys nWarnTrnsys nCallTraceTrnys ! Limit of Iterations, limit of warnings, limit of calls to a component before it will be traced
DFQ solver_integration ! TRNSYS numerical integration solver method
WIDTH 132 ! TRNSYS output file width, number of characters
LIST ! NOLIST statement

SOLVER solver_statement min_relax_factor max_relac_factor ! Solver statement, Minimum relaxation factor, Maximum relaxation factor
NAN_CHECK nan_check_bool ! Nan DEBUG statement
OVERWRITE_CHECK debug_statement ! Overwrite DEBUG statement
EQSOLVER solver_equation ! EQUATION SOLVER statement
TIME_REPORT time_report


**************************************
*** MASS FLOW SOLVER CONSTANTS ******
**************************************

CONSTANTS 3
mfrSolverAbsTol = 1e-8
mfrSolverRelTol = 1e-8
mfrTolSwitchThreshold = 1e2

**************************************
***User defined printer settings******
**************************************

CONSTANTS 3

tStrtUser = START ! START start time of user defined printer
tEndUser = STOP ! END time of user defined printer
dtPrUser = dtSim ! timestep of user defined printer

**************************************
***Generic Constants ******
**************************************

CONSTANTS 6
versionDeck = 1 !can be changed from config file to adapt processes and so on
PI = 3.1415926
Zero = 0
Nix = 0
notused = 0
NPlotsPerSim = 18

**************************************
***Constant fluid properties ******
**************************************

CONSTANTS 7
CPBRI = 3.8160 ! spec. heat of Glycol [kJ/kgK]; Value for an average pipe temperature with 55 °C Tyfocor LS
RHOBRI = 1016.0 ! density Glycol [kg/m³]; Value for an average pipe temperature with 55 °C Tyfocor L
CPWAT = 4.19 ! spec. heat of Water [kJ/kgK] at 20 °C
RHOWAT = 998.0 ! density of Water [kg/m³] at20 °C
LAMWAT = 0.58 ! heat conductivity W/(mK)
CPWAT_SI = CPWAT*1000 ! J/(kgK)
CPBRI_SI = CPBRI*1000 ! J/(kgK)

*******************************
**END Head.dck
*******************************
33 changes: 33 additions & 0 deletions tests/trnsysGUI/data/exampleProjects/example1/example1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"Blocks": {
".__BlockDct__": true,
"Block-1": {
".__BlockDict__": true,
"BlockDisplayName": "PV",
"BlockName": "PV",
"__version__": "e8cfde2f-8239-4338-a5f0-63a7abb93900",
"blockPosition": [
-10.0,
-55.0
],
"flippedH": false,
"flippedV": false,
"portsIdsIn": [],
"portsIdsOut": [],
"rotationN": 0,
"trnsysId": 1
},
"IDs": {
"GlobalId": 1,
"__idDct__": true,
"globalConnID": 1,
"trnsysID": 2
},
"Strings": {
"DiagramName": "example1.json",
"ProjectFolder": "C:\\Development\\parent\\pytrnsys_gui\\tests\\trnsysGUI\\data\\exampleProjects\\example1",
"__nameDct__": true
}
},
"hydraulicLoops": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
*******************************
**BEGIN Head.ddck
*******************************

*****************************************
** Contact person: Dani Carbonell
** Date: 30.09.2016
*****************************************

END

*******************************
**END End.ddck
*******************************
110 changes: 110 additions & 0 deletions tests/trnsysGUI/data/exampleProjects/example2/ddck/generic/head.ddck
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
*******************************
**BEGIN Head.ddck
*******************************

*****************************************
** Contact person: Dani Carbonell
** Date: 30.09.2016
*****************************************

***************************************************************************
** Description:
** Basic TRNSYS variables including fluid properties
***************************************************************************

VERSION 17

**************************************
***Simulation time ******
**************************************

CONSTANTS 3
START = 0
STOP = 8760
dtSim = 1/30. ! time step in hours

**************************************
***TRNSYS SIMULATION constants ******
**************************************

CONSTANTS 13
nIteTrnsys = 30 ! TRNSYS Limit of iterations
nWarnTrnsys = 12000 ! TRNSYS Limit of warnings
nCallTraceTrnys = 31 ! TRNSYS limit of calls to a component before it will be traced
FrInte_Tol = 0.003 ! TRNSYS solver tolerances
FrConv_Tol = 0.0005 ! TRNSYS solver tolerances
nan_check_bool = 1 ! TRNSYS nan check boolean
time_report = 1 ! TRNSYS time report
solver_equation = 0 ! TRNSYS EQUATION SOLVER statement
debug_statement = 0 ! TRNSYS Overwrite DEBUG statement
solver_statement = 0 ! TRNSYS Solver statement
min_relax_factor = 1 ! TRNSYS Minimum relaxation factor
max_relac_factor = 1 ! TRNSYS Maximum relaxation factor
solver_integration = 1 ! TRNSYS numerical integration solver method


**************************************
***TRNSYS SIMULATION SET-UP ******
**************************************

SIMULATION START STOP dtSim
TOLERANCES FrInte_Tol FrConv_Tol
LIMITS nIteTrnsys nWarnTrnsys nCallTraceTrnys ! Limit of Iterations, limit of warnings, limit of calls to a component before it will be traced
DFQ solver_integration ! TRNSYS numerical integration solver method
WIDTH 132 ! TRNSYS output file width, number of characters
LIST ! NOLIST statement

SOLVER solver_statement min_relax_factor max_relac_factor ! Solver statement, Minimum relaxation factor, Maximum relaxation factor
NAN_CHECK nan_check_bool ! Nan DEBUG statement
OVERWRITE_CHECK debug_statement ! Overwrite DEBUG statement
EQSOLVER solver_equation ! EQUATION SOLVER statement
TIME_REPORT time_report


**************************************
*** MASS FLOW SOLVER CONSTANTS ******
**************************************

CONSTANTS 3
mfrSolverAbsTol = 1e-8
mfrSolverRelTol = 1e-8
mfrTolSwitchThreshold = 1e2

**************************************
***User defined printer settings******
**************************************

CONSTANTS 3

tStrtUser = START ! START start time of user defined printer
tEndUser = STOP ! END time of user defined printer
dtPrUser = dtSim ! timestep of user defined printer

**************************************
***Generic Constants ******
**************************************

CONSTANTS 6
versionDeck = 1 !can be changed from config file to adapt processes and so on
PI = 3.1415926
Zero = 0
Nix = 0
notused = 0
NPlotsPerSim = 18

**************************************
***Constant fluid properties ******
**************************************

CONSTANTS 7
CPBRI = 3.8160 ! spec. heat of Glycol [kJ/kgK]; Value for an average pipe temperature with 55 °C Tyfocor LS
RHOBRI = 1016.0 ! density Glycol [kg/m³]; Value for an average pipe temperature with 55 °C Tyfocor L
CPWAT = 4.19 ! spec. heat of Water [kJ/kgK] at 20 °C
RHOWAT = 998.0 ! density of Water [kg/m³] at20 °C
LAMWAT = 0.58 ! heat conductivity W/(mK)
CPWAT_SI = CPWAT*1000 ! J/(kgK)
CPBRI_SI = CPBRI*1000 ! J/(kgK)

*******************************
**END Head.dck
*******************************
37 changes: 37 additions & 0 deletions tests/trnsysGUI/data/exampleProjects/example2/example2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"Blocks": {
".__BlockDct__": true,
"Block-1": {
".__BlockDict__": true,
"BlockDisplayName": "Coll",
"BlockName": "Collector",
"__version__": "e8cfde2f-8239-4338-a5f0-63a7abb93900",
"blockPosition": [
-10.0,
-16.0
],
"flippedH": false,
"flippedV": false,
"portsIdsIn": [
1
],
"portsIdsOut": [
2
],
"rotationN": 0,
"trnsysId": 1
},
"IDs": {
"GlobalId": 3,
"__idDct__": true,
"globalConnID": 1,
"trnsysID": 2
},
"Strings": {
"DiagramName": "example2.json",
"ProjectFolder": "C:\\Development\\parent\\pytrnsys_gui\\tests\\trnsysGUI\\data\\exampleProjects\\example2",
"__nameDct__": true
}
},
"hydraulicLoops": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
*******************************
**BEGIN Head.ddck
*******************************

*****************************************
** Contact person: Dani Carbonell
** Date: 30.09.2016
*****************************************

END

*******************************
**END End.ddck
*******************************
Loading
Loading