CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Native Meshers: snappyHexMesh and Others

trouble with snappyhex

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

Reply
 
LinkBack Thread Tools Display Modes
Old   January 3, 2014, 15:24
Default trouble with snappyhex
  #1
New Member
 
Zac Arapura
Join Date: Dec 2013
Posts: 7
Rep Power: 4
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, 18:02
Default
  #2
Senior Member
 
lore
Join Date: Mar 2010
Location: Italy
Posts: 464
Rep Power: 10
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, 07:20
Default
  #3
New Member
 
Zac Arapura
Join Date: Dec 2013
Posts: 7
Rep Power: 4
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, 09:52
Default
  #4
Senior Member
 
lore
Join Date: Mar 2010
Location: Italy
Posts: 464
Rep Power: 10
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, 10:05
Default
  #5
New Member
 
Zac Arapura
Join Date: Dec 2013
Posts: 7
Rep Power: 4
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, 11:23
Default
  #6
New Member
 
Zac Arapura
Join Date: Dec 2013
Posts: 7
Rep Power: 4
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, 17:05
Default
  #7
Senior Member
 
lore
Join Date: Mar 2010
Location: Italy
Posts: 464
Rep Power: 10
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, 17:18
Default
  #8
New Member
 
Zac Arapura
Join Date: Dec 2013
Posts: 7
Rep Power: 4
arapuraz is on a distinguished road
Ofcourse .... Thank you once again
arapuraz is offline   Reply With Quote

Old   January 8, 2014, 03:17
Default
  #9
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,555
Blog Entries: 6
Rep Power: 27
Tobi will become famous soon enoughTobi will become famous soon enough
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

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble with big domain of study, johnnyp FLUENT 3 May 15, 2013 23:19
SnappyHex on a decomposed case Pj. OpenFOAM Native Meshers: snappyHexMesh and Others 5 March 14, 2013 23:34
Zero thickness surface using snappyhex Balti OpenFOAM Native Meshers: snappyHexMesh and Others 5 March 12, 2013 10:24
[ICEM] trouble with mesh quality from ICEM in CFX Solver escher25 ANSYS Meshing & Geometry 0 February 28, 2011 08:38
[GAMBIT] Trouble meshing complex VOF geometry RPJones ANSYS Meshing & Geometry 2 February 14, 2011 19:54


All times are GMT -4. The time now is 13:36.