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

How to import mesh file in OpenFOAM,created in Hypermesh

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

Like Tree3Likes
  • 1 Post By florian_krause
  • 1 Post By florian_krause
  • 1 Post By Lodda

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 26, 2009, 14:52
Default How to import mesh file in OpenFOAM,created in Hypermesh
  #1
Member
 
Devesh Baghel
Join Date: Mar 2009
Posts: 84
Rep Power: 17
devesh.baghel is on a distinguished road
Hi all,

I am doing meshing in Hypermesh. Can some one please help me, how to import that mesh (xyz.hm) file in OpenFOAM ?...... I read userguide but din't find option for importing Hypermesh files.

it was urgently required.....

Please....it will be appreciable, if somebody help me,,,,,,,,,,

thanks alot
devesh.baghel is offline   Reply With Quote

Old   November 26, 2009, 15:40
Default
  #2
Senior Member
 
Florian Krause
Join Date: Mar 2009
Location: Munich
Posts: 103
Rep Power: 17
florian_krause is on a distinguished road
Hi,

it depends a bit on your hypermesh version... but normally in hypermesh switch to the cfd user profile, then export your *.hm file as a fluent *.cas file

then use the openfoam import routine for fluent files

fluentMeshToFoam <your *.cas file> -scale ...

there you go!

Best,
Florian
chaitanyaarige likes this.
florian_krause is offline   Reply With Quote

Old   November 30, 2009, 04:40
Default
  #3
Member
 
Devesh Baghel
Join Date: Mar 2009
Posts: 84
Rep Power: 17
devesh.baghel is on a distinguished road
Hiii
thanks for your reply.....
as per suggestions....first I did export one Hypermesh file in .inp format as well file was saved as .hm files.

I tried to import in OpenFOAM but in the PolyMesh folder there were not boundary elements / nodes found in files inside the polymesh folder. As well as patches were blank wherever required.

i just made collectors & put boundary elements in respective collectors. so i was guessing that it should come into patches.

Am I doing something wrong. ....Please help me...
suggestions would be appreciable,,,,,,,,
thanks alot
devesh.baghel is offline   Reply With Quote

Old   November 30, 2009, 08:27
Default
  #4
Senior Member
 
Florian Krause
Join Date: Mar 2009
Location: Munich
Posts: 103
Rep Power: 17
florian_krause is on a distinguished road
hello!

maybe it was a misunderstanding, but I did not suggest to export your *.hm file into a *.inp file.

1) in hypermesh go to preferences -> user profiles and switch to CFD

2.) go to CFD I/O options in the utility menu (next to model browser)

3.) then go to write fluent *.cas file

for the boundary patches put your 2D elements in different collectors according to your patches and also put the 3D elements in one seperated collector.

then use fluentMeshToFoam or fluent3DMeshToFoam (might be better for real 3D grids) as I described in my first post.

enjoy!
chaitanyaarige likes this.
florian_krause is offline   Reply With Quote

Old   December 1, 2009, 05:25
Default Direct export
  #5
Member
 
Guido Adriaensen
Join Date: Mar 2009
Posts: 56
Rep Power: 17
guido_adriaensen is on a distinguished road
Hello,

As suggested by Florian, export through Fluent format works good.

I have been in contact with Altair Engineering (the company providing Hypermesh) for direct export of the mesh to OF. Currently they are working on this feature. I have provided them with some mesh-format examples and documentation from OF. I just received the first testfiles from them yesterday. I could open the mesh-files, but there are still some errors in the mesh. Maybe in the near future it will be introduced in hypermesh.

kind regards,
Guido
guido_adriaensen is offline   Reply With Quote

Old   December 8, 2009, 09:03
Default Unable to get animation file even by following User Guide
  #6
Member
 
Devesh Baghel
Join Date: Mar 2009
Posts: 84
Rep Power: 17
devesh.baghel is on a distinguished road
first of all.....Thanks alot ........for your responce.
now I got clear picture about the mesh conversion. It was really helpful for me.

Thank you so much.....

Here I am facing another problem while trying to make animation......

I am facing some problem while I want to make animation file & snapshot too. Here I am getting some kinda error pasted below..
Error: GLXBadContext 154
Extension: 144 (Uknown extension)
Minor opcode: 5 (Unknown request)
Resource id: 0x5d
X Error: GLXBadContext 154
Extension: 144 (Uknown extension)
Minor opcode: 5 (Unknown request)
Resource id: 0x5d
X Error: GLXBadContext 154
Extension: 144 (Uknown extension)
Minor opcode: 5 (Unknown request)
Resource id: 0x5d
X Error: GLXBadContext 154
Extension: 144 (Uknown extension)
Minor opcode: 5 (Unknown request)
Resource id: 0x5d
/data/OpenFOAM/OpenFOAM-1.6/bin/paraFoam: line 109: 29512 Segmentation fault paraview --data="$caseFile"
...............
these are the messages I am getting while attempting the same command as given in USER GUIDE.

Please any one can help me to sort out these problems....

Thank you so much for your suggestions / advice......thanks alot
devesh.baghel is offline   Reply With Quote

Old   January 24, 2011, 06:53
Default
  #7
Member
 
Claudio
Join Date: Mar 2010
Posts: 57
Rep Power: 16
claco is on a distinguished road
Quote:
Originally Posted by guido_adriaensen View Post
Hello,

As suggested by Florian, export through Fluent format works good.

I have been in contact with Altair Engineering (the company providing Hypermesh) for direct export of the mesh to OF. Currently they are working on this feature. I have provided them with some mesh-format examples and documentation from OF. I just received the first testfiles from them yesterday. I could open the mesh-files, but there are still some errors in the mesh. Maybe in the near future it will be introduced in hypermesh.

kind regards,
Guido

Dear Sir,

I have the same problem. I would like to export a mesh (and its patches) from Hypermesh to Openfoam, but I cannot. As a matter of fact, if I export a .cas file, I cannot import it with fluentMeshToFoam application, since the latter requires a .msh to work properly. Could You help me please?
Yours Sincerely.

Claudio Comis
claco is offline   Reply With Quote

Old   January 25, 2011, 04:17
Default
  #8
New Member
 
Join Date: Jul 2009
Posts: 11
Rep Power: 16
Lodda is on a distinguished road
I managed the Mesh export for a simple pipe (Inlet, Outlet, Wall) like this:

The Geometry was imported from Pro/E

1) Create Surface-Mesh in HyperMesh (I have created a quad mesh on the surface)

2) Create Collectors for needed patches (Inlet, Outlet, Wall)
-> Collectors -> Create -> Components

3) Link Surfaces with the above defined Components (Inlet, Outlet,Wall)
-> Tool -> organize -> elements -> dest component
(you have to check one Element surface on the patch)
-> check element selection -> by face
repeat this step for all patches

4) Create Volume Mesh
Main Menu -> 3D -> tetramesh -> CFD
For Boundary Layer creation -> fixed with boundary layer -> comps
-> select your Wall component
Setup your Boundary Layer
-> number of layers
-> first layer thickness
-> growth rate
Create the Volume-Mesh

5) Two new Components appeare
-> CFD_Boundary_Layer
-> CFD_tetramesh_Layer
Delete all Components exepting the two new ones
-> Rename CFD_tetramesh_Layer into Fluid
-> Put the CFD_Boundary_Layer into the Fluid Component
At this Point you have only one Component -> Fluid

8) Find all Faces of the Fluid Component
-> tool -> faces -> comps (Fluid) -> find faces

7) Repeat steps 2) and 3) to define your new patchs (i think this point can be solved much more elegant, but this is the way i took)

9) Export your Date to Fluent-File-Format
-> utility -> CFD i/O -> Fluent CAS/MSH File -> Write
A window with a compatibility advice will appear -> check OK
A window with a question about the usage of cas file will appeare
(i dont exactly remember what this windows say ) -> Check NO!

The exported Data now can be translated into OpenFOAM Format by using
the fluent3Dmeshtofoam utility.

I have to check which version of HyperMesh i have used.

Best regards

Lodda
EshitaPal likes this.
Lodda is offline   Reply With Quote

Old   January 25, 2011, 05:10
Default
  #9
Member
 
Claudio
Join Date: Mar 2010
Posts: 57
Rep Power: 16
claco is on a distinguished road
Quote:
Originally Posted by Lodda View Post
I managed the Mesh export for a simple pipe (Inlet, Outlet, Wall) like this:

The Geometry was imported from Pro/E

1) Create Surface-Mesh in HyperMesh (I have created a quad mesh on the surface)

2) Create Collectors for needed patches (Inlet, Outlet, Wall)
-> Collectors -> Create -> Components

3) Link Surfaces with the above defined Components (Inlet, Outlet,Wall)
-> Tool -> organize -> elements -> dest component
(you have to check one Element surface on the patch)
-> check element selection -> by face
repeat this step for all patches

4) Create Volume Mesh
Main Menu -> 3D -> tetramesh -> CFD
For Boundary Layer creation -> fixed with boundary layer -> comps
-> select your Wall component
Setup your Boundary Layer
-> number of layers
-> first layer thickness
-> growth rate
Create the Volume-Mesh

5) Two new Components appeare
-> CFD_Boundary_Layer
-> CFD_tetramesh_Layer
Delete all Components exepting the two new ones
-> Rename CFD_tetramesh_Layer into Fluid
-> Put the CFD_Boundary_Layer into the Fluid Component
At this Point you have only one Component -> Fluid

8) Find all Faces of the Fluid Component
-> tool -> faces -> comps (Fluid) -> find faces

7) Repeat steps 2) and 3) to define your new patchs (i think this point can be solved much more elegant, but this is the way i took)

9) Export your Date to Fluent-File-Format
-> utility -> CFD i/O -> Fluent CAS/MSH File -> Write
A window with a compatibility advice will appear -> check OK
A window with a question about the usage of cas file will appeare
(i dont exactly remember what this windows say ) -> Check NO!

The exported Data now can be translated into OpenFOAM Format by using
the fluent3Dmeshtofoam utility.

I have to check which version of HyperMesh i have used.

Best regards

Lodda


Thank You very much Lodda.
And, in the case I want (I have to) to import a .bdf file into Openfoam, what can You suggest me? (Please consider that I don't want to use Ansys softwares to convert this format .bdf, but only Open source codes)
Kindest regards.

Claudio Comis
claco is offline   Reply With Quote

Old   January 25, 2011, 05:23
Default
  #10
New Member
 
Join Date: Jul 2009
Posts: 11
Rep Power: 16
Lodda is on a distinguished road
Hallo Claudio,

i've never worked with Nastran so i cant help you at this point. Sorry

Best regards

Lodda
Lodda is offline   Reply With Quote

Old   January 25, 2011, 06:19
Default
  #11
Member
 
Claudio
Join Date: Mar 2010
Posts: 57
Rep Power: 16
claco is on a distinguished road
Ok Lodda.

I would like to export the .cas in batch mode, via a TCL or a Hypermesh script. However, at the moment of exporting the mesh in .cas format (in batch mode, via the feinputwithdata command), an error occurs, due to the answers I have to give to the code (that I cannot give since I am not in GUI mode; this problem doesn't occur when exporting a .bdf file, which, in turn, cannot be read by Openfoam).
How can I bypass this problem?

Thank You.

Claudio Comis
claco is offline   Reply With Quote

Old   June 29, 2011, 11:21
Default
  #12
Senior Member
 
Sebastian Engel
Join Date: Jun 2011
Location: Germany
Posts: 566
Rep Power: 20
bluebase will become famous soon enough
Hello guys,
in the new release v11 of hypermesh an option to export directly to openfoam is implemented. Though, i haven't tried it yet.
bluebase is offline   Reply With Quote

Old   July 8, 2011, 07:01
Default
  #13
Member
 
Join Date: Mar 2009
Posts: 36
Rep Power: 17
Amiga500 is on a distinguished road
Quote:
Originally Posted by bluebase View Post
Hello guys,
in the new release v11 of hypermesh an option to export directly to openfoam is implemented. Though, i haven't tried it yet.
Hi all,

What is the status of this?


The company I'm working with are considering Hyperworks for many things right now across the CAE range. The ability to mesh and export directly to OpenFoam* would be a major plus point.


*Particularly with multi-subdomain meshes - unlike the current fluent2foam convert which doesn't do multi-subdomain.
Amiga500 is offline   Reply With Quote

Old   August 6, 2011, 08:03
Default
  #14
Senior Member
 
Ralph Moolenaar
Join Date: Aug 2010
Location: 's-Hertogenbosch, the Netherlands
Posts: 120
Rep Power: 15
Ralph M is on a distinguished road
Hi all,

Just a short question; did you used Hypermesh on a Linux or windows machine?

After generating a mesh in windows (with hypermesh) I get an arror in linux when trying the use fluent3DMeshToFoam: syntax error near unexpected token `newline'

Has someone a clue how to solve this? Btw: I tried to use dos2unix but this conversion doesn't seem to change the .cas (mesh)file.

Thanks!

Ralph
__________________
CFD for marine applications? Go to http://www.marinecfd.com/ and join the OF Ship Hydromechanics Group: http://www.cfd-online.com/Forums/gro...mechanics.html
Ralph M is offline   Reply With Quote

Old   August 6, 2011, 09:47
Default
  #15
Senior Member
 
Ralph Moolenaar
Join Date: Aug 2010
Location: 's-Hertogenbosch, the Netherlands
Posts: 120
Rep Power: 15
Ralph M is on a distinguished road
Well, I found that the base of my error was located somewhere else.

I used the command "fluent3DMeshToFoam <mymesh.msh>". Obviously the "<" and ">" shouldn't be there.

The final step that Lodda missed (which wasn't clear for me) is to put the .msh-file in a new openfoam-calculation directory which already consists of "0", "constant" and complete "system" folders. Then browse form within your terminal to the folder and do the conversion!

Three more tips:
-when the mesh is made in windows check the linux-compatibility:
cat -v somefile.msh
-when "^M" is shown you have to convert the file to a linux type with the following command:
dos2unix somefile.msh
-however, for Ubuntu 10.04 this command doens't work (you can't install it under that name), use "sudo aptitude install tofrodos" to install and run:
fromdos somefile.msh

Enjoy!
__________________
CFD for marine applications? Go to http://www.marinecfd.com/ and join the OF Ship Hydromechanics Group: http://www.cfd-online.com/Forums/gro...mechanics.html
Ralph M is offline   Reply With Quote

Old   October 10, 2011, 14:41
Unhappy Conversion problem from Fluent to OF
  #16
New Member
 
Nilesh Tank
Join Date: Oct 2011
Location: India
Posts: 5
Rep Power: 14
Nilesh_87 is on a distinguished road
Send a message via Skype™ to Nilesh_87
Dear all,
i am very new in OpenFoam. as per the userguide of OF i typed in terminal fluentToFoam <car_nilesh.cas> file. the error is 'syntax error near unexpected token `newline'. Plz help me.
Nilesh_87 is offline   Reply With Quote

Old   January 12, 2012, 13:58
Default
  #17
ck7
New Member
 
chandan
Join Date: Jan 2012
Location: bangalore
Posts: 5
Rep Power: 14
ck7 is on a distinguished road
Quote:
Originally Posted by florian_krause View Post
hello!

maybe it was a misunderstanding, but I did not suggest to export your *.hm file into a *.inp file.

1) in hypermesh go to preferences -> user profiles and switch to CFD

2.) go to CFD I/O options in the utility menu (next to model browser)

3.) then go to write fluent *.cas file

for the boundary patches put your 2D elements in different collectors according to your patches and also put the 3D elements in one seperated collector.

then use fluentMeshToFoam or fluent3DMeshToFoam (might be better for real 3D grids) as I described in my first post.

enjoy!
I am using a CFD software, which creates mesh without lables (like inlet , outlet, etc) i can export this into .nas format to be read into fluent. I would like to assign label or face names by importing the exported nas file in hypermesh . if this works i can create msh file that can be read both in fluent and openfoam.

( Currently i am using a single component for meshing)

Please provide with few suggestion how to go about this.
ck7 is offline   Reply With Quote

Old   June 8, 2016, 08:40
Default
  #18
Member
 
Join Date: Jun 2016
Posts: 31
Rep Power: 9
tdof is on a distinguished road
Hi,

I'm digging out this thread because I've got a few additional questions. First of all, how do I set up the BCs in Hypermesh so that the correspondent OpenFOAM files are created during the export? As far as I can tell, only the Acusolve interface offers a BC setup option (not a particularly great one at that), but not the general interface. If that's not possible, is there a way to create standard U, p and transportProperties files using HM which I would then edit manually?
tdof is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] SnappyHexMesh for internal Flow vishwa OpenFOAM Meshing & Mesh Conversion 24 June 27, 2016 09:54
Working directory via command line Luiz CFX 4 March 6, 2011 21:02
[OpenFOAM] ParaView 33 canbt open OpenFoam file hariya03 ParaView 7 September 25, 2008 18:33
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 02:24
Imprting HYPERMESH Mesh file in Gambit Atul T. Shinde FLUENT 1 December 31, 2002 12:39


All times are GMT -4. The time now is 17:00.