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

qingfeng.xia
Posts: 172
Joined: Tue Sep 22, 2015 1:47 pm
Location: Oxford Uk
Contact:

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby qingfeng.xia » Sun Nov 19, 2017 11:12 pm

Great job, the matplotlib plotting, I am just thinking to implement it, via the plot workbench, while you made it.
Thanks, I will integrate it.
Last edited by qingfeng.xia on Sun Nov 19, 2017 11:15 pm, edited 1 time in total.
Ubuntu LTS 64bit in virtualbox, always work with latest FreeCAD git version
Mainly work on OpenFOAM + Fenics for CFD, FSI
ickby
Posts: 2922
Joined: Wed Oct 05, 2011 7:36 am

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby ickby » Mon Dec 04, 2017 6:59 am

Hello Oliver,

On twitter I saw a post stating you calculated the drag coefficient of the Millennium Falcon:
https://twitter.com/ex_mente/status/936562984914210816

could you write a little something about that with a few pictures in the user showcase? I would love to use this on our Facebook site with the release of the new star wars film :)
User avatar
Kunda1
Posts: 5783
Joined: Thu Jan 05, 2017 9:03 pm

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby Kunda1 » Mon Dec 04, 2017 11:07 am

ickby wrote:
Mon Dec 04, 2017 6:59 am
Hello Oliver,

On twitter I saw a post stating you calculated the drag coefficient of the Millennium Falcon:
https://twitter.com/ex_mente/status/936562984914210816

could you write a little something about that with a few pictures in the user showcase? I would love to use this on our Facebook site with the release of the new star wars film :)
Not to mention the Release_notes_0.17. That would be an awesome top of the page.
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
bernd
Posts: 8440
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby bernd » Mon Dec 04, 2017 6:25 pm

Kunda1 wrote:
Mon Dec 04, 2017 11:07 am
Release_notes_0.17
according to release notes no changes in FEM ... :o
Mx74
Posts: 23
Joined: Fri Dec 08, 2017 12:39 pm

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby Mx74 » Fri Dec 08, 2017 4:04 pm

Hello,

In my quest of an openFoam GUI, I just discovered your workbench. Congrats for doing such a job.
The installation was easy via the addon manager, and everything went fine (window10).

Now I'm struggling to make it work.

I first tried to use a stl file created with Blender, but I just can't mesh it. the mesh option never get active when I try to select it. it there a possibility ot use an external stl file?

then I try to create a simple "wind tunnel" as a trial. A small box into a bigger box. BUt again, I have a problem when comes the mesh step. I can mesh only one of my object (cfmesh or gmsh). When I select the second object and launch the mesh process, just nothing happen.

I couldn't find a tuto involving two object like that.

Looks like a newbee problem, but if someone can help me to understand my mistake?

Thank you
thschrader
Posts: 1421
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby thschrader » Sat Dec 09, 2017 11:22 am

Mx74 wrote:
Fri Dec 08, 2017 4:04 pm
...
Looks like a newbee problem, but if someone can help me to understand my mistake?
Hello Mx74,
welcome to the forum. As a start to cfd-workbench, please have a look at the turorials
https://opensimsa.github.io/training.html
from the developers (Dr.Oliver Oxtoby).

About STL-files:
After importing the stl in FC, please check if the body is a full watertight solid.
Goto "Mesh Design"-wb, Meshes==>Analyse==>Check solid mesh
If it is a solid, you must convert the stl to a "body" in the part-wb with "Create shape from Mesh".
Thats the body you can mesh. If your body isnt a solid, you must repair it. I use netfabb-basic for this.
On the pics you see a windtunnel with a prop. The prop in the tunnel was designed with FC and has 13 faces.
No problem to adress the BC-conditions. I exported the prop as an stl, then reimporting the stl. After converting
the stl to a body, you can see that the body has 1458 faces! It is impossible to adress the BC by clicking every face.
Thats the Problem when using stls in FC for FEM/CFD... ;)

About bluecfdcore:
I have installed the 2016-1 version month ago without using the preferences option. Which version do u have
installed via preferences as a default (2016-1/2016-2/2017-1?)
http://bluecfd.github.io/Core/Downloads/
regards Thomas
prop1.JPG
prop1.JPG (93.63 KiB) Viewed 893 times
prop2.JPG
prop2.JPG (207.57 KiB) Viewed 893 times
EDIT 09.12.2017:
@Mx74: can you post a screenshot of your simulation?
Here is a result with a fixed prop.
Challenge: how to setup a rotating prop with dynamic mesh?
prop3.JPG
prop3.JPG (61.29 KiB) Viewed 870 times
Mx74
Posts: 23
Joined: Fri Dec 08, 2017 12:39 pm

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby Mx74 » Mon Dec 11, 2017 6:17 pm

Hello,

Thank you for your quick answer. I read already the tuto, but couln't find a solution to my problem.

I import my test.stl, and convert it into an objet (thank you for this, that was a part of my previous problem).
Now, it' recognize as a body, and I can mesh it. But then I can't mesh anything else.
When I select another body (like a bigger cube for the computational domain), i have the option visible, but when I click, it's just blank. I can't launch the meshing process.

I try with another cube created with Freecad (cube the smaller cube).
Same, I can mesh it, but then nothing else.

I'm stuck here.

And also, the body I get from the stl, doesn't appear as an object for cfd boundary condition to define it as a wall, only the two cube appear.


I can't join a file test, it's 3Mo and it is said to be too large.
User avatar
Kunda1
Posts: 5783
Joined: Thu Jan 05, 2017 9:03 pm

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby Kunda1 » Mon Dec 11, 2017 7:23 pm

use dropbox or a 3rd party cloud hosting solution to share larger files.
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
Mx74
Posts: 23
Joined: Fri Dec 08, 2017 12:39 pm

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby Mx74 » Tue Dec 12, 2017 12:31 pm

Hello,

I attached a very simple file showing my problem.

I made a stl cube (cube stl). Import it to Freecad, transform it as a body via Mesh Design workbench.
And I make a bigger cube with Freecad for my domain.

Then I create a simulation.
I can select my cube stl and mesh it.
But then impossible to mesh the domain cube.
I tried with both cfmesh and gmsh, same behaviour.
I tried also with 2 cubes created with Freecad, same problem.

And when I want to define my boundary condition, I can't see my cube stl. Only the domain cube is visible in the dropdown list, even if not meshed.

I must make a very silly mistake, but which one?
Or my installation is buggy?

I downloaded the last Freecad 0.17 six days ago (revision 12772), and then installed the dependency automatically. BlueCore CFD comes automatically in version 2016 with open Foam 4.

Thank you a lot for your help !
Attachments
test.FCStd
(68.87 KiB) Downloaded 19 times
thschrader
Posts: 1421
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby thschrader » Tue Dec 12, 2017 2:35 pm

@Mx74:
testCube.FCStd
(577.86 KiB) Downloaded 23 times
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12772 (Git)
Build type: Release
Branch: master
Hash: c8c9b76f43d2c78c4afb65b756f3f07d626aac85
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: German/Germany (de_DE)
cfd1.JPG
cfd1.JPG (223.39 KiB) Viewed 776 times