Progress of the general Computational Fluid Dynamics (CFD) workbench: CfdWorkbench

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

thschrader
Veteran
Posts: 3157
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Progress of the general Computational Fluid Dynamics (CFD) workbench: CfdWorkbench

Post by thschrader »

qingfeng.xia wrote: Thu Nov 23, 2017 2:03 pm For Fenics, I would need a pure 2D mesh. Any idea?
Sorry Sir, no idea... ;)
I have never worked with fenics. In FEM-wb, you can generate 2D-meshes, but I cant
tell you, if they can be used in Fenics-calculations.
regards Thomas
joha2
Posts: 303
Joined: Tue Oct 11, 2016 9:48 pm

Re: Progress of the general Computational Fluid Dynamics (CFD) workbench: CfdWorkbench

Post by joha2 »

qingfeng.xia wrote: Sun Nov 19, 2017 11:20 pm And can anyone teach me to make a 2D plane part, elbow, to test my code?
Why don't you use the XDMF and XML export functions of FreeCAD? They also work with pure 2D meshes. (If there is nothing happened during the development of FC which breaks their functionality :mrgreen:) Or is the problem the missing export function of boundary conditions?

Best wishes
Johannes

PS: the files in the attachment were created via a sketch and a planar face in the FEM wb. I think either of them can be used by Fenics.
In the same manner you could create the elbow from the tutorial.
Attachments
circle2d.zip
(10.42 KiB) Downloaded 66 times
qingfeng.xia
Posts: 227
Joined: Tue Sep 22, 2015 1:47 pm
Location: Oxford UK/Shenzhen China
Contact:

Re: Progress of the general Computational Fluid Dynamics (CFD) workbench: CfdWorkbench

Post by qingfeng.xia »

Dear Joha2,

Thanks for showing me 2D mesh, can you post me the 2D part too, I will have a trial to mesh a complicate 2D part by gmsh.

You are right, boundary facets are also needed to do a realistic case setup. I do not expect user to write Subdomain script to find boundaries. Json file is the only text input for my FenicsSolver, Gmsh can do the job (subdomain export), although not accepted by master, I fork gmsh into CFD.

Boundary export should be possible, similar with CFD meshexport boundary in CfdTools.py. but I have not got the time to do it. I can only maintain the minimal test route.
joha2 wrote: Sat Nov 25, 2017 8:20 am
qingfeng.xia wrote: Sun Nov 19, 2017 11:20 pm And can anyone teach me to make a 2D plane part, elbow, to test my code?
Why don't you use the XDMF and XML export functions of FreeCAD? They also work with pure 2D meshes. (If there is nothing happened during the development of FC which breaks their functionality :mrgreen:) Or is the problem the missing export function of boundary conditions?

Best wishes
Johannes

PS: the files in the attachment were created via a sketch and a planar face in the FEM wb. I think either of them can be used by Fenics.
In the same manner you could create the elbow from the tutorial.
Ubuntu 18.04 LTS 64bit, python3, always work with latest FreeCAD daily build
Working on Cfd module for FreeCAD, FreeCAD_Module_Develop_Guide
https://github.com/ukaea/parallel-preprocessor/
https://github.com/qingfengxia/Cfd
joha2
Posts: 303
Joined: Tue Oct 11, 2016 9:48 pm

Re: Progress of the general Computational Fluid Dynamics (CFD) workbench: CfdWorkbench

Post by joha2 »

Why is the branch not accepted by master? In the attachment you'll find an new circle2d file (this time including the FCstd file).
Actually the xdmf export supports the export of boundary groups from FreeCAD. I marked the boundary edges with value 1 here.
Since paraview can read this xdmf file I bet Fenics can either. (Except that it has difficulties with higher order elements.)
Therefore you should be able to simply reproduce the elbow example all from FreeCAD and export it as xdmf file.

Best wishes
Johannes
Attachments
circle2d_2.zip
(194.13 KiB) Downloaded 68 times
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Progress of the general Computational Fluid Dynamics (CFD) workbench: CfdWorkbench

Post by bernd »

It breaks GSoC gmsh code. The branch should be based on GSoC branch, or qing feng should wait until the GSoC Elmer is in master (which will happen soon, hopefully) and than rebases his branch.

Btw: would it not be better to write a separate small export module for the new export file formats which is not included in gmsh tools but uses the gmsh module class instead?
joha2
Posts: 303
Joined: Tue Oct 11, 2016 9:48 pm

Re: Progress of the general Computational Fluid Dynamics (CFD) workbench: CfdWorkbench

Post by joha2 »

I am also awaiting this integration very much :-)
Since a generalized solver framework is also useful for the Fenics integration!
Keep up your good work!

Best wishes
Johannes
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Progress of the general Computational Fluid Dynamics (CFD) workbench: CfdWorkbench

Post by bernd »

it's in master ...

I did a lot rebase today, all my other dev branches. I gave the branch of qing a try too. https://github.com/berndhahnebach/FreeC ... gmshexport But I did not test it at all. ...
qingfeng.xia
Posts: 227
Joined: Tue Sep 22, 2015 1:47 pm
Location: Oxford UK/Shenzhen China
Contact:

Re: Progress of the general Computational Fluid Dynamics (CFD) workbench: CfdWorkbench

Post by qingfeng.xia »

Thanks, I will have a look and test.
bernd wrote: Sat Dec 02, 2017 8:20 pm it's in master ...

I did a lot rebase today, all my other dev branches. I gave the branch of qing a try too. https://github.com/berndhahnebach/FreeC ... gmshexport But I did not test it at all. ...
Ubuntu 18.04 LTS 64bit, python3, always work with latest FreeCAD daily build
Working on Cfd module for FreeCAD, FreeCAD_Module_Develop_Guide
https://github.com/ukaea/parallel-preprocessor/
https://github.com/qingfengxia/Cfd
qingfeng.xia
Posts: 227
Joined: Tue Sep 22, 2015 1:47 pm
Location: Oxford UK/Shenzhen China
Contact:

Re: Progress of the general Computational Fluid Dynamics (CFD) workbench: CfdWorkbench

Post by qingfeng.xia »

I should soon test CFDworkbench it again on FreeCAD 0.17, make Fenics and OpenFOAM in CFD module work with stable 0.17 release.
Ubuntu 18.04 LTS 64bit, python3, always work with latest FreeCAD daily build
Working on Cfd module for FreeCAD, FreeCAD_Module_Develop_Guide
https://github.com/ukaea/parallel-preprocessor/
https://github.com/qingfengxia/Cfd
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Progress of the general Computational Fluid Dynamics (CFD) workbench: CfdWorkbench

Post by bernd »

qingfeng.xia wrote: Mon Apr 09, 2018 12:22 pm I should soon test CFDworkbench it again on FreeCAD 0.17, make Fenics and OpenFOAM in CFD module work with stable 0.17 release.
you may have a look at https://github.com/berndhahnebach/FreeC ... gmshexport too
Post Reply