SCRIPTS in Thermoflow Programs

SCRIPTS in Thermoflow Programs

After releasing version 23 of Thermoflow software, Scripting capability was introduced which had a great impact on empowering Thermoflow. Scripting functionality allows users to create and compute custom outputs or to set certain inputs using code written in the scripting language Lua. They can link to and run code and other programs that are not immediately visible from the script editing. So Scripts can be dangerous and you should not run a script that you think may contain malicious or harmful code.

At first, Scripting employed in THERMOFLEX module but now individuals can use it in GT PRO, GT MASTER and THERMOFLEX

History of employing Scripting in THERMOFLOW

-THERMOFLEX, Version23, since2013
-GT MASTER, Version24, since2014
-GT PRO, Version26, since2016
THERMOFLEX uses the scripting language Lua, version 5.1.4 which individuals can find more information on the following link

Full online documentation for Lua version 5.1:  http://www.lua.org/manual/5.1/manual.html

four group of variables can be defined in Thermoflow scripting:

CustomScript Inputs: name, descriptionand Units(TFIP)
Script Inputs fromprogram(GTP-GTM-TFX) : input parameterstobe determinedbytheScript (TFIP)
Script Outputs: customoutput parameterstobe computedbytheScript (SOP)
Script Inputs: inputs and outputs fromtheprogramrequiredbytheScript (SIP) (CustomScript Inputs mustbe addedhere)

User should notice to the difference on Units: “Currentdisplay” and “Native” because unit conversion within the script is left to the user.

Scripts can be executed in different program computation:

۱. At the beginning of computationbefore anything else has been computed Allows a script to set THERMOFLEX input parameters before beginning the computation.
۲. During the main computation loop Allows a script to set inputs during the computation instead of waiting for convergence. This can give a result faster, but is also more likely to make the model unstable.
۳. Just before the model is deemed convergedto give the script one last chance to change THERMOFLEX input parameters (TFIPs) Allows a script to set inputs that change the flow or pressure relational matrices
۴. At the end of computationafter all other outputs have been computed Allows a script to compute custom outputs using the final results of the computation. THERMOFLEX input parameters are not set at this time. Computation is over, so setting TFIPs to new values at this point wouldhave no effect on the results.

The results are in TEXT tab in Thermoflex:

ثبت ديدگاه

5 × چهار =