A short presentation (15 min) of pytrnsys and its features can be found in the following YouTube video.
You can find the documentation under https://pytrnsys.readthedocs.io/
You'll need TRNSYS
(at least version 17, preferably version 18, 32 bit) installed on your machine.
This version is recommended for non-SPF users and/or everyone interested in the most recent stable release possibly missing the latest features.
Go to Releases and download the .zip
file included in
the latest Release Build:
(Note that the version will vary as newer versions are being published)
This version is recommended for SPF users and/or everyone wanting to get the latest and greatest but not minding the fact that this version is less stable (i.e. can contain more bugs/errors) than the latest stable release.
Go to Releases and download the .zip
file included in
the bleeding-edge
Development Build:
Copy pytrnsys
custom TRNSYS types in the form of compiled DLLs from
pytrnsys_data\data\ddcks\dlls
to the respective folder of your TRNSYS installation:
...\UserLib\ReleaseDLLs
pytrnsys-gui.bat
writes logging messages into the pytrnsys-gui.log
file located in the same directory
as the .bat
file. The .log
file might give you some hints as to what happened if something doesn't
work or if pytrnsys-gui.bat
has crashed.
Local clones of the following GIT repositories:
https://github.com/SPF-OST/pytrnsys.git
https://github.com/SPF-OST/pytrnsys_gui.git
They should be next to each other and be called pytrnsys
and pytrnsys_gui
like so:
parent/
pytrnsys/
pytrnsys_gui/
All the following commands should be run from the pytrnsys_gui
directory. The command should be run in a
"Windows Command Prompt" (cmd).
py -3.12 -m venv venv
venv\Scripts\activate
python -m pip install wheel
python -m pip install -r requirements\dev.txt
python dev-tools\generateGuiClassesFromQtCreatorStudioUiFiles.py
pytrnsys-gui
python setup.py egg_info -b dev
(By adding this tag we make sure that the Qt Creator .ui files are re-generated each time the GUI is started.)
pytrnsys-gui
!
python trnsysGUI\gui.py
Several custom TRNSYS types in the form of compiled DLLs are delivered with pytrnsys
.
You'll have to manually copy the files from
pytrnsys\data\ddcks\dlls
to the respective folder of your TRNSYS installation:
...\UserLib\ReleaseDLLs
Beware that the GUI can only be started from within the virtual environment you created in step 1. I.e., whenever you open a new console window from which you want to start the GUI you first need to activate the environment (step 2. above).