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

Parallel case setup boundry conditions snappyhexmesh

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 8, 2009, 19:39
Default I've probably been going at th
  #1
New Member
 
Oskar
Join Date: Mar 2009
Location: Finland
Posts: 6
Rep Power: 8
oskar is on a distinguished road
I've probably been going at this the wrong way, but haven't been able to find the correct way to to setup a parallel case.

What I've been doing:
1. blockMesh
2. snappyHexMesh
3. manually define boundary conditions
4. decomposePar
5. mpirun case

I would prefer to run snappyHexMesh in parallel because:
a) running out of memory on single computer
b) running on one core is very slow

What I've tried:
1. manually setup boundary condition for time 0
2. decomposeParDict: method metis
3. blockMesh
4. decomposePar
5. decomposeParDict: method parMetis
6. mpirun snappyHexMesh

This results in a good mesh, but the problem is I can't figure out how to get the boundary conditions to follow the mesh generation to timestep 3. Snappyhexmesh does insert the stl-wall boundary correctly, but doesn't touch the p, U etc. files.

Could some knowledgeable FOAMer point me in the right direction?
oskar is offline   Reply With Quote

Old   April 15, 2009, 14:04
Default
  #2
New Member
 
Oskar
Join Date: Mar 2009
Location: Finland
Posts: 6
Rep Power: 8
oskar is on a distinguished road
Surely someone must have a elegant way to setup the initial field for parallel cases while using snappyHexMesh in parallel?
How do you do it?

I tried using mapFields, but I couldn't figure out a way to setup the case using the "-consistent" flag (since the stl-surface isn't there before running snappyHexMesh). Without the -consistent flag mapFields requires the "destination" case to already have the field variables set to something. Creating the field variable in the first place is what I'm trying to do!

Manually setting the initial field variables isn't very efficient since a lot of files need to be created (or copied and tweaked individually). Especially if batch runs with small adjustments need to be run this is impossible to do without a tool.

Using a CFD program with no user interface seems to be very difficult.
oskar is offline   Reply With Quote

Old   April 16, 2009, 11:23
Default
  #3
Senior Member
 
Francesco Del Citto
Join Date: Mar 2009
Location: Zürich Area, Switzerland
Posts: 215
Rep Power: 9
fra76 is on a distinguished road
I don't know if it works for parallel cases as well, but have you tried pyFoam? Search the forum for it.

Francesco
fra76 is offline   Reply With Quote

Old   April 17, 2009, 07:34
Default
  #4
New Member
 
Oskar
Join Date: Mar 2009
Location: Finland
Posts: 6
Rep Power: 8
oskar is on a distinguished road
Thanks for the tip fra76!

I found some documentation to pyFoam on openfoamwiki.net, looks to have useful tools.
I also stumbled across funkySetFields, tried that out and it's somewhat capable of doing what I what with a single command. (for parallel case setups needs to be run with the same processor amount as the case is decomposed to though)

mpirun -hostfile ~/foamHosts funkySetFields -create -field U -expression 'vector(60,0,0)' -time 3 -parallel

I'll probably have to learn how to make the hideously cryptic bash scripts, but funkySetFields seems to be able to do most of what I what so hopefully I wont need to figure that much out.
oskar is offline   Reply With Quote

Old   September 9, 2009, 06:20
Default
  #5
Member
 
Andrew King
Join Date: Mar 2009
Location: Perth, Western Australia, Australia
Posts: 81
Rep Power: 8
andersking is on a distinguished road
Hi Oscar,

see

http://www.cfd-online.com/Forums/ope...tml#post228991

I have a feeling this may work (testing at the moment)

Cheers
Andrew
__________________
Dr Andrew King
Fluid Dynamics Research Group
Curtin University
andersking is offline   Reply With Quote

Old   September 11, 2009, 01:12
Default
  #6
Member
 
Cem Albukrek
Join Date: Mar 2009
Posts: 50
Rep Power: 8
albcem is on a distinguished road
I had the exact same problem as the original poster. I have not found an elegant way, but use a rather convenient work around:
  1. Reconstruct your decomposed mesh output by snappyhexmesh
  2. Transfer the reconstructed mesh to the appropriate location in constant/ directory
  3. Set fields serially
  4. Re-decompose
Note that none of the above steps seem to consume the memory associated with the whole mesh, so you should be able to build your case without problems.
albcem 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
SnappyHexMesh in 2D case sjs OpenFOAM Mesh Utilities 9 July 8, 2009 17:42
boundry conditions pardeep kumar FLUENT 1 February 15, 2009 13:30
Boundry conditions!!!! Zaher CFX 2 March 16, 2004 10:25
Boundry Conditions Parshant Dhand FLUENT 2 January 10, 2003 21:25
Boundry Conditions Parshant Dhand FLUENT 2 January 10, 2003 21:18


All times are GMT -4. The time now is 07:21.