Computational Fluid Dynamics (CFD) workbench using OpenFOAM
Moderator: oliveroxtoby
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
-
- Veteran
- Posts: 3157
- Joined: Sat May 20, 2017 12:06 pm
- Location: Germany
Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM
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:
I used your sketches and rebuilt the chamber with Part-wb.
Now cfmesh works. Meshing goes superfast, under 1 minute.
See file:
Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM
What specifically ?thschrader wrote: ↑Wed May 25, 2022 2:41 pm It seems that cfmesh does not like bodys from Part-Design wb.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
-
- Veteran
- Posts: 3157
- Joined: Sat May 20, 2017 12:06 pm
- Location: Germany
Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM
Correct answer: I dont know.Kunda1 wrote: ↑Wed May 25, 2022 3:16 pmWhat specifically ?thschrader wrote: ↑Wed May 25, 2022 2:41 pm It seems that cfmesh does not like bodys from Part-Design wb.
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
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.
- Crossleyuk
- Posts: 165
- Joined: Wed Jun 20, 2018 7:47 am
- Location: United Kingdom
- Contact:
Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM
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.
Cheers and thanks for the contact again.
Michael
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.
Cheers and thanks for the contact again.
Michael
- oliveroxtoby
- Posts: 837
- Joined: Fri Dec 23, 2016 9:43 am
- Location: South Africa
Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM
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): 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.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
-
- Veteran
- Posts: 3157
- Joined: Sat May 20, 2017 12:06 pm
- Location: Germany
Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM
Good to hear that meshing works for you.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.
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
But first things first. Lets concentrate on the meshing process.
Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM
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.
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
- Crossleyuk
- Posts: 165
- Joined: Wed Jun 20, 2018 7:47 am
- Location: United Kingdom
- Contact:
Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM
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
Million thanks
Michael
Million thanks
Michael
- oliveroxtoby
- Posts: 837
- Joined: Fri Dec 23, 2016 9:43 am
- Location: South Africa
Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM
@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).
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.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
- Attachments
-
- vortexChamber_ts_oo.FCStd
- (64.23 KiB) Downloaded 61 times