Jacobi: error (divergence) solving for Velocity
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
Jacobi: error (divergence) solving for Velocity
Hi everybody,
I am using Code_Saturne V.4.0.4 and my goal is to determine the cavitation aspect in the case of a venturi. For simplifying the problem I decided at first, to use a 2D geometry.
I have run my case without cavitation effect for 90000 iterations, I have observed some bad joining and/or bad mesh (paraview pictures are attached), however the simulation have been finished, the pressure and velocity are converged and the results are pretty good.
Then, I made use of this case for a cavitation simulation, so I applied the restart option in GUI and run another case from 90000th iteration where cavitation effect is activated (icavit = 1 in parameters subroutine).
The calculation started without problem, nevertheless I get the following error output after 2 iterations:
*******************************************************************
Jacobi [Jacobi]: divergence after 2 iterations:
initial residual: 2.6908e+06; current residual: 2.1288e+11
/home/firozi/code_saturne-4.0.4/src/alge/cs_sles_it.c:3934: Fatal error.
Jacobi: error (divergence) solving for Velocity
Call stack:
1: 0x2b820277854e <cs_sles_solve+0x28e> (libsaturne.so.0)
2: 0x2b8202a28ef9 <__cs_c_bindings_MOD_sles_solve_native+0x1ed> (libsaturne.so.0)
3: 0x2b8202558826 <coditv_+0x12da> (libsaturne.so.0)
4: 0x2b8202638561 <predvv_+0x6d91> (libsaturne.so.0)
5: 0x2b8202622c7e <navstv_+0x1ebe> (libsaturne.so.0)
6: 0x2b8202653cb0 <tridim_+0x4800> (libsaturne.so.0)
7: 0x2b82025318a1 <caltri_+0x2b41> (libsaturne.so.0)
8: 0x2b820251a875 <cs_run+0x3e5> (libsaturne.so.0)
9: 0x2b820251a9b5 <main+0x115> (libsaturne.so.0)
10: 0x3baf81ecdd <__libc_start_main+0xfd> (libc.so.6)
11: 0x4024e9 <> (cs_solver)
End of stack
*******************************************************************
I don`t know if this is right, but I suppose this may be due to bad mesh.
Has someone an idea how to fix this problem?
Listing is also attached.
Thank you very much in advance.
Best regards,
Amir
I am using Code_Saturne V.4.0.4 and my goal is to determine the cavitation aspect in the case of a venturi. For simplifying the problem I decided at first, to use a 2D geometry.
I have run my case without cavitation effect for 90000 iterations, I have observed some bad joining and/or bad mesh (paraview pictures are attached), however the simulation have been finished, the pressure and velocity are converged and the results are pretty good.
Then, I made use of this case for a cavitation simulation, so I applied the restart option in GUI and run another case from 90000th iteration where cavitation effect is activated (icavit = 1 in parameters subroutine).
The calculation started without problem, nevertheless I get the following error output after 2 iterations:
*******************************************************************
Jacobi [Jacobi]: divergence after 2 iterations:
initial residual: 2.6908e+06; current residual: 2.1288e+11
/home/firozi/code_saturne-4.0.4/src/alge/cs_sles_it.c:3934: Fatal error.
Jacobi: error (divergence) solving for Velocity
Call stack:
1: 0x2b820277854e <cs_sles_solve+0x28e> (libsaturne.so.0)
2: 0x2b8202a28ef9 <__cs_c_bindings_MOD_sles_solve_native+0x1ed> (libsaturne.so.0)
3: 0x2b8202558826 <coditv_+0x12da> (libsaturne.so.0)
4: 0x2b8202638561 <predvv_+0x6d91> (libsaturne.so.0)
5: 0x2b8202622c7e <navstv_+0x1ebe> (libsaturne.so.0)
6: 0x2b8202653cb0 <tridim_+0x4800> (libsaturne.so.0)
7: 0x2b82025318a1 <caltri_+0x2b41> (libsaturne.so.0)
8: 0x2b820251a875 <cs_run+0x3e5> (libsaturne.so.0)
9: 0x2b820251a9b5 <main+0x115> (libsaturne.so.0)
10: 0x3baf81ecdd <__libc_start_main+0xfd> (libc.so.6)
11: 0x4024e9 <> (cs_solver)
End of stack
*******************************************************************
I don`t know if this is right, but I suppose this may be due to bad mesh.
Has someone an idea how to fix this problem?
Listing is also attached.
Thank you very much in advance.
Best regards,
Amir
- Attachments
-
- listing.doc
- (3.32 MiB) Downloaded 485 times
-
- Posts: 284
- Joined: Fri Dec 04, 2015 1:42 pm
Re: Jacobi: error (divergence) solving for Velocity
Hello,
I think that you have a typo at a boundary condition. I have checked your listing and find this
May be "joint5" is "join5"
Regards,
Luciano
I think that you have a typo at a boundary condition. I have checked your listing and find this
Code: Select all
The group "joint5" in the selection criteria:
"joint5 or join6"
does not correspond to any boundary face.
Regards,
Luciano
Re: Jacobi: error (divergence) solving for Velocity
Hi Luciano,
Thank you for your replay.
You are right, this discontinuity problem was due to the typo, however I still have a problem with cavitation model.
I changed ‘joint5’ to ‘join5’ and I run my case another time from 0 to 20000 iterations without cavitation model. The result looks good.
As above, I got this results and I run a calculation from 20000th iteration with activated cavitation model (icavit = 1). Despite, the void fraction is appeared 10-10 anywhere in my geometry (listing is attached) which is probably meant it is not activated or is clipped.
So I suppose there is still another difficulty and I would be appreciated if you could help me with this.
Many thanks,
Kind regards
Amir
Thank you for your replay.
You are right, this discontinuity problem was due to the typo, however I still have a problem with cavitation model.
I changed ‘joint5’ to ‘join5’ and I run my case another time from 0 to 20000 iterations without cavitation model. The result looks good.
As above, I got this results and I run a calculation from 20000th iteration with activated cavitation model (icavit = 1). Despite, the void fraction is appeared 10-10 anywhere in my geometry (listing is attached) which is probably meant it is not activated or is clipped.
So I suppose there is still another difficulty and I would be appreciated if you could help me with this.
Many thanks,
Kind regards
Amir
- Attachments
-
- listing.txt
- (5.08 MiB) Downloaded 451 times
-
- Posts: 284
- Joined: Fri Dec 04, 2015 1:42 pm
Re: Jacobi: error (divergence) solving for Velocity
Hello Amir,
In the listing file I have noted that the for the Merkel model is set to , wherewith the evaporation and condensation rates will be almost zero. You can check this in the therory documentation (http://code-saturne.org/cms/sites/defau ... theory.pdf) and in the file /src/base/cavitation.f90
Please check the parameter in cs_user_parameters-cavitation.f90
Regards,
Luciano
In the listing file I have noted that the
Code: Select all
Uinf
Code: Select all
Uinf=-0.1e+14
Please check the
Code: Select all
Uinf
Regards,
Luciano
Re: Jacobi: error (divergence) solving for Velocity
Hi Luciano,
Thanks a lot for your observation, that was one of the major problems. So instead of 1e+14, I imposed Vinf=6.3 m/s (exactly equals to my inlet velocity) however I am still far from the acceptable result.
I think the cavitation model is activated, but the code asks for a really small reference time; I have started with Tref = 5e-7 , the solution was clipped to 1e-10 for minimum and maximum void fraction.
Then for some cases, I applied 1e-10 as the reference time which is definitely small, however, the code still displays a warning on reference time and clip the minimum value by some iteration.
As far as I know the void fraction should be near by 1 somewhere in edge but the maximum value calculated here is 7e-4. So I suppose something is wrong with my simulation.
By the way, could you please help me with this?
Enclosed you could find listing and my SRC files.
Many thanks for your help.
Kind regards,
Amir
Thanks a lot for your observation, that was one of the major problems. So instead of 1e+14, I imposed Vinf=6.3 m/s (exactly equals to my inlet velocity) however I am still far from the acceptable result.
I think the cavitation model is activated, but the code asks for a really small reference time; I have started with Tref = 5e-7 , the solution was clipped to 1e-10 for minimum and maximum void fraction.
Then for some cases, I applied 1e-10 as the reference time which is definitely small, however, the code still displays a warning on reference time and clip the minimum value by some iteration.
As far as I know the void fraction should be near by 1 somewhere in edge but the maximum value calculated here is 7e-4. So I suppose something is wrong with my simulation.
By the way, could you please help me with this?
Enclosed you could find listing and my SRC files.
Many thanks for your help.
Kind regards,
Amir
- Attachments
-
- cs_user_boundary_conditions.f90
- (22.83 KiB) Downloaded 466 times
-
- cavitation.f90
- (13.54 KiB) Downloaded 467 times
-
- listing.txt
- (5.25 MiB) Downloaded 469 times
-
- Posts: 284
- Joined: Fri Dec 04, 2015 1:42 pm
Re: Jacobi: error (divergence) solving for Velocity
Hello amir,
Could you also post the case and the mesh files?
Regards,
Luciano
Could you also post the case and the mesh files?
Regards,
Luciano
Re: Jacobi: error (divergence) solving for Velocity
Hi!
The mesh files and case are attached.
I hope, it will be useful.
Kind regards
Amir
The mesh files and case are attached.
I hope, it will be useful.
Kind regards
Amir
- Attachments
-
- RANS-2D.rar
- (1.97 MiB) Downloaded 417 times
-
- Posts: 284
- Joined: Fri Dec 04, 2015 1:42 pm
Re: Jacobi: error (divergence) solving for Velocity
Hello Amir,
I was looking the cavitation.f90 file and the theory documentation, because I never work with cavitation.
In the theory documentation of the CS 4.0.0 the vaporization source terms are
}{0.5\rho_lu_\infty^2t_\infty}, m^- = -\dfrac{C_{dest} \rho_v \max \left( p-p_V,0 \right)}{0.5\rho_lu_\infty^2t_\infty},)
but in the documentation of CS 4.2 are
\alpha(1-\alpha)}{0.5\rho_lu_\infty^2t_\infty}, m^- = -\dfrac{C_{dest} \rho_v \max \left( p-p_V,0 \right)\alpha(1-\alpha)} {0.5\rho_lu_\infty^2t_\infty},)
Also I was looking for the original paper of Merkle to check the model and I couldn't find it. But checking other references the vaporization source terms are
\alpha}{0.5\rho_lu_\infty^2t_\infty}, m^- = -\dfrac{C_{dest} \rho_v \max \left( p-p_V,0 \right)(1-\alpha)}{0.5\rho_lu_\infty^2t_\infty},)
Also, in the doc the
{C_{prod}=1000, C_{dest}=50
and in the cavitation.f90 are defined
{C_{prod}=10000, C_{dest}=50
I think that you will need help from some of the developers.
Regards,
Luciano
I was looking the cavitation.f90 file and the theory documentation, because I never work with cavitation.
In the theory documentation of the CS 4.0.0 the vaporization source terms are
but in the documentation of CS 4.2 are
Also I was looking for the original paper of Merkle to check the model and I couldn't find it. But checking other references the vaporization source terms are
Also, in the doc the
I think that you will need help from some of the developers.
Regards,
Luciano
Re: Jacobi: error (divergence) solving for Velocity
Hi Luciano,
Thanks a lot for your answer.
Actually the multiplicative term, (α(α-1)) , is not updated in V.4.0. theory, but it is applied in “cavitation.f90 subroutine” respectively.
The source terms are also different than the reference that you mentioned because it is the developer’s idea to use this form of source terms (Maximum/Minimum hypothesis) to keep the void fraction between 0 and 1 (for details see “Development of algorithm based on the fractional time step for the simulation of cavitation”).
I have also noticed that the rho is not variable in my case (irovar = 0 in “cs_user_parameters.f90”), so I should change it for 1.
As another idea is run a case with a smaller cavitation number at outlet (i.e. smaller outlet Pressure), I do not know if I am right but I think the problem is due to high pressure. I mean the high pressure prevents increase of void fraction.
I keep you inform with any Improvement.
Best regards,
Amir
Thanks a lot for your answer.
Actually the multiplicative term, (α(α-1)) , is not updated in V.4.0. theory, but it is applied in “cavitation.f90 subroutine” respectively.
The source terms are also different than the reference that you mentioned because it is the developer’s idea to use this form of source terms (Maximum/Minimum hypothesis) to keep the void fraction between 0 and 1 (for details see “Development of algorithm based on the fractional time step for the simulation of cavitation”).
I have also noticed that the rho is not variable in my case (irovar = 0 in “cs_user_parameters.f90”), so I should change it for 1.
As another idea is run a case with a smaller cavitation number at outlet (i.e. smaller outlet Pressure), I do not know if I am right but I think the problem is due to high pressure. I mean the high pressure prevents increase of void fraction.
I keep you inform with any Improvement.
Best regards,
Amir
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Jacobi: error (divergence) solving for Velocity
Hello,
I'll try to remember to mention this thread to the developper who last worked on the cavitation model, to see if he has any suggestions. I am not familiar with that model myself, and am a bit short on time these days (already too many threads to follow).
Regards,
Yvan
I'll try to remember to mention this thread to the developper who last worked on the cavitation model, to see if he has any suggestions. I am not familiar with that model myself, and am a bit short on time these days (already too many threads to follow).
Regards,
Yvan