[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



Christoph,

  Sorry for the delay in responding about this. I have not dug into the problem yet but could you please tell me which version of Trnsys you are using?

kind regards,

 David


On 08/17/2020 03:45, Christoph Buettner via TRNSYS-users wrote:

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@isfh.de 

Internet: 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]
_______________________________________________
TRNSYS-users mailing list
TRNSYS-users@lists.onebuilding.org
http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org
-- 
***************************
David BRADLEY
Principal
Thermal Energy Systems Specialists, LLC
3 North Pinckney Street - suite 202
Madison, WI  53703 USA

P:+1.608.274.2577
F:+1.608.278.1475
d.bradley@tess-inc.com

http://www.tess-inc.com
http://www.trnsys.com