[TRNSYS-users] Sharing some information - (simple example and some hints to change a variable from input to parameter and vice versa)

Mehdi Shahrestani mahdishahrestani at yahoo.com
Sat Jul 17 09:57:08 PDT 2010


Dear Jeff 

Many thanks for your valuable comment.
For sure all the users should be very careful of the mentioned point.
The rationale behind the example, was only explaining a way for changing
type of a variable form parameter to input and vice versa. 
As you mentioned it is not reasonable to change the diameter when the
simulation is running and I did not meant to do so.

Finally I acknowledge your supervisory role in this communication. Such a
wise comment is always advantageous.

Regards
Mehdi Shahrestani



-----Original Message-----
From: Jeff Thornton [mailto:thornton at tess-inc.com] 
Sent: 17 July 2010 17:08
To: Mehdi Shahrestani; trnsys-users at cae.wisc.edu
Subject: Re: [TRNSYS-users] Sharing some information - (simple example and
somehints to change a variable from input to parameter and vice versa)

<Suppose that in type 31 (pipe & duct), we need to change the pipe
inside diameter to an input (pipe inside diameter is originally defined as
a parameter in type 31).>

This is a perfect example of why you have to be very careful when you
change a parameter to an input.  In this case, it seems relatively
straightforward to make the change using the nice example that was
provided by Mehdi.  However, changing the diameter of the pipe during the
simulation in fact changes the mass of fluid in the pipe and the
differential equation describing the temperature of the fluid in the pipe
is now not valid.  In addition, changing the diameter of the pipe would
thereby increase or decrease the outlet flow rate.  Therefore this simple
change would introduce mass and energy balance problems into your
simulation.  So please be sure you understand the role of each of the
parameters before making such a change.

Jeff

Jeff Thornton
President - TESS, LLC

22 North Carroll Street - Suite 370
Madison WI 53703 USA

Phone: 608-274-2577
Fax: 608-278-1475
E-mail: thornton at tess-inc.com
Web: www.tess-inc.com




More information about the TRNSYS-users mailing list