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

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

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby oliveroxtoby » Wed Mar 13, 2019 3:45 pm

wafi wrote:
Wed Mar 13, 2019 9:28 am
Hi Thomas
I think I have managed now the problem to show the water surface including waves. The problem seems to be the meshing of the water surface. If you only use the initialisation zone you are defining with 1/0 the box for water, but that it. I defined now 2 zones, one atmosphere and one water and the top face of the water zone I`ve put into the mesh region to be refined as surface. Doing so, I am able to extract the isosurface in paraview and I getting a nice view of the water surface waves. (meshed with cfmesh). I have tried to do same with snappyhexmesh, but that did not work, I had to change some dicts with atmosphere and water box, it seems that snappyhexmesh would work with this named items and creating a refined mesh of water surface.
@Oliver
I think we need a tool to define a box for phases i.e. water / atmosphere including the material properties of each phase and an automatic refinement of the boundary of the phases.
Could you explain what is inadequate about the present formulation? You should not need two initialisation zones, as long as you initialise the fields with air and create a box for water, or vice versa. The tool should remain as generic as possible - if you want refinement, you can easily add it where you need it, but I do not think this is something that should happen automatically.
thschrader
Posts: 1403
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby thschrader » Wed Mar 13, 2019 4:24 pm

wafi wrote:
Wed Mar 13, 2019 9:28 am
@Oliver
I think we need a tool to define a box for phases i.e. water / atmosphere including the material properties of each phase and an automatic refinement of the boundary of the phases.
As Oliver said:
I initialize the complete field with zero water fraction,
then later the initialization zone (the blue cube) with water=1. Only the mesh inside
the cube is water, the rest is automatically set to air.
Your boat: how did you manage a constant flow around the hull?
initialize_field.JPG
initialize_field.JPG (81.84 KiB) Viewed 653 times
wafi
Posts: 66
Joined: Sat Oct 15, 2016 8:45 am

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby wafi » Sun Mar 17, 2019 8:20 am

Dear all,
sorry for late reply, but this week was ... let`s say interesting ... so I just was able to try to check it again since yesterday ...
Whatever, Thomas, I agrree that it should work to have the general definition of 0 and a special definition with 1 in an initialation zone ... Unfortunately that does not work, I tried it again, result it was not possible to see the boundary between atmosphere and water ... and the waves of cause. It was also not possible to increase the refinement of meshing in this area. If explizid an initialazation zone atmosphere with 0 and a zone water with 1 is defined the water surface is defined, the waves can be seen, as well as a refinement is possible and the python window is showing also that the program is looking for a href file, not been seen without this explicid definition.Try it yourselfe.

Thomas,
there will be no constant flow around a hull. Impossible. Otherwise it would not be possible to have a circulation arround the hull/keel/rudder. I think the problem is, to have a huge testing area. In the moment with 25m width vs app. 5m width of the hull (due to drift angle) and only 5m water depth, too small to avoid additional effects due to Bernoulli. The "trick" to mirror the hull at midshipsplane and therfore to have a wide testing area due to mirror the calculation, does not work with a hull with drift angle and heeling. On the other hand it will take a hell of time to run one calculation. I do not have a final idea to solve this problem. On the other hand, the question is, what lift you will produce and an optimization is not a question of the figures of lift and drag, but a question of optimization of lift/drag under water in combination of lift/drag of sails above water.
thschrader
Posts: 1403
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby thschrader » Fri Mar 22, 2019 8:18 pm

Hi wafi,

sorry for my late reply. I think your simulation-problem is extremely complicated (better: sophisticated).
A long time ago a read these books:
https://www.amazon.de/Die-Aerodynamik-S ... 3768810178
https://www.amazon.de/Aerodynamik-Hydro ... 3768803902
https://www.weltbild.de/artikel/ebook/s ... gKWLvD_BwE

I find these books absolutely fascinating.
The author, Czeslaw Marchaj, did his job. And man, the physics/aerodynamics/hydrodynamics of sailingboats is
very hard stuff. Especially, when the problems are combined. Can we do that with FeeCAD-cfdof?
Not the whole stuff, but we could seperate some questions. For instance: calculate hull-perfomance with zero heeling
and no wave interaction. This can be done with simpleFoam. The first step on a long run.
Some ideas.
Thomas
wafi
Posts: 66
Joined: Sat Oct 15, 2016 8:45 am

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby wafi » Sat Mar 23, 2019 7:18 pm

Hi Thomas
of cause Marchaj is good. The book, "Seetüchtigkeit der vergessene Faktor" is not my favourite book, in my point of view it is more driven by Fastnet Race 79, whatever, a point to discuss only with some Jever as fuel for discussions :mrgreen: If you are in our area (Schleswig) you`re welcome. Summer will start 5th of April and boat will be back in water and always some Jever in the fridge.

Combination of aerodynamic and hydrodynamic is hard, I do not think that it is a good idea to try to combine this. Easier is to separate this questions and to use only the results to bring forces/moments into the picture. That`s what we did also in the past for tank testing of boats. Zero heel is not an option for a sailing boat, also drift angles have to be included. In general it is not a problem for openfoam, also waves are not a problem i.e. with wave2foam dictionaries. The problem for the cfdof is to create a gui to handle the different dictionaries. With interfoam we are a good step ahead and Oliver etc made a real good job. For me the problem of meshing also with dynamical meshes would be great, InterDyMfoam would be perfect, of cause this would need to bring in weight/moment of inertia etc to have the possibility of 6 dof, and ... in the future some methods to implement the wave2foam dictionaries.
wafi
Posts: 66
Joined: Sat Oct 15, 2016 8:45 am

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby wafi » Sun Mar 24, 2019 9:30 am

btw,
I just downloaded the ihfoam gui, enabling waves based on interfoam, programmed in python. Maybe a possibility for easier implementation additional openfoam features into cfdof wb. Here the link: http://ihfoam.ihcantabria.com/model/gui/

best regards
Peter
User avatar
Crossleyuk
Posts: 46
Joined: Wed Jun 20, 2018 7:47 am
Location: United Kingdom
Contact:

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby Crossleyuk » Mon Mar 25, 2019 3:55 am

Hi again guys. Made fantastic progress since your great help and I have my first complex Boolean Fragment Mesh model. below:
12in Original VXC.PNG
12in Original VXC.PNG (54.48 KiB) Viewed 427 times
12in Original VXC Boolean Mesh.PNG
12in Original VXC Boolean Mesh.PNG (82.8 KiB) Viewed 427 times

As I hope I've shown, the complex body has four inlets and one outlet and represents the internal flow region of the device. The axial inlets enter the device tangentially and set up a strong vortex that leaves via tapered exit and outlet, still spinning.

A simpler version with no tapered outlet tube (diffuser) worked reasonably well with a mesh base element size of 1.7mm. It gave me results that I could graph to show diametric pressure profiles.
X Inlet Face & Chart.png
X Inlet Face & Chart.png (31.28 KiB) Viewed 427 times
Z Inlet Face & Chart.png
Z Inlet Face & Chart.png (24.76 KiB) Viewed 427 times

This seemed to be making good sense so I moved onto the above extended model and it will not work at all, I can only get about 100 iterations before failure.
12inVXC CFD - Rev P2 82 Itns Fail.PNG
12inVXC CFD - Rev P2 82 Itns Fail.PNG (142.84 KiB) Viewed 427 times

I don't expect explanations at this time and I'm still working hard on understanding it all, but I have one question.

I don’t see this model as over complex and would expect it to be successful, but my concern is the fine mesh in the exit pipe. I need to expand axially the mesh in this region to reduce the number of nodes but haven’t been able to do that yet. SnappyHexMesh is what I need but will not work for the Boolean Fragment. Would you agree that this is what I need to do?

Sorry for the long post so going to leave it here and carry on searching but thanks in anticipation.

Model is too large to post here but will try again ;) :lol:
User avatar
Crossleyuk
Posts: 46
Joined: Wed Jun 20, 2018 7:47 am
Location: United Kingdom
Contact:

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby Crossleyuk » Mon Mar 25, 2019 3:58 am

Here it is without the mesh, the mesh takes it to 3.8Mb:
12inVXC CFD - Rev P2 No Mesh.FCStd
(77.08 KiB) Downloaded 15 times

Cheers 8-)
User avatar
oliveroxtoby
Posts: 281
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby oliveroxtoby » Mon Mar 25, 2019 7:55 am

Crossleyuk wrote:
Mon Mar 25, 2019 3:55 am
I don’t see this model as over complex and would expect it to be successful, but my concern is the fine mesh in the exit pipe. I need to expand axially the mesh in this region to reduce the number of nodes but haven’t been able to do that yet. SnappyHexMesh is what I need but will not work for the Boolean Fragment. Would you agree that this is what I need to do?
Your model seems to work fine with snappy and cfMesh if you simply use the Union operation (in the Part workbench) instead of boolean fragments. I would try it with that first as the cut-cell cartesian meshes produced are more favourable to OpenFOAM than the gmsh tet meshes.
User avatar
Crossleyuk
Posts: 46
Joined: Wed Jun 20, 2018 7:47 am
Location: United Kingdom
Contact:

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby Crossleyuk » Sun Mar 31, 2019 8:57 am

Hi Oliver. Thanks, that solved the problem and I now understand.

Sorry if you were distracted by my last post about pressures, I found an error in my model so deleted it and started again.

Michael