CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

an udf for boundry condition of reciprocating flow

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   November 27, 2017, 05:59
Default an udf for boundry condition of reciprocating flow
New Member
Join Date: Nov 2017
Posts: 1
Rep Power: 0
mohamad-p is on a distinguished road
I want to model the time dependent reciprocating flow through a pipe. the boundary conditions at inlet and outlet are sinusoidal velocity and fully developed flow condition respectively which change in each half cycle.
So i need an udf to define a time dependent sinusoidal velocity profile at inlet and define fully developed condition at the other end of the pipe which be reversed in each half cycle.
the following udf is which i use for left boundry

#include <stdio.h>
#include <math.h>
#include "udf.h"
double t,PI,h_cyc,vel;
face_t f;
Thread *t0=THREAD_T0(thread);
cell_t c0;

h_cyc=sin(5.*t); /****half cycle****/
if (h_cyc>=0.0)
vel = h_cyc;

face_t f;

I would be so grateful if anyone help me.

Last edited by mohamad-p; November 27, 2017 at 07:23.
mohamad-p is offline   Reply With Quote


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Appropriate pressure boundary condition in incompressible flow lonelywing OpenFOAM Running, Solving & CFD 21 June 6, 2022 09:44
What will be the state or condition in fluid volume when flow is not full? shivasluzz CFX 2 May 17, 2015 02:59
Mass flow rate boundary condition with negative values ashtonJ CFX 3 November 26, 2014 05:21
Boundary condition for bifurcated flow jiejie OpenFOAM 12 March 3, 2011 10:35
External,incompressible flow boundary condition? John Main CFD Forum 0 October 1, 2003 00:00

All times are GMT -4. The time now is 12:47.