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

udf about mass diffusivity of multicomponent flow

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By suiger

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 9, 2017, 19:38
Post udf about mass diffusivity of multicomponent flow
  #1
New Member
 
zmliu
Join Date: Nov 2010
Posts: 10
Rep Power: 16
suiger is on a distinguished road
the multicomponent flow includes four species. Mass diffusivity of the species is dependent of spatial coordinate. the udf as follows can be incorporated successfully. but a error "Divergence detected in AMG solver: species-0“ is displayed after I press "calculate" button. the udf is as follows.

#include "udf.h"

DEFINE_DIFFUSIVITY(myudf,c,t,i)
{
real xc[ND_ND];
real diff;
C_CENTROID(xc,c,t);
if(i==0)
{ if(xc[0]>=-0.014&&xc[0]<=-0.006&&xc[1]>=-0.140&&xc[1]<=0.140&&xc[2]>=-0.140&&xc[2]<=0.140)
diff=1.24e-11/80.34;
else
diff=5.88e-6 ;
}

else if(i==1)
{
if(xc[0]>=-0.014&&xc[0]<=-0.006&&xc[1]>=-0.140&&xc[1]<=0.140&&xc[2]>=-0.140&&xc[2]<=0.140)
diff=1.85e-11/57.05;
else
diff=5.88e-6 ;

}
else if(i==2)
{
if(xc[0]>=-0.014&&xc[0]<=-0.006&&xc[1]>=-0.140&&xc[1]<=0.140&&xc[2]>=-0.140&&xc[2]<=0.140)
diff=6.00e-11/28.68;
else
diff=5.88e-6 ;
}
return diff;
}

Can anybody help me on this please?

regards
Mohamed Mousa likes this.
suiger is offline   Reply With Quote

Old   December 12, 2017, 03:26
Default
  #2
Member
 
Refik
Join Date: Dec 2014
Location: Turkey
Posts: 58
Rep Power: 12
rewol is on a distinguished road
Hi,

At first glance, shouldn't there be a fourth elseif(i==3), since the mixture is composed of 4 species ?

Also the error you get may not be related to your UDF, but to a large source/sink term for species. I found the link below regarding to the same error u get.

Divergence Detected in AMG solver- Species 0

Regards.
rewol is offline   Reply With Quote

Old   December 15, 2017, 03:30
Default
  #3
New Member
 
zmliu
Join Date: Nov 2010
Posts: 10
Rep Power: 16
suiger is on a distinguished road
Firstly thank you very much! secondly,The problem was solved,u r right that the error was not related to the udf.
thank u ver much!
suiger is offline   Reply With Quote

Old   December 15, 2017, 06:11
Default
  #4
Member
 
Refik
Join Date: Dec 2014
Location: Turkey
Posts: 58
Rep Power: 12
rewol is on a distinguished road
Hi, i am glad everything worked out well.

Can you please share how you solved the problem ? It can be of help / guidance to everybody out there as well.

Regards.
rewol is offline   Reply With Quote

Old   March 14, 2019, 12:51
Default
  #5
New Member
 
AKHIL KUMAR
Join Date: Jan 2019
Posts: 13
Rep Power: 7
AKHIL123 is on a distinguished road
could you please tell how you solved the problem
AKHIL123 is offline   Reply With Quote

Reply

Tags
udf multicomponent


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
Issues on the simulation of high-speed compressible flow within turbomachinery dowlee OpenFOAM Running, Solving & CFD 11 August 6, 2021 07:40
mass flow in is not equal to mass flow out saii CFX 12 March 19, 2018 06:21
Pressure Outlet Targeted Mass Flow Rate LuckyTran FLUENT 1 November 23, 2016 11:40
UDF for inlet mass flow rate rahulsuresh89 Fluent UDF and Scheme Programming 1 October 16, 2010 18:06
particle, parcel and mass flow rate balance flybird FLUENT 0 May 24, 2007 11:44


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