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

Error: Divergence detected in AMG solver: species-0

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 29, 2024, 06:31
Exclamation Error: Divergence detected in AMG solver: species-0
  #1
New Member
 
Evi Partsalidi
Join Date: Apr 2024
Location: Athens, GR
Posts: 2
Rep Power: 0
iamdesperate is on a distinguished road
Hi i am trying to run a simulation for a pipeline with natural gas that is injected with H2 (vertical pipe).

The simulation runs fine when i am not using udf (so the mesh and setup, initialization etc are okay i guess). As soon as i try to load udfs problems occur.

I have one c file that has the 4 equations i need. The first problem occurs when i press build:

Error: The UDF library you are trying to load (C:\Users\evipa\Desktop\8\Sim_files\dp0\FFF\Fluent \libudf) is not compiled for 3d on the current platform (win64).\n\nThe system cannot find the file specified.
\n\nC:\Users\evipa\Desktop\8\Sim_files\dp0\FFF\Flu ent\C:\Users\evipa\Desktop\8\Sim_files\dp0\FFF\Flu ent\libudf\win64\3d\libudf.dll
Error Object: #f

(I make sure to delete the previous udf in the library before building again)

Despite the message, when i go to manage it shows the udf, so i can load it.

Then i put the udf in the materials i use (at the fluid and mixture folder), and do initialization again (haven't changed anything else from the original simutalion that run without udf).

Then i keep seeing the same 2 errors over and over again:

reversed flow in 5 faces on pressure-outlet 9.
# Divergence detected in AMG solver: species-0 -> Increasing relaxation sweeps!
# You may try the enhanced divergence recovery with (rpsetvar 'amg/protective-enhanced? #t)
--------------------------------------------------------------------------------------
Error: Divergence detected in AMG solver: species-0

Error: Divergence detected in AMG solver: species-0
Error Object: #f




Any idea on what to do? I keep thinking that the problem is because of the compile but idk how to fix it.

Thanks in advance.
Yours truly,
A desperate student
iamdesperate is offline   Reply With Quote

Old   April 29, 2024, 14:18
Default
  #2
Senior Member
 
CFDKareem's Avatar
 
Kareem
Join Date: Nov 2022
Location: New York
Posts: 119
Rep Power: 3
CFDKareem is on a distinguished road
Can you post the UDF you are using?
__________________
Please like the answer if it helped!

Video Tutorials and Tips: https://www.youtube.com/@cfdkareem/featured
CFDKareem is offline   Reply With Quote

Old   April 30, 2024, 03:08
Default The UDF:
  #3
New Member
 
Evi Partsalidi
Join Date: Apr 2024
Location: Athens, GR
Posts: 2
Rep Power: 0
iamdesperate is on a distinguished road
/************************************************** *******************
UDF that simulates solidification by specifying a temperature-
dependent viscosity property
************************************************** ********************/
#include "udf.h"
#include "global.h"
DEFINE_PROPERTY(cell_density,c,t)
{

real pop = C_P(c,t);
real P_op = RP_Get_Float("operating-pressure");
real p = (pop+P_op)/100000;
real rho;
real tr1=289.15;
rho = 1/(-1.076443E-03*(tr1/p)+3.989515E-05*(pow(tr1,2)/p)-4.436841E-05*tr1-6.637080E-08*(pow(tr1,3)/p)+3.012561E-08*tr1*p+1.096540E-07*pow(tr1,2));

return rho;
}
DEFINE_PROPERTY(cell_density_H2,c,t)
{
real tr1 = 289.15;
real pop = C_P(c,t);
real P_op = RP_Get_Float("operating-pressure");
real p = (pop+P_op)/100000;
real rho_H2;
rho_H2 = 1/(0.04168135*tr1/p-3.2589E-06*pow(tr1,2)/p+4.2802E-05*tr1+5.9524E-09*pow(tr1,3)/p+6.8998E-09*tr1*p-6.2674E-08*pow(tr1,2));

return rho_H2;
}
DEFINE_PROPERTY(cell_viscosity,c,t)
{

real pop = C_P(c,t);
real P_op = RP_Get_Float("operating-pressure");
real p = (pop+P_op)/100000;
real tr1=289.15;
real mu;
mu = 20.08-20.78*tr1+7.5001*p+9.752*pow(tr1,2)+0.46572*pow(p, 2)-4.7141*tr1*p;

return mu;
}
DEFINE_PROPERTY(cell_viscosity_H2,c,t)
{
real tr1 = 289.15;
real pop = C_P(c,t);
real P_op = RP_Get_Float("operating-pressure");
real p = (pop+P_op)/100000;
real mu_H2;
mu_H2= 1.9849+0.0256045*tr1+0.003971*p-0.0000081*pow(tr1,2)+0.000005944*pow(p,2)-0.0000112275*tr1*p;


return mu_H2;
}
DEFINE_PROPERTY(cell_cond,c,t)
{
real temp = 289.15;
real pop = C_P(c,t);
real P_op = RP_Get_Float("operating-pressure");
real p = pop+P_op;
real cond;
cond= (0.02003+0.000038*temp+0.000146E-5*p);
return cond;
}
DEFINE_PROPERTY(cell_cond_H2,c,t)
{
real temp = 289.15;
real pop = C_P(c,t);
real P_op = RP_Get_Float("operating-pressure");
real p = pop+P_op;
real cond_H2;
cond_H2= (0.049722+0.000460*temp+0.000074E-5*p);
return cond_H2;
}
iamdesperate is offline   Reply With Quote

Reply

Tags
#ansys, #compile, #fluent, #udf


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
Population Balance Modeling (PBM) - Ansys Fluent chittipo FLUENT 164 November 18, 2023 11:54
PEMFC tutorial case problem Suleyman41 FLUENT 2 July 15, 2023 11:16
Divergence detected in AMG solver Rahmani_Zakaria Fluent Multiphase 4 January 11, 2023 15:09
Divergence detected in AMG solver: pressure correction CMICT FLUENT 4 June 14, 2016 12:08
fluent divergence for no reason sufjanst FLUENT 2 March 23, 2016 16:08


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