CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM

Change mesh location on drive..

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

LinkBack Thread Tools Display Modes
Old   November 4, 2010, 06:51
Default Change mesh location on drive..
New Member
Mark Herskind
Join Date: Oct 2010
Posts: 9
Rep Power: 9
MarkHerskind is on a distinguished road

I have a mesh, which is want to do 12 simulations on (changing inflow direction).. The mesh I have right now is app 7.5m cells, which is about 1.5GB of data..

If I want to run these simultanious, I will need to generate 12 cases, each with a copy of the mesh.. It'll take up a lot of space copying the grid to each sector (14.5GB of duplicate data), but worse, it takes time..

I was wondering if there's a way of changing the reference to the mesh location, so that the simulations can share the same mesh..

Mark Herskind
MarkHerskind is offline   Reply With Quote

Old   November 4, 2010, 19:04
Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,123
Blog Entries: 39
Rep Power: 110
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Greetings Mark,

It depends on where the mesh is kept at. For example, when we run "blockMesh", the mesh is kept in the folder "constant/polyMesh". The same happens when we run "snappyHexMesh -overwrite", which will overwrite the latest mesh (which is usually the initial mesh by blockMesh).

So, if you can keep the mesh in the folder "constant/polyMesh" then you can use symbolic links for sharing the mesh between cases. For example, if we have 3 case folders: "case1 case2 case3".
Generate the mesh in case1. Then step back into the previous folder and run:
rm -rf case2/constant/polyMesh
rm -rf case3/constant/polyMesh
ls -s ../../case1/constant/polyMesh case2/constant/polyMesh
ls -s ../../case1/constant/polyMesh case3/constant/polyMesh
Now, I haven't tested this yet, but at least in theory it should work. If you run the following commands:
cd case3/constant
ls -l polyMesh/
It should show the contents of the case1's polyMesh folder.

But the best method would be to use absolute folders, as long as you run always on the same path:
ls -s $PWD/case1/constant/polyMesh case2/constant/polyMesh
ls -s $PWD/case1/constant/polyMesh case3/constant/polyMesh
The variable $PWD holds the path of the current folder. If you don't believe me run:
echo $PWD
Best regards and good luck!
wyldckat is offline   Reply With Quote


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
[ICEM] surface mesh merging problem everest ANSYS Meshing & Geometry 44 April 14, 2016 06:41
[ICEM] Generating Mesh for STL Car in Windtunnel Simulation tommymoose ANSYS Meshing & Geometry 48 April 15, 2013 04:24
Open\/Foam change of mesh diffusivity in meshMotion. DLC Main CFD Forum 0 November 26, 2009 11:55
basic of mesh refinement arya CFX 4 June 19, 2007 12:21
How to control Minximum mesh space? hung FLUENT 7 April 18, 2005 09:38

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