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

Scheme file for sinusoidal channel flow

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 24, 2009, 11:27
Default Scheme file for sinusoidal channel flow
  #1
New Member
 
Join Date: Nov 2009
Posts: 3
Rep Power: 17
elobb is on a distinguished road
I am trying to model flow through a channel, Womersley number one, with a sinusoidal pressure gradient. I saw elsewhere on this forum that using a udf with a scheme file to implement it at each timestep is the way forward, though I am having trouble programming the scheme file.

This is the udf and scheme file I started with..

udf...

#include "udf.h"

DEFINE_EXECUTE_AT_END(execute)
{
real pressure, t;
t=CURRENT_TIME;
pressure=sin(t);; /* The pressure gradient can be a function of time. */
RP_Set_Real("flag", pressure); /* This will store the pressure gradient value in a variable called flag*/
}

scheme file...

(rp-var-define 'flag 0 'real #f)
(define print
(lambda()
(define nu (rpgetvar 'flag))
(rpsetvar 'periodic/pressure-derivative nu)
)
)

Any help would be much appreciated

Regards
elobb 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
Complex problem: Open Channel Flow lett FLUENT 18 November 10, 2018 19:30
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 02:24
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 15:00
Results saving in CFD hawk Main CFD Forum 16 July 21, 2005 21:51
compressible channel flow.. R.D.Prabhu Main CFD Forum 0 July 17, 1998 18:23


All times are GMT -4. The time now is 00:36.