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

[snappyHexMesh] trouble with snappyhex

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 3, 2014, 14:24
Default trouble with snappyhex
  #1
New Member
 
Zac Arapura
Join Date: Dec 2013
Posts: 7
Rep Power: 12
arapuraz is on a distinguished road
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
arapuraz is offline   Reply With Quote

Old   January 3, 2014, 17:02
Default
  #2
Senior Member
 
lore
Join Date: Mar 2010
Location: Italy
Posts: 460
Rep Power: 18
lovecraft22 is on a distinguished road
Send a message via Skype™ to lovecraft22
Try with
runParallel snappyHexMesh 4 -overwrite
lovecraft22 is offline   Reply With Quote

Old   January 4, 2014, 06:20
Default
  #3
New Member
 
Zac Arapura
Join Date: Dec 2013
Posts: 7
Rep Power: 12
arapuraz is on a distinguished road
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.
arapuraz is offline   Reply With Quote

Old   January 4, 2014, 08:52
Default
  #4
Senior Member
 
lore
Join Date: Mar 2010
Location: Italy
Posts: 460
Rep Power: 18
lovecraft22 is on a distinguished road
Send a message via Skype™ to lovecraft22
Try this then:

mpirun -np 8 snappyHexMesh -overwrite -parallel

Of course you need to run decomposePar first.
lovecraft22 is offline   Reply With Quote

Old   January 4, 2014, 09:05
Default
  #5
New Member
 
Zac Arapura
Join Date: Dec 2013
Posts: 7
Rep Power: 12
arapuraz is on a distinguished road
IT WORKED!!

Thank you for your help, was stuck on this for weeks.
arapuraz is offline   Reply With Quote

Old   January 4, 2014, 10:23
Default
  #6
New Member
 
Zac Arapura
Join Date: Dec 2013
Posts: 7
Rep Power: 12
arapuraz is on a distinguished road
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
arapuraz is offline   Reply With Quote

Old   January 6, 2014, 16:05
Default
  #7
Senior Member
 
lore
Join Date: Mar 2010
Location: Italy
Posts: 460
Rep Power: 18
lovecraft22 is on a distinguished road
Send a message via Skype™ to lovecraft22
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.
lovecraft22 is offline   Reply With Quote

Old   January 6, 2014, 16:18
Default
  #8
New Member
 
Zac Arapura
Join Date: Dec 2013
Posts: 7
Rep Power: 12
arapuraz is on a distinguished road
Ofcourse .... Thank you once again
arapuraz is offline   Reply With Quote

Old   January 8, 2014, 02:17
Default
  #9
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
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
in that file you find the alias
Code:
runParallel
runApplication
.
.
If you did not load that file you can not use that keywords.
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
Tobi 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
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


All times are GMT -4. The time now is 14:39.