Computational Fluid Dynamics (CFD) workbench using OpenFOAM

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

Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by Syres »

Crossleyuk wrote: Sat Jul 16, 2022 8:41 am ping
Morning Michael, ignore my comment from last night, a fresh morning and I think I've cracked it using cfMesh. I only left the solver to run for 4 minutes but it was error free through that time. I ended up modelling a quadrant and then using Draft Polar Array all in FC 0.19.4 it fully meshes at 1.8mm element size. I'll make a more detailed step-by-step later today but find the attached file to try. I have to say this is quite unusual to give such hassle from the modelling side of things but the quadrant technique isn't silly when you're looking to use the smallest amount of geometry in the sketches, the master sketch maybe over the top in this instance but it's really good practice for when the user looks to have really complex models as they progress.

OS: Windows 7 Version 6.1 (Build 7601: SP 1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24267 +148 (Git)
Build type: Release
Branch: Branch_0.19.4
Hash: 476ecf091941bead59b14e44afa6064d5a66afa3
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: English/United Kingdom (en_GB)
Attachments
Radial_Diffuser_Fusion_Rev_P13_Syres_Win0194.FCStd
(75.1 KiB) Downloaded 77 times
User avatar
Crossleyuk
Posts: 165
Joined: Wed Jun 20, 2018 7:47 am
Location: United Kingdom
Contact:

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by Crossleyuk »

Syres wrote: Sun Jul 17, 2022 8:49 am
Crossleyuk wrote: Sat Jul 16, 2022 8:41 am ping
Morning Michael, ignore my comment from last night, a fresh morning and I think I've cracked it using cfMesh. I only left the solver to run for 4 minutes but it was error free through that time. I ended up modelling a quadrant and then using Draft Polar Array all in FC 0.19.4 it fully meshes at 1.8mm element size. I'll make a more detailed step-by-step later today but find the attached file to try. I have to say this is quite unusual to give such hassle from the modelling side of things but the quadrant technique isn't silly when you're looking to use the smallest amount of geometry in the sketches, the master sketch maybe over the top in this instance but it's really good practice for when the user looks to have really complex models as they progress.

OS: Windows 7 Version 6.1 (Build 7601: SP 1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24267 +148 (Git)
Build type: Release
Branch: Branch_0.19.4
Hash: 476ecf091941bead59b14e44afa6064d5a66afa3
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: English/United Kingdom (en_GB)
Thank you Syres,

All this is absolutely new to me so please bear with me.

I tried your case but had to add a CfdAnalysis with new boundaries in order to mesh. It meshed completely very quickly and ran with a successful completion after just a few seconds. It provided a residuals chart with velocity and pressure key but it did not show any iteration steps.

As I say. all alien to my nieve understanding level but here is the the case I put together from your file. Also, with your great help, I've now generated a new case with your Cut suggestions and I must admit I loved the process and was very happy with the look of the result. But unfortunately, it will not mesh in cfMesh and fails with errors when run after gmesh and snappy. I've provided that case as well.

Many thanks and sorry to trouble you.

Michael
Radial_Diffuser_Fusion_Rev_P13_Cuts_3.FCStd
(85.03 KiB) Downloaded 70 times
User avatar
Crossleyuk
Posts: 165
Joined: Wed Jun 20, 2018 7:47 am
Location: United Kingdom
Contact:

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by Crossleyuk »

Syres wrote: Sat Jul 16, 2022 10:31 am
Crossleyuk wrote: Sat Jul 16, 2022 8:41 am OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24291 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: 7b5e18a0759de778b74d3a5c17eba9cb815035ac
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)
How do I access my OCC version?
I'll remodel it completely this afternoon after I've sorted through my list of jobs, so it probably will be this evening (UK time) before I get back to you. In them meantime I've no problem with you staying on FreeCAD version 0.19 but please upgrade to the 0.19.4 which has a significant number of bugfixes in it as well as using OCC 7.5.3. It's available from (direct link to the downloader) https://github.com/FreeCAD/FreeCAD/rele ... ller-2.exe (it's larger than normal). You can install it in another folder (called for example FreeCAD0194) or upgrade your existing version in it's current folder, it doesn't matter because they both share the same config files held in your user area.

I really hope you've not stumbled across a bizarre issue that I've not seen before!! If I do get it to behave then I'll try to document a step by step guide of how it was achieved so you have something to reference in future.

Thanks Syres, I will upgrade to FC0.19.4

Cheers

OS: Windows 7 Version 6.1 (Build 7601: SP 1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24267 +148 (Git)
Build type: Release
Branch: Branch_0.19.4
Hash: 476ecf091941bead59b14e44afa6064d5a66afa3
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: English/United Kingdom (en_GB)

CfdOF Wb version 0.17.0
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by Syres »

Crossleyuk wrote: Sun Jul 17, 2022 11:04 am
I tried your case but had to add a CfdAnalysis with new boundaries in order to mesh. It meshed completely very quickly and ran with a successful completion after just a few seconds. It provided a residuals chart with velocity and pressure key but it did not show any iteration steps.
This tells me you are using an older version of the CfdOF Wb and therefore cfMesh and Hisa will most likely also be out of date, you should have had to do nothing other than mesh and solve.
User avatar
Crossleyuk
Posts: 165
Joined: Wed Jun 20, 2018 7:47 am
Location: United Kingdom
Contact:

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by Crossleyuk »

Thanks for the explanation Syres. I'll update and get back to you. Cheers 🤘
User avatar
Crossleyuk
Posts: 165
Joined: Wed Jun 20, 2018 7:47 am
Location: United Kingdom
Contact:

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by Crossleyuk »

Thnks again Syres,

Updated and re-entered all CfdOF components and it has worked and is now showing the Simulation Residuals.

Cheers and will be back to you.

Michael
User avatar
Crossleyuk
Posts: 165
Joined: Wed Jun 20, 2018 7:47 am
Location: United Kingdom
Contact:

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by Crossleyuk »

Thanks again once more Syres,

Your support was valuable and very very interesting. I ran your model after updates and it ran but provided me a result unlike any other I have produced from my full models in the past. But a great inspiration, so decided to do a full model cut case.

I started with a plain cylinder the correct diameter and full component length and started to model the flow regions for each sub component. The results were the following cuts that show the solid model, a 50% Transparancy without and with inlet and outlet bounds and finally the failed mesh. I feel its my poor 3D modeling aproach that is causing this ;) But I also feel that I am missunderstanding how to set the initial starting body geometry. I've made many changes to the exit section, with no success. But still trying hard to understand.

RDF_Cuts_5_50mm_Rev_P2.png
RDF_Cuts_5_50mm_Rev_P2.png (238.55 KiB) Viewed 2689 times

The result was that it is still not meshing the final, now complicated exit section and the case fails after it remeshes and starts the computation.

I don't expect you to be able to solve my problem but any observations would be greatfully received.

Here is my latest case file if you could be intertested. There seems to be some sketching errors, that I havent pinned down yet but still continue to learn.
Radial_Diffuser_Fusion_Rev_P13_Cuts_5.FCStd
(136.19 KiB) Downloaded 84 times
Model Portion Dims - Rev_P1.xlsx
(10.28 KiB) Downloaded 68 times

Many many thanks for your support again.

Michael
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by Syres »

Crossleyuk wrote: Thu Jul 21, 2022 2:47 pm There seems to be some sketching errors, that I haven't pinned down yet but still continue to learn.
When you see the white exclamation mark on red background as per below then there's no point in carrying on until the user has solved the error. The status bar had a red Wire is not closed which admittedly doesn't stay on there for long.

WireNotClosedError.jpg
WireNotClosedError.jpg (52.42 KiB) Viewed 2631 times

The Revolve is not error free due to the sketch it is based on has some incorrect geometry, either two points are not coincident, there's the same geometry on top of each other (which can be difficult to detect) or in this case a single line segment that has in effect no thickness therefore I changed it to construction to remove it from the analysis.

IncorrectGeometry.jpg
IncorrectGeometry.jpg (69.29 KiB) Viewed 2631 times

The mesh still doesn't complete correctly so there's more work to do and I would suspect it's the fact that you have Radial_Diffuser_Flow_Revolve001 with the same outer size at 35.89mm as the main body which results in coplanar issues and again this is purely an experience situation.

Generally I'd advise you go back to my previous model to learn how to model just a quadrant, only if you can mesh (forget the Cfd inlet, outlet etc at this time) the quadrant then proceed to Draft Polar Array it into a full cylindrical object. If I get some time this weekend I'll build a screenshot step-by-step method as promised.
User avatar
Crossleyuk
Posts: 165
Joined: Wed Jun 20, 2018 7:47 am
Location: United Kingdom
Contact:

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by Crossleyuk »

Thank you again Syres, I still have a massive amount to learn. I'll endeavour to follow your suggestions.

Best Regards

Michael
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by Syres »

Crossleyuk wrote: Fri Jul 22, 2022 1:19 pm I still have a massive amount to learn. I'll endeavour to follow your suggestions.
Attached is the step-by-step guide and a demo file along with it. Sketcher Wb is a subject in it's own right and if you aren't already aware chrisb has written a thorough doc on it's use available in English at https://owncloud.gwdg.de/index.php/s/eZ ... 9/download
Attachments
Radial_Diffuser_Fusion_Rev_P13_QuadrantArray2.FCStd
(115.89 KiB) Downloaded 78 times
GuideToConstructReliableCylindricalModels.pdf
(606.99 KiB) Downloaded 84 times
Post Reply