[TRNSYS-users] change units in user made components?

Jeff Thornton thornton at tess-inc.com
Wed Nov 14 09:07:04 PST 2007


<I've created a new component with connected C++ function. The variables
in my component have their dimensions and units. In standard TRNsys
components one can freely change the units and computation goes on. In my
compo it's also possible to change units. However, in my C++ function only
numbers are input for the variables. How can I detect which units the user
has selected? Or is it needed to lock the units in the component and how
can that be done?>

Henk,

The studio lets you change the units for your parameters and non-connected
inputs as you have pointed out.  However, the parameters and inputs are
still written to the TRNSYS input file in the units that were originally
selected by the author - and therefore passed to the model in the desired
units.  So, in short, it's not necessary to "detect" the units that are
being provided to your model - they will be provided in the units that you
dictate when you create the studio proforma.

Jeff

Jeff Thornton
President - TESS, LLC

2916 Marketplace Drive - Suite 104
Madison WI 53719 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