CFD Online Logo CFD Online URL
Home > Forums > Fluent UDF and Scheme Programming

UDF doubt

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

LinkBack Thread Tools Display Modes
Old   June 7, 2017, 01:44
Default UDF doubt
New Member
Join Date: May 2017
Posts: 7
Rep Power: 2
raviramesh10 is on a distinguished road
Hello everyone,

I am simulating the behaviour of the non-Newtonian fluid, Colgate on top of a vibrating membrane of a speaker. I have been working on a UDF to apply on a vibrating membrane, giving it a sinusoidal input velocity, i.e.,
v =v0* cos(pi*x/L)*sin(2*pi*f*t)

Where v0 is the maximum velocity achieved by the vibrating membrane and pi is already defined. f is the input frequency which I have obtained from previous experiments.

#include "udf.h"
#include "dynamesh_tools.h"
#define pi 3.1416
DEFINE_GRID_MOTION(inlet_y_velocity,d,dt,time,dtim e)
Thread *t;
real y[ND_ND];
real x_c;
face_t f;
real v;
Node *w;
int n;

w = F_NODE(f,t,n);
if (NODE_X(v)>0 && NODE_X(v)<0.08 && NODE_Y(v)==0 && NODE_POS_NEED_UPDATE(v))

I would like to know the correction for the errors in the code, as well as suggestions to improve the code.
raviramesh10 is offline   Reply With Quote


Thread Tools
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF for vapor pressure anuarun Fluent UDF and Scheme Programming 1 May 18, 2017 09:28
Doubt about real x[ND_ND] declaration in FLUENT udf Abhya Fluent UDF and Scheme Programming 5 March 21, 2013 01:21
parse error while interpreting udf Kristin Fluent UDF and Scheme Programming 3 March 15, 2012 07:43
I need UDF help. S.Whitney FLUENT 0 October 15, 2007 11:29
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 05:01

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