CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Fluent UDF and Scheme Programming

Momentum by force equation in UDF

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 18, 2013, 05:14
Default Momentum by force equation in UDF
  #1
New Member
 
Join Date: Apr 2011
Posts: 27
Rep Power: 6
tom634 is on a distinguished road
Hello,

I am simulating a wall by momentum equations in Cell Zone Conditions. The flow is stationary.
I have the force given by equation like:
F=c*uxn
Where:
F - force vector
c - constant
u - velocity vector
n - wall normal vector
Force generally is F=momentum/time derivative.
So, my question is, how to provide time in UDF in steady/stationary flow?

For example for X direction of flow I would have something like:
Lx=c*ux*nx
and I have to convert the force into momentum, so I would need to derive by time:
Lx/dt=Mx=c*ux*nx/dt

Code:
#include "udf.h"

DEFINE_SOURCE(name,c,t,dS,eqn)
{
real c, x_vel, L, source, n;
c=5;
x_vel=C_U(c,t);
u=x_vel;
n=2;

L=c*u*n;
source=L/dt;

return source;

}
My question is how to write line:
Code:
source=L/dt;
in a proper way?

Thank you for help!
tom634 is offline   Reply With Quote

Reply

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
Force in UDF J14 Fluent UDF and Scheme Programming 15 May 12, 2015 08:20
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 06:27
UDF force on a face enry Fluent UDF and Scheme Programming 10 March 23, 2011 11:48
Coupling between momentum and energy equation Mattia FLUENT 0 October 26, 2007 08:02
Momentum Equation used in Fluent for porous media Sherry FLUENT 0 October 24, 2005 14:41


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