|
[Sponsors] |
[Commercial meshers] Import Surface from HyperMesh to snappyHexMesh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 27, 2008, 06:10 |
Import Surface from HyperMesh to snappyHexMesh
|
#1 |
Senior Member
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20 |
Hi all,
so far I have been struggling to import an triangular surface mesh from Hypermesh to snappyHexMesh. It works with limitations doing the following in Hypermesh9.0: Export -> Nastran -> Standard (not long!). This can be read into snappyHexMesh, however components are not kept (neither names nor groups, it is a single group). The same happens for the stl export. Using HM "long" or "CFD" nastran export does not even read in the surface because it is double precision. I looked at the sources - it seems to be prepared for ANSA and T-Grid but not for Hypermesh. Anybody having similar problems? Any solutions so far? (Mark you're using Hpermesh, right?) BastiL |
|
September 29, 2008, 05:46 |
I haven't had time to work wit
|
#2 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40 |
I haven't had time to work with the auto-hex-mesh yet and thus don't know how well it all works. For writing out ASCII files from hypermesh for OpenFOAM surfaces, you might find the Alias wavefront format to be quite convenient. I've attached an HyperMesh template for exporting it. You'll need to add it a button in your userpage.mac that looks something like this:
*beginmacro("WaveFront_export") *evaltclscript("/export/home/olesenm/Star-CD/hypermesh/exportStarCD.tcl",0) *evaltclstring("::hmstarcd::export::WaveFront_expo rt", 0); *endmacro() and the corresponding tcl snippet looks like this: # # Alias/WaveFront export: # proc ::hmstarcd::export::WaveFront_export {} { variable exportDir; variable templateDir; set objFile [file join $exportDir "hmexport.obj"] set objTmplt [file join $templateDir "wavefrontExport.tpl" ] # make nodes 1-based *createmark nodes 1 all *renumber nodes 1 1 1 0 0 catch { *feoutput "$objTmplt" "$objFile" 1 1 0 } } It is probably possible to move lots of the tcl directly into the button, but like this you can update the tcl at will, without needing to exit from hypermesh. wavefrontExport.tpl |
|
September 29, 2008, 06:05 |
PS:
use the hypermesh Tool/
|
#3 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40 |
PS:
use the hypermesh Tool/edges and Tool/normals to check that your surfaces are closed and correctly oriented before exporting. |
|
September 30, 2008, 18:05 |
Thanks Mark,
I will try thi
|
#4 |
Senior Member
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20 |
Thanks Mark,
I will try this out. However for our workflow it would be best if we could read your Nastran-Files ("CFD"-Typ HM Nastran) into OpenFOAM. I have understand where the problems are: - Hypermesh uses double precision (GRID*) - It has a continuation Symbol (*) at the end of the first line. TGrid doesnt - that is a problem - It has another continuation symbol than ANSA (+) - Name Mapping from ANSA has to be modified. Maybe I will put some work into this. Regards. |
|
October 1, 2008, 04:26 |
As luck would have it, I poste
|
#5 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40 |
As luck would have it, I posted a buggy version. Wavefront actually uses 1-based addressing: wavefrontExport.tpl
Re: the Nastran format. I wouldn't think it should be too difficult to change the code to skip a trailing continuation symbol with "GRID*" and handle the "$HMNAME" hypermesh extension .. just nobody else has needed it before. If you get it done, please post it as a "bug fix" so that it can get integrated into OpenFOAM-1.5.x git repository. |
|
October 1, 2008, 09:46 |
If you take a look at the git
|
#6 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40 |
If you take a look at the git repo, it looks like OpenCFD has already updated this. If this works for you, it would probably be much easier than my obj export approach.
|
|
October 2, 2008, 08:30 |
Thanks once more to you guys a
|
#7 |
Senior Member
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20 |
Thanks once more to you guys also for fast implementation. this looks good, I will try it next week.
Regards |
|
October 7, 2008, 08:32 |
I have tied the new version. I
|
#8 |
Senior Member
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20 |
I have tied the new version. It works fine, everything looks the way I want it to have. Thanks.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] snappyHexMesh surface refinement bugs | wc34071209 | OpenFOAM Meshing & Mesh Conversion | 9 | October 7, 2018 07:53 |
CFD-Post User Surface STL Import Shifted? | denbjornen | FLUENT | 0 | November 16, 2017 18:49 |
[snappyHexMesh] SnappyHexMesh castellation stage creates hole in surface where mesh flows into domain | Dav3dum | OpenFOAM Meshing & Mesh Conversion | 0 | August 30, 2017 05:19 |
[snappyHexMesh] problem with snappyHexMesh | kanes | OpenFOAM Meshing & Mesh Conversion | 10 | January 26, 2016 07:11 |
[snappyHexMesh] SnappyHexMesh no layers and no decent mesh for complex geometry | pizzaspinate | OpenFOAM Meshing & Mesh Conversion | 1 | February 25, 2015 08:05 |