CFD tutorials from opensim - UAV - 03 macro

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

Post Reply
eggy
Posts: 31
Joined: Thu Jul 30, 2015 12:56 pm

CFD tutorials from opensim - UAV - 03 macro

Post by eggy »

First, thanks to all who have brought this to FreeCAD; I am learning so much.
I have worked through the opensim tutorials, however, I have a few questions about some of the details.

The CFD - UAV tutorial runs OK, but has some differneces from the documentation included. In macro 03-refineMesh.FCMacro, lines 34 to 40 references a few seemingly disconnected faces:

Code: Select all

CfdMeshRefinement.makeCfdMeshRefinement(App.ActiveDocument.Slice_Mesh)
referenceList = []
referenceList.append(('Slice','Face55'))
referenceList.append(('Slice','Face14'))
referenceList.append(('Slice','Face6'))
referenceList.append(('Slice','Face7'))
FreeCAD.ActiveDocument.MeshRefinement002.References = referenceList
I am wondering what the list of these 4 faces actually accomplishes. They do not make one part, and are disconnected.

My second question is that the documentation for the UAV tutorial shows a refine mesh dialog box that has a Primitive Type dropdown box that is not present on my setup of FreeCAD:

Code: Select all

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16110 (Git)
Build type: Release
Branch: (HEAD detached at upstream/releases/FreeCAD-0-18)
Hash: f7dccfaa909e5b9da26bf50c4a22ccca9bb10c40
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
It seems a sphere is automatically setup in the same included macro 03-refineMesh.FCMacro as above, so I got around having to make it through the dialog box anyway.

My last question is about the mesh refinement dialog that asks you to pick a point inside the mesh. For any exterior flow problem like the UAV example, do you pick a point inside the box, but outside of the shell (the UAV in this case), or do you pick a point inside the shell (the UAV)? My gut is saying outside the shell (UAV), so that the mesh is refined on the skin, and not confused with the inside of the shell (the UAV).

Again, thank you so much. I am learning about CFD when I thought I would never be going down this path, and I am finding it addictive!

Rob
User avatar
oliveroxtoby
Posts: 840
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: CFD tutorials from opensim - UAV - 03 macro

Post by oliveroxtoby »

eggy wrote: Thu Sep 12, 2019 10:27 pm First, thanks to all who have brought this to FreeCAD; I am learning so much.
I have worked through the opensim tutorials, however, I have a few questions about some of the details.

The CFD - UAV tutorial runs OK, but has some differneces from the documentation included. In macro 03-refineMesh.FCMacro, lines 34 to 40 references a few seemingly disconnected faces:

Code: Select all

CfdMeshRefinement.makeCfdMeshRefinement(App.ActiveDocument.Slice_Mesh)
referenceList = []
referenceList.append(('Slice','Face55'))
referenceList.append(('Slice','Face14'))
referenceList.append(('Slice','Face6'))
referenceList.append(('Slice','Face7'))
FreeCAD.ActiveDocument.MeshRefinement002.References = referenceList
I am wondering what the list of these 4 faces actually accomplishes. They do not make one part, and are disconnected.
This is just to give an example of refining the mesh in certain critical areas. There is no requirement that they be connected.
My second question is that the documentation for the UAV tutorial shows a refine mesh dialog box that has a Primitive Type dropdown box that is not present on my setup of FreeCAD:
Yes, the tutorials are increasingly out of date with the workbench, and will become more so unless there is any kind of community involvement.
My last question is about the mesh refinement dialog that asks you to pick a point inside the mesh. For any exterior flow problem like the UAV example, do you pick a point inside the box, but outside of the shell (the UAV in this case), or do you pick a point inside the shell (the UAV)? My gut is saying outside the shell (UAV), so that the mesh is refined on the skin, and not confused with the inside of the shell (the UAV).
Correct - you pick the point where you want to the mesh to be.
Again, thank you so much. I am learning about CFD when I thought I would never be going down this path, and I am finding it addictive!
Thanks - happy to hear it!
eggy
Posts: 31
Joined: Thu Jul 30, 2015 12:56 pm

Re: CFD tutorials from opensim - UAV - 03 macro

Post by eggy »

Thanks for the quick feedback!

I am far from an expert, but maybe if I get my example working, I will try and copy the examples page and update it with newer WB screenshots?

I have moved on to a more complex geometry, and the first mesh is taking forever just to write the mesh case, so I will go back and see where this might be happening. Is there a way to get an error other than the python or report console in FreeCAD?
Is SnappyHexMesh worth trying over cfmesh here?

I revised the macros from the UAV project to suit the new geometry, and I will try those to automate my one-variable-at-a-time change to troubleshoot.

Still having fun!

Rob

EDIT: one more thing about the point inside mesh. In the UAV example, do I want to pick a point internal to the UAV's outer shell, or anywhere outside of it within the containing cube/box?
Post Reply