VIIC 1:45 modell
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: VIIC 1:45 modell
thanks to @freecad-heini-1 for pointing out the slicing of lofts and parts the meshing is done ...
On to openfoam next.
On to openfoam next.
-
- Veteran
- Posts: 7788
- Joined: Tue Jan 07, 2014 11:10 am
- Contact:
Re: VIIC 1:45 modell
Thank you for this recommendation. I figured out the same to create complex parting plane for injection mold. Loft could replace ruled faces, so skip ruled faces for the future.
Re: VIIC 1:45 modell
Some short notes of the transfer from FC to OpenFoam:
1) If you are creating complex hulls you may want to make sure that your "tiles" consist of two splines and two straight lines. It is probably not a must every time, but you will have less rounding issues during the mesh process. This is how i did it in FC. Straight lines top and bottom, splines from aft to bow.
2) Double check that your parts do not interlock. Otherwise your meshing will probably fail with "intersection" errors.
3) Settings of gmsh i used. I did not use the FEM WB because i wanted to have a bit more control over the files created for the data interchange. You may want to set the import geometry tolerance from 1e-8 to 1e-2 depending on your hull. The interpolation between the various splines will leave "holes" otherwise. You can check that for example with an export to *stl file and do a test with Meshlab.
4) My Mesh settings
5) In gmsh add your various parts as volumes and do a 3D mesh.
6) Save mesh and move it to an OpenFoam project tree. Change "writeFormat" from "ASCII" to "binary" in your controlDict, otherwise the import will fail. Run "gmshToFoam your.msh".
7) Create an empty file in the OpenFoam project tree with just a name "foobar.openFoam" for example. It is only needed for paraview. Start paraview, open File -> Files of type (scroll to ALL files) -> click on your "*.openFoam". If everything went right you should see your 3D Foam Mesh.
8) Create the flow channel ... This is something for the next days. The idea for now is using blockmesh for the flowchannel and then snappyHexMesh for combining.
1) If you are creating complex hulls you may want to make sure that your "tiles" consist of two splines and two straight lines. It is probably not a must every time, but you will have less rounding issues during the mesh process. This is how i did it in FC. Straight lines top and bottom, splines from aft to bow.
2) Double check that your parts do not interlock. Otherwise your meshing will probably fail with "intersection" errors.
3) Settings of gmsh i used. I did not use the FEM WB because i wanted to have a bit more control over the files created for the data interchange. You may want to set the import geometry tolerance from 1e-8 to 1e-2 depending on your hull. The interpolation between the various splines will leave "holes" otherwise. You can check that for example with an export to *stl file and do a test with Meshlab.
4) My Mesh settings
5) In gmsh add your various parts as volumes and do a 3D mesh.
6) Save mesh and move it to an OpenFoam project tree. Change "writeFormat" from "ASCII" to "binary" in your controlDict, otherwise the import will fail. Run "gmshToFoam your.msh".
7) Create an empty file in the OpenFoam project tree with just a name "foobar.openFoam" for example. It is only needed for paraview. Start paraview, open File -> Files of type (scroll to ALL files) -> click on your "*.openFoam". If everything went right you should see your 3D Foam Mesh.
8) Create the flow channel ... This is something for the next days. The idea for now is using blockmesh for the flowchannel and then snappyHexMesh for combining.
-
- Veteran
- Posts: 3129
- Joined: Sat May 20, 2017 12:06 pm
- Location: Germany
Re: VIIC 1:45 modell
Hi hds,
can you give some additional info?
What hardware do you use for cfd? (processor, number of cpus, RAM)
In you "ParaviewCut" pic from above I can see that your mesh (the meshed sub-body, right?)
contains more than 1,2 Mio FEM-cells. When I extrapolate this mesh refinement to the complete flow
domain, you will get approx 10 Mio cells .
What calculation you will run? I mean, is the sub submerged or do you want to simulate a
free surface (sub not submerged).
Is the sub your "original" hobby-model or is it scaled up to the real world?
I am wondering why you do not use the FreeCAD cfd-workbench.
You have 3 different meshers (gmsh, snappyhexmesh+blockmesh, cfmesh)
with the options of mesh-refinement and turbulence (boundary-layers).
regards Thomas
again: stunning project!
can you give some additional info?
What hardware do you use for cfd? (processor, number of cpus, RAM)
In you "ParaviewCut" pic from above I can see that your mesh (the meshed sub-body, right?)
contains more than 1,2 Mio FEM-cells. When I extrapolate this mesh refinement to the complete flow
domain, you will get approx 10 Mio cells .
What calculation you will run? I mean, is the sub submerged or do you want to simulate a
free surface (sub not submerged).
Is the sub your "original" hobby-model or is it scaled up to the real world?
I am wondering why you do not use the FreeCAD cfd-workbench.
You have 3 different meshers (gmsh, snappyhexmesh+blockmesh, cfmesh)
with the options of mesh-refinement and turbulence (boundary-layers).
regards Thomas
again: stunning project!
Re: VIIC 1:45 modell
I'am in the lucky position to have acces to various machines ranging from 12CPUs/8GB to 40CPUS/256GB RAM (Intel).
The mesh you see in paraview is not the final stage. This is just to show a reproducible way of generating the mesh. As you might have realized i'am by no means a CFD engineer.
I need the hydrodynamic coeffiencts of the submerged boat. In various articels about the navigation control of AUVs it is pointed out that especially the pitch control is very much non linear. You may realize it when watching model subs on an exhibition. They tend to be stable in a certain range of speed. Below and above there is some tendency for instability. Yes, i know that there are pitch controller out there. But as said above i like the challenge. Lets see where i end up. I don't mind if my effort does not pay off. In the end i learned how to create a ship hull in FC and dump that into OpenFoam. Fair enough.
The sub i build is a model 1:45. But there is no reason for not doing a real world CFD. Only need to scale up the model.
The cfd WB in FC cannot be installed (at least in the latest FCdaily i use). The cfdOF has the same limitation in usage as the "loft" tool. When it comes down to select the part you want to mesh, you are forced to select from this darn drop down list of lines, splines and such. I've been through this process of manually creating dozends of lofts on the pyhton console. Not again.
I couldn't get gmsh to create the mesh between the flow channel and the body of the sub. Probably something dumb, but i cannot figure it out of how to do it. Thats the deeper reason why i want to give blockMesh and snappyHexMesh a try.
The mesh you see in paraview is not the final stage. This is just to show a reproducible way of generating the mesh. As you might have realized i'am by no means a CFD engineer.
I need the hydrodynamic coeffiencts of the submerged boat. In various articels about the navigation control of AUVs it is pointed out that especially the pitch control is very much non linear. You may realize it when watching model subs on an exhibition. They tend to be stable in a certain range of speed. Below and above there is some tendency for instability. Yes, i know that there are pitch controller out there. But as said above i like the challenge. Lets see where i end up. I don't mind if my effort does not pay off. In the end i learned how to create a ship hull in FC and dump that into OpenFoam. Fair enough.
The sub i build is a model 1:45. But there is no reason for not doing a real world CFD. Only need to scale up the model.
The cfd WB in FC cannot be installed (at least in the latest FCdaily i use). The cfdOF has the same limitation in usage as the "loft" tool. When it comes down to select the part you want to mesh, you are forced to select from this darn drop down list of lines, splines and such. I've been through this process of manually creating dozends of lofts on the pyhton console. Not again.
I couldn't get gmsh to create the mesh between the flow channel and the body of the sub. Probably something dumb, but i cannot figure it out of how to do it. Thats the deeper reason why i want to give blockMesh and snappyHexMesh a try.
Re: VIIC 1:45 modell
Reality strikes back ...
Something went wrong in the plastification process. Probably something with the chemicals. So i have to redo the 132 frames because they are more or less a bit warped ....
Something went wrong in the plastification process. Probably something with the chemicals. So i have to redo the 132 frames because they are more or less a bit warped ....
Code: Select all
for (jacka=0,jacka<=42;jacka++) {
mv head -> locker(hard);
}
Re: VIIC 1:45 modell
at least the openFoam approach seems to be promising ... blockMesh for the flow channel and snappyHexMesh for the VIIC surface file.
Re: VIIC 1:45 modell
That's sad. Good luck, this is an amazing project.
hds wrote: ↑Tue Jun 12, 2018 10:26 amCode: Select all
for (jacka=0,jacka<=42;jacka++) { mv head -> locker(hard); }
-
- Veteran
- Posts: 3129
- Joined: Sat May 20, 2017 12:06 pm
- Location: Germany
Re: VIIC 1:45 modell
How do you connect both meshes?
As far as I know the blockmesh works only as a "background-mesh" for snappyhexmesh to start.
Which means the blockmesh must be bigger than the complete flow channel.
The meshing-pics below of my "submarine" are done with the freecad cfd-wb (snappyhexmesh with refinement).
As you can see, there is no mesh inside the submarine (cylinder) body. When you mesh the submarine-body
too, the water-flow goes through the sub, not around it.
Can you provide a step-file of your submarine body? (watertight solid body without rudders)
Would be intersting to see, how FC can handle this problem. (I believe it can...)
Programming the openfoam dictionaries "by hand" is very time consuming. Thats why the
cfd-of workbench was invented
regards Thomas
Re: VIIC 1:45 modell
The meshes are connected by snappyHexMesh. This picture is just a vizualisation of the surface of the hull and bottom and back of the flow channel.
You may download the step file here
It would be nice if you could post any findings here as well so that the knowledge is not lost.
Have fun.
Attached pls find some pics of the water flow in Y-direction (up/down) with a -0.5m/s water flow in Z-direction.
You may download the step file here
It would be nice if you could post any findings here as well so that the knowledge is not lost.
Have fun.
Attached pls find some pics of the water flow in Y-direction (up/down) with a -0.5m/s water flow in Z-direction.