Page 38 of 43

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Posted: Wed May 25, 2022 2:41 pm
by thschrader
It seems that cfmesh does not like bodys from Part-Design wb.
I used your sketches and rebuilt the chamber with Part-wb.
Now cfmesh works. Meshing goes superfast, under 1 minute.
See file:
vortexChamber_ts.FCStd
(64.28 KiB) Downloaded 60 times
cfmesh_vortexChamber.JPG
cfmesh_vortexChamber.JPG (226.39 KiB) Viewed 2483 times

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Posted: Wed May 25, 2022 3:16 pm
by Kunda1
thschrader wrote: Wed May 25, 2022 2:41 pm It seems that cfmesh does not like bodys from Part-Design wb.
What specifically ?

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Posted: Wed May 25, 2022 3:47 pm
by thschrader
Kunda1 wrote: Wed May 25, 2022 3:16 pm
thschrader wrote: Wed May 25, 2022 2:41 pm It seems that cfmesh does not like bodys from Part-Design wb.
What specifically ?
Correct answer: I dont know.

All 3 meshers have problems with the Part-Design bodies, in this case.
When using the exact same sketches (I copied them, no redrawing!) and Part-wb,
meshing works.

openFoam uses an stl as base-part, generated from FC. Maybe the stl generator has some
problems with part-Design bodies. Sorry, only a guess...

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Posted: Wed May 25, 2022 7:38 pm
by KAKM
Kunda1 wrote: Wed May 25, 2022 3:16 pm What specifically ?
I think the issue is something like the exporter is failing to move down one tree level when trying to export a body. There was someone a while back who was trying to export a FreeCAD brep file to gmsh and when they had the body selected upon clicking "export", it just put out an empty file (no errors), but if they selected the three objects (I think they were surfaces) that made up the body instead, it exported as expected.

It was also true the last time I tried to mesh something using CfdOF that I had to use a shell instead of a solid or it wouldn't mesh. That may have since been fixed though–it was a year or two ago and I feel like I've seen successful meshing from solids since then.

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Posted: Wed May 25, 2022 7:58 pm
by Crossleyuk
Hi TH,

I tried your case and sure it meshed in cfMesh and gmsh but could not get it to run at all. So I've continued with my rebuild using gmsh and note that the case fails every time the Residuals climb higher. Here is what I'm getting every time.
Body_Cyl_Axial_Complete_Rev_P2_Large_Residual.png
Body_Cyl_Axial_Complete_Rev_P2_Large_Residual.png (58.1 KiB) Viewed 2380 times

Cheers and thanks for the contact again.

Michael

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Posted: Wed May 25, 2022 9:18 pm
by oliveroxtoby
thschrader wrote: Wed May 25, 2022 2:41 pm It seems that cfmesh does not like bodys from Part-Design wb.
I used your sketches and rebuilt the chamber with Part-wb.
Now cfmesh works. Meshing goes superfast, under 1 minute.
See file:
vortexChamber_ts.FCStd
cfmesh_vortexChamber.JPG
I don't think CfdOF has an issue with Part Design per se. Looking carefully at the 'Flows' body, there is a whole face missing where the diffuser should meet the part (the diffuser is 'floating' in mid-air):
Screenshot (4).png
Screenshot (4).png (332.1 KiB) Viewed 2338 times
I don't know much about how this works but presumably one would need to cut a hole out of the plane where the diffuser joins it. I guess that simply having the two surfaces abutting each other in the body does not allow them to merge correctly. The mesher needs a continuous, enclosed void in which to produce the mesh. @thschrader's apprach of fusing different solids together is a nice way to get that.

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Posted: Wed May 25, 2022 9:21 pm
by thschrader
Crossleyuk wrote: Wed May 25, 2022 7:58 pm ...
I tried your case and sure it meshed in cfMesh and gmsh but could not get it to run at all.
Good to hear that meshing works for you.
For me the case runs. I am writing from private PC,
next simulation is friday on company PC.
Tomorrow I am on holiday.
In Germany is "Vatertag" (fathers day)
That means: get drunk and talk BS :lol:

But first things first. Lets concentrate on the meshing process.

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Posted: Thu May 26, 2022 3:31 am
by trijonb
I got almost exactly the same behaviour (after remeshing with gsmh (tets and poly's)). Inviscid, viscous laminar, viscous k-omega, with multiple combinations of URF's, as well as very low values, and got the same divergence in the pressure residual. Assumed it was either BC's or a mesh problem.

Incidently, to @oliveroxtoby point, you do need to ensure the bodies are connected for the mesh to 'propagate' contiguously across part 'boundaries'. I found this in a couple of instances, and as per the comments above, solved mostly with the boolean fuse option.
Crossleyuk wrote: Wed May 25, 2022 7:58 pm Hi TH,

I tried your case and sure it meshed in cfMesh and gmsh but could not get it to run at all. So I've continued with my rebuild using gmsh and note that the case fails every time the Residuals climb higher. Here is what I'm getting every time.

Body_Cyl_Axial_Complete_Rev_P2_Large_Residual.png

Cheers and thanks for the contact again.

Michael

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Posted: Thu May 26, 2022 8:55 am
by Crossleyuk
As the naive outsider can I say, WOW and thank you guys. The thanks for a fantastic lessons package that I need to read again to start to understand. The connection beween items has always been a question of mine and I usually start a new item by selecting the connecting face, adding a sketch and changing the direction if required. I'll take another look to see if I can add anything that may be relevant :lol: :oops:

Million thanks

Michael

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Posted: Thu May 26, 2022 7:57 pm
by oliveroxtoby
@thschrader's case works for me, as does the attached which has been modified to have the same boundary conditions as your original case. This is using cfMesh - I get mesh quality issues when using gmsh, probably due to a small gap or misalignment somewhere (which cfMesh and snappyHexMesh tend to be more robust to by their design).
Crossleyuk wrote: Wed May 25, 2022 7:58 pm Hi TH,

I tried your case and sure it meshed in cfMesh and gmsh but could not get it to run at all. So I've continued with my rebuild using gmsh and note that the case fails every time the Residuals climb higher. Here is what I'm getting every time.

Body_Cyl_Axial_Complete_Rev_P2_Large_Residual.png

Cheers and thanks for the contact again.

Michael
Don't forget to look at the checkMesh output - I suspect you will find it is poor in the gmsh case. Otherwise, uploading the exact case that is giving you an issue should make it possible for someone to assist.