|
[Sponsors] |
February 17, 2019, 14:07 |
Fluent Welding
|
#1 |
New Member
Mateusz
Join Date: Feb 2019
Posts: 2
Rep Power: 0 |
Hello
I want to simulate a heat source (Goldak model) during TIG welding. Every time I add the UDF and I want to do the initialization, I get an error: "the f1 process could not be started fluent" #include"udf.h" #define PI 3.14159 #define v 0.00833 #define Il 150 #define Ul 14.25 #define af 0.005 #define ar 0.01 #define b 0.005 #define c 0.006 #define r 0.005 DEFINE_SOURCE(heat_qian_source_moving,cell,thread, dS,eqn) { real xc[ND_ND],source; real x,y,z,t; C_CENTROID(xc,cell,thread); x=xc[0]; y=xc[1]; z=xc[2]; t=RP_Get_Real("flow-time"); if(((x-r-v*t)*(x-r-v*t)/(af*af)+y*y/(b*b)+z*z/(c*c))<=1&&(x-r-v*t)>=0) { source=(2*af/(af+ar))*0.8*Ul*Il*6*sqrt(3)/(PI*sqrt(PI)*af*b*c)*exp(-3*(x-r-v*t)*(x-r-v*t)/(af*af)-3*y*y/(b*b)-3*z*z/(c*c)); dS[eqn]=0; } else if(((x-r-v*t)*(x-r-v*t)/(ar*ar)+y*y/(b*b)+z*z/(c*c))<=0); { source=(2*ar/(af+ar))*0.8*Ul*Il*6*sqrt(3)/(PI*sqrt(PI)*ar*b*c)*exp(-3*(x-r-v*t)*(x-r-v*t)/(ar*ar)-3*y*y/(b*b)-3*z*z/(c*c)); dS[eqn]=0; } { source=0; dS[eqn]=0; } return source; } |
|
February 18, 2019, 20:50 |
|
#2 |
Senior Member
Join Date: Sep 2017
Posts: 246
Rep Power: 12 |
Hi Musiek17,
Your if...else structures are flawed. The first structure is this: Code:
if(test1) { /* do stuff1 */ }else if (test2) { /* do stuff2 */ } Then your second structure is Code:
{ /* do stuff3 */ } I think you probably intended this: Code:
if(test1) { /* do stuff1 */ }else if (test2) { /* do stuff2 */ }else{ /* do stuff3 */ } Good luck! Ed |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Two questions on Fluent UDF | Steven | Fluent UDF and Scheme Programming | 7 | March 23, 2018 04:22 |
heat transfer with RANS wall function, over a flat plate (validation with fluent) | bruce | OpenFOAM Running, Solving & CFD | 6 | January 20, 2017 07:22 |
Running UDF with Supercomputer | roi247 | FLUENT | 4 | October 15, 2015 14:41 |
Fluent 12.0 is worst then Fluent 6.2 | herntan | FLUENT | 5 | December 14, 2009 03:57 |
Problems in lauching FLUENT | Lourival | FLUENT | 3 | January 16, 2008 17:48 |