# Momentum by force equation in UDF

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

 October 18, 2013, 05:14 Momentum by force equation in UDF #1 New Member   Join Date: Apr 2011 Posts: 29 Rep Power: 7 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!