|
[Sponsors] |
October 14, 2014, 11:41 |
mesh storage in another directory
|
#1 |
New Member
Martin Schmelzer
Join Date: Aug 2012
Location: TU Delft
Posts: 4
Rep Power: 14 |
Dear all,
I study the turbulence models implemented in OpenFOAM. For this I need to run a bunch of different simulations for a test case with different settings (e.g. different coefficients), which requires a case folder structure for each simulations (0/ constant/ system/). However, the mesh is kept the same for all simulations and I don't wanna copy or rebuild it for each simulation, because it is rather expensive to do. Thus, I would like to know if you guys know a way, how to store the mesh in a something like a parent folder and link it to the folder structure of each simulation? It should look similar to this kind of generic structure: Simulation1/{0/ constant/ system/} Simulation2/{0/ constant/ system/} Simulation3/{0/ constant/ system/} ... folder-containing-the-mesh-for-each-simulation/ Any help is appreciated! |
|
October 21, 2014, 15:57 |
|
#2 |
Senior Member
|
Hi,
You could just use soft-links, either via the terminal or some file manager. So make the mesh once (polyMesh folder) and create soft links in all constant folders to this polyMesh folder. Regards, Tom |
|
October 22, 2014, 05:28 |
|
#3 |
New Member
Martin Schmelzer
Join Date: Aug 2012
Location: TU Delft
Posts: 4
Rep Power: 14 |
Hi Tom,
Thanks for your reply. I already figured that out, but haven't posted it yet - I am sorry! For everybody who runs into the same problem my detailed workaround is as follows: 0. Make a backup copy of your <case> (you never know...): cp -r <case> bu.<case> 1. Copy your <case> containing 0/ constant/ system/ and name the copy e.g. parent_mesh_case: cp -r <case> parent_mesh_case 2. Go to parent_mesh_case and create the mesh, e.g. by running blockMesh cd parent_mesh_case blockMesh 3. Now go back to your <case> and delete or rename the polyMesh folder, e.g. cd ../<case>/constant mv polyMesh bu.polyMesh (just in case you gonna need it in the future) 4. Create a symbolic link referring to the mesh directory in parent_mesh_case ln -s ../../parent_mesh_case/constant/polyMesh . 5. Now if you copy your <case> also the symbolic link will be copied. So you don't copy your mesh, which might be expensive, but only the symbolic link, which is cheap. cp <case> new_case cp -a <case> new_case (on mac) Now, everything what you change in parent_mesh_case/constant/polyMesh is also changed in <case>/constant/polyMesh Again thanks to Tom for reminding me posting that. Cheers! |
|
Tags |
mesh, parent folder, running |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] Add Mesh Layers doesnt work on the whole surface | Kryo | OpenFOAM Meshing & Mesh Conversion | 13 | February 17, 2022 08:34 |
3D Hybrid Mesh Errors | DarrenC | ANSYS Meshing & Geometry | 11 | August 5, 2013 07:42 |
[ICEM] Generating Mesh for STL Car in Windtunnel Simulation | tommymoose | ANSYS Meshing & Geometry | 48 | April 15, 2013 05:24 |
[snappyHexMesh] Layers:problem with curvature | giulio.topazio | OpenFOAM Meshing & Mesh Conversion | 10 | August 22, 2012 10:03 |
[Gmsh] 2D Mesh Generation Tutorial for GMSH | aeroslacker | OpenFOAM Meshing & Mesh Conversion | 12 | January 19, 2012 04:52 |