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

Fluent Welding

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 17, 2019, 14:07
Default Fluent Welding
  #1
New Member
 
Mateusz
Join Date: Feb 2019
Posts: 2
Rep Power: 0
Musiek17 is on a distinguished road
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;
}
Musiek17 is offline   Reply With Quote

Old   February 18, 2019, 20:50
Default
  #2
Senior Member
 
Join Date: Sep 2017
Posts: 246
Rep Power: 12
obscureed is on a distinguished road
Hi Musiek17,

Your if...else structures are flawed. The first structure is this:
Code:
if(test1) {
  /* do stuff1 */
}else if (test2) {
  /* do stuff2 */
}
... and this does stuff1 or stuff2 or nothing.

Then your second structure is
Code:
{
   /* do stuff3 */
}
which always happens.

I think you probably intended this:
Code:
if(test1) {
  /* do stuff1 */
}else if (test2) {
  /* do stuff2 */
 }else{
  /* do stuff3 */
 }
But none of this explains why you would be getting such fatal errors. I think you need to make the test case even simpler to find the cause of these errors.
Good luck!
Ed
obscureed 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
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


All times are GMT -4. The time now is 19:15.