|
[Sponsors] |
January 3, 2014, 14:24 |
trouble with snappyhex
|
#1 |
New Member
Zac Arapura
Join Date: Dec 2013
Posts: 7
Rep Power: 12 |
I am currently trying to run the motorbike tutorial in OpenFoam. The tutorial was previously set up for a 8 core computer, I only have a quad core computer. I tried to play around with the decomposePardict and finally found one that works. I am now however struggling to get the snappyhex running in parallel. I used the following code
snappyHexMesh 4 -overwrite but I get the follwoing error when running Usage: snappyHexMesh [OPTIONS] options: -case <dir> specify alternate case directory, default is the cwd -checkGeometry check all surface geometry for quality -noFunctionObjects do not execute functionObjects -overwrite overwrite existing mesh/results files -parallel run in parallel -roots <(dir1 .. dirN)> slave root directories for distributed running -writeLevel write pointLevel and cellLevel postprocessing files -srcDoc display source code in browser -doc display application documentation in browser -help print the usage Using: OpenFOAM-2.2.2 (see www.OpenFOAM.org) Build: 2.2.2 --> FOAM FATAL ERROR: Wrong number of arguments, expected 0 found 1 FOAM exiting I was wondering if anyone knew why I am getting this problem and how to overcome it. Thanks |
|
January 3, 2014, 17:02 |
|
#2 |
Senior Member
|
Try with
runParallel snappyHexMesh 4 -overwrite |
|
January 4, 2014, 06:20 |
|
#3 |
New Member
Zac Arapura
Join Date: Dec 2013
Posts: 7
Rep Power: 12 |
hi there I tried the command and it unfortunately did not work, it said the following error
runParallel snappyHexMesh 4 -overwrite bash: runParallel: command not found... I think the main problem is with the snappyHexMeshDict, I might be wrong. |
|
January 4, 2014, 08:52 |
|
#4 |
Senior Member
|
Try this then:
mpirun -np 8 snappyHexMesh -overwrite -parallel Of course you need to run decomposePar first. |
|
January 4, 2014, 09:05 |
|
#5 |
New Member
Zac Arapura
Join Date: Dec 2013
Posts: 7
Rep Power: 12 |
IT WORKED!!
Thank you for your help, was stuck on this for weeks. |
|
January 4, 2014, 10:23 |
|
#6 |
New Member
Zac Arapura
Join Date: Dec 2013
Posts: 7
Rep Power: 12 |
I was following the script file that came with the motorbike tutorial. Once again i am stuck so here is the full script
#!/bin/sh cd ${0%/*} || exit 1 # run from this directory # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions # copy motorbike surface from resources folder cp $FOAM_TUTORIALS/resources/geometry/motorBike.obj.gz constant/triSurface/ runApplication surfaceFeatureExtract runApplication blockMesh runApplication decomposePar runParallel snappyHexMesh 6 -overwrite #- For non-parallel running #cp -r 0.org 0 > /dev/null 2>&1 #- For parallel running ls -d processor* | xargs -i rm -rf ./{}/0 $1 ls -d processor* | xargs -i cp -r 0.org ./{}/0 $1 runParallel patchSummary 6 runParallel potentialFoam 6 -noFunctionObjects -writep runParallel $(getApplication) 6 runApplication reconstructParMesh -constant runApplication reconstructPar -latestTime # ----------------------------------------------------------------- end-of-file I am stuck again on the runParallel $(getApplication) 6 I tried to change the code the following code mpirun -np 4 $(getApplication) 4 -parallel the mpirunb ti and the rest of the line worked fine befor the only part causing problems is the $(getApplication) 4 thank you |
|
January 6, 2014, 16:05 |
|
#7 |
Senior Member
|
That is a variable you have to set somewhere, which indicates the solver you want to use.
If you want to use simpleFoam, just type mpirun -np 4 simpleFoam -parallel instead and you should be able to walk around it. |
|
January 6, 2014, 16:18 |
|
#8 |
New Member
Zac Arapura
Join Date: Dec 2013
Posts: 7
Rep Power: 12 |
Ofcourse .... Thank you once again
|
|
January 8, 2014, 02:17 |
|
#9 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Hi,
just one hint. You said that you used the scripts but I think you typ in the commands by yourself, arenīt you? If you do this you have to be sure the aliases are loaded in your terminal: Code:
. $WM_PROJECT_DIR/bin/tools/RunFunctions Code:
runParallel runApplication . . I think that is your Problem. Hence you just able to work with the official Linux commands: Code:
mpirun -np 20 snappyHexMesh -parallel // example Regards Tobi |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Trouble with rotating wall boundary condition | king1989 | OpenFOAM Running, Solving & CFD | 7 | July 29, 2016 13:44 |
Trouble with sampleDict syntax for OpenFOAM 2.3.1 | rawdoggity | OpenFOAM Post-Processing | 1 | February 1, 2015 05:24 |
[snappyHexMesh] SnappyHex on a decomposed case | Pj. | OpenFOAM Meshing & Mesh Conversion | 5 | March 14, 2013 22:34 |
[ICEM] trouble with mesh quality from ICEM in CFX Solver | escher25 | ANSYS Meshing & Geometry | 0 | February 28, 2011 07:38 |
[GAMBIT] Trouble meshing complex VOF geometry | RPJones | ANSYS Meshing & Geometry | 2 | February 14, 2011 18:54 |