CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   CFX Cavitation Model (https://www.cfd-online.com/Forums/cfx/113753-cfx-cavitation-model.html)

kimotbwb February 26, 2013 05:38

CFX Cavitation Model
 
Hi there,

i have a couple of questions regarding the CFX Cavitation Model.
CFX uses the simplified Rayleigh-Plesset model per default. The formulation of the source term (transport based equation model) is done by Zwart (this model is similar to the Kubota formulation)
I tried to implement the MERKLE model by using CEL expressions, but stability problems occur. I even tried to implement the original formulation used by CFX, but even there i got stability problems. The solver fails and produces a fatal overflow in the linear equations after a couple of iterations.
Does anybody has some experiences with the implementation of user defined cavitation models ?
Perhaps somebody could sent me his CEL-formulation as a template?

king regards!

ghorrocks February 26, 2013 17:58

Cavitation models are always difficult to get stable as they involve such large changes in density.

Implementing a model in CEL can add additional stability problems as the model is not implicitly included in the numerics but is updated separately. This means the implementation of existing models with CEL will be less stable (as you found).

So I would try user fortran to implement your model. I am not sure but hopefully this is better linked into the solver and will result in better numerical stability.

kimotbwb February 26, 2013 18:24

Thanks for your reply. We have already thought of this. But the first impression is that there isn't any relative difference regarding the stability problems elsewhere as for CEL and for Fortran routine. We tryied to reproduce the original formulation for the source and the sink term that CFX model uses both with CEL and Fortran, but we obtained stability problems in both cases.
There are some literature references available from authors who implemented the KUBOTA and the MERKLE model for their purposes and got stable and accurate results.
We tried to stabilize the CEL and the Fortran routine by some tricks like if/else statements for condensation and for vaporization, but actualy the linear solver exceeds the bounds and fails out with an overflow.

The funny think is, that we even tryied to reproduce the original CFX model (see KUBOTA) on a working testcase. The original CFX model gets very good results in a close range depending on the cavitation number, but we failed trying to reproduce the same testcase by using CEL and fortran routine.

It would be very interesting to know, if somebody has got a CEL-template or maybe a routine.f with a working and stable user defined cavitation model.

ghorrocks February 27, 2013 06:51

Oh yes, and did you use source term coefficients with your source terms?

kimotbwb February 27, 2013 07:51

yes of cource. we used the default coefficients of the CFX source term model. means: Fvap=50.0 and Fcond=0.01.
did you ment that?

ghorrocks February 27, 2013 17:50

No. When you use a source term you are recommended to define a linearisation coefficient to assist with convergence. The source term coefficient is general taken as the derivative of the source term WRT to equation variable. In several cases I have done I could not get a source term to converge, but the addition of a source term coefficient made it converge quickly and easily. It makes a massive difference.

Have a look in the documentation about source terms, especially the linearisation coefficients.

hydroaero June 18, 2013 02:08

Hi kimotbwb,
Did you finish the implementation of Merkle model in CFX? Your results are good?
I plan to implement Merkle model in CFX by User Fortran soon.
Any advice from your part would be appreciated!
See you!

hydroaero July 10, 2013 13:32

Dear Glenn Horrocks,
I’m implemeting new cavitation models using CFX user routine with Fortran code.
The model is running but doesn’t converge.
I want to use linearization coefficients to improve the convergence.
I read the CFX documentation about linearization coefficients for source terms.
As you said, linearization coefficient = derivative of source term to equation variable.
Do you know where to specify these linearization coefficients for cavitation modelling in CFX?
Thanks for your help!
See you soon! :)

Quote:

Originally Posted by ghorrocks (Post 410540)
No. When you use a source term you are recommended to define a linearisation coefficient to assist with convergence. The source term coefficient is general taken as the derivative of the source term WRT to equation variable. In several cases I have done I could not get a source term to converge, but the addition of a source term coefficient made it converge quickly and easily. It makes a massive difference.

Have a look in the documentation about source terms, especially the linearisation coefficients.


ghorrocks July 13, 2013 07:20

I think you need to talk to CFX support for this type of detail.

huangxianbei November 12, 2013 22:20

Quote:

Originally Posted by ghorrocks (Post 410287)
Cavitation models are always difficult to get stable as they involve such large changes in density.

Implementing a model in CEL can add additional stability problems as the model is not implicitly included in the numerics but is updated separately. This means the implementation of existing models with CEL will be less stable (as you found).

So I would try user fortran to implement your model. I am not sure but hopefully this is better linked into the solver and will result in better numerical stability.

Hi
I'm trying to implement the ZGB cavitation model just to ensure the way through Fortran is right. But I'm confused about the volume fraction definition of the vapor, for the vapor volume fraction is the main variable in the cavitation model. The user_get_var or use_get_gvar seems powerless in getting the vapor volume fraction data. Could you make some suggestion about how to get this variable?

huangxianbei November 12, 2013 22:24

Quote:

Originally Posted by hydroaero (Post 439018)
Dear Glenn Horrocks,
Iím implemeting new cavitation models using CFX user routine with Fortran code.
The model is running but doesnít converge.
I want to use linearization coefficients to improve the convergence.
I read the CFX documentation about linearization coefficients for source terms.
As you said, linearization coefficient = derivative of source term to equation variable.
Do you know where to specify these linearization coefficients for cavitation modelling in CFX?
Thanks for your help!
See you soon! :)

Hi
I'm trying to implement a cavitation model into CFX too. But the problem I'm facing is the variable-vapor volume fraction. Can you give me the guidance about how to get the vapor volume fraction data during the calculation?


All times are GMT -4. The time now is 08:17.