CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Cutting a Cell with a surface. (Splitting a cell in two) (https://www.cfd-online.com/Forums/openfoam-programming-development/224338-cutting-cell-surface-splitting-cell-two.html)

 frobaux February 14, 2020 09:53

Cutting a Cell with a surface. (Splitting a cell in two)

Hello everyone,

Does an utility exists to split a cell which is cut by a surface?
Actually, what I'm interested about is the volume left on each side.

I currently have identified which cells/faces/edges are "cut" by my surface (using mainly cellClassification). I still need to compute the volumes on each side of the triSurface, but I have to admit, I have not clue on how to do that.

Is there an utility to do that? I would take any lead, or idea!

Thank you a lot for you help!

 HPE February 14, 2020 16:26

For a given cell and an arbitrary defined surface passing through the cell in an arbitrary orientation, you want to calculate the volume portions of the cell separated by the surface?

I dont think there is a utility for that, which seems to be quite 'niche' to me unless I correctly understand it. You may need to hack the source code.

Curious, what is the application related to this?

 frobaux February 15, 2020 04:18

Well, It is exactly that. I'm currently trying to devellop it with a particular hypothesis:
The surface inside the cut cell is planar. (so that the intersection points with the edges defines a face). In my case that hypothesis is true but it probably won't always be.
Well even like that is not that simple to write.

The application is to convert a free surface defined by a surface (direct method) into a volume of fluid method (ie. obtain the alpha.water field, representing the volume fraction of a given cell which is under water).

I hope I was clear!

Kind regards!
Fabien

 All times are GMT -4. The time now is 07:31.