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

Why temperature dependent UDF is crashing in Ansys fluent without any error?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 6, 2022, 00:04
Default Why temperature dependent UDF is crashing in Ansys fluent without any error?
  #1
New Member
 
Ram Rapaka
Join Date: Nov 2022
Location: Indian Institute of Technology Palakkad
Posts: 2
Rep Power: 0
RamR is on a distinguished road
In am using a UDF for heat flux that is dependent on temperature. If I am using constant temperature it is giving results. But using temperature function (F_T(f,t)) in code, fluent is crashing withot any error while initiation. I am attaching my code.Untitled.png

#include "udf.h"
#include "math.h"
DEFINE_PROFILE(heat_profile_pinbase,thread,positio n)
{
real x[ND_ND];
real a,b,c,r;
//sticking and slipping heat flux
real stk,slp;
// Fractional plastic deformation converted to heat and percentage of heat transfered to w/p
real eta_m = 0.4, eta_h=0.6;
// Fractional slip and coefficient of friction
real delta, mu_f;
// Fitting Constant
real C_f = 0.31;
// Angular Velocity, welding speed and Axial Pressure
real omg = 157.08, U = 0.0017, P_n=10*pow(10,6);
// Yield Stength and shear strength
//real sig_y = 50 * pow(10,6), tou_y = sig_y / sqrt(3);
real sig_y,tou_y;
// Axial center coordinates
int i=0,j=0,k=0;
real tem;
face_t f;
//cell_t ce;
begin_f_loop(f,thread)
{
//tem = 300;
tem = F_T(f,thread);
//tem = C_T(ce,thread);
if (tem >= 800)
{
tou_y = 0;
}
else
{
sig_y = (11.76 + 8206.07 / exp(tem / 107.60)) * pow(10, 6);
tou_y = sig_y / sqrt(3);
}
F_CENTROID(x,f,thread);
a =x[0]-i;
b =x[1]-j;
c =x[2]-k;
// radial distance
r =sqrt(pow(a,2)+pow(c,2));
//Fractinal slip and co-efficient of friction
delta = C_f * exp((r * omg) / 1.87) - 0.026;
mu_f = 0.5 / exp(delta * r * omg);
// Sticking and Sliping heat flux
stk= eta_m *(1-delta)*tou_y;
slp=delta*mu_f*P_n;
//Total Heat Flux
F_PROFILE(f,thread,position) = eta_h *(stk+slp)*(omg*r-U*(a/r));
}
end_f_loop(f,thread)
}

Last edited by RamR; November 9, 2022 at 01:48.
RamR is offline   Reply With Quote

Old   November 8, 2022, 23:36
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
where is F_T(f,t) macro in your code?

fluent is not crushing without errors if:
1. UDF is compiled properly
2. Fluent is installed properly
in other words, compile your udf, fix all errors and run case. If fluent crashes still, reinstall fluent
__________________
best regards


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

Old   November 9, 2022, 01:22
Default
  #3
New Member
 
Ram Rapaka
Join Date: Nov 2022
Location: Indian Institute of Technology Palakkad
Posts: 2
Rep Power: 0
RamR is on a distinguished road
I have highlighted (tem = F_T(f,thread)) micros in the code. Thank you
RamR 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
UDF for DPM particle deposition modelingpa haghshenasfard Fluent UDF and Scheme Programming 10 September 15, 2019 02:03
Compile calcMassFlowC aurore OpenFOAM Programming & Development 13 March 23, 2018 07:43
DPM udf error haghshenasfard FLUENT 0 April 13, 2016 06:35
Compiling problems with hello worldC fw407 OpenFOAM Installation 21 January 6, 2008 17:38
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51


All times are GMT -4. The time now is 01:13.