# Viscosity calculation in mixture model

 Register Blogs Members List Search Today's Posts Mark Forums Read

 March 25, 2019, 07:53 Viscosity calculation in mixture model #1 New Member   Vitor Braga Join Date: Feb 2019 Posts: 6 Rep Power: 7 Hello! So, as far as I know, when the Mixture model is selected for a two-phase flow, Fluent calculates the viscosity of the mixture with the equation: mu_mixture = alpha_1 * mu_1 + alpha_2 * mu_2. I would like to change the viscosity calculation to more complex models, such as the one proposed by Dukler (1964). Does anyone know how to proceed? What kind of UDF do I need? Where to implement it? I really appreciate any help I can get! Thank you very much.

 June 29, 2020, 02:22 #2 New Member   reza Join Date: Aug 2019 Posts: 14 Rep Power: 6 Hi, did you find how can you solve this problem? if yes, may i ask you please shear it with me? thanks

 June 29, 2020, 07:06 #3 New Member   Vitor Braga Join Date: Feb 2019 Posts: 6 Rep Power: 7 Yes, I found a solution. You don't need to change the way Fluent calculates the mixture viscosity. You can just change by UDF the viscosity of each phase to represent the viscosity model that you want. Thus, each phase will have the same value of viscosity (calculated based on the specific model that you want to implement), hence when Fluent calculates: mu_mixture = alpha_1 * mu_1 + alpha_2 * mu_2 the value it obtains is the value of your model, since mu_1 = mu_2 (and alpha_2 = 1 - alpha_1). I'm sorry if I didn't make myself clear... English is not my native language. If you need any clarifications, please, feel free to ask, I'll try to improve my explanation.

 June 29, 2020, 07:11 #4 New Member   reza Join Date: Aug 2019 Posts: 14 Rep Power: 6 Hi, Really thank you, another question: you used same udf for each phase? may i ask you please if you have your udf, share with me please?

 June 29, 2020, 07:15 #5 New Member   reza Join Date: Aug 2019 Posts: 14 Rep Power: 6 did you use DEFINE_PROFILE for your work? my main question is that can we write UDF as we can write for single-phase after we can implement this UDF for each phase??

 June 29, 2020, 07:22 #6 New Member   Vitor Braga Join Date: Feb 2019 Posts: 6 Rep Power: 7 Yes, I used the same UDF. This is the UDF: #include"udf.h" #include "math.h" #define mu_phase1 0.004452 #define mu_phase2 1.208e-05 DEFINE_PROPERTY(beatie_whalley,c,t_phase) { real mu_lam; real vof1,vof2; Thread *tc = THREAD_SUPER_THREAD(t_phase); Thread **pt = THREAD_SUB_THREADS(tc); Thread *tp = pt[0]; vof1 = C_VOF(c,tp); vof2 = 1-C_VOF(c,tp); mu_lam = vof2 * mu_phase2 + mu_phase1 * vof1 * (1 + 2.5 * vof2); return mu_lam; } Yes, you use the UDF for single phase in each phase for the viscosity.

 June 29, 2020, 07:35 #7 New Member   reza Join Date: Aug 2019 Posts: 14 Rep Power: 6 really thanks

 June 30, 2020, 04:14 #8 New Member   reza Join Date: Aug 2019 Posts: 14 Rep Power: 6 Hi, I have a question, I would be grateful if you could help me. for my problem: VOF_fluid = 0.8 VOF_solid = 0.2 base on your code: vof1 = 0.8 vof2 = 0.2 ???? or vof1 = 0.2 vof2 = 0.8 ??? or if I give my UDF to each phase, automatically VOF is equal to volume fraction of that phase? really thanks for your great help

 June 30, 2020, 07:06 #9 New Member   Vitor Braga Join Date: Feb 2019 Posts: 6 Rep Power: 7 Well, it depends. VOF1 is the primary phase, which you defined in Fluent.

 Tags mixture model, multiphase flow, two-phase flow, viscosity model