|
[Sponsors] |
How to Create .msh file so that when converted to OpenFOAM will have some BC |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 4, 2012, 14:49 |
How to Create .msh file so that when converted to OpenFOAM will have some BC
|
#1 |
New Member
Jay Patel
Join Date: Feb 2012
Posts: 8
Rep Power: 14 |
Hi all, I am a beginner in OpenFOAM. I want to know how we can create .msh (Fluent mesh file) so that it contains some details about Boundary Conditions. On OpenFOAM website it is told that Fluent BC may not have complete decoding using OpenFOAM. If I am Creating any mesh file in the Boundary file of case problem, I am having following output:
1 ( wall-solid { type wall; nFaces 640; startFace 1930; } ) I want it to be something like this automatically: 3 ( movingWall { type wall; nFaces 20; startFace 760; } fixedWalls { type wall; nFaces 60; startFace 780; } frontAndBack { type empty; nFaces 800; startFace 840; } ) Hoping for solution Thanks, Jay |
|
June 6, 2012, 08:30 |
|
#2 |
Senior Member
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18 |
As far as I know it is not a good idea to define a specific boundary conditions when creating the Fluent Mesh file. You should define all boundaries you would like to have as wall when creating the Fluent Mesh file. After conversion with fluentMeshToFoam you will have your boundaries available in OF named like you defined it in your Fluent mesh file. Then change the ones which are no walls to type "patch" and apply the BC in the specific field file (U,p, and so on).
Kind regards, Fabian |
|
June 6, 2012, 10:55 |
|
#3 |
New Member
Jay Patel
Join Date: Feb 2012
Posts: 8
Rep Power: 14 |
Hi Fabian,
Thanks for quick reply. I didn't get you when you say "OF named". I tried name selection after I created the mesh to name various surfaces which I am going to give special BCs and what it does is creation of new file (.mshdb, which is a mesh database file). I don't know any way by which I can have these informations written on .msh file itself. As I told in earlier post that by default I am getting only one Boundary and that to with a Boundary condition of wall. I want to know the way I can get more Boundaries and then I can change there BC's using patch option. Thanks, Jay |
|
June 6, 2012, 11:53 |
|
#4 |
Senior Member
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18 |
Which program do you use to create the mesh?
|
|
June 6, 2012, 11:57 |
|
#5 |
New Member
Jay Patel
Join Date: Feb 2012
Posts: 8
Rep Power: 14 |
I used ANSYS Fluent, so I have .msh file. I change the environmental variable AWP_WRITE_FLUENT_MESH_ASCII=1, so I am getting output .msh file in ASCII instead of Binary.
Thanks, Jay |
|
June 6, 2012, 12:02 |
|
#6 |
New Member
Hannes
Join Date: Oct 2011
Posts: 19
Rep Power: 15 |
As far as I know, Fluent is no meshing program...
Did you mean ANsys Meshing? |
|
June 6, 2012, 12:06 |
|
#7 |
New Member
Jay Patel
Join Date: Feb 2012
Posts: 8
Rep Power: 14 |
Yes, I used ANSYS Meshing. But we have various output formats of mesh in ANSYS itself. I used the mesh generated by ANSYS Meshing for Fluent Solver and not for CFX or Polyflow solver. So I used the term Fluent Mesh.
Thaks, Jay |
|
June 6, 2012, 12:07 |
|
#8 |
Senior Member
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18 |
Mmh I only know Gambit, but the basic principle should be the same. You create your geometry, mesh it and define your BCs with ANSYS Fluent. Define every BC you need, e.g. a for a cube each of the six sides. Define each BC of type "Wall" and give it a unique name, e.g. "side 1", "side2" and so on. Do not use the other Fluent BCs, only walls. Export the mesh as Fluent 5/6 .msh file and convert it with fluentMeshToFoam. Then you should have a look into the file <OF-case-dir>/constant/polyMesh/boundary
There should be a list of all boundaries with the unique name you specified when created the BCs in ANSYS Fluent. But all of them are of type "wall". It should look like this: bottom { type wall; nFaces 90000; startFace 32238000; } top { type wall; nFaces 90000; startFace 32328000; } So change the type by hand to "patch" for every BC which is not a wall and your done. The type "patch" could be every boundary condition you would like to specifiy in a volVectorField. Look into the handbook for more details. |
|
June 6, 2012, 12:08 |
|
#9 | |
New Member
Hannes
Join Date: Oct 2011
Posts: 19
Rep Power: 15 |
Quote:
You have to define Named Selections. Then use the export function to export the *.msh. You will see that the named selections are available as patches in OF. |
||
June 6, 2012, 12:12 |
|
#10 |
Senior Member
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18 |
Ah ok this seems to be a problem with Ansys Meshing and not with the conversion of the mesh between Ansys and OpenFoam. So I am out :-D because I never used Ansys Meshing.
kind regards, Fabian |
|
June 6, 2012, 12:29 |
|
#11 |
New Member
Jay Patel
Join Date: Feb 2012
Posts: 8
Rep Power: 14 |
I got it. The solution is name the surfaces first and then create mesh.
Thanks for your help Fab. Jay |
|
June 7, 2012, 11:33 |
|
#12 |
New Member
Jay Patel
Join Date: Feb 2012
Posts: 8
Rep Power: 14 |
Thanks Hanes..
|
|
December 5, 2016, 12:29 |
|
#13 |
New Member
Honey
Join Date: Jun 2015
Posts: 9
Rep Power: 11 |
Hello, can you please specify the process how to set the environment variable. I am quite new to this stuff. Thanks in advance
|
|
November 9, 2017, 08:44 |
|
#14 | |
Senior Member
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 9 |
Quote:
Code:
Tools->Options->Export->"Format of Input File" and select ASCII |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
wmake compiling new solver | mksca | OpenFOAM Programming & Development | 14 | June 22, 2018 07:29 |
friction forces icoFoam | ofslcm | OpenFOAM | 3 | April 7, 2012 11:57 |
2.0.x on Mac OSX | niklas | OpenFOAM Installation | 74 | March 28, 2012 17:46 |
"parabolicVelocity" in OpenFoam 2.1.0 ? | sawyer86 | OpenFOAM Running, Solving & CFD | 21 | February 7, 2012 12:44 |
Where's the singularity/mesh flaw? | audrich | FLUENT | 3 | August 4, 2009 02:07 |