SPF-OST / pytrnsys

Package that provides functionality to run and process, plot and report TRNSYS simulations
https://pytrnsys.readthedocs.io
GNU General Public License v3.0
11 stars 8 forks source link

Add `@` syntax for "black box" component temperatures to .ddck files. #100

Closed zuckerruebe closed 1 year ago

zuckerruebe commented 2 years ago

As a developer I want to unify the way .ddck files are connected to each other via the hydraulic. We currently/will soon have the possibility to access, e.g., the input mass flow rate through a port of a given component with the following syntax in a .ddck file (see https://github.com/SPF-OST/pytrnsys_gui/issues/233)

MfrCondIn = @mfr(condensorInput, MfrPiHpCondIn)

The black box component temperatures are currently read out from a .ddck file by looking at a block like

***********************************
** outputs to hydraulic solver
***********************************
EQUATIONS 2
THpEvapOut = [162,1]     ! 
THpCondOut = [162,3]     ! Temperature of the condenser (heat sink) outlet

in the ddck file (we're searching for the string "outputs to hydraulic"). In order to be consistent we should change this to

@temp(evaporatorOutput) = ...

where the right hand side could either be THpEvapOut, if needed, which would be defined further above or [162,1], directly (i.e. both ways should be supported).

zuckerruebe commented 2 years ago

@martin-neugebauer : We'll need to think a bit more about whether this should/can be in pytrnsys or pytrnsys-gui and/or what pytrnsys should do in the default case...

martin-neugebauer commented 1 year ago

Done.