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

Momentum by force equation in UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 18, 2013, 06:14
Default Momentum by force equation in UDF
  #1
New Member
 
Join Date: Apr 2011
Posts: 29
Rep Power: 15
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


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
Momentum Equation used in Fluent for porous media Sherry FLUENT 1 September 12, 2016 11:22
Force in UDF J14 Fluent UDF and Scheme Programming 15 May 12, 2015 09:20
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 07: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 09:02


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