Designer Control Via Scripts Popular

By 1091 downloads

Download (zip, 140 KB)


Designer Control Via Scripts

Two scripts have been created to enable controlling the designer.

The first script called ConfigActivation will change the active designer configuration. Just type in the designer config name you want to make active and it will change it. Setting that input property in the script via the api and excel will also change the active configuration.

The second script called DesignerProxy is used so that you can change the component/property that is used for the equality constraint and independent variable, as well as the target value and limits. It works in such a way that the designer is setup to modify and read from the script properties, these properties then pass along and retrieve the data from the components and properties you specified as inputs on the script.

To use it point the designer equality constraint and the independent variable to the proxy properties in the script. You must then enter the component and property names in the script inputs for the real independent variable and equality constraint. You also enter target values and minimum and maximum values in the script. In the designer itself the target value must always be 1 and the limits must always be 0 and 1. All the script inputs can be modified via any of the usual mechanisms like the api and excel.

You can use multiple copies of this script if you want multiple concurrent items that you want to design in one designer config.

Included is a network that uses the scripts so that it can be tested out.

Pipe Geometry Extractor Popular

By 640 downloads

Download (zip, 3.41 MB)

Pipe Geometry Extractor Ver 1.5.zip

Pipe Geometry Extractor

Flownex allows the user to specify pipe diameters and wall thicknesses as “Geometry” inputs where the user has to specify the specific values, or as “Schedule” inputs where a nominal diameter and schedule is selected.

Pipe diameters and wall thicknesses are often used in engineering calculations such as to calculate the pipe flow cross sectional area or the wetted internal surface area, or the maximum allowable working pressure of a pipe. External pipe surface heat transfer would require the pipe diameter (internal) and the wall thickness as well as the pipe length.

For power users who need to read pipe diameters and wall thicknesses from these pipe elements in order to perform further calculations in a script as discussed above or simply transfer this information to another element, this task is unfortunately not as simple as one would expect. Flownex uses two different property fields to store diameter information – one for the geometry inputs and one for the schedule input and they are completely independent. The problem for the user is that if you read the Diameter (geometry) field but the Pipe Schedule is specified, you will end up with the wrong diameter. Similarly, the user could specify the Schedule input option, and then the Diameter (from schedule) property field would yield the wrong information. The same problem exists for the pipe wall thickness.

Unfortunately Flownex does not offer a simple straightforward way for the user to obtain the correct diameter and wall thickness from a single field each. To assist with this, a simple script was developed which reads both diameters and both wall thickness fields as well as the geometry specification option - whether the geometrical diameter and wall thickness are specified or if the geometry is defined via a nominal diameter and schedule. It then provides the user with one result field for the correct diameter and the correct wall thickness.

The attached example Flownex project demonstrates the geometry extraction from a pipe and sending that information to a user script for further calculation.