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

UDF for laser Keyhole problem

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By AlexanderZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 21, 2020, 10:46
Default UDF for laser Keyhole problem
  #1
New Member
 
Join Date: Jan 2020
Posts: 2
Rep Power: 0
eddy94 is on a distinguished road
Hi everyone,
I'm modeling an heat source for laser welding; I'm trying to model the keyhole volumetric distribution in a simple workpiece.
Once I created the UDF I gave it to the source term of the workpiece and I run the simulation but fluent always give me this error message:

"# Divergence detected in AMG solver: temperature -> Increasing relaxation sweeps!
# You may try the enhanced divergence recovery with (rpsetvar 'amg/protective-enhanced? #t)

Error: Divergence detected in AMG solver: temperature

Error: Divergence detected in AMG solver: temperature
Error Object: #f"

I really don't know what is the problem. This is my UDF:

/***** LASER HEAT SOURCE *****/

#include "udf.h"

#define EffL 0.85
#define Flas 3
#define Zkey 1.8
#define Zi 0.45
#define Plas 2000
#define CHIlow 0.5
#define CHIupp 0.5
#define PI 3.141592654
#define X0 15

DEFINE_PROFILE(heatflux_laser,thread, position)

{


real r[ND_ND];
real x, y, qlas,z,d,Rlas,Ri,Re;
cell_t c;


begin_c_loop(c, thread)
{

C_CENTROID(r, c, thread);
x= r[0];
y= r[1];
z= r[2];

if (z>=0 && z<Zi)
{
Rlas = Ri + ((Ri-Re)/Zi)*(z-Zi);
Ri = Rlas;
Re = 2*Rlas;
d = sqrt((x-X0)*(x-X0)+(y*y));
qlas = (CHIupp*EffL*Flas*Flas*Plas)/(PI*(1-exp(-3))*Zi*((Ri*Ri)+(Ri*Re)+(Re*Re)))*exp(-(Flas*d*d)/(Rlas*Rlas));

}

else if (z>=Zi && z<Zkey)
{

qlas = (CHIlow*EffL*Plas)/(PI*Ri*Ri*(Zkey-Zi));

}
else
{
qlas = 0;
}
C_PROFILE(c, thread, position)= qlas;

}
end_c_loop(c, thread)


}


If someone can help me would be awsome! Thanks to everyone in advance
eddy94 is offline   Reply With Quote

Old   January 22, 2020, 02:12
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
line 35:
Rlas = Ri + ((Ri-Re)/Zi)*(z-Zi);

Ri and Re are not defined

compile your code an read logs
anoop.k.unni and eddy94 like this.
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   January 22, 2020, 10:39
Default
  #3
New Member
 
Join Date: Jan 2020
Posts: 2
Rep Power: 0
eddy94 is on a distinguished road
Thank you very much for your fast responce. Now my problem is solved, god bless you!
eddy94 is offline   Reply With Quote

Reply

Tags
fluent - udf, laser welding, udf code


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
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM Rizwan Fluent UDF and Scheme Programming 40 March 18, 2018 07:05
Problem with DPM simulation with particles injection and EXECUTE_AT_THE_END UDF. Ari Fluent UDF and Scheme Programming 4 May 31, 2016 09:51
udf loading problem santu Fluent UDF and Scheme Programming 1 May 22, 2015 16:47
Vaporization pressure UDF property problem? lehoanganh07 Fluent UDF and Scheme Programming 1 September 13, 2014 11:59
Problem with my udf july Fluent UDF and Scheme Programming 3 June 20, 2010 07:56


All times are GMT -4. The time now is 21:26.