CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

pls check this c program

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 7, 2008, 08:32
Default pls check this c program
  #1
bestrcsekhar
Guest
 
Posts: n/a
#include "udf.h"

static real v_prev = 0.0;

static real A = 0.00009;

static real f = 1;

DEFINE_CG_MOTION(piston,dt,vel,omega,time,dtime)

{

/* reset velocities */

NV_S(vel, =, 0.0);

NV_S(omega, =, 0.0);

if (!Data_Valid_P())

return;

/* equation of velocity */

v_prev = 2*3.142*A*f*sin(2*3.142*f*time+3.142/2);

/* set x-component of velocity */

vel[0] = v_prev;

}

can u tell me the mistake in it
  Reply With Quote

Old   December 8, 2008, 06:34
Default Re: pls check this c program
  #2
Steve
Guest
 
Posts: n/a
which 1 do u wont, the 1st or last?????
  Reply With Quote

Old   December 8, 2008, 08:43
Default Re: pls check this c program
  #3
bestrcsekhar
Guest
 
Posts: n/a
when i am using this i am getting an an phase error in second line

and also in the equation
  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
*** CAE program for heat conducting *** Rogerio Fernandes Brito CFX 12 January 26, 2008 07:12
Grid independence check Mattis Voss FLUENT 1 November 23, 2005 11:30
3-D Mesh Check in Gambit..... SHR FLUENT 4 March 25, 2003 04:10
How to write a simple program ?? kokey FLUENT 0 March 19, 2002 11:21
Any numerical triple integration program is available in Fortran? Radhakrishnan Main CFD Forum 3 March 4, 1999 02:03


All times are GMT -4. The time now is 05:28.