TAGGED: macro, non-newtonian, shear-rate, udf, viscosity
-
-
July 23, 2021 at 11:24 am
montenegro
SubscriberHello.
I'm modelling a 2D channel with a non-newtonian fluid flow and I need to describe its viscosity through an equation that depends on the shear rate ( η=f(gamma_dot) ). I am doing this through an UDF. How can I access the shear rate? Should I use the C_STRAIN_RATE(c, t) macro or the C_DUDY(c, t) (in this case, the absolute value of it) one?
Thank you.
Best regards
July 23, 2021 at 12:54 pmRob
Forum ModeratorIf you search for C_STRAIN_RATE on here you'll find one or two helpful answers.
July 23, 2021 at 1:50 pmmontenegro
SubscriberHello.
Thank you for the reply.
I asked the question because I've seen some discussions where it is told that the C_STRAIN_RATE(c,t) macro is the shear rate and other where it is said that it is indeed the strain rate. I also read in the Fluent User's Guide that the strain rate is the shear rate.
However, I ran my calculations (with C_STRAIN_RATE(c,t) macro in my viscosity equation) and checked if the results made sense. The value of the shear rate should be zero all over a centerline in my channel and it is not when I pull the results for the "Strain Rate" in the "Derivatives" top down menu. The "dX-velocity/dy" is, though, hence my confusion.
Moreover, I used the C_DUDY(c,t) macro in my UDF (needed to use abs(C_DUDY(c,t)), because Fluent returns it with negative values in the lower side of my channel) and I could not achieve convergence.
Can you tell if there is something wrong with my procedure?
Thank you Best regards.
July 23, 2021 at 1:57 pmKarthik Remella
AdministratorHello Just to add to 's answer - you can use Fluent expressions directly without using UDF. You should find the parameter you are looking for under 'Derivatives'.
Karthik
July 23, 2021 at 3:09 pmmontenegro
SubscriberHi.
Yes, I know I can set the viscosity equation via the 'custom field functions' option, but the problem persists. I am still doubtful regarding which parameter should I use, the "Strain rate" (C_STRAIN_RATE_MAG(c, t)) or the "dX-velocity/dy" (C_DUDY(c,t)) and if I use the latter one, my solution doesn't converge.
Thank you.
Best regards.
July 23, 2021 at 4:00 pmRob
Forum ModeratorCan you show the plot of shear rate that you're looking at?
As an aside, I use C_STRAIN_RATE_MAG(c, t) in viscosity UDFs, and I don't think I've seen anyone using (or discussing) C_DUDY(c,t) the same purpose.
July 23, 2021 at 5:04 pmmontenegro
SubscriberHello.
I'll upload the pictures. So, if I plot the contour for the strain rate it it is noticeable that in the center of the channel the value is very low, circa 0.26 1/s, but not zero.
This can be confirmed by plotting the same contour over a horizontal (xx) line I drew exactly in the middle of the channel.
I then plotted the contour for the dx-velocity/dy over this same centerline and you can see it is exactly zero, as the shear rate is supposed to be.
And I will send you the contour of the dx-velocity/dy over the channel as a confirmation that it is being calculated.
Thank you.
Best regards.
July 26, 2021 at 11:15 amRob
Forum ModeratorTurn off node values & replot. You may also want to have a look at xy plots rather than contours.
Viewing 7 reply threads- The topic ‘How to get shear rate macro in UDF?’ is closed to new replies.
Ansys Innovation SpaceTrending discussions- How do I get my hands on Ansys Rocky DEM
- Script Error
- Unburnt Hydrocarbons contour in ANSYS FORTE for sector mesh
- Help: About the expression of turbulent viscosity in Realizable k-e model
- convergence issue for transonic flow
- Facing trouble regarding setting up boundary conditions for SOEC Modeling
- Point exception in erosion calculation
- Errors with multi-connected bodies using AQWA
- Script Error Ansys
Top Contributors-
2337
-
925
-
599
-
591
-
527
Top Rated Tags© 2025 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.
-