How to get the internal part of a tube

A subforum specific to the development of the OpenFoam-based workbenches ( Cfd https://github.com/qingfengxia/Cfd and CfdOF https://github.com/jaheyns/CfdOF )

Moderator: oliveroxtoby

Sedullo
Posts: 10
Joined: Thu May 28, 2020 4:00 pm

How to get the internal part of a tube

Post by Sedullo »

I have a cad geometry which is similar to a tube, my goal is to simulate a fluid inside this "tube".

I would like to create a "negative" of this geometry, basically I would like to create a cad of the fluid part. If you think about a straight tube, I would like to get a cad of the internal cylinder inside the tube.

Is that somehow possible?

The next step will be to create the stl of this negative and make a mesh out of it using snappyhexmesh in OpenFOAM.
thschrader
Veteran
Posts: 3155
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: How to get the internal part of a tube

Post by thschrader »

Do you mean something like this?
A hollow pipe in a block. You want to simulate the flow through
the pipe, but there is nothing to mesh. Because the pipe is hollow… :o
pipe.JPG
pipe.JPG (31.65 KiB) Viewed 5437 times
RatonLaveur
Posts: 991
Joined: Wed Mar 27, 2019 10:45 am

Re: How to get the internal part of a tube

Post by RatonLaveur »

Well, why don't you simply build a solid cylinder representing the actual fluid volume?

In CFD in FreeCAD there are really two ways to create the domain:

A. The domain is simple enough that you can recreate it in positive.

B. You have an existing part with complex cavities, in which case you can use that existing part to carve out from a solid volume (boolean operation).
polymer
Posts: 278
Joined: Fri Sep 12, 2014 8:49 am

Re: How to get the internal part of a tube

Post by polymer »

Maybe a function for creating a part from the inner Volumen could be added to FreeCad.
Two steps: first select faces of the entry/outlet, then select a face of the inner volume.

For example:
phpBB [video]
thschrader
Veteran
Posts: 3155
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: How to get the internal part of a tube

Post by thschrader »

polymer wrote: Sun Jul 05, 2020 9:14 pm Maybe a function for creating a part from the inner Volumen could be added to FreeCad.
...
You can use the defeaturing/curves wb.
fill_hole_and_mesh.JPG
fill_hole_and_mesh.JPG (103.09 KiB) Viewed 5275 times
RatonLaveur
Posts: 991
Joined: Wed Mar 27, 2019 10:45 am

Re: How to get the internal part of a tube

Post by RatonLaveur »

thschrader wrote: Tue Jul 07, 2020 12:50 pm You can use the defeaturing/curves wb.
ah...that is a great idea, let me suggest a little further: what if only the "necessary" tools of that workbench were integrated in the CfdOF//FEM module as a set of "Model preparation" tools ? Which would become a first step in the workflow for simulating in FreeCAD.
thschrader
Veteran
Posts: 3155
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: How to get the internal part of a tube

Post by thschrader »

RatonLaveur wrote: Thu Jul 16, 2020 9:35 am
thschrader wrote: Tue Jul 07, 2020 12:50 pm You can use the defeaturing/curves wb.
ah...that is a great idea, let me suggest a little further: what if only the "necessary" tools of that workbench were integrated in the CfdOF//FEM module as a set of "Model preparation" tools ? Which would become a first step in the workflow for simulating in FreeCAD.
You can arrange your tools with "Tools/customize".
But I have never used this option, I can live with the actual workbench structure.
Tools_customize.JPG
Tools_customize.JPG (39.78 KiB) Viewed 5190 times
polymer
Posts: 278
Joined: Fri Sep 12, 2014 8:49 am

Re: How to get the internal part of a tube

Post by polymer »

thschrader wrote: Tue Jul 07, 2020 12:50 pm
polymer wrote: Sun Jul 05, 2020 9:14 pm Maybe a function for creating a part from the inner Volumen could be added to FreeCad.
...
You can use the defeaturing/curves wb.
fill_hole_and_mesh.JPG
That is right and will be a quick and easy method for simple geometries like the given example. But due to partly uncomfortable usability regarding selecting inner or hidden geometries, an automatism would be helpful. See the other topic with the vacuum cleaner in the German sub-forum.
RatonLaveur
Posts: 991
Joined: Wed Mar 27, 2019 10:45 am

Re: How to get the internal part of a tube

Post by RatonLaveur »

as far as I know, there's a lot of development by user realthunder regarding the selection of hidden and inner faces.
https://forum.freecadweb.org/viewtopic. ... 2&start=20
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: How to get the internal part of a tube

Post by DeepSOIC »

My approach would be:
1. make a solid block that covers most of the tube, and leaves small protrusions of the ends of the pipework.
2. Part Cut the block with the tube
3. Part Explode and delete the block part. The fluid will remain.
Post Reply