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

Re: [TRNSYS-users] Defining a Global Variable in User Created Components



Aaron,

You could use a COMMON statement in FORTRAN to automatically pass this information to the other components but that does, in some ways, defeat one of the basic ideas of TRNSYS: the ability to remain completely flexible.  You could then only use those components together and never separately.  A better idea would be to define the specific heat parameter in every model, use an equation block to set the specific heat:

Equations 1
Cp_Fluid=4.182

Then in every model that uses the specific heat, simply change the units of the specific heat variable to string and enter the "value" as Cp_Fluid.  Every time you change fluids by updating the equation, the other components are automatically updated.

Jeff





Jeff Thornton
President - TESS, LLC

22 North Carroll Street - Suite 370
Madison WI 53703 USA

Phone: 608-274-2577
Fax: 6! 08-278-1475
E-mail: thornton@tess-inc.com
Web: www.tess-inc.com



----- Original Message -----
From: "Aaron J. Danenberg" <danenberg@hartford.edu>
Sent: Fri, August 26, 2011 9:22
Subject: [TRNSYS-users] Defining a Global Variable in User Created Components

TRNSYS Users:

 

I am working on simulating a system that is composed of multiple user created components.  Is there a way to define a parameter in one single place that will update the parameter in multiple components.  For example I would like to define the specific heat of a fluid in one place, and have three different components automatically use this value as one of their own parameters.  Thanks!

 

Aaron J. Danenberg

Graduate Research Assistant

Candidate for Master of Mechanical Engineering, September 2! 011

University of Hartford

Dana Hall 103, Research Laboratory 1

200 Bloomfield Ave.

West Hartford, CT 06117

 


_______________________________________________
TRNSYS-users mailing list
TRNSYS-users@cae.wisc.edu
https://mailman.cae.wisc.edu/listinfo/trnsys-users