Jump to main content
STAR-CCM+ Documentation

Simcenter STAR-CCM+ 2406

User Guide

  1. Home
  2. Tutorials

    Tutorials show you how to use Simcenter STAR-CCM+ for various applications in a step-by-step format with recommendations for setup, initialization and steps of the solution process specific to the application. Macro and simulation files are available for download for a large proportion of cases.

  3. Automation

    The tutorials in this set illustrate various Simcenter STAR-CCM+ automation and macro features.

  4. Simple Java Macros: Post-Processing Objects

    This tutorial is intended to demonstrate the steps required in recording, editing, and replaying a Java macro in Simcenter STAR-CCM+.

  5. Editing the Macro

    Examine the recorded macro to identify where you can insert a loop for the creation of multiple line probes.

Share
Link: copied
Breadcrumb: copied
  • Tutorials

    Tutorials show you how to use Simcenter STAR-CCM+ for various applications in a step-by-step format with recommendations for setup, initialization and steps of the solution process specific to the application. Macro and simulation files are available for download for a large proportion of cases.

    • Using Tutorial Macros and Files

      Macros, input files, and final simulation files for a range of tutorials are provided as an optional download package on the Support Center website. These macros and final simulation files are provided as an aid to the written tutorials, so that you can check your final results against the downloaded files, or against a simulation that is built and run using the macros.

    • Introduction

      Welcome to the Simcenter STAR-CCM+ introductory tutorial. In this tutorial, you explore the important concepts and workflow. Complete this tutorial before attempting any others.

    • Foundation Tutorials

      The foundation tutorials showcase the major features of Simcenter STAR-CCM+ in a series of short tutorials.

    • Geometry

      The tutorials in this set illustrate various Simcenter STAR-CCM+ features for creating and working with parts and 3D-CAD.

    • Mesh

      The tutorials in this set illustrate various STAR-CCM+ features for building CFD meshes.

    • Incompressible Flow

      The tutorials in this set illustrate various Simcenter STAR-CCM+ features for incompressible fluid flows as well as porosity and solution recording

    • Compressible Flow

      The tutorials in this set illustrate various Simcenter STAR-CCM+ features for compressible fluid flows as well as harmonic balance.

    • Heat Transfer and Radiation

      The tutorials in this set illustrate various Simcenter STAR-CCM+ features for heat transfer, radiation, and thermal comfort.

    • Multiphase Flow

      The tutorials in this set illustrate various Simcenter STAR-CCM+ features for simulating multiphase fluid flow problems

    • Discrete Element Method

      The tutorials in this set illustrate various Simcenter STAR-CCM+ features for simulating Discrete Element Method problems

    • Motion

      The tutorials in this set illustrate various STAR-CCM+ features for simulating problems with moving geometries and meshes, dynamic fluid body interaction, and rigid body motion:

    • Reacting Flow

      The tutorials in this set illustrate various Simcenter STAR-CCM+ features for simulating reacting flows such as combustion.

    • Solid Stress

      The tutorials in this set illustrate various Simcenter STAR-CCM+ features for computing deformation, strain, and stresses in solid regions. They also show how such computations can be coupled to the fluid behavior in an analysis of fluid-structure interaction.

    • Aeroacoustics

      The tutorials in this set illustrate various Simcenter STAR-CCM+ features for solving aeroacoustic simulations.

    • Electromagnetism

      The following tutorials illustrate features for solving problems that involve electromagnetic fields.

    • Electrochemistry

      The following tutorial demonstrates chemical reactions induced by an electrical current.

    • Battery

      The tutorials in this set illustrate various Simcenter STAR-CCM+ features for setting up a battery model:

    • Automation

      The tutorials in this set illustrate various Simcenter STAR-CCM+ automation and macro features.

      • Simulation Assistant: Internal Flow Assistant

        The Simulation Assistant provides you with an API framework that allows you to create workflows.

      • Simple Java Macros: Post-Processing Objects

        This tutorial is intended to demonstrate the steps required in recording, editing, and replaying a Java macro in Simcenter STAR-CCM+.

        • Prerequisites

          The instructions in the Simple Java Macros tutorial assume that you are already familiar with certain techniques in Simcenter STAR-CCM+.

        • Importing the Volume Mesh

          To set up the Simcenter STAR-CCM+ simulation, launch a simulation and import the supplied volume mesh.

        • Converting the Mesh to Two-Dimensions

          Simcenter STAR-CCM+ can use the surface of a three-dimensional mesh to create a two-dimensional mesh if the surface to be used lies on the X-Y plane at Z = 0.

        • Selecting the Physics Models

          Physics models define the physical variables and phenomena in the simulation. An incompressible isothermal turbulent flow is sufficient for this analysis. Use the segregated flow model with the k-omega turbulence model.

        • Setting Boundary Conditions and Values

          Specify a constant velocity in the X direction at the inlet, and a constant pressure at the outlet. Set the centerline boundary to be of type axis. This axis boundary must lie exactly on the Y = 0 line; project the axis to the appropriate plane.

        • Setting Stopping Criteria

          Set the stopping criteria for the simulation. By default, simulations are set to stop after 1000 iterations.

        • Visualizing the Simulation

          Create a scalar scene to display the pressure field as the solution develops.

        • Running the Simulation
        • Recording a Macro

          Create a macro to generate line probes at equally spaced intervals along the axis of the venturi tube. This enables you to extract profiles of axial velocity that can be used to observe the recovery of the flow after the venturi section.

        • Editing the Macro

          Examine the recorded macro to identify where you can insert a loop for the creation of multiple line probes.

          • Initial Lines of the Macro

            Open the file createLineProbes.java in an appropriate text editor. The first few lines of the macro specify the package to which the macro class belongs and the imported libraries that Simcenter STAR-CCM+ use to compile the macro.

          • Initial Sections of the execute0 Method

            Examine the initial sections of the execute0 method.

          • Code that Obtains the Scene Object

            Examine the code that obtains the scene object.

          • Code to be Repeated Multiple Times

            You now come to the code to be placed within a loop. Some Java comments have been added to help describe the operations taking place. Items to be replaced by variables are underlined, and sections to be removed are underlined.

          • Adding the Loop

            Add a loop to the macro that renames the line probes that are created.

          • Displaying the New Parts

            The remaining change is to display all of the line probes in the scalar scene. This is achieved by obtaining all of the derived parts from the PartManager and setting them on the appropriate displayer of object scene_0 obtained previously. Delete the redundant line of code which is underlined below:

        • Reviewing the Edited Macro
        • Running the Macro

          Run the macro in the Simcenter STAR-CCM+ client.

        • Plotting Data Using Line Probes

          Use the line probes to create an X-Y plot of axial velocity profiles. Each data series presented on the plot corresponds to the data extracted along a single-line probe. The data contained in the plot are exported to a text file.

        • Exporting XY Plot Data

          The data contained in the Velocity Profiles plot can be exported to a text file.

        • Further Training
        • Summary

          This tutorial has introduced the following Simcenter STAR-CCM+ features:

      • Intermediate Java Macros: Run Multiple Simulations

        This tutorial simulates a train in a cross-wind, to calculate the drag coefficient on the train for different angles of attack.

      • Simulation Templates: HVAC Duct

        In Simcenter STAR-CCM+, simulation templates define a starting point for simulations with similar physics. A simulation template can include a variety of predefined objects, such as predefined simulation operations, mesh operations, tags, filters, and parameters. Using a simulation template helps to automate and speed up the simulation preparation process.

    • Design Exploration

      The tutorials in this set illustrate various features for running design exploration studies in Design Manager.

    • Coupling with CAE Codes

      The tutorials in this set illustrate various Simcenter STAR-CCM+ features for coupling with CAE codes:

    • Analysis Methods

      The tutorials in this set illustrate various Simcenter STAR-CCM+ features for analysing and visualizing simulation data.

    • Simcenter STAR-CCM+ In-cylinder

      The tutorials in this set illustrate features for simulating internal combustion engines in Simcenter STAR-CCM+ using the dedicated add-on Simcenter STAR-CCM+ In-cylinder.

Editing the Macro

Examine the recorded macro to identify where you can insert a loop for the creation of multiple line probes.

NoteThe layout of the macro presented in the following sections may be different from what appears in your editor.
  • Initial lines of the macro
  • Initial sections of the execute0 method
  • Code that obtains the Scene object
  • Code to be repeated multiple times
  • Adding the loop
  • Displaying the new parts
  • Initial Lines of the Macro
  • Initial Sections of the execute0 Method
  • Code that Obtains the Scene Object
  • Code to be Repeated Multiple Times
  • Adding the Loop
  • Displaying the New Parts

Unpublished work © Siemens 2023

Corporate Information Privacy Policy Cookies Policy Terms of Use Digital ID

Need Support?

Support Center

Follow Us