Help:STAR CCM+

From CECS wiki
Jump to navigation Jump to search

Star CCM+ supports CFD including CAD, meshing, CFD analysis, and post processing.

Vendor homepage
https://www.plm.automation.siemens.com/global/en/products/simcenter/STAR-CCM.html
Software availability
MMAE: windows, unix
Available to students in Senior Design on request
Student version available from vendor
Other related software
category:CFD
command to type to run
starccm+
View online documentation
built into software help menu
Online Documentation available for multiple versions. (Must be on UCF Network or VPN to view)
Newer versions are available, ask if you need them here.
Tutorials
2008_May_STAR-CCM+_Foundation_Training_V2.0_-_LECTURES.pdf (19M) (old)
2008_May_STAR-CCM+_Foundation_Training_V2.0_Rev_A-TUTORIALS.pdf (59M) (old)
Training
Sample models (more available on request)
Location of example files
installdir/doc/tutorials
External links
Dynamics magazine
Company sponsored workshops
Conferences

Additional notes[edit]

See also Siemens licensing for licensing and usage terms.

StarCCM 16 (2021) changed the default version of MPI to OpenMPI which works correctly with infiniband. Also, slurm is now supported, so you should remove these options and their parameters: -np -machinefile -mpiflags -mpi and replace them with -batchsystem slurm


Note that StarCCM+ requires OpenGL (GLX) and therefore does not work with xming or exceed. (It may work with mobaXterm.) Instead, run it in client/server mode, with StarCCM+ running as a client running locally in windows.

To run starccm as a server job on the unix cluster

starccm+ -server -rsh ssh -on compute-0-11:2,compute-0-10:2 model.sim  &

Once you have started it on the server, start starccm+ under windows, and instead of File-->Open select File-->connect to server and supply the servername and copy the port number the server selected when it was started.

-rsh ssh
use ssh (parallel will probably not work without this option)
-server
run as a server, without a graphical interface
-master
run the master on node c0-12
-on
comma separated list of additional nodes (ex: 2 cpus each on nodes c0-11 and c0-10)
-collab
allow all users to interact with this session (or specify the unix username in the client form)

Hostname syntax:

  • specify number of cpus with : syntax
  • separate hostnames with commas

To run StarCCM+ on the cluster via remote off campus client, you can create an ssh tunnel.

Troubleshooting[edit]

If the Linux installer gives you a error like this:

Preparing to install
Extracting the JRE from the installer archive...
Unpacking the JRE...
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...

Launching installer...

An internal LaunchAnywhere application error has occured and this application cannot proceed. (LAX)

Stack Trace:
java.lang.IllegalArgumentException: Malformed \uxxxx encoding.
        at java.base/java.util.Properties.loadConvert(Properties.java:654)
        at java.base/java.util.Properties.load0(Properties.java:454)
        at java.base/java.util.Properties.load(Properties.java:378)
        at com.zerog.common.java.util.PropertiesUtil.loadProperties(Unknown Source)
        at com.zerog.lax.LAX.<init>(Unknown Source)
        at com.zerog.lax.LAX.main(Unknown Source)

It is probably because you have the literal string '\u' somewhere in an environment variable (most likely $PS1). If you remove all occurrences of of that string, it should then run.

Batch mode with slurm[edit]

Sample slurm batch script:

This should work for StarCCM+ 17.02 or later (and possibly earlier):

#!/bin/bash
#SBATCH --ntasks=4
##SBATCH --nodes=4
#SBATCH --mem-per-cpu=1G
##SBATCH --time=48:00:00

# Load Modules -- change this to set version
module load starccm+

# change these for your model
MODEL="yourfile.sim"
STARTMACRO=/share/apps/local/run.java

starccm+ -batchsystem slurm -batch $STARTMACRO -batch-report "$MODEL"

echo "Program is finished with exit code $? at: `date`"

Batch mode with SGE[edit]

This is described in the StarCCM+ User Guide in the following sections:

  • Introducing Star-CCM+
    • Working with Simulations
      • Using the Client and the Server
        • Running the Client in Batch (v504? page 369; v506: pg 421)

( see "Scripting the Application")


This is untested...more details later

#$ -cwd Lines starting with #$ are options to qsub
#$ -l mem_free=3G Pick nodes with at least 3G of free memory.
#$ -pe mpich 4-8 minimum and maximum number of cpus to use
starccm+ -batchsystem sge -batch macrofile.java model.sim
Additional shell commands can go here

Note: omit the -pe line and the -batchsystem sge line if you want a single cpu run. Add the -server option and omit the macrofile if you want an interactive sge compute job.

#$ -cwd 
#$ -l mem_free=3G
#$ -pe mpich 4
starccm+ -rsh ssh -batchsystem sge -batch macrofile.java

macrofile.java: sample STAR-CCM+ Java macrofile to start the simulation

// STAR-CCM+ macro: macrofile.java
// Written by STAR-CCM+ 13.02.013
package macro;

import java.util.*;

import star.common.*;
import star.post.*;

public class init extends StarMacro {

  public void execute() {
    execute0();
  }

  private void execute0() {

    Simulation simulation_0 = 
      getActiveSimulation();

    simulation_0.getSimulationIterator().runAutomation();
  }
}

Batch Interactive Interface[edit]

Note: for the remote control starccm+ interface to work, both machines must be running the same version of starccm+.

You can use Slurm to start STAR-CCM+ in server mode, and then connect to it remotely from a Windows or Linux StarCCM+ client. Below is sample code to use in your submission script (modify as appropriate):

#!/bin/sh
#SBATCH --time=12:00:00
#SBATCH --ntasks=16

## Simulation File: ====> Source
STARSOURCEFILE="myFile"

## SLURM: ====> Job Node List (DO NOT MODIFY)
echo "Slurm nodes assigned :$SLURM_JOB_NODELIST"
echo "SLURM_JOBID="$SLURM_JOBID
echo "SLURM_JOB_NODELIST"=$SLURM_JOB_NODELIST
echo "SLURM_NNODES"=$SLURM_NNODES
echo "SLURMTMPDIR="$SLURMTMPDIR
echo "working directory = "$SLURM_SUBMIT_DIR
echo "SLURM_NTASKS="$SLURM_NTASKS


## Modules: ====> Loading desired mudule (DO NOT MODIFY)
module load starccm/starccm-17.04.007

        
starccm+ -collab -server -np $SLURM_NTASKS -rsh ssh -batchsystem slurm -licpath $STARCCM_LICENSE $STARSOURCEFILE &>> job_$SLURM_JOB_ID.log

After submitting this with sbatch, check the output file, and look for a line that looks like:

Server::start -host compute-1-0.local:47827

Then, set up an ssh tunnel through the cluster head node, to the compute node and port listed in the log file (as above).

If you are using putty to set up the tunnel:

  1. start a new session to the cluster head node (but don't open it yet)
  2. In the option menu on the left, expand the SSH section and select tunnel
  3. Select LOCAL tunnel, for 'source pick an unused local port (e.g., 11111)
  4. Copy the compute:port address from the log file into the destination blank and click ADD
  5. Open the connection and log in normally
  6. Start StarCCM+ on your local machine and select Connect to server, for host use localhost and for port, use the local port you selected in step 3 (e.g., 11111) and connect

If you disconnect from interactive jobs, make sure you reconnect later and close them!

see also: Using STAR-CCM+ with SLURM