CFD Online Logo CFD Online URL
Home > Forums > FLUENT

How to make a new variable for Initialize?

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

LinkBack Thread Tools Display Modes
Old   July 1, 2014, 01:32
Default How to make a new variable for Initialize?
New Member
Join Date: Jul 2014
Posts: 12
Rep Power: 3
Jups is on a distinguished road
I have a problem.. I used source terms and I make UDF for my source terms..
but i need to define one variable, q = 0 as initialize.. so that the q variable could looping from time to time...
this is my UDF mass sourceterms example :

DEFINE_SOURCE(mass_source, cell, thread)
real time, turq, q, source;

turq = k*(qe-q);
q = q+turq*time;

source = -((1-e)/e)*turq*Rc;
return source;


i got problem for my q variable...
can anyone help me to make a new variable q for initialize?
Jups is offline   Reply With Quote


initialize, new variable, udf

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
OF 1.6 ext on Ubuntu 12.10 (64 bit) compilation errors dreamilam OpenFOAM Installation 7 April 21, 2013 05:43
paraFoam not found maysmech OpenFOAM Paraview & paraFoam 26 October 25, 2011 03:14
emag beta feature: charge density charlotte CFX 4 March 22, 2011 10:14
OpenFOAM 1.7.1 installation problem on OpenSUSE 11.3 flakid OpenFOAM Installation 16 December 28, 2010 09:48
Problems with additional variable Krishna Premi CFX 1 October 29, 2007 09:19

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