[TRNSYS-users] Additional checking functions: EQWARN, GTWARN, GEWARN, NEWARN

Christoph Buettner buettner at isfh.de
Mon Aug 17 01:45:16 PDT 2020


Dear TRNSYS-users,

 
accordingly to TRNSYS Volume 6 TRNEdit, we can use the functions eqwarn, gtwarn, gewarn and newarn to generate a notice, warning or error (set as third argument), after first and second expression/argument are compared. (The description in the documentation is quite wrong, the error is generated if function is TRUE)

 
I’m using this function to stop early simulations and reduce processing time e.g. after a temperature is too often too low.

 
I got some problems with this.

1.       The functions generate an error, even if I set the third argument to  0 or 1 for notice or warning.

2.       The function compares all iteration of a timestep. This means, even if the comparison of two values at the END of a timestep is FALSE, it generate the error.

 
Regarding Point 1:

The SourceFile Eval.f90 has a part for Fatal and Warning: I think a change of the second FATAL to WARNING should work, but where is the notice Part?

 
Case (33) !eqwarn

    If (stack(top) == stack(top+1)) Then

       stack(top) = 1.d0

                   If (stack(top+2) > 1.5) Then

          Call Messages(617,atemp,'FATAL',-1,-1) !Generate an error message

                      eval = -99999.d0

                      Return

                   ElseIf (stack(top+2) > 0.5) Then

          Call Messages(617,atemp,'FATAL',-1,-1) !Generate an error message

                      eval = -99999.d0

                      Return

       EndIf

    Else

       stack(top) = 0.d0

    EndIf

 
Regarding Point 2:

How can the calculation of an Equation be done only at the end of a timestep (like a Printer)?

Right now I’m using the saved values of last timestep, but maybe it’s possible to set the calculation of these warn-function to “After Convergence”? Every Type has this “If(getIsEndOfTimestep()) Then”-Part.

 
I’m grateful for any ideas.

 
Chris


________________________________________________________________

 
M.Sc. Christoph Büttner

 
Abteilung Solare Systeme

Solar systems department

 
Arbeitsgruppe Thermische Energiesysteme

Workgroup Thermal Energy Systems

 
Institut für Solarenergieforschung GmbH

Am Ohrberg 1

D-31860 Emmerthal

 
Phone: +49 (0) 5151 999 647

Fax: +49 (0) 5151 999 400

 
eMail:ch.buettner at isfh.de 

Internet:www.isfh.de <http://www.isfh.de/>  

 
Handelsregister: Amtsgericht Hannover HRB 100547

Geschäftsführer: Prof. Dr. Rolf Brendel

Vorsitzender des Aufsichtsrats: Ministerialrat Dr. Sebastian Huster

________________________________________________________________

 

¥2019 ISFH [1546297200]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20200817/f4cd48d9/attachment.html>


More information about the TRNSYS-users mailing list