Batch mode

<< Click to Display Table of Contents >>

Navigation:  Using CFturbo2ICEM >

Batch mode

Previous pageReturn to chapter overviewNext page

Use next command for running CFturbo2ICEM in batch mode:

<icemBatch> -batch -script "<working directory>/CFturbo2Icem2CFX.tcl" > "<working directory>/IcemBatch.log"


CFturbo2ICEM.tcl has to be created by the user and saved in the working directory. In this file are set some important variables.
Following example would run CFturbo2ICEM for ICEM-CFD v150 using the example MyPump.tinXML saved under c:/Daten.


global batch_mode options env


#Define namespace CFt

namespace eval CFt {}


#Set working directory

set ::CFt::workDir "C:/test"

ic_chdir "C:/test"


#Set the variable ::CFt::tinXmlFilesToOpen containing tinXML file to be loaded

set ::CFt::tinXmlFilesToOpen {"C:/test/MyPump.tinXML"}


#Set icem directory

set ::CFt::ai_envDir "C:/Program Files/ANSYS Inc/v150/ANSYS/../icemcfd/win64_amd/bin/../lib/ai_env"

set ::CFt::nProcessors $options(n_processors)


#Load variables and procs

source "$::CFt::ai_envDir/scripts/cfturbo/variables.tcl"

source "$::CFt::ai_envDir/scripts/cfturbo/procs.tcl"


#Disable pop-up dialogs

set ::CFt::confirm 0


#Set STEP-Reader

# workbenchReader    -> Use this option to import STEP-File using Workbench reader

# cfturbo2icemReader -> Use this option to import STEP-File using CFturbo2ICEM reader

#                       For using version 5.1 of ICEM translator, include following line:

#                       set ::CFt::useVersion51 1

set ::CFt::stepReader workbenchReader


#Add components



#Perform CFturbo2ICEM

if  [catch {::CFt::auto} _error] {

#Error by reading tetin file

 lappend ::CFt::controlString "\nError in procedure $::CFt::activeProc"

 lappend ::CFt::controlString "\n$_error"