|
[Sponsors] |
December 7, 2008, 08:32 |
pls check this c program
|
#1 |
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 |
|
December 8, 2008, 06:34 |
Re: pls check this c program
|
#2 |
Guest
Posts: n/a
|
which 1 do u wont, the 1st or last?????
|
|
December 8, 2008, 08:43 |
Re: pls check this c program
|
#3 |
Guest
Posts: n/a
|
when i am using this i am getting an an phase error in second line
and also in the equation |
|
|
|
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 |