UAV-tutorial / compressible-solver

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

UAV-tutorial / compressible-solver

Postby thschrader » Sun Aug 26, 2018 2:38 pm

Hi,
the opensimsa UAV-tutorial was updated.
First impressions:
Hard to mesh. When using the parameters from tutorial (base cell size 100 mm),
cfmesh gives back a bad mesh (with more then 1 Mio cells). The problems remains when
using cell-size 50 mm, the mesh is still looking weird.
When starting meshing, FC needs 3 min to generate the stl for OF.
Maybe thats a translation problem from XOR to stl.
I will try gmsh/SHM. Or the macros...

After updating the cfd-wb, there is a new solver option:
Compressible/High mach number:
Which solvers are used? rhoSimpleFoam and sonicFoam?

Fluid-properties, sutherland-constant:
The units kg/(m*s) imply that this is a dynamic viscosity. Is it the
reference-viscosity mu-0 in the sutherland-formula?

Initialise flow-field, temperature:
Is it the reference-temperature T-0 in formula?

Bondary conditions:
How must I use the new Far-field BC?

@oliver/bernd: great job guys, the cfd/fem-wb is a real stunning
engineering-tool :)
sutherland_formula.JPG
sutherland_formula.JPG (48.31 KiB) Viewed 719 times
maxCellsize_100mm.JPG
maxCellsize_100mm.JPG (219.33 KiB) Viewed 719 times
maxCellsize_50mm.JPG
maxCellsize_50mm.JPG (256.74 KiB) Viewed 719 times
thschrader
Posts: 1331
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: UAV-tutorial / compressible-solver

Postby thschrader » Sun Aug 26, 2018 3:51 pm

I will see, if I can transform the imported iges-shells (from grabcad)
into a watertight solid to be sure, that the booleans work properly.
In the curves-wb is a tool "Make a parametric solid from selected faces"
(the green cube). For the front wheel it works...
UAV_modelCheck.JPG
UAV_modelCheck.JPG (99.13 KiB) Viewed 704 times
thschrader
Posts: 1331
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: UAV-tutorial / compressible-solver

Postby thschrader » Sun Aug 26, 2018 4:40 pm

BTW:
The Millenium-Falcon tutorial on
https://opensimsa.github.io/training.html
has gone... :o
I_am_innocent.JPG
I_am_innocent.JPG (20.64 KiB) Viewed 695 times
HanSolo1.JPG
HanSolo1.JPG (24.78 KiB) Viewed 695 times
User avatar
oliveroxtoby
Posts: 216
Joined: Fri Dec 23, 2016 9:43 am

Re: UAV-tutorial / compressible-solver

Postby oliveroxtoby » Mon Aug 27, 2018 12:20 pm

thschrader wrote:
Sun Aug 26, 2018 2:38 pm
Hi,
the opensimsa UAV-tutorial was updated.
First impressions:
Hard to mesh. When using the parameters from tutorial (base cell size 100 mm),
cfmesh gives back a bad mesh (with more then 1 Mio cells). The problems remains when
using cell-size 50 mm, the mesh is still looking weird.
When starting meshing, FC needs 3 min to generate the stl for OF.
Maybe thats a translation problem from XOR to stl.
I will try gmsh/SHM. Or the macros...
Did you update the workbench before you did this? Because we have not experienced either of these issues.

EDIT: Sorry. I do have the mesh problem when I run it in 0.17. It is happy in 0.18. Investigating...
After updating the cfd-wb, there is a new solver option:
Compressible/High mach number:
Which solvers are used? rhoSimpleFoam and sonicFoam?
No, hisa.gitlab.io, a solver just released by my institution.

Fluid-properties, sutherland-constant:
The units kg/(m*s) imply that this is a dynamic viscosity. Is it the
reference-viscosity mu-0 in the sutherland-formula?
No, unfortunately the units are wrong at present because FreeCAD currently doesn't accept fractional units (on my todo list). This is the C_1 constant referenced at https://www.cfd-online.com/Wiki/Sutherland%27s_law
Initialise flow-field, temperature:
Is it the reference-temperature T-0 in formula?
This is the initial temperature and it is used to calculate viscosity at initial time via the formula, but it doesn't relate to the reference temperature. The formula used uses C_1 and S, and T_0 is not used.
Bondary conditions:
How must I use the new Far-field BC?
It is for specifying uniform free-stream flow conditions far away from a body, typically an aircraft, and prevents reflections of shocks back into the domain.
@oliver/bernd: great job guys, the cfd/fem-wb is a real stunning
engineering-tool :)
Thank you for the testing!
User avatar
oliveroxtoby
Posts: 216
Joined: Fri Dec 23, 2016 9:43 am

Re: UAV-tutorial / compressible-solver

Postby oliveroxtoby » Mon Aug 27, 2018 12:21 pm

thschrader wrote:
Sun Aug 26, 2018 3:51 pm
I will see, if I can transform the imported iges-shells (from grabcad)
into a watertight solid to be sure, that the booleans work properly.
In the curves-wb is a tool "Make a parametric solid from selected faces"
(the green cube). For the front wheel it works...
UAV_modelCheck.JPG
That sounds like a really useful tool. But I have not had any issues with the tutorial as presented.

EDIT: My bad. It was working fine with latest 0.18, but not with 0.17. Investigating...
User avatar
oliveroxtoby
Posts: 216
Joined: Fri Dec 23, 2016 9:43 am

Re: UAV-tutorial / compressible-solver

Postby oliveroxtoby » Mon Aug 27, 2018 12:23 pm

thschrader wrote:
Sun Aug 26, 2018 4:40 pm
BTW:
The Millenium-Falcon tutorial on
https://opensimsa.github.io/training.html
has gone... :o
I_am_innocent.JPG
HanSolo1.JPG
It was not much of a 'tutorial' to begin with - the new UAV tutorial makes it obsolete. Is is still there on the repository - see https://github.com/opensimsa/opensim/tr ... tCases/CFD
thschrader
Posts: 1331
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: UAV-tutorial / compressible-solver

Postby thschrader » Mon Aug 27, 2018 2:09 pm

oliveroxtoby wrote:
Mon Aug 27, 2018 12:20 pm
Did you update the workbench before you did this? Because we have not experienced either of these issues.
Updated cfd-of, problem remains. I have reimported the written XOR_Geometry.stl from
trisurface. In the mesh-design wb you can analyze the stl. Try this on your machine.
When the stl writing process is identical, you should get the same result.
However, I will try to redesign the UAV in FC. This is a nice
model to play with curves/surface-wb. My system:
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14315 (Git)
Build type: Release
Branch: master
Hash: 5f8f26824486b55b2bf72c579e95f0f6d4a19284
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)
uav_cfmesh_tutorial.JPG
uav_cfmesh_tutorial.JPG (113.65 KiB) Viewed 632 times
checkMesh.JPG
checkMesh.JPG (124.28 KiB) Viewed 632 times
meshWB_analyse_stl.JPG
meshWB_analyse_stl.JPG (126.35 KiB) Viewed 632 times
User avatar
oliveroxtoby
Posts: 216
Joined: Fri Dec 23, 2016 9:43 am

Re: UAV-tutorial / compressible-solver

Postby oliveroxtoby » Mon Aug 27, 2018 8:44 pm

thschrader wrote:
Mon Aug 27, 2018 2:09 pm
oliveroxtoby wrote:
Mon Aug 27, 2018 12:20 pm
Did you update the workbench before you did this? Because we have not experienced either of these issues.
Updated cfd-of, problem remains. I have reimported the written XOR_Geometry.stl from
trisurface. In the mesh-design wb you can analyze the stl. Try this on your machine.
When the stl writing process is identical, you should get the same result.
However, I will try to redesign the UAV in FC. This is a nice
model to play with curves/surface-wb. My system:
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14315 (Git)
Build type: Release
Branch: master
Hash: 5f8f26824486b55b2bf72c579e95f0f6d4a19284
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)
uav_cfmesh_tutorial.JPG
checkMesh.JPG
meshWB_analyse_stl.JPG
This should be fixed now. I don't think it was appropriate to use XOR here. Slice seems to do the job. For some reason (probably sheer luck), XOR worked for me originally on a version that was linked to OCC 6.9 (which happened to be my 0.18 version, but it was nothing to do with that)...
thschrader
Posts: 1331
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: UAV-tutorial / compressible-solver

Postby thschrader » Tue Aug 28, 2018 2:19 am

oliveroxtoby wrote:
Mon Aug 27, 2018 8:44 pm
This should be fixed now. I don't think it was appropriate to use XOR here. Slice seems to do the job. For some reason (probably sheer luck), XOR worked for me originally on a version that was linked to OCC 6.9 (which happened to be my 0.18 version, but it was nothing to do with that)...
Slice (and the updated wb) is the way. Thanks for the fast fixing.
Lets have fun with the tutorial.
2nd_try_cfmesh.JPG
2nd_try_cfmesh.JPG (118.8 KiB) Viewed 595 times
thschrader
Posts: 1331
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: UAV-tutorial / compressible-solver

Postby thschrader » Wed Sep 05, 2018 12:41 pm

Updated cfd-of wb.
Updated cfmesh.
Installed HiSA-solver via preferences/cfd. Installation ok, dependencies ok.
I want to simulate the openfoam "prism" tutorial with FC (Mach 2 flow along prism)
When writing the case I still get error "compressible model currently not supported"
Maybe my workflow is wrong?
prism.FCStd
(18.97 KiB) Downloaded 14 times
prism_tutorial.JPG
prism_tutorial.JPG (24.1 KiB) Viewed 488 times
cfmesh_prism.JPG
cfmesh_prism.JPG (96.55 KiB) Viewed 488 times