[TRNSYS-users] duplicate equation block component

David BRADLEY d.bradley at tess-inc.com
Wed Jul 20 10:08:52 PDT 2011


David and Werner
   That is an interesting suggestion. If you have two equations with the 
same name in your input file, TRNSYS should catch that and give you an 
error saying so when you run the simulation. Its not always easy to find 
where the duplicate equations are; I typically open the *.dck itself 
from the Studio and then search for the name of the offending equation, 
then note the name of the equation block that it was found in.

   One other thing to note though: while equation names cannot be 
duplicated, a variable can be used in more than one equation block. For 
example, the following is perfectly okay (note that the second equation 
block uses the results of the first equation block. as a side note, NO 
link needs to be drawn between the two equation blocks in the Studio!):


* EQUATIONS "equation block 1"
*
EQUATIONS 2
myEqn1 = 0.0
myEqn2 = myEqn1+4
*$UNIT_NAME equation block 1
*$LAYER Main
*$POSITION 565 779

* EQUATIONS "equation block 2"
*
EQUATIONS 1
myEqn3 = myEqn1+myEqn2
*$UNIT_NAME equation block 2
*$LAYER Main
*$POSITION 500 700


On 7/20/2011 10:53, keilholz, werner wrote:
>
> Thanks David for this suggestion.
>
> In the meantime, you can now also use the edit button in the equation 
> editor and use the replace function of the text editor.
>
> Werner
>
> *De :*trnsys-users-bounces at cae.wisc.edu 
> [mailto:trnsys-users-bounces at cae.wisc.edu] *De la part de* CHEZE David 
> 227480
> *Envoyé :* mercredi 20 juillet 2011 11:01
> *À :* trnsys-users at engr.wisc.edu
> *Objet :* [TRNSYS-users] duplicate equation block component
>
> Hi,
>
> I wrote an Equation block (in TRNSYS 17.0.019) which stands for a very 
> simple fluid heater and I aim to duplicate this block (just Copy/paste 
> in the Studio) in order to have a new instance of this object in the 
> same project but connected to another hydraulic loop with different 
> behavior : when I just copy/past in the studio, another block is 
> nicely copied, all equations are written in the deck files but with 
> the same variable's names what can not be used as I guessed. In an 
> object oriented use of this "Equation block", it would be nice to have 
> a feature in the studio which ensures an automatic renaming of the 
> declared variables. Another way is obviously user component's writing 
> but not so quick and more general while the problem was local.
>
> Thanks for your advice,
>
> David
>
>
> _______________________________________________
> TRNSYS-users mailing list
> TRNSYS-users at cae.wisc.edu
> https://mailman.cae.wisc.edu/listinfo/trnsys-users

-- 
***************************
David BRADLEY
Principal
Thermal Energy Systems Specialists, LLC
22 North Carroll Street - suite 370
Madison, WI  53703 USA

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

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20110720/b7fde57e/attachment-0001.htm>


More information about the TRNSYS-users mailing list