|
[Sponsors] |
July 1, 2014, 02:32 |
How to make a new variable for Initialize?
|
#1 |
New Member
Jups
Join Date: Jul 2014
Posts: 12
Rep Power: 12 |
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? |
|
Tags |
initialize, new variable, udf |
|
|
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 06:43 |
[OpenFOAM] paraFoam not found | maysmech | ParaView | 26 | October 25, 2011 04: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 |