|
[Sponsors] |
January 21, 2020, 10:46 |
UDF for laser Keyhole problem
|
#1 |
New Member
Join Date: Jan 2020
Posts: 2
Rep Power: 0 |
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 |
|
January 22, 2020, 02:12 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
line 35:
Rlas = Ri + ((Ri-Re)/Zi)*(z-Zi); Ri and Re are not defined compile your code an read logs
__________________
best regards ****************************** press LIKE if this message was helpful |
|
January 22, 2020, 10:39 |
|
#3 |
New Member
Join Date: Jan 2020
Posts: 2
Rep Power: 0 |
Thank you very much for your fast responce. Now my problem is solved, god bless you!
|
|
Tags |
fluent - udf, laser welding, udf code |
|
|
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 |