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

Divergence detected in AMG solver: k when udf loaded

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 20, 2015, 08:30
Default Divergence detected in AMG solver: k when udf loaded
  #1
New Member
 
Gromash Hellscream
Join Date: Apr 2015
Posts: 2
Rep Power: 0
google9002 is on a distinguished road
Hi,everyone
I wanna use a udf to define the wall shear on the boundary, this udf could be loaded and initialized right, but when I begin to calculate, Fluent tells me that Divergence detected in AMG solver: k -> Increasing relaxation sweeps!
When this udf unloaded, it works well, the solution is not so good though.
By the way, i use VOF model here.
And my code is below here, is there any problem with it?
I need your help...


#include <stdio.h>
#include "udf.h"
#include "mem.h"
#include <math.h>
DEFINE_PROFILE(wall_shear_x, thread, position)
{
real u, v, w, segm, dens,text,velo,bata;
face_t f;
cell_t c;
Thread *t0;
Domain *d;
d = Get_Domain(3);
int Zone_ID = 4;
thread = Lookup_Thread(d, Zone_ID);
begin_f_loop(f, thread)
{
u = F_U(f, thread);
v = F_V(f, thread);
w = F_W(f, thread);
segm = F_P(f, thread);
if (NNULLP(THREAD_STORAGE(thread, SV_DENSITY)))
dens = F_R(f, thread);
else
{
c = F_C0(f, thread);
t0 = F_C0_THREAD(f, thread);
dens = C_R(c, t0);
}
velo = sqrt(u*u + v*v + w*w);
bata = -u / velo;
text = segm*0.2 + 0.037731222*dens*velo*velo;
F_PROFILE(f, thread, position) = text*bata;
}
end_f_loop(f, thread)
}
DEFINE_PROFILE(wall_shear_y, thread, position)
{
real u, v, w, segm, dens, text, velo, bata;
face_t f;
cell_t c;
Thread *t0;
Domain *d;
d = Get_Domain(3);
int Zone_ID = 4;
thread = Lookup_Thread(d, Zone_ID);
begin_f_loop(f, thread)
{
u = F_U(f, thread);
v = F_V(f, thread);
w = F_W(f, thread);
segm = F_P(f, thread);
if (NNULLP(THREAD_STORAGE(thread, SV_DENSITY)))
dens = F_R(f, thread);
else
{
c = F_C0(f, thread);
t0 = F_C0_THREAD(f, thread);
dens = C_R(c, t0);
}
velo = sqrt(u*u + v*v + w*w);
bata = -v / velo;
text = segm*0.2 + 0.037731222*dens*velo*velo;
F_PROFILE(f, thread, position) = text*bata;
}
end_f_loop(f, thread)
}
DEFINE_PROFILE(wall_shear_z, thread, position)
{
real u, v, w, segm, dens, text, velo, bata;
face_t f;
cell_t c;
Thread *t0;
Domain *d;
d = Get_Domain(3);
int Zone_ID = 4;
thread = Lookup_Thread(d, Zone_ID);
begin_f_loop(f, thread)
{
u = F_U(f, thread);
v = F_V(f, thread);
w = F_W(f, thread);
segm = F_P(f, thread);
if (NNULLP(THREAD_STORAGE(thread, SV_DENSITY)))
dens = F_R(f, thread);
else
{
c = F_C0(f, thread);
t0 = F_C0_THREAD(f, thread);
dens = C_R(c, t0);
}
velo = sqrt(u*u + v*v + w*w);
bata = -w / velo;
text = segm*0.2 + 0.037731222*dens*velo*velo;
F_PROFILE(f, thread, position) = text*bata;
}
end_f_loop(f, thread)
}
google9002 is offline   Reply With Quote

Old   April 20, 2015, 23:27
Default
  #2
New Member
 
Gromash Hellscream
Join Date: Apr 2015
Posts: 2
Rep Power: 0
google9002 is on a distinguished road
well, i'm so stupid, u=v=w=0 at the starting moment, how could it be calculated with a 0 denominator?
google9002 is offline   Reply With Quote

Old   November 6, 2019, 08:43
Default
  #3
New Member
 
Rahul
Join Date: Jun 2019
Location: Pune
Posts: 23
Rep Power: 7
rahulmule797@gmail.com is on a distinguished road
Quote:
Originally Posted by google9002 View Post
well, i'm so stupid, u=v=w=0 at the starting moment, how could it be calculated with a 0 denominator?
What changes you have made then?
I also get same type of error.
rahulmule797@gmail.com is offline   Reply With Quote

Old   November 8, 2019, 00:34
Default
  #4
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
if the problem is starting point, load UDF after 1st timestep
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ 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
Error: Divergence detected in AMG solver siri FLUENT 8 March 12, 2018 18:08
Divergence detected in AMG solver: pressure correction emlejeen FLUENT 5 December 15, 2016 00:47
Divergence detected in AMG solver: pressure correction xinquanzhoucn FLUENT 5 July 21, 2014 05:49
Divergence detected in AMG solver: pressure coupled n.jithin.1991 FLUENT 6 January 5, 2014 12:43
Quarter Burner mesh with periosic condition SamCanuck FLUENT 2 August 31, 2011 12:34


All times are GMT -4. The time now is 14:18.