CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Need directTopoChange.H (http://www.cfd-online.com/Forums/openfoam/105558-need-directtopochange-h.html)

Tobi August 2, 2012 10:30

Need directTopoChange.H
 
Hi all,

i am using OF2.1.x and wanna compile a other sHM - version which is offered by chalmeers.

Well there I need the directTopoChange.H file which is not included in the OF2.1.x version. Is it possible that this feature is just added by the OF-extend version?

Tobi

wyldckat August 2, 2012 17:03

Hi Tobi!

A snappyHexMesh version provided by Chalmers? What? Where? Do you have a link?

There might have been several improvements/changes made when OpenFOAM evolved from 1.7 to 2.0 which might make it difficult to use that modified version directly.

Nonetheless, if you can provide the source code or a link to it and indicate what was the original version, it might be relatively easy to apply the same changes to the latest snappyHexMesh version to perform the same added features :D

Best regards,
Bruno

Tobi August 3, 2012 03:15

Quote:

Originally Posted by wyldckat (Post 375120)
Hi Tobi!

A snappyHexMesh version provided by Chalmers? What? Where? Do you have a link?

There might have been several improvements/changes made when OpenFOAM evolved from 1.7 to 2.0 which might make it difficult to use that modified version directly.

Nonetheless, if you can provide the source code or a link to it and indicate what was the original version, it might be relatively easy to apply the same changes to the latest snappyHexMesh version to perform the same added features :D

Best regards,
Bruno


Hi Bruno ... here the link:
its from 2011 and I wanna try it.

Search for Christoffer Järpner:
www.tfd.chalmers.se/~hani/kurser/OS_CFD_2011/

He added 4 features.

Tobi

elvis August 3, 2012 03:29

Quote:

Originally Posted by Tobi (Post 375168)
Hi Bruno ... here the link:
its from 2011 and I wanna try it.

Search for Christoffer Järpner:
www.tfd.chalmers.se/~hani/kurser/OS_CFD_2011/

He added 4 features.

Tobi

Hi,

if You look at Christoffer Järpner Report it says
Devoloped for OpenFOAM-1.6.ext

Tobi August 3, 2012 07:09

Hi,

yes I know, couse in the Ext-Version there is the library that i am searching for. So my question was, if there is a possible way to implement that library in OF 2.1.x to work with that tool.

Well I can use it at home (thats not a problem) but here in work I just have 2.1.x

But thanks for your advice

wyldckat August 3, 2012 08:46

Greetings to all!

@Elvis: thanks for the reference to the 1.6-ext! That way I didn't have to look any further :)

@Tobi: Here you go: https://github.com/wyldckat/CJsnappyHexMesh - Sorry, it took me longer than I wanted, but it's done :cool: I was interested in seeing the result as well :D as well as improving my skills...

As always, I've made the adaptations, but I haven't properly tested things... or in other words, I ran and adapted the cases, but I'm not 100% things are working as intended.

This is a nifty way of adding boundary layers, although that priceless tutorial presented at OFW7 this year might make it easier to use in the long run ;) :
Quote:

Originally Posted by elvis (Post 373402)
there is a brilliant tutorial (download and untar it "tar -xzf ") I believe it will guide you throught most of your SHM questions

Specially since I can't see right away how on earth this will work with most geometries :confused:

I'll detail next in the "README" what steps did I take to get it working.
edit: All done. Haven't referenced this at openfoamwiki.net yet... nor did I yet referenced libOpenSMOKE there...

Best regards,
Bruno

Tobi August 3, 2012 13:47

Bruno ... wow ... !!!

I ll test it on monday!

I think you are just waiting that I post new things I read a while befor that you can get it bugfixed again and making me very happy :D

Tobi

wyldckat August 3, 2012 14:19

Hi Tobi,

This only happened because:
  1. I'm currently on vacation and still trying to learn a bit more about OpenFOAM.
  2. It had to do with snappyHexMesh, so it peaked my interest.
  3. And it was a good chance to test/improve my skills :D.
Have fun!
Bruno

Tobi August 3, 2012 14:49

Well that sounds good.
I hope I get so familiar to the code like you (some day).

Tonioh211 September 3, 2012 11:00

4 Attachment(s)
Hi and Thanks Bruno for the 2.1.x version it has been quite useful

I've been trying to mesh a hull with the original snappy and I can't manage to get a fully satisfying grid.

I keep on getting a few snapped faces on my hull that have badly orientated faces due to a poor projections of the castellated grid.

I can't manage to get a decent boundary layer around the hull (keep on getting a 95% extrusion success but the bulb and the bow (front) are where the layers are missing but also where I really need them!) I also noticed that the buffer layers were counted in the extrusion success value but they are not suitable for the criteria of the boundary layers. I'm trying to generate 8 layers with an expansion ratio of 1.3 and a starting thickness of 0.002 m

I tried tweaking the parameters without any success. I was wondering what are the limits (geometry, refinement, mesh quality) for generating a correct boundary layer process in the original snappyHexMesh?


Then I tried it with your 2.1.x version of Christoffers layer generation and got a much better result. However the checkMesh failed with non-orthogonal and highly-skewed elements .

As you where suggesting before, the CJsnappy doesn't work with all sorts of surfaces. What would be the possible modifications that need to be brought to snappy in order for it to generate properly the grid + boundary around a Hull?

///////////////////////////////////////////////////////////////////////////////////////

Layer.jpeg : Boundary Layers set I get with snappyHexMesh
All Visible.jpg : Whole grid to compare the boundary layers locations
Badorientation.jpg : Certain cells have a bad snap (in red)
CJsnappy.jpg : Better mesh with the CJsnappyHexMesh but still needs work

Tobi September 3, 2012 12:14

Hi tonioh,

can you tell me what Post-Processing tool you are using? Your edges of the mesh are so nice. paraview divide the cells in tets (normally).

Tonioh211 September 3, 2012 12:36

I use ParaView but I only used half of the body as I applied a symmetry plane for the solver. If you click on the VTKPolyhedron field on the propriety tab, you'll get nicely formed hexaedrons. This works only for the boundaries and not for the slices as you can see on the CJsnappy.jpg image I posted.

wyldckat September 3, 2012 16:05

Greetings to all!

@Tonioh211: I've got only two suggestions:
  1. Check the tutorials from here: http://openfoamwiki.net/index.php/SnappyHexMesh
  2. Check the section "3.6 Isolate and Conquer" that I just added.
Good luck!
Bruno

Tonioh211 September 5, 2012 03:33

Thanks Bruno, I'm trying it as speaking but turning the mesh quality parameters all off helps a little but doesn't allow me to have a fully layered hull. I'll have a few more tries otherwise I'll try to understand the CJsnappy better and see if there are other ways to handle the boundary generation.


All times are GMT -4. The time now is 20:55.