|
[Sponsors] |
Hull two phase simulation, help for a beginner |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 9, 2017, 16:14 |
Hull two phase simulation, help for a beginner
|
#1 |
New Member
Join Date: Nov 2017
Posts: 10
Rep Power: 9 |
Hi mates,
sorry to write you for help in what I expected to be quite an easy task, but I made many tests and still cannot find a clear solution. So, I'm testing StarCCM+ since about one moth and got the principles for a single phase subsonic simulation. The problem, I'm a naval architect and will try to perform hull resistance prediction by CFD. Here is till not about getting a reliable results... it's more about getting a result.... My test model is as follows: - a simple extruded hull form having sharp leading edge (bow) and shart trailing edge (stern), circular arc sides. Length is 1.5m. - a rectangular box having 20m in length, extending 8 lengths forward the hull and 12 times aft. - a coarse mesh refined from 350mm (base size) to 30 mm in touch with the hull and at free surface, 0.35m over and 0.25m under it. - Settings of the physical model are: - steady - segregated - turbolent - k-w turbolence model (SST), without touching any parameter - eulerian multiphase - volume of fluid - gravity The inlet , sides and bottom are velocity inlet, as I read that this is advantageous. Please explain, if possible...! I also tried wall on sides and bottom, and combinations of both... The outlet is now fluw-split outlet, with ratio 1.0. I tried a normal pressure outlet with many problems. Can you confirm this is ok? The top I tested with pressure outlet and velocity inlet, the last being better IMHO. Water level for the inlets and initial conditions is defined by two field functions as per tutorials and everything seems fine. Now the problems: 1) When I started my first simulation, iteration 1 was ok from the VOF point of view, but starccm+ quickly converged to a funny solution. The water was peeing into the box through the inlet, running at high speed on the bottom of the box and running out through the outlet. The most of the region was just air. 2) Then I tried flow-split outlet instead of pressure: I thought I found the solution but such kind of solution re-appeared in other simulation (for example with pressure outlet top or wall as bottom... then I switched to velocity inlet top and bottom). 3) After many and many iterations (four thousands about) the model was converging to a solution with the water level where it was expected to be, a little higher and well defined volume fractions... but at certain point diverged to a solution having 50% VOF of air and 50% water in all the cells... and stopped. The free surface was still not properly solved, with absolutely random colors... this is why I was still running the software 4) Now with above mentioned settings at least it is still working, even if not converging: after nearly 2000 iterations the residua do not want to converge and forces on the hull are somehow unexpected: - Y is quite okay, close to zero, sometimes on one side, sometimes on the other - Z is terrible... 8 to 15 thousands Newton up, while buoyancy forces are expected about 2.5 kN. - X is simply directed forward instead of backward. Sometimes strongly oscillating from +500 to -500 N in few iterations. 5) as far as the simulation seems to converge and residues are smoothly going down to the order of E-4, VOF still E-2... Residulas start to shake and any convergence trend is lost. I tried to re-enable secondary gradients (which I suspended at the beginning hoping in better convergence) but nothing... Will try to refine further the mesh at interface... I'm still going on testing, but I feel quite uncomfortable because I can't find a rule to these problems... Maybe I should not use VOF? Should I use coupled solver? (will test) Why can't I set bottom as wall? Why water can diverge just flowing out from my domain and running on the bottom of it? I know this is phisically normal (canals...) but this is not what I want to simulate... Thanks to everyone! |
|
December 10, 2017, 09:34 |
|
#2 |
New Member
Join Date: Nov 2017
Posts: 10
Rep Power: 9 |
Well, I made some testing:
1) I understood I cannot use coupled solver with VOF 2) I found some confirmations that VOF is the correct approach for a hull in free surface flow 3) I got an acceptable convergence trend by setting all boundaries as velocity inlet, apart from the outlet, which is a flow-split outlet. 4) At a certain point (about 200 iterations) the residues stopped to reduce but the free surface was still not well defined. I decided to test two solutions: - enable secondary gradients (no effect) - reduce mesh size This second approach lead to a limited success: I reduced mesh size close to free surface down to 32mm (obtaining 30 millions cells and lot of swap). The calculation went on with better convergence trend for about 40 iterations, then residues became irregular again and nothing better could be achieved. I could not improve my mesh as my calculation resources are limited. I decided to restart from the beginning with a smaller domain and now is running again. First iterations with secondary gradients disabled and mesh size 400mm, 50mm in the free surface area. Then I will switch, hopefully to 25mm cells. Is it ok? Is enough? Is to small? Is there something else I can do to improve calculations? Why I still get some cells far from the surface having volume fractions different from 1 (water only) or 0 (air only)? |
|
December 10, 2017, 12:32 |
|
#3 |
Member
Soroush Kargar
Join Date: Apr 2017
Posts: 45
Rep Power: 9 |
Greetings
As I found thus far, you haven't set the initial conditions and that's most likely why the water starts to "bleed" in through the velocity inlets. and about the outlet, Pressure Outlet is the best approach. Here is the things you should consider: 1) Use segregated solver, gravity and eulerian multiphase; the reason your free surface doesn't appear is that you didn't set the initial condition for that as a Flat wave condition and setting the 2 phases of the flow. For that you have to define Water and Air as the 2 phases you are working with in the Materials. You can add them in Eulerian multiphase tab. 2) As for as many Velocity inlets you have, you should define the different phases and mass fraction and flow velocities for them. 3) In the end, you have to be very careful with the mesh specially on the free surface if you want to model the free surface and wave resistance. One rule of thumb is that if you ONLY want to see the drag force and dont care much about the wave or residual resistance, u can model only the wetted surface specially during a Steady State run. In that case you don't need an Eulerean multiphase since you only have the water to work with. Hope that helps P.S: you can exercise with the STAR's tutorial within its Help. Specially the KCS Drag tutorial which is exactly the case Cheers |
|
December 10, 2017, 15:22 |
|
#4 |
New Member
Join Date: Nov 2017
Posts: 10
Rep Power: 9 |
Hi Seervan, thank you so much for writing!
Well: in my model initial conditions and inlets are set with field functions defining the VOF of water under the free surface and that of air over the free surface. Pint 1: Infact at the first iteration everything is ok and the water is up to the desired level. Then the domain empties in few iterations and the, if everything is ok, it fill up again, alittle higher than the level I set in the field function for the inlet. It seems that right after the inlet the water accumulate over the level. I tested right now with pressure outlet after having run for 500 iterations using flow-split outlet. With fluid-split everything seemed ok, but convergence was still far and the velocity seemed too low (i set 0.5 m/s while I had something between 0.001 and 0.something... and few cells with 24 m/s. Point 2: done Point 3: how the mesh dimension should be if I want to get good convergence and capture wave resistance? I'm trying to get something about 25mm, while my body is 1.5 m in length. Your consideration about drag is itneresting. How the boundary condition should be if I don't model multiphase? Do you put a boundary wall (maybe with slip condition) in way of the free surface? Or maybe a simmetry condition? Thanks again for your time! |
|
December 11, 2017, 05:46 |
|
#5 |
New Member
Join Date: Nov 2017
Posts: 10
Rep Power: 9 |
Thank you again Seervan for your suggestion about the manual. At a first sight I didn't find the KCS tutorial: I looked better and I found it perfect for my scope.
I found that I had to set VOF waves and use the relevant scalar measures such as pressures. Now I'm testing again with my small model: still not ok but much better. Also, I understood why using pressure outlet all my domain was emptying through the back... I had to set a head pressure on the outlet, and this is physically obvious (...now that I know ...) As far as I will have enough RAM I will complete the whole container ship numerical propulsion test! Could you please just explain me how do you perform drag calculation without free surface? Wall on the free surface or simmetry condition? |
|
December 12, 2017, 04:24 |
|
#6 |
New Member
Join Date: Nov 2017
Posts: 10
Rep Power: 9 |
Nothing.... I tried with all the settings of the KCS guide: my domain is proportionally larger and this is cause of higher number of cells.
However I proceeded refining the mesh day by day. After refinement residues go a bit down for 20-30 iteration, then flat and shaking. I refine again and can get something more, but I'm far from convergence: 5E-3 for continuity, water fraction and the X,Y,Z momentum... Byt the worst thing is that there is not any idea of wave pattern due to a hull... Only random crests and thoughs having random shape... The only difference between the guide and my model, apart from my hull which is very easy extruded body, is that I'm using k-w model instead of k-e. I believe this hardly can make a difference on the whole free surface wave pattern... |
|
December 12, 2017, 05:39 |
|
#7 |
Member
Soroush Kargar
Join Date: Apr 2017
Posts: 45
Rep Power: 9 |
Greetings Dear Piero
I'm glad that you had some advances. First I'm going to tell about the drag test without free surface. In that case you have some options. You only subtract the underwater part of the ship from the Block you are working with as a virtual tank. Almost in all conditions port and starboard sides of the tank got to be Slip-Wall or Symmetry condition. But one crucial thing is that you must set the boundary where previously was you free surface, as Symmetry boundary condition. Also you don't have to be worry about the validness of the situation since it has been accepted by ITTC. Having wetted surface has a great advantage over the whole mode: 1) you don't have to compute multiphase flow 2): You can run it as steady state. 3) Much lower computation cost. You can get good ideas following the works of Toxopeus such as: "Investigation of water depth and basin wall effects on KVLCC2 in manoeuvring motion using viscous-flow calculations" By S. L. Toxopeus • C. D. Simonsen • E. Guilmineau M. Visonneau • T. Xing • F. Stern |
|
December 12, 2017, 05:49 |
|
#8 |
Member
Soroush Kargar
Join Date: Apr 2017
Posts: 45
Rep Power: 9 |
About the meshing over the free surface. It's kind of a try and mistake task. You have to play with the numbers. And know that the procedures told in the tutorial about the macros and meshing aren't that much necessary. You have to consider these: Have a prism layer over the ship and over the free surface. For free surface you can make 2-3 thin blocks where the free surface is which they are different in height gradualy and then play with the numbers.
It's better to play with the numbers by the mean of percentage since it can be more comparable. Set all the parameters then change the Base size of the mesh. Or you can create surface or volume controllers to apply these changes locally. Hope that works Best of luck |
|
December 12, 2017, 08:34 |
|
#9 |
New Member
Join Date: Nov 2017
Posts: 10
Rep Power: 9 |
Oh God I think yiou hit the point. I'm running my free surface simulation as a steady state... I thought if there wasw no heave and trim I could leave it steady state!!
Thank you, Seervan, will try better!! And thanks for the suggestion about drag! Will test |
|
December 12, 2017, 09:29 |
|
#10 |
Member
Soroush Kargar
Join Date: Apr 2017
Posts: 45
Rep Power: 9 |
So that's one of the most crucial parts. When you have free surface there is almost impossible to run it in steady state.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
simulation two phase closed thermosyphon | mohammad reza | FLUENT | 3 | November 1, 2016 04:58 |
Simulation of flow around a ship hull using fluent and Openfoam | manoj_nav | FLUENT | 0 | December 17, 2015 02:05 |
Simulation of Phase change material (PCM) and nanoparticles together | farah | Main CFD Forum | 0 | November 2, 2015 15:30 |
Reverse Flow Problem. (Hull with a Bulbous Bow )Towing Tank simulation. | Nyarla | Siemens | 2 | March 13, 2012 20:04 |
a question about two phase simulation | xck1986 | OpenFOAM Running, Solving & CFD | 0 | June 16, 2011 12:00 |