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
Posts: 1413
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

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

Postby thschrader » Thu Nov 23, 2017 2:40 pm

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: 236
Joined: Tue Oct 11, 2016 9:48 pm

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

Postby joha2 » 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.
Attachments
circle2d.zip
(10.42 KiB) Downloaded 21 times
qingfeng.xia
Posts: 165
Joined: Tue Sep 22, 2015 1:47 pm
Location: Oxford Uk
Contact:

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

Postby qingfeng.xia » Thu Nov 30, 2017 2:28 pm

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 LTS 64bit in virtualbox, always work with latest FreeCAD git version
Mainly work on OpenFOAM + Fenics for CFD, FSI
joha2
Posts: 236
Joined: Tue Oct 11, 2016 9:48 pm

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

Postby joha2 » Fri Dec 01, 2017 10:06 pm

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 23 times
User avatar
bernd
Posts: 8311
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

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

Postby bernd » Sat Dec 02, 2017 8:31 am

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: 236
Joined: Tue Oct 11, 2016 9:48 pm

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

Postby joha2 » Sat Dec 02, 2017 10:14 am

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
Posts: 8311
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

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

Postby bernd » 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. ...
qingfeng.xia
Posts: 165
Joined: Tue Sep 22, 2015 1:47 pm
Location: Oxford Uk
Contact:

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

Postby qingfeng.xia » Sat Dec 09, 2017 9:58 pm

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 LTS 64bit in virtualbox, always work with latest FreeCAD git version
Mainly work on OpenFOAM + Fenics for CFD, FSI
qingfeng.xia
Posts: 165
Joined: Tue Sep 22, 2015 1:47 pm
Location: Oxford Uk
Contact:

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

Postby qingfeng.xia » 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.
Ubuntu LTS 64bit in virtualbox, always work with latest FreeCAD git version
Mainly work on OpenFOAM + Fenics for CFD, FSI
User avatar
bernd
Posts: 8311
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

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

Postby bernd » Mon Apr 09, 2018 7:47 pm

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