Process when using stl or obj files

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

Post Reply
Octavarius
Posts: 7
Joined: Fri Nov 05, 2021 1:54 pm

Process when using stl or obj files

Post by Octavarius »

Hello FC team,

I have been playing with CfdOF, amazing work that's been done this far.

I was wondering what process you would recommend when starting when starting from a geometry in stl or obj format.
I tried the following:
Mesh Design Module
-Import Mesh (obj)
Part module
-Select all part >Create shape from mesh>Convert to solid>Make Compound
CFDOF Module
-Analysis container>Select compound>Create mesh>write mesh case>Run mesher

I don't know if this is correct. It works pretty well for simple geometries, however, on larger models, the step "Exporting the part surfaces" will last very long and eventually hang.
This makes sense, as the geometry is more complicated. During this step, is the geometry being meshed again in the background ? Is there not a way to skip it, since the initial import was an stl/obj ?

Thanks for any help !
A new FC enthusiast.
User avatar
oliveroxtoby
Posts: 810
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Process when using stl or obj files

Post by oliveroxtoby »

Octavarius wrote: Wed Nov 17, 2021 8:31 am Hello FC team,

I have been playing with CfdOF, amazing work that's been done this far.

I was wondering what process you would recommend when starting when starting from a geometry in stl or obj format.
I tried the following:
Mesh Design Module
-Import Mesh (obj)
Part module
-Select all part >Create shape from mesh>Convert to solid>Make Compound
CFDOF Module
-Analysis container>Select compound>Create mesh>write mesh case>Run mesher

I don't know if this is correct. It works pretty well for simple geometries, however, on larger models, the step "Exporting the part surfaces" will last very long and eventually hang.
Yes, this is the procedure I have been using.
This makes sense, as the geometry is more complicated. During this step, is the geometry being meshed again in the background ? Is there not a way to skip it, since the initial import was an stl/obj ?
Yes, it's being re-meshed. Although this could be skipped in the simple case, it is difficult to generalise - for example, what if the imported STL is combined with some other shapes that aren't meshed already? I think it would be a better bet to try to get the meshing step to an acceptably fast solution even in the many-faceted case.

I tried a few moderately sized geomtries and performance seemed tolerable. If you can share a surface that demonstrates the problem, I would like to experiment a bit.

Thanks!
Octavarius
Posts: 7
Joined: Fri Nov 05, 2021 1:54 pm

Re: Process when using stl or obj files

Post by Octavarius »

Hi,

thanks for your reply.
I have not been able to reproduce this on a non industrial case. I'll keep looking.
The model that fails is not so finely meshed but has many PIDs.
In the meantime is there any way to get more output, in order to find out which surface or operation is causing the issue ?

Thanks!
KAKM
Posts: 109
Joined: Tue May 04, 2021 12:17 am

Re: Process when using stl or obj files

Post by KAKM »

If you don't have the Report View on, you can turn that on. It's under View->Panels. You can also turn on logging by running

Code: Select all

freecad -l
in your computer's command line. There's a bit more information on that here: https://wiki.freecad.org/Debugging/en
Octavarius
Posts: 7
Joined: Fri Nov 05, 2021 1:54 pm

Re: Process when using stl or obj files

Post by Octavarius »

Hello again CFDOF team,

I have an example file, starting with an obj. I'm attaching a link below:
https://drive.google.com/file/d/12-0Or3 ... sp=sharing

I follow the process described earlier:
Mesh Design Module
-Import Mesh (obj)
Part module
-Select all part >Create shape from mesh>Convert to solid>Make Compound
CFDOF Module
-Analysis container>Select compound>Create mesh>write mesh case>Run mesher

I have noticed the following:
-the step "create mesh" takes a really long time, about 2 hours, although the geometry is rather simple
-some of the bcs don't seem to be applied on the model. "radiateurbc" for example has an assigned temperature. The surface seems hot but there does not seem to be any natural convection above it :?

Any thought on what is wrong with this process ?

Many thanks!
User avatar
oliveroxtoby
Posts: 810
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Process when using stl or obj files

Post by oliveroxtoby »

Octavarius wrote: Tue Apr 05, 2022 9:56 pm I have noticed the following:
-the step "create mesh" takes a really long time, about 2 hours, although the geometry is rather simple
The problem seems to be the sheer number of facets in your imported surface (~37000). Re-triangulating this takes a long time. I'll see what can be done about that, but a quick fix here would be to use Part | Create a copy | Refine shape. This will combine all the planar facets and hugely reduce their number.
-some of the bcs don't seem to be applied on the model. "radiateurbc" for example has an assigned temperature. The surface seems hot but there does not seem to be any natural convection above it :?
The allocation of BCs seems fine, and the result looks sensible to me. The radiator draws air upward from the inlet, but it can't go anywhere above that because of the solid roof. Maybe you indended this to be an opening?
Octavarius
Posts: 7
Joined: Fri Nov 05, 2021 1:54 pm

Re: Process when using stl or obj files

Post by Octavarius »

oliveroxtoby wrote: Wed Apr 06, 2022 9:18 am
Octavarius wrote: Tue Apr 05, 2022 9:56 pm I have noticed the following:
-the step "create mesh" takes a really long time, about 2 hours, although the geometry is rather simple
The problem seems to be the sheer number of facets in your imported surface (~37000). Re-triangulating this takes a long time. I'll see what can be done about that, but a quick fix here would be to use Part | Create a copy | Refine shape. This will combine all the planar facets and hugely reduce their number.

Hello. Many thanks for the suggestion. At what stage would you use the refine shape command ? I tried to use it right after the "Create shape from mesh" and after "Convert to solid" but in both case, Freecad will crash.
-some of the bcs don't seem to be applied on the model. "radiateurbc" for example has an assigned temperature. The surface seems hot but there does not seem to be any natural convection above it :?
The allocation of BCs seems fine, and the result looks sensible to me. The radiator draws air upward from the inlet, but it can't go anywhere above that because of the solid roof. Maybe you indended this to be an opening?
As for the results, I'm getting something like this:
Capture-room3.PNG
Capture-room3.PNG (137.99 KiB) Viewed 2232 times
A colleague of mine ran the same case on another software and gets a very large chimney effect over the radiator.
Capture-room2.PNG
Capture-room2.PNG (188.95 KiB) Viewed 2232 times
I don't have any experimental data, so I have no idea which one is the closest to reality. I'm just surprised no to see this chimney effect.

Thanks!
User avatar
oliveroxtoby
Posts: 810
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Process when using stl or obj files

Post by oliveroxtoby »

oliveroxtoby wrote: Wed Apr 06, 2022 9:18 am The allocation of BCs seems fine, and the result looks sensible to me. The radiator draws air upward from the inlet, but it can't go anywhere above that because of the solid roof. Maybe you indended this to be an opening?
Sorry, I was talking nonsense here - viewing the model upside-down!
User avatar
oliveroxtoby
Posts: 810
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Process when using stl or obj files

Post by oliveroxtoby »

Octavarius wrote: Tue Apr 05, 2022 9:56 pm -the step "create mesh" takes a really long time, about 2 hours, although the geometry is rather simple
The main issue here should be resolved now. Takes about a minute for me now.
Post Reply