|
[Sponsors] |
September 3, 2018, 17:13 |
Bingham Fluid - UDF
|
#1 |
Member
Liliana de Luca Xavier Augusto
Join Date: Feb 2013
Posts: 69
Rep Power: 13 |
Hi all,
does anyone here works with NonNewtonian fluids? I implemented a UDF for calculate the viscosity for a Bingham fluid in a 2D pipe. As BC at inet, I set a pressure 58.86 Pa and at outlet P = 0. The geometry has 0.002m radius and 0.006m length. The flow is laminar, steady state. However, when I compare the results of Fluent with analytical solution, it does not match (see picture, there 3 graphs for different values of yield stress). I am not sure if the problem is the UDF. Does anyone have any idea of can be wrong or has the same problem? k = 1 Pa.s tau0 = 1.0; 3.0; 5.0 Pa (three simulations with three differente values) The theoretical equations: v = (dP/dL) * (Rē - rē)/(4*k) - tau0*(R-r)/k (for non-plug region) v = (dP/dL) * (Rē/4*k) * (1 - Rp/R)^2 (for plug region) with Rp = 2*L*tau0/dP The picture: https://drive.google.com/open?id=1tn...UYPuTsV6sWnoRE Here are the UDF: /* UDF for Bingham fluid (Bingham Papanastasiou model)*/ #include "udf.h" FILE *fp; /* ************************************************* */ /* Bingham Fluid */ DEFINE_PROPERTY(Bingham_viscosity, c, t) { /* Input Parameters for Bingham Viscosity */ real vis; real stress; real ys; real m; real k; real Max, Min; ys = 5.0; /* Initial Yield Stress */ k = 1.0; /* Fluid Consistency */ m = 100000000; Max = 100000000000; Min = 0.00000000001; stress = C_STRAIN_RATE_MAG(c,t); /************ Bingham Fluid **********/ vis = k + ys*(1-exp(-m*stress))/stress; /* vis = k; */ return vis; } |
|
September 3, 2018, 23:43 |
|
#3 |
Member
Liliana de Luca Xavier Augusto
Join Date: Feb 2013
Posts: 69
Rep Power: 13 |
||
September 3, 2018, 23:51 |
|
#4 |
Senior Member
|
Simple type "solve/set/expert" in the TUI (text user interface) when you have to access gradient in your UDF. Also, it would be great to post the formulation of viscosity for Bingham flow. I can see what you code does, but I do not know what the code is supposed to do.
|
|
September 3, 2018, 23:55 |
|
#5 | |
Member
Liliana de Luca Xavier Augusto
Join Date: Feb 2013
Posts: 69
Rep Power: 13 |
Quote:
About the viscosity, I am trying to implement the equation (6) of this paper: https://drive.google.com/file/d/1gQ-...w?usp=drivesdk |
||
September 4, 2018, 10:17 |
|
#6 |
Senior Member
|
Well in this case you do not have to do that because the viscosity is needed in the momentum equation in which the strain rate is readily available. I think what you have done is right and the discrepancy when plug flow region appears is rather strange. However it might not be easy to figure out why. You might do a full 3D simulation to make sure that this is not an issue with the axis-symmetric implementation in FLUENT.
|
|
September 4, 2018, 10:28 |
|
#7 | |
Member
Liliana de Luca Xavier Augusto
Join Date: Feb 2013
Posts: 69
Rep Power: 13 |
Quote:
|
||
September 26, 2018, 09:26 |
|
#8 |
New Member
Join Date: Mar 2016
Posts: 6
Rep Power: 10 |
Hello liliana!
I'm currently facing the same problem as you, working with Herschel-Bulkley fluids with ANSYS Fluent. The Herschel-Bulkley rheological model (for n = 1, we have the Bingham model) has a discontinuity on its function, since we have a yield stress. So, Fluent implements a regularization model to overcome this discontinuity (documented in the user's guide), using a "critical shear rate", which means that for shear rate < critical shear rate, the fluid will behave as a Newtonian Fluid with high viscosity, and for shear rate > critical shear rate the fluid will behave as a Herschel-Bulkley fluid (or Bingham fluid, in your case). The udf you are showing makes a different regularization for this problem, with the Papanastasiou Model, which depends on the "m" parameter. The literature recomends m = 1000s (LABSI, 2016, "Herschel-Bulkley fluid flow within a pipe by taking into account viscous dissipation"), however i'm not fully convinced about it and i think the "m" parameter needs to be calibrated as well. I recommend using the fluent's implementation with critical shear rate using low values, in the order of 0.001 s^-1 and 0.01 s^-1, then confront with analytical results as you did. Any further questions regarding to non-Newtonian fluids, you can PM me. |
|
September 26, 2018, 09:34 |
|
#9 | |
Member
Liliana de Luca Xavier Augusto
Join Date: Feb 2013
Posts: 69
Rep Power: 13 |
Quote:
|
||
September 26, 2018, 09:51 |
|
#10 | |
New Member
Join Date: Mar 2016
Posts: 6
Rep Power: 10 |
Quote:
and about the numerical details: which convergence criteria and number of iterations are you using? and where are you getting the velocity data in the domain (usually it's a point/line/plane where the flow is fully developed)? |
||
September 26, 2018, 09:54 |
|
#11 | |
Member
Liliana de Luca Xavier Augusto
Join Date: Feb 2013
Posts: 69
Rep Power: 13 |
Quote:
I am getting the velocity at x=0.045 m, the pipe has x=0.049m. I saw that the flow is fully developed (since I am using a pressure condition at inlet as well....). I have disable the convergence criteria and I am monitoring the maximum velocity (and the field, and the profile...), when they are stable, I stop the simulation (around residuals 1e-8 or 1e-9). |
||
September 26, 2018, 10:11 |
|
#12 | |
New Member
Join Date: Mar 2016
Posts: 6
Rep Power: 10 |
Quote:
give a look at this article, the author did a very similar case with fluent and it's well explained. https://www.sciencedirect.com/scienc...92687514003677 |
||
September 26, 2018, 10:17 |
|
#13 | |
Member
Liliana de Luca Xavier Augusto
Join Date: Feb 2013
Posts: 69
Rep Power: 13 |
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Creating a UDF for fluid inlet velocity | ameetks99 | Fluent UDF and Scheme Programming | 10 | February 9, 2017 07:29 |
UDF for a viscoelastic fluid flow | cliff | Fluent UDF and Scheme Programming | 1 | December 21, 2014 16:04 |
How to choose the mean diameter value for dispersed fluid? | creddy_trddc | CFX | 1 | October 30, 2011 05:30 |
Velocity of Fluid @ different positions of Particle in DPM using UDF | pmghadge | FLUENT | 1 | June 16, 2009 20:11 |
Terrible Mistake In Fluid Dynamics History | Abhi | Main CFD Forum | 12 | July 8, 2002 10:11 |