CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

fail to run series of runApplication topoSet -dict

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   March 8, 2018, 01:03
Default fail to run series of runApplication topoSet -dict
Join Date: Jan 2018
Location: Malaysia
Posts: 58
Rep Power: 7
jiahui_93 is on a distinguished road
Hi, I am trying to use Allrun bash script to run openFoam job. Below is the complete script
echo start running Allrun
cd ${0%/*} || exit 1    # Run from this directory

# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions

# Set application name

# meshing
runApplication blockMesh 
runApplication topoSet -dict system/topoSetDict/topoSetDict_noCarInt

runApplication subsetMesh -overwrite noCarIntCS
runApplication topoSet -dict system/topoSetDict/topoSetDict_updateCSCZ

# refineMesh
runApplication refineMesh -overwrite 
runApplication topoSet -dict system/topoSetDict/topoSetDict_updateCSCZ2

# setFields
runApplication setFields

echo end
I want to excute series of topoSet based on different dict, so i use topoSet -dict. But it only execute the 1st topoSet job based on the 1st dict i listed.
runApplication topoSet -dict system/topoSetDict/topoSetDict_noCarInt
runApplication topoSet -dict system/topoSetDict/topoSetDict_updateCSCZ
runApplication topoSet -dict system/topoSetDict/topoSetDict_updateCSCZ2
Another problem is i tried setSet before. It seems stucked on setSet and cant jump to the next job. Since the log showing > without quit, so i tried to insert quit command in terminal and it can continue to next job. Is there anyway to insert quit in my script so that i dont have to type it manually?
I tried "> quit" and change runApplication into foamJob, but it is still cnt be solved

I would be grateful and thanks to all advice and suggestions
Thanks for your time in reading this.

Jia Hui
jiahui_93 is offline   Reply With Quote

Old   May 25, 2022, 13:56
Federico Zabaleta
Join Date: May 2016
Posts: 47
Rep Power: 8
fedez91 is on a distinguished road
I don't know about the setSet issue, but the problem with runApplication occurs because once runApplication runs topoSet for the first time, it saves the log file in log.topoSet. Then, when it tries to run topoSet again, it detects that it has already been run (because log.topoSet exist), and skips the command.

If you wanna run topoSet in several instances you should do:

runApplication -s 1 topoSet ...
runApplication -s 2 topoSet ...
runApplication -s 3 topoSet ...

I know the thread is old but it may be useful for someone else..
fedez91 is offline   Reply With Quote


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
topoSet simpleFoam parallelized run error HakikiCanakkaleli OpenFOAM Pre-Processing 5 October 5, 2018 11:52
Allrun for SHM and LTSInterFoam laurent98 OpenFOAM Running, Solving & CFD 4 November 18, 2012 21:07
Working directory via command line Luiz CFX 4 March 6, 2011 21:02
Fail to run when turn on Wll Contact Angle hsieh OpenFOAM Running, Solving & CFD 8 May 21, 2008 02:02
Parallel run fail in CFX5.7.1 in Linux FC.4 Begonia CFX 1 August 2, 2005 09:03

All times are GMT -4. The time now is 18:59.