A tutorial on cavitation two-phase flow modeling

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
Moha
Posts: 3
Joined: Sat May 08, 2021 3:04 pm

A tutorial on cavitation two-phase flow modeling

Post by Moha »

Dear All,

I am new to #code_saturne and I would like to do a simulation of #cavitation #two-phase flow.

I tried to do simulations on single-phase flow and it was a success, but I always got errors if I change to the VoF solver (evaporation and condensation). Please, can you make a tutorial to guide me to solve this problem without computation error? How to implement pressure inlet boundary conditions?

Attached you can find the sketch of the case study!
img3298.gif
(8.23 KiB) Not downloaded yet
Last edited by Moha on Wed May 12, 2021 9:48 am, edited 1 time in total.
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: A tutorial on cavitation two-phase flow modeling

Post by Yvan Fournier »

Hello,

There have been several requests for this sort of documentation in the last few months.

I do not have an example case for this, but I'll check with colleagues who might be using this option.

And of course, anyone who has an example available is welcome to answer also...

Best regards,

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

Re: A tutorial on cavitation two-phase flow modeling

Post by Luciano Garelli »

Hello,

I did a simple test using the cavitation model some time ago, but I didn't complete a full validation test. I just update the test case for CS 6.0.4.

I upload the necessary files (data, mesh, user files) and also some additional documents about the test.

I hope this helps you as a starting point.

Regards,

Luciano
VOF_Cavit_Test.zip
(3.22 MiB) Downloaded 161 times
animation.gif
Moha
Posts: 3
Joined: Sat May 08, 2021 3:04 pm

Re: A tutorial on cavitation two-phase flow modeling

Post by Moha »

Dear Luciano,

Thank you very much for your case and help!

I guess you set up the case on a Text-User Interface and with modification in the source code, not?

Because when I tried to open the case on code_saturne GUI I couldn't find any settings (i.e., boundary conditions, solver setup, .. etc) "attached!"

I still have a problem with the code_saturne GUI, I can't setup the case correctly and I got a solver error " **********************
Starting calculation
**********************


*****************************
Post-calculation operations
*****************************

solver script exited with status 1.

Error running the calculation.

Check code_saturne log (listing) and error* files for details.

Error in calculation stage.
" every time.

Can anyone show me what I did wrong with the setup? I am sharing the setup shoots
Also, is there an option for the pressure inlet boundary conditions?
Screenshot from 2021-05-17 08-49-14.png
Screenshot from 2021-05-17 08-49-30.png
Screenshot from 2021-05-17 08-49-56.png
Luciano Garelli
Posts: 280
Joined: Fri Dec 04, 2015 1:42 pm

Re: A tutorial on cavitation two-phase flow modeling

Post by Luciano Garelli »

Hello,
Moha wrote: Mon May 17, 2021 7:53 am I guess you set up the case on a Text-User Interface and with modification in the source code, not?
No, I am using the GUI to set up the case and most of the BC's. The user files are used to define the void fraction at the inlet and the outlet pressure.

What version of CS are you using? Could you share the log files to check what is the error?

Regards,
Luciano
Moha
Posts: 3
Joined: Sat May 08, 2021 3:04 pm

Re: A tutorial on cavitation two-phase flow modeling

Post by Moha »

I use code saturne 6.3.0

Here is the setup!
setup.xml
(7.62 KiB) Downloaded 141 times
here is the error log


/home/alagha/Code_Saturne/code_saturne-6.3.0/src/base/cs_boundary_conditions.c:693: Fatal error.


Some boundary condition definitions are incomplete or incorrect.

For details, read the end of the calculation log,
or visualize the error postprocessing output.


Call stack:
1: 0x7f66b68d9ce4 <cs_boundary_conditions_error+0xa4> (libsaturne-6.3.so)
2: 0x7f66b700a577 <__cs_c_bindings_MOD_boundary_conditions_error+0xe> (libsaturne-6.3.so)
3: 0x7f66b6a0ed05 <typecl_+0x5a45> (libsaturne-6.3.so)
4: 0x7f66b689a5a1 <condli_+0xe11> (libsaturne-6.3.so)
5: 0x7f66b6a071d7 <tridim_+0x2a64> (libsaturne-6.3.so)
6: 0x7f66b687a527 <caltri_+0x1c2f> (libsaturne-6.3.so)
7: 0x7f66b794fb48 <main+0x708> (libcs_solver-6.3.so)
8: 0x7f66b77490b3 <__libc_start_main+0xf3> (libc.so.6)
9: 0x56050bdea06e <_start+0x2e> (cs_solver)
End of stack
Luciano Garelli
Posts: 280
Joined: Fri Dec 04, 2015 1:42 pm

Re: A tutorial on cavitation two-phase flow modeling

Post by Luciano Garelli »

Hello,

The error log is telling you that
Moha wrote: Mon May 17, 2021 7:40 pm Some boundary condition definitions are incomplete or incorrect.
and
Moha wrote: Mon May 17, 2021 7:40 pm For details, read the end of the calculation log,
or visualize the error postprocessing output.
Did you check which BC is not defined?

My recommendation is to use the lasted production version.

I will try to test the case with CS 6.3.

Regards,

Luciano

EDIT:

I run the case that I have shared with CS 6.3 and run without problem, so I guess that this error refers to your case. So, you should check the boundary condition definitions.
Post Reply