wyldckat |
August 7, 2012 08:16 |
Greetings to all!
@samiam1000: The first line shouldn't have quotes:
There is a major flaw in your current script: "foamJob -p" will launch and run in the background automatically, leading the rest of the script to executed immediately after foamJob is executed. A quick fix would be to run with "foamJob -s -p".
By what I can understand, it's not foamJob that needs nohup, it's the call to this script that needs this! For example, if you call this script "runcase.sh", you'll need to:
- The script should be something like this:
Code:
#!/bin/bash
foamJob -s -p buoyantPimpleFoam
reconstructPar
cd ../1DegNew/
mapFields -consistent ../1DegStartNew -sourceTime 100
decomposePar
buoyantPimpleDyMFoam_MS
sed -i 's/1/2/' system/controlDict
buoyantPimpleDyMFoam_MS
sed -i 's/2/3/' system/controlDict
buoyantPimpleDyMFoam_MS
sed -i 's/3/4/' system/controlDict
buoyantPimpleDyMFoam_MS
sed -i 's/4/5/' system/controlDict
buoyantPimpleDyMFoam_MS
sed -i 's/5/6/' system/controlDict
- After you edit and save the script for the first time, make sure it is an executable script:
Code:
chmod a+x runcase.sh
- Then for running the script:
Last but not least, why aren't you following the examples shown in the tutorials? For example, see "incompressible/simpleFoam/turbineSiting/Allrun". The downside of this example is that it will only run in the machine where it is launched...
Best regards,
Bruno
|