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

Mass source UDF in 2D axisymmetric domain

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

LinkBack Thread Tools Display Modes
Old   July 13, 2015, 17:34
Default Mass source UDF in 2D axisymmetric domain
New Member
Join Date: May 2014
Posts: 2
Rep Power: 0
Michael.Z is on a distinguished road
Hello all,

I want to set up a UDF mass source term that calculates a mass sink for every cell in my domain depending on the varying mass fraction of a certain species (water) in every cell.
The species should be reduced by a constant rate of 0.0002 per second. My domain is 2D axisymmetric and I run transient solver.

Here what I came up with so far:

real sink;


/* sink term definition: (mass fraction) x (density) x (sink constant rate) (kg/m3 s)*/

/* derivative of sink term */
dS[eqn] = 0;
sink = dS[eqn] = 0;

return sink;

The UDF is running perfectly fine showing reduction in the species in the domain but I am getting results that are off by some factors from what I expected.
I feel like I made a mistake setting up the sink term but I cant figure out what it is. I thought I might have to implement a loop over every cell but I'm not sure.

Thanks in advance for any help.

Michael.Z 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
Issues with mass source macros in a multiphase system cp703 Fluent UDF and Scheme Programming 4 April 14, 2015 03:34
Mass source term definition in UDF for an axisymmetric problem adnanakhtar Fluent UDF and Scheme Programming 0 February 19, 2015 19:18
Swak4FOAM 0.2.3 / OF2.2.x installation error FerdiFuchs OpenFOAM Installation 27 April 16, 2014 15:14
what is swap4foam ?? AB08 OpenFOAM 27 July 1, 2013 09:17
I need UDF help. S.Whitney FLUENT 0 October 15, 2007 11:29

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