CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

Ubuntu Allrun command

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By shukriesamirudin

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 16, 2024, 02:10
Unhappy Ubuntu Allrun command
  #1
New Member
 
Join Date: Apr 2024
Posts: 9
Rep Power: 2
shukriesamirudin is on a distinguished road
Hi everyone, i have problem running command below. Why is it appears command not found?

shukrie@DESKTOP-GM7974Q:~/Run/FirstTime/motorBike$ -processor
-processor: command not found

Below is the Allrun file for this simulation


#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------

# copy motorbike surface from resources directory
mkdir -p constant/triSurface

cp -f \
"$FOAM_TUTORIALS"/resources/geometry/motorBike.obj.gz \
constant/triSurface/

# Make dummy 0 directory
mkdir -p 0

runApplication blockMesh

runApplication decomposePar -decomposeParDict system/decomposeParDict.hierarchical

runParallel snappyHexMesh -decomposeParDict system/decomposeParDict.ptscotch -profiling -overwrite

find . -iname '*level*' -type f -delete

#- Set the initial fields
restore0Dir -processor

runParallel renumberMesh -overwrite

runParallel potentialFoam -initialiseUBCs -writephi

runParallel checkMesh -writeFields '(nonOrthoAngle)' -constant

runParallel $(getApplication)

#------------------------------------------------------------------------------
shukriesamirudin is offline   Reply With Quote

Old   May 16, 2024, 03:06
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,104
Rep Power: 26
Yann will become famous soon enough
Hello,

Code:
shukrie@DESKTOP-GM7974Q:~/Run/FirstTime/motorBike$ -processor
-processor is not a command.

If you want to run the Allrun script, you should type something like this:
Code:
./Allrun
Cheers
Yann
Yann is offline   Reply With Quote

Old   May 17, 2024, 02:35
Default
  #3
New Member
 
Join Date: Apr 2024
Posts: 9
Rep Power: 2
shukriesamirudin is on a distinguished road
i want to run the restore0Dir, in the Allrun file it said that the command is

-processor

however, when i trigger the command, it said that the command is not found.
shukriesamirudin is offline   Reply With Quote

Old   May 17, 2024, 03:28
Default
  #4
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,104
Rep Power: 26
Yann will become famous soon enough
Hello,

-processor is not a command, the command is actually
Code:
restore0Dir -processor
This being said, restore0Dir is not an actual OpenFOAM command but a Run Function, just as runApplication and runParallel.

in the Allrun script, run functions are loaded by this line at the beginning of the script:
Code:
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
So if you want to use run functions in your terminal, you will need to type this line beforehand. After that, you should be able to used restore0Dir.

More about run functions: https://damogranlabs.com/2020/10/run...ck-cheatsheet/

Cheers,
Yann
Yann is offline   Reply With Quote

Old   May 17, 2024, 04:38
Default
  #5
New Member
 
Join Date: Apr 2024
Posts: 9
Rep Power: 2
shukriesamirudin is on a distinguished road
Hello,

Thanks a lot for the assistant. I am new to CFD openFoam. This helps really much.

Thanks
Shukrie
Yann likes this.
shukriesamirudin is offline   Reply With Quote

Reply


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
[OpenFOAM.com] Paraview command error. OpenFOAM 8, Ubuntu 20.04 sungmin130 OpenFOAM Installation 0 October 20, 2020 12:26
[foam-extend.org] Ubuntu 14.04, Foam-extend 3.1: "command not found" KangX1 OpenFOAM Installation 31 September 27, 2016 16:30
Problems after 'make install' command in Ubuntu Sparsh SU2 Installation 2 October 30, 2015 14:37
OpenFOAM 1.7.1 installation problem on OpenSUSE 11.3 flakid OpenFOAM Installation 16 December 28, 2010 08:48
Please help me liugx212 OpenFOAM Running, Solving & CFD 4 November 15, 2005 16:14


All times are GMT -4. The time now is 00:24.