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

Friction Stir Welding UDF in Fluent 2020 R2( Fluent is Automatically closed)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 10, 2022, 13:27
Default Friction Stir Welding UDF in Fluent 2020 R2( Fluent is Automatically closed)
  #1
New Member
 
Gazi Raihan
Join Date: Feb 2022
Posts: 3
Rep Power: 4
raihan57 is on a distinguished road
Dea Altruits,
I am trying to simulate the CFD simulation of friction stir welding. I have written the code for process simulation. The code is fully compiled. But when I load the code(fiction heat part), the ansys fluent GUI is automatically shut down. It would you really kind enough if you let me know how I can solve the issue. I am sharing my udf code with you below.

Best regards
Gazi Raihan



// Heat generation is two types: friction+sticking heat generation in the interface and heat generation due to plasticity/viscous dissipation out of the interface
// Heat Generation in sticking/ shipping condition
// Sticking/slipping heat flux at the tool shoulder
DEFINE_PROFILE(Frictional_heat_flux,thread, index)
{
real x[ND_ND];
#define omega0 8.4
#define deltao 0.35
#define muef 0.4
real mue;
real omegaV;
real temp;
real sticking;
real theta;
real R;
real pressure;
real yieldstress;
real area =0.0019635;
real axialforce = 24500;
real cf=0.95;
face_t f;
begin_f_loop(f, thread)
{
F_CENTROID(x,f, thread);
R=sqrt((x[1]*x[1])+(x[0]*x[0]));
temp=F_T(f, thread);
if (temp <=1500)
yieldstress=(0.0013*temp*temp-2.068*temp+794.62)*1000000;
else
{
yieldstress = 0;
}
theta=-atan2(x[1],x[0]);
omegaV=omega0*R/Rmax;
sticking=1-exp(-1*omegaV*R/(deltao*omega0*Rmax));
mue=muef*exp(-1*sticking*omegaV*R);
pressure= axialforce/area;
F_PROFILE(f, thread, index)=cf*(sticking*yieldstress/1.73*(omegaV*R-U*sin(theta))+(1-sticking)*mue*pressure);
}
end_f_loop(f, thread)
}
// Full sticking condition heat flux at tool probe for the bottom plane all of the probe
DEFINE_PROFILE(Frictional_heat_flux_probe, thread, index)
{
real x[ND_ND];
#define omega0 8.4
#define deltao 0.35
#define muef 0.4
real mue;
real omegaV;
real cf=0.95;
real temp;
real sticking=1;
real theta;
real R;
real Rma=0.006;
real area= 0.000113;
real axialforce=1436;
real pressure;
real yieldstress;
face_t f;
begin_f_loop(f, thread)
{
F_CENTROID(x,f, thread);
R=sqrt((x[1]*x[1])+(x[0]*x[0]));
temp=F_T(f, thread);
if (temp<=1500)
yieldstress=(0.0013*temp*temp-2.068*temp+794.62)*1000000;
else
{
yieldstress=0;
}
theta=-atan2(x[1],x[0]);
R=sqrt((x[1]*x[1])+(x[0]*x[0]));
omegaV=omega0*R/Rma;
mue=muef*exp(-1*sticking*omegaV*R);
pressure=axialforce/area;
F_PROFILE(f, thread, index)=cf*(sticking*yieldstress/1.73*(omegaV*R-U*sin(theta))+(1-sticking)*mue*pressure);
}
end_f_loop(f, thread)
}
// Full Sticking condition of the heat flux in Probe Side Verticle Side
DEFINE_PROFILE(Frictional_heat_flux_probe_verticle , thread, index)
{
real x[ND_ND];
#define omega0 8.4
#define deltao 0.35
#define muef 0.4
#define U 0.0004
real mue;
real omegaV;
real cf=0.95;
real temp;
real sticking=1;
real theta;
real R;
real Rma=0.006;
real area= 0.000113;
real axialforce=1436;
real pressure;
real yieldstress;
face_t f;
begin_f_loop(f, thread)
{
F_CENTROID(x,f, thread);
R=sqrt((x[1]*x[1])+(x[0]*x[0]));
temp=F_T(f, thread);
if (temp<=1000)
yieldstress=(0.0013*temp*temp-2.068*temp+794.62)*1000000;
else
{
yieldstress=0;
}
theta=-atan2(x[1],x[0]);
R=sqrt((x[1]*x[1])+(x[0]*x[0]));
omegaV=omega0*R/Rma;
mue=muef*exp(-1*sticking*omegaV*R);
pressure=axialforce/area;
F_PROFILE(f, thread, index)=cf*(sticking*yieldstress/1.73*(omegaV*Rma-U*sin(theta))+(1-sticking)*mue*pressure);
}
end_f_loop(f, thread)
}
raihan57 is offline   Reply With Quote

Reply


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
Simulation of Friction Stir Welding of Pipe Butt Joints keysersoze ANSYS 0 November 26, 2018 04:50
A Problem of Fluent Interpreted UDF: parse error knight Fluent UDF and Scheme Programming 25 August 16, 2018 11:26
Two questions on Fluent UDF Steven Fluent UDF and Scheme Programming 7 March 23, 2018 04:22
How to Calculate the Friction by UDF in FLUENT lzgwhy FLUENT 0 July 27, 2009 06:29
fluent UDF external library lapack problem Rick FLUENT 0 May 7, 2008 11:16


All times are GMT -4. The time now is 20:07.