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 Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By AlexanderZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 21, 2020, 09: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, 01:12
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 1,424
Rep Power: 21
AlexanderZ 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
eddy94 likes this.
__________________
best regards


******************************
press LIKE if this message helped you

How to ask questions:
https://www.cfd-online.com/Forums/si...tml#post612025
AlexanderZ is offline   Reply With Quote

Old   January 22, 2020, 09: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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 06:05
Problem with DPM simulation with particles injection and EXECUTE_AT_THE_END UDF. Ari Fluent UDF and Scheme Programming 4 May 31, 2016 08:51
udf loading problem santu Fluent UDF and Scheme Programming 1 May 22, 2015 15:47
Vaporization pressure UDF property problem? lehoanganh07 Fluent UDF and Scheme Programming 1 September 13, 2014 10:59
Problem with my udf july Fluent UDF and Scheme Programming 3 June 20, 2010 06:56


All times are GMT -4. The time now is 05:47.