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

Change mesh location on drive..

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 4, 2010, 05:51
Default Change mesh location on drive..
  #1
New Member
 
Mark Herskind
Join Date: Oct 2010
Posts: 12
Rep Power: 15
MarkHerskind is on a distinguished road
Hi..

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..

Cheers
Mark Herskind
MarkHerskind is offline   Reply With Quote

Old   November 4, 2010, 18:04
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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:
Code:
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:
Code:
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:
Code:
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:
Code:
echo $PWD
Best regards and good luck!
Bruno
__________________
wyldckat 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
[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 10: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 12:12.