CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Non newtonian viscosity UDF -Diveregence in AMG Solver error

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 5, 2013, 01:17
Default Non newtonian viscosity UDF -Diveregence in AMG Solver error
  #1
New Member
 
Josy
Join Date: Mar 2009
Location: India
Posts: 29
Rep Power: 17
Josyula is on a distinguished road
Hi,

I have written an UDF for implementing a non-newtonian viscosity model for blood. This is the UDF:-

#include "udf.h"
#define mu_plasma 0.0012
#define H 0.47
DEFINE_PROPERTY(cumul_viscosity,c,t)
{
real mu_blood,beta,gamma,a,b,d;
gamma = C_STRAIN_RATE_MAG(c,t);
beta = 1+(6.0/pow(gamma,0.75));
a = beta*(1-H);
b = (4.1*H)/(1.64-H);
d = mu_plasma*a;
mu_blood = pow(d,b);
return mu_blood;
}

I am getting 'Divergence in AMG solver - x momentum' error.

I tried reducing the time step size and URF. Nothing seems to work.

Any suggestions on how to resolve this?

Thank you.
Josyula is offline   Reply With Quote

Old   March 13, 2013, 06:38
Default
  #2
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 23
vasava will become famous soon enough
Do you start your simulation from zero. I mean do you initialize and then start calculating or you obtain an initial solution and then continue with Non-Newtonian calculations.

We had same problem with Non-Newtonian UDF. So we did the following.

1. Initialize the simulation for steady or transient case.
2. Run the simulation for Newtonian case for very short time or very few iterations say 10 iterations.
3. Continue simulation with non-Newtonian UDF.

This is just to obtain a non-zero solution so that UDF can be used. When everything is zero some times UDFs can act strange.

By the way are you calculating OSI as well. Do you have UDF for that?
vasava is offline   Reply With Quote

Old   March 15, 2013, 23:05
Default
  #3
New Member
 
Josy
Join Date: Mar 2009
Location: India
Posts: 29
Rep Power: 17
Josyula is on a distinguished road
Paritosh,
Thank you for your suggestion. I managed to run the case as suggested with a help from another member of this forum.
I am not calculating OSI for my case, as it is 2D and would be irrelevant.
Josyula is offline   Reply With Quote

Old   March 18, 2013, 05:15
Default
  #4
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 23
vasava will become famous soon enough
Hello Josyula

What exactly did you do? I am just curious.
vasava is offline   Reply With Quote

Old   March 19, 2013, 01:05
Default
  #5
New Member
 
Josy
Join Date: Mar 2009
Location: India
Posts: 29
Rep Power: 17
Josyula is on a distinguished road
I initialized the solution with Newtonian property of blood and let the simulation run for 1-2 iterations. After that, I stopped the simulation and hooked the Non-Newtonian UDF.
Josyula is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling dynamicTopoFvMesh for OpenFOAM 2.1.x Saxwax OpenFOAM Installation 25 November 29, 2013 06:34
Ansys Fluent 13.0 UDF compilation problem in Window XP (32 bit) Yogini Fluent UDF and Scheme Programming 7 October 3, 2012 08:24
Installation OF1.5-dev ttdtud OpenFOAM Installation 46 May 5, 2009 03:32
Compiling problems with hello worldC fw407 OpenFOAM Installation 21 January 6, 2008 18:38
user subroutine error CFDUSER CFX 2 December 9, 2006 07:31


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