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

[mesh manipulation] best approach to cut off part of domain

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By AtoHM
  • 1 Post By ginop

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 8, 2024, 01:00
Default best approach to cut off part of domain
  #1
New Member
 
Gino Parisella
Join Date: Mar 2017
Location: Perth, Western Australia
Posts: 22
Rep Power: 9
ginop is on a distinguished road
Hi,
I have generated a set of meshes with a commercial grid generator, and exported to openfoam successfully. Now I would like to modify those meshes to simulate different conditions. The changes "simply" require cutting off part(s) of the domain.

As such I am looking for options to obtain this, if even possible.

- cut(s) would be made through planes. So I initially thought about using snappyHexMesh, but it doesn't seem to work using searchablePlane

- it also popped to my mind to use topoSet and subsetMesh. While I haven't tried it yet, I fear that it would require fiddling around with boundary patches for the exposed cells

- alternatively, I thought of using paraview filters, then export as VTK, and convert such VTK to foam

Sooo... in your experience, what approach would you pursuit? is it even doable at all?

previous threads on the topic went unanswered, here and here.

Thanks


EDIT: using the paraview approach all boundary patches are lost, i.e. all cells/faces are either internal or default

Last edited by ginop; January 8, 2024 at 07:04. Reason: update info about paraview
ginop is offline   Reply With Quote

Old   January 11, 2024, 01:30
Default
  #2
Senior Member
 
M
Join Date: Dec 2017
Posts: 642
Rep Power: 12
AtoHM is on a distinguished road
This is untested territory for me, but knowing a few things about how snappy works, I might have a lead for you:


When using any of the searchable regions, you can use them for refinement which is probably the usual way people use them. However, if you add these parts inside the surfaceRefinement { } subdict, create a faceZone, snappy will snap the cells to them. Additionally, if you add a cellZone, you can create regions this way. Once you have regions, you can extract them separately.


Now, yet an easier way might be possible in the ESI version of OF. There we have the possibility to provide inside and outside points. So I would go about this by adding the plane as you did. Add an entry for the plane inside the refinementSurfaces subdict and create a faceZone for it to snap the cells which are cut, while supplying a locationInMesh inside the part you want to preserve. Usually, snappy cuts away separate regions which do not have a locationInMesh, so this might be all thats needed. If its remains there, you can try to explicitly remove it: https://www.openfoam.com/documentati...onsOutsideMesh
ginop likes this.
AtoHM is offline   Reply With Quote

Old   January 11, 2024, 03:55
Default
  #3
New Member
 
Gino Parisella
Join Date: Mar 2017
Location: Perth, Western Australia
Posts: 22
Rep Power: 9
ginop is on a distinguished road
Thanks AtoHM

ok, so I tested the suggestions on a simple mesh, and it works there.

I define a searchablePlane as
Code:
plane1
{
	type          searchablePlane;
	planeType    pointAndNormal;
	pointAndNormalDict
	{
	    point	(0 0 -1.);
	    normal	(0.1 0 0.9);
	}
}
then use it within the refinementSurfaces as
Code:
plane1
{
	level (0 2);
	patchInfo
	{
	    type patch;
	}
	faceZone aaa;
	faceType boundary;  //internal;
	cellZone bbb;
	cellZoneInside inside;
	insidePoint (0.1 0.2 -3.3);
}
I do obtain sets for the two regions, and also the faceZone. For some reasons the cellZone is empty, but I am not really bothered.

After running snappyHexMesh, I run subsetMesh using the region of interest (cellSet) to obtain the new domain.

I will try the approach on the actual mesh (much larger in size), and keep you posted about the outcome.

Again, thanks a lot for your help!
AtoHM likes this.
ginop is offline   Reply With Quote

Reply


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
PEMFC tutorial case problem Suleyman41 FLUENT 2 July 15, 2023 11:16
[ICEM] a wall part inside the fluid domain ENIMAB ANSYS Meshing & Geometry 3 July 25, 2022 17:13
[Other] refineWallLayer Error Yuby OpenFOAM Meshing & Mesh Conversion 2 November 11, 2021 11:04
Out File does not show Imbalance in % Mmaragann CFX 5 January 20, 2017 10:20
Examining part of a Domain in Pointwise dilbert Pointwise & Gridgen 0 August 31, 2012 11:37


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