Thanks, Jeff,
Further question: is special care required in selecting the units while creating the proforma? Does TRNsys "see" the unit difference between e.g. output of one component and input of a connected component? Or is it needed to carefully set input units equal to output units while creating the schema?
Henk
>>> "Jeff Thornton" <thornton@tess-inc.com> 14-11-2007 18:07 >>> <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@tess-inc.com Web: www.tess-inc.com |