### 2.7.1. Acquiring a Journal File with a TurboSystem Component in ANSYS Workbench

Journaling is not available for any actions/operations made in either BladeGen or BladeEditor.

The basic workflow for acquiring a journal file with a TurboSystem-related system (for example, a TurboGrid system or a Vista TF system) is as follows:

1. Start ANSYS Workbench.

2. Start journaling: File > Scripting > Record Journal.

3. From the Toolbox view, open a TurboGrid or other TurboSystem-related system.

4. Create a TurboSystem-related system and then work with it (for example, create a TurboSystem-related mesh or set up a throughflow analysis). The actions you perform are captured by the journaling process and written to a .wbjn file).

5. Stop journaling: File > Scripting > Stop Recording Session.

6. Optionally, edit the journal file (this is the process of scripting).

7. Run File > Scripting > Run Script File and select the .wbjn file.

#### 2.7.1.1. Journal of an Operation that uses Vista TF

When you record a journal file of operations that involve Vista TF, the contents will be similar to the following code snippets. In this example, a Vista TF system is added to an existing Geometry cell, then the Vista TF system is renamed, then a Vista TF setting is changed in the Setup cell properties:

Create a Vista TF system downstream of a Geometry cell

      template2 = GetTemplate(TemplateName="Vista TF")
      component1 = system1.GetComponent(Name="Geometry")
      componentTemplate1 = GetComponentTemplate(Name="VistaTFSetupTemplate")
      system2 = template2.CreateSystem(
          DataTransferFrom=[{"FromComponent": component1, "TransferName": None, "ToComponentTemplate": componentTemplate1}],
          Position="Right",
          RelativeTo=system1)

Rename the Vista TF system

      system2.DisplayText = "Centrifugal Compressor Throughflow Analysis"

Change the Handedness of the Machine in the Setup cell of the Vista TF system

      component2 = system2.GetComponent(Name="Setup")
      component2.Refresh()
      setup1 = system2.GetContainer(ComponentName="Setup")
      setupEntity1 = setup1.GetSetupEntity()
      setupEntity1.RotationalDirection = "LeftHanded"
      Update()

#### 2.7.1.2. Journal of an Operation that uses ANSYS TurboGrid

When you record a journal file of an operation that uses ANSYS TurboGrid, the contents will be similar to the following code snippets. In this example, a mesh is created and the project is then saved.

Create the TurboGrid system

      template1 = GetTemplate(TemplateName="TurboGrid")
      system1 = template1.CreateSystem()

Edit the Turbo Mesh cell and read a BladeGen file

      turboMesh1 = system1.GetContainer(ComponentName="Turbo Mesh")
      turboMesh1.Edit()
      turboMesh1.SendCommand(Command=r"""VIEW:View 1
        Camera Mode = User Specified
        CAMERA:
          Option = Pivot Point and Quaternion
          Pivot Point = 0, 0, 0
          Scale = 1
          Pan = 0, 0
          Rotation Quaternion = 0.279848, -0.364705, -0.115917, 0.880476
          Send To Viewer = False
        END

      END

      >readinf filename=C:\examples\rotor37\BladeGen.inf, guess=Off""")

Create a topology by unsuspending the Topology Set object

      turboMesh1.SendCommand(Command="""VIEW:View 1
        Camera Mode = User Specified
        CAMERA:
          Option = Pivot Point and Quaternion
          Pivot Point = 21.2526, -0.338768, 3.24
          Scale = 0.0965047
          Pan = 0, 0
          Rotation Quaternion = 0.279848, -0.364705, -0.115917, 0.880476
          Send To Viewer = False
        END

      END

      > um mode=normal, object=/TOPOLOGY SET""")

Create a mesh

      turboMesh1.SendCommand(Command="""VIEW:View 1
        Camera Mode = User Specified
        CAMERA:
          Option = Pivot Point and Quaternion
          Pivot Point = 21.2526, -0.338768, 3.24
          Scale = 0.0965047
          Pan = 0, 0
          Rotation Quaternion = 0.279848, -0.364705, -0.115917, 0.880476
          Send To Viewer = False
        END

      END

      > addlayer type=auto
      > mesh""")

Quit ANSYS TurboGrid

      turboMesh1.Exit()

Save the Project file

      Save(
          FilePath="C:/demo.wbpj",
          Overwrite=True)

In the above snippets, note how CCL and command actions for ANSYS TurboGrid are encapsulated as arguments of `CFX.SendCommand` instructions.

Release 18.2 - © ANSYS, Inc. All rights reserved.