|
[Sponsors] |
Why temperature dependent UDF is crashing in Ansys fluent without any error? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 6, 2022, 01:04 |
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 |
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 02:48. |
|
November 9, 2022, 00:36 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
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 |
|
November 9, 2022, 02:22 |
|
#3 |
New Member
Ram Rapaka
Join Date: Nov 2022
Location: Indian Institute of Technology Palakkad
Posts: 2
Rep Power: 0 |
I have highlighted (tem = F_T(f,thread)) micros in the code. Thank you
|
|
|
|
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 03:03 |
Compile calcMassFlowC | aurore | OpenFOAM Programming & Development | 13 | March 23, 2018 08:43 |
DPM udf error | haghshenasfard | FLUENT | 0 | April 13, 2016 07:35 |
Compiling problems with hello worldC | fw407 | OpenFOAM Installation | 21 | January 6, 2008 18:38 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 18:51 |