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

How to make a new variable for Initialize?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 1, 2014, 01:32
Default How to make a new variable for Initialize?
  #1
New Member
 
Jups
Join Date: Jul 2014
Posts: 12
Rep Power: 11
Jups is on a distinguished road
hello..
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;
time = CURRENT_TIME;

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

Reply

Tags
initialize, new variable, udf


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


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