CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [mesh manipulation] Splitting the Boundaries (https://www.cfd-online.com/Forums/openfoam-meshing/208140-splitting-boundaries.html)

Chris123 October 10, 2018 07:12

Splitting the Boundaries
 
Dear Foamers,
I read threads about toposet and others regarding spliiting patches etc.
But I still struggeling with that.
My goal is to split each of my Boundary-sides.

I have something like a Box with left, right, front, back sides (forget the top and the bottom). I would like to split each of these 4 sides into two (so cutting each by the half) to have more flexible Boundary conditions.
Has anyone an idea how to handle this?

linnemann October 10, 2018 08:20

Easiest way to do this is using Paraview.

Follow this guide to select the cells you want in you BC.
Remember to turn off "internalMesh" when you load the case.

https://i.imgur.com/k35Vv0H.gif

After this use surfaceToPatch with the stl you just made.

https://i.imgur.com/ce7o6cU.gif

Chris123 October 10, 2018 09:21

many many thanks Niels.
But I got an fatal error if i execute surfaceToPatch with:"No Mesh available, Probaply mesh is not read."
Which sounds strange to me because my mesh is of course there!
Do you have any idea where the error comes from?

linnemann October 10, 2018 10:51

Could you please list the exact command you ran and the output of checkMesh.

Also an OF version would be nice to know.

Chris123 October 11, 2018 09:11

The error comes from the saved surface stl file. In my case it is empty becasue paraview complains that stl files does only support triangles, I have an irregular grid. I tried it with a polygonal file format, but this does not work with the "surfaceToPatch command. The other file formats (e.g vtm)to save the surface extraction which paraview suggested fails as well.
Any idea to overcome this issue?

linnemann October 11, 2018 09:12

Could you share the case?

Chris123 October 12, 2018 01:57

I have a complicated environment 5terrain case which is very huge. Therefore I tried your method also on the wind around Buildings tutorial, and it fails with the same error message. A bit strange, can you maybe try on that as well?

linnemann October 12, 2018 03:27

Are you sure you followed all my steps?

1. Select surface cells to be used for BC
2. Extract selection
3. Extract surface
4. Save Data -> choose stl and ascii output.
5. Try and load the stl and see it is triangulated

I did this for a case made with snappyHexMesh and have no problems.

EDIT:
Just used the windAroundBuildings tutorial and it work fine.

Chris123 October 12, 2018 05:43

Yes, I made an animated gif, the same as your guidance but unfortunately I'am not able to share it with you. I cannot attach it as an gif the attachment management convert it to a jpg.
Sorry.

linnemann October 12, 2018 06:25

I use imgur and then use the link to the gif here on the forum using "Insert Image".

Chris123 October 12, 2018 06:33

Hi Niels, many thanks for your Help, and your excellent guidance.
If I apply a Triangulate filter before saving the surface stl file it works.
Maybe it is somewhere predefined in your setting otherwise I do not know why you denot need it?
Anyway, again many thanks.

linnemann October 12, 2018 07:00

Maybe it is the Paraview version?
I'm using 5.5 on windows for the one I made.

Chris123 October 15, 2018 04:53

Dear Nils,
sorry to come back again. After I could split each of my 4 patches successfully, the way forward is not clear to me.
I mean now I have 8 new polymesh folders for each new splittet patch in terms of:

oldside A splittet in SideA half1 and half2
oldside B splittet in SideB half1 and half2
oldside C splittet in SideC half1 and half2
oldside D splittet in SideD half1 and half2

Now I think I have to merge all of them and deleted the old entries out to have a new (combined)boundary, face, patch, owner, points and neighbour file inside the polymesh. But how, Or do I miss something?

Chris123 October 16, 2018 09:21

What I did in the meantime, is that I meshed the new splittet stl files with snappyhexmesh. So I think have what I want, but how I get rid of the old patches, how can I delete these. I read some other threads but I did not find the answer yet.
Any idea?

Chris123 October 17, 2018 06:27

Problem solved. Just using in the beginning the "half" names for each patch.

beluiz93 October 25, 2018 01:12

Hi guys,

Is it possible to use the same idea (in paraview) but with the internal mesh? Meaning splitting the mesh with inner and outer cylinders?

Thanks!

Bernardo

linnemann April 30, 2019 02:35

Quote:

Originally Posted by beluiz93 (Post 712530)
Hi guys,

Is it possible to use the same idea (in paraview) but with the internal mesh? Meaning splitting the mesh with inner and outer cylinders?

Thanks!

Bernardo

Hi

No that will not be possible as the cells needs to be cut to get actual cylinders. You could make the cylinders in paraview and export them as stl and use in snappy before meshing.


All times are GMT -4. The time now is 23:40.