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

help udf error

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 2 Post By pakk
  • 1 Post By pakk

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   September 26, 2014, 02:50
Default help udf error
  #1
Member
 
ad
Join Date: Apr 2014
Posts: 75
Rep Power: 12
adi.ptb is on a distinguished road
hi guys, i have a problem compiling a udf ,i want to simulate a pulse tube refrigerator,in order to model the piston i used this udf :
#include "udf.h"
#include "dynamesh_tools.h"
DEFINE_CG_MOTION(oscillate,dt,vel,omega,time,dtime )
{
Thread *t;
face_t f; /* define the variables */

t = DT_THREAD(dt); /* get the thread pointer for which the motion is defined */

/* if (!Data_Valid_P())
/* return; /* check if the values of the variables are accessible before you compute the function */

begin_f_loop(f,t) /* loop over each face in the zone to create an array of data */
{
if (time <= 1)
vel[0] = -2* 3.14159 * 2 * 0.025 * cos (2 * 3.14159 * 2 * time); /* define the velocity of the moving zone---*/
else
vel[0] = 0;
}
end_f_loop(f,t)
}
i successfully compiled it,but when i tried to compile this udf for time dependent viscosity :
#include "udf.h"
DEFINE_PROPERTY(helium_viscosity,c,t)
{
real T = C_T(c,t);
return (0.412e-6)*(T**0.68014);
}

it wont compile,i even tried a udf from fluent udf manual:
#include "udf.h"
DEFINE_PROPERTY(cell_viscosity, cell, thread)
{
real mu_lam;
real T = C_T(cell, thread);
if (T > 288.)
mu_lam = 5.5e-3;
else if (T > 286.)
mu_lam = 143.2135 - 0.49725 * T;
else
mu_lam = 1.;
return mu_lam;
}
but it wont compile either,does anyone know what might be the problem?
please help
adi.ptb is offline   Reply With Quote

 


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
[OpenFOAM] an error in Calculator's equation immortality ParaView 12 June 29, 2021 00:10
Undeclared Identifier Errof UDF SteveGoat Fluent UDF and Scheme Programming 7 October 15, 2014 07:11
ParaView for OF-1.6-ext Chrisi1984 OpenFOAM Installation 0 December 31, 2010 06:42
Installation OF1.5-dev ttdtud OpenFOAM Installation 46 May 5, 2009 02:32
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 20:50


All times are GMT -4. The time now is 21:55.