Venturi pipe flow VOF convergence issue

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
lorenzo.iron
Posts: 18
Joined: Tue May 11, 2021 1:22 pm

Venturi pipe flow VOF convergence issue

Post by lorenzo.iron »

Dear All,

one year ago I discovered Code_Saturne and used it for axisymmetric simulations of internal flows in Venturi pipes used for steel bars cooling. In particular, the steel bar was represented by the bottom moving wall with imposed wall temperature (just for sensitivity analysis purposes).
Venturi_pipe.png
This year, I'd like to extend the model to account for cavitation and then for boiling in Code_Saturne 7.0.

Concerning the cavitation, I'd like to include it in the model because I've increased the inlet water flows and as a result I achieve a high speed increase and higher pressure drops, going below absolute zero at the Venturi necks.
To begin with, I switched on the VoF model via GUI ("Homogeneout Eulerian - VoF model" -> "Vaporization/Condensation Merkle model"), but it didn't work because the GUI doesn't foresees an input field to set the ivolf2 variable.
So, I copied to SRC and edited the cs_user_boundary_conditions.f90 in order to set ivolf2=0 (full water).
In order to have the VoF module working, despite the VoF was already set in the GUI, I had also to copy to SRC and edit the cs_user_parameters-base.c file, setting there all the parameters for the activation of the VoF.
So far so good!

Now, if I run the case unfortunately the simulation doesn't converge.
In the run_solver.log I read a Warning about the Void fraction resolution, asking for very tiny time steps, but I wasn't able to find a working setting.
The simulation diverges because of the near outlet high local pressure and speeds.
I tried also to change the solver parameters but without success.

I also tried to apply the "No mass transfer" VoF model, deactivating the Merkle option in the user_subroutine
//vof_param->vof_model = CS_VOF_ENABLED | CS_VOF_MERKLE_MASS_TRANSFER;
and activating only the Standard option
vof_param->vof_model = CS_VOF_ENABLED;
In this case the calculation converges but unfortunately the result is not good because void fractions remain unchanged and the pressure turns to go down to negative values. Moreover, the velocity field result turns out to be different respect to the one achieved with the "Standard Eulerian single phase" model, so I don't understand what the CS_VOF_ENABLED option is doing.

My questions are:
1) Can you help me in finding the mistakes with the VoF+Merkel solution stability?
2) How can I have the "No mass transfer" working?

You can find the example herein below attached.
VOF_Test.7z
(82.7 KiB) Downloaded 205 times
Thank you in advance,
Lorenzo
Yvan Fournier
Posts: 4153
Joined: Mon Feb 20, 2012 3:25 pm

Re: Venturi pipe flow VOF convergence issue

Post by Yvan Fournier »

Hello,

I'm not familiar with our VoF model, and an not sure our tutorial for this is out yet, but i reminded a colleaguewho actually worked on this model to check out this post.

So stay tuned :-)

Best regards,

Yvan
Luciano Garelli
Posts: 284
Joined: Fri Dec 04, 2015 1:42 pm

Re: Venturi pipe flow VOF convergence issue

Post by Luciano Garelli »

Hello Lorenzo,


I checked and ran your case with CS 7.0.4. The time step discretization in your setup was set to steady, but in this situation the regime is transient. The simulation now runs with a time step of 1e-4 s (Co max ~ 2.5) after the change. It is accurate to say that the maximum fluid velocity is around 27 m/s, which results in a negative (total) pressure in the venturi region.

In the lower pressure areas, void fraction is produced when the Vof + cavitation model is active.

video2.gif
Regards,
Luciano
Last edited by Luciano Garelli on Mon Oct 03, 2022 3:13 am, edited 1 time in total.
lorenzo.iron
Posts: 18
Joined: Tue May 11, 2021 1:22 pm

Re: Venturi pipe flow VOF convergence issue

Post by lorenzo.iron »

Hello Luciano,
thank you very much for your advice, now the simulation runs.

I've some questions:
1) if I run the simulation with the Time Step Option = "Constant" (and reference time step = 0.0002 as suggested) the simulation stacks because of an excess of fluid speed. Did you face the same issue?
2) if I run with the Time Varying (Adaptive) Option the simulation basically runs but the result is dependent on the choice of the parameter Maximal CFL Number. What CFL parameter did you set in your simulation?
3) Is there any other sensible parameter worth to mention?

I'm not 100% sure but it seems to me that the simulation result also changes depending on the number of CPUs i set...
... and one time I had errors due to the MPI.
I will further check tomorrow.

Anyhow, It could be of big help for me If you could share the modified Case file, so that I can try running it and see if I achieve the same results.

See for example the following different velocity profile with different CO
animation.gif
animation.gif
Thank you,
Lorenzo
Luciano Garelli
Posts: 284
Joined: Fri Dec 04, 2015 1:42 pm

Re: Venturi pipe flow VOF convergence issue

Post by Luciano Garelli »

Hello,
lorenzo.iron wrote: Thu Sep 29, 2022 1:11 am 1) if I run the simulation with the Time Step Option = "Constant" (and reference time step = 0.0002 as suggested) the simulation stacks because of an excess of fluid speed. Did you face the same issue?
No, but in your setup all the numerical scheme where in automatic, you can try to set to an upwind scheme.
lorenzo.iron wrote: Thu Sep 29, 2022 1:11 am 2) if I run with the Time Varying (Adaptive) Option the simulation basically runs but the result is dependent on the choice of the parameter Maximal CFL Number. What CFL parameter did you set in your simulation?
As I say.. for a dt = 1e-4 I get a CFL max ~ 2.5, you can read the BPG for more detail about time stepping. https://www.code-saturne.org/cms/sites/ ... meters.pdf

Mesh_32.med
(1.71 MiB) Downloaded 217 times
dt_0001.tar
(7.83 MiB) Downloaded 177 times
dt_0002.tar
(7.88 MiB) Downloaded 227 times
Regards,
Luciano
lorenzo.iron
Posts: 18
Joined: Tue May 11, 2021 1:22 pm

Re: Venturi pipe flow VOF convergence issue

Post by lorenzo.iron »

Hello Luciano and Yvan,

@ Luciano:
thank you for the update. I set the upwind scheme for velocity only and the simulation was running without interruptions.
My question is: did you use that Scheme in your simulations or it is just a workaround for me?
Minor question: why you prefer saving results in MED format?

@Yvan:
have you had any update by your colleague about the questions in my first post?
Additionally, I'd like to know what the following warning implies:
@
@ @@ WARNING: Void fraction resolution
@ ========
@ The current time step is too large to ensure the min/max
@ principle on void fraction.
@
@ The current time step is 0.20000E-03 while
@ the maximum admissible value is 0.37454E-07
@
@ Clipping on void fraction should occur and
@ mass conservation is lost.
@


Lots of thanks,
Lorenzo
Luciano Garelli
Posts: 284
Joined: Fri Dec 04, 2015 1:42 pm

Re: Venturi pipe flow VOF convergence issue

Post by Luciano Garelli »

lorenzo.iron wrote: Mon Oct 03, 2022 11:01 am Hello Luciano and Yvan,

@ Luciano:
thank you for the update. I set the upwind scheme for velocity only and the simulation was running without interruptions.
My question is: did you use that Scheme in your simulations or it is just a workaround for me?
The results of the previous post was with the schemes set in automatic and dt =1e-4 s. When your simulations don't converge you have to use the most conservative setting, like upwind

lorenzo.iron wrote: Mon Oct 03, 2022 11:01 am Minor question: why you prefer saving results in MED format?
https://docs.salome-platform.org/7/dev/ ... -file.html

https://www.hdfgroup.org/solutions/hdf5/ "HDF5 high performance data software library and file format to manage, process, and store your heterogeneous data. HDF5 is built for fast I/O processing and storage."

Regards,
Luciano
Post Reply