Tutorial 18: Variable Definition Tutorial

Purpose/Objective

This exercise will walk the user through building a simple tube & orifice model with the use of variable definition. The user will learn how to:

  • Create Chamber & Element
  • Create Variable & Set Expression
  • Define Element Properties via Variable
  • Check the model
  • Run the model & Post-Process
  • Creation of Multi-Case
  • Creation of Derived Result Variable
  • Post-process of Multi-Case run
  • Chamber Types: Plenum, Momentum
  • Element Types: Conventional Orifice, Tube
  • Fluid: Air

Step 1: Create Chamber & Element

  1. The user will be creating a flow model consists of simple tube and orifice element where tube radius is known.
  2. Plan model setup based on what is known about the geometry

    Figure 1.01: Sketch/Outline of model

  3. Drag and drop Boundary Plenum & Boundary Momentum chambers at the inlet and outlet locations as shown Figure 1.01
    • Translate (right click chamber/element → translate) option and manually editing the coordinates (Property Editor → Location), can be used to assist in placing chambers and elements in the right location
  4. Use to adjust symbol and text size
  5. Place non-boundary momentum chambers at the center location.
  6. Connect stationary tube element between boundary plenum (left) and the center momentum chamber, and conventional orifice element between center momentum chamber and boundary momentum (right) chamber.
  7. For the inlet boundary plenum
    1. Set pressure to 300 psi
    2. Set temperature to 500 F
  8. For the sink boundary momentum
    1. Set static pressure to 200 psi
    2. Set total pressure to 290 psi
    3. Set temperature to 400 F
  9. For the outlet conventional orifice
    1. Set area to 0.25 in^2
    2. Set Cd to 0.8

Step 2: Create Variable and Expressions

  1. Creation of Variable
    1. Click to open Variable Edit Tree or the steps described in quick guide
    2. Create Variable named “Radius” and set a constant value of 0.25
    3. Create another variable named “Area” and set expression as “Math.pow([Radius],2) *Math.PI” in secondary pop-up window as shown in the following figure. Make sure to click “Execute” button after defining.

      Figure 1.02

Step 3: Define Element properties via Variable

  1. For the Tube Element
    1. Set Geometric Input Type as “Area” only
    2. Set Geometric Input size as “Constant” only
    3. Set Area as “[Area]”, which is a defined variable, as shown Figure 1.03
    4. Set Length as 5 in.

      Figure 1.03

Step 4: Check Model and Run

  1. Select checkmark icon from the top toolbar to check the model for warnings/errors.
    • An error should populate stating that the internal chamber has not been initialized
  2. Select the initialization icon from the toolbar, and pick Start. Accept values once flow solver has converged.
  3. Select run icon from toolbar. Run Flow Simulator.

Step 5: Post-process

  1. Results file (*.res) should automatically be loaded into GUI. If not, it can be selected via File → Load Result File
  2. By default, both chamber and elemental results are displayed in the graphical workspace.

    Figure 1.04: Model results

  3. Results displayed after running the model will include pressures, temperatures, and swirl values

Step 6: Creation of Multi-Case & Run

  1. In this section a multicase will be created using MultiCase Creator Tool with 4 case where in each case Cd values of the orifice element will be varied (0.2, 0.4, 0.6 & 0.8).
  2. Click to open Multicase Creator Graphical User Interface.
  3. Click “Properties” tab on left side of the GUI Window.
  4. Select Orifice element from main Graphic window, when selected the properties related to the element will be populated in left side of the Multicase Creator GUI
  5. Select “Discharge Coefficient(CD) (HeadLoss)” from the list of items.
  6. Click 4 times to add 4 columns in left side of the table.
  7. Enter 0.2, 0.4, 0.6 & 0.8 for Case 1 , Case 2, Case 3 & Case 4 column.
  8. Save the multi-case by clicking in top left corner of the Multicase Creator GUI.

    Figure 1.05: Multi-Case Creator

  9. Select the initialization icon from the toolbar, and pick Start. Accept values once flow solver has converged.
  10. Select run icon from toolbar.
  11. Choose “Multiple Cases” and click “Multi-Case Settings” button to make sure proper multicase import file is selected.
  12. Check “Save Results to separate Folder” and then Run Flow Simulator

    Figure 1.06: Run option during Multi-Case

Step 7: Creation of Derived Result Variable

  1. In this section a result variable will be created using Variable Edit Tool
  2. Open Variable Edit Tree by clicking button.
  3. Create a new variable named “Dynamic-Head”. Right-Click and then “Set Expression” to define the expression for this newly created variable.
    1. Click “Insert Result Variable” button.
    2. Select “Chamber”.
    3. Select “Entity” from drop-down list.
    4. “Select “Total Pressure” from the populated list.
    5. Click “Insert Expression”.
    6. Enter “-” (negative sign) inside the expression box.
    7. Repeat process (i-v) to insert static pressure. After the expression should looks like as shown in figure 1.07.
    8. Click Execute.

      Figure 1.07: Defining Derived result variable

Step 8: Post-Process Multi-case Result using Result Table

  1. This section will provide details on how to post-process multi-case results with one derived result variable
    1. Open “Result Table” pop-up GUI by clicking button.
    2. Click “Select Result Folder” to choose the multi-case result folder.
    3. Click “Variable” Tab under which all defined variables are listed.
    4. Choose “Dynamics-Head”. The “Dynamic-Head” data of all 4 cases will be displayed in right window as shown in the figure 1.08.
    5. User can create plot using option
    6. At last user can save the result set by clicking button.

      Figure 1.08: Defining Derived result variable