|
[Sponsors] |
June 22, 2010, 17:13 |
DEFINE_ADJUST question
|
#1 |
New Member
Join Date: Apr 2010
Posts: 15
Rep Power: 16 |
Hi,
I need to define a variable using DEFINE_ADJUST macro, looping over all cells in all cell threads. Also I want to monitor another variable on a certain face, which requires to loop over the faces on only one face thread. I understand that if I only have the first part, then I only need to define one t and c, which will represent all cell threads. But since I also need to operate on a single face thread, can I just define two threads, one for the general thread and one for the specific face thread? Will that cause conflict during calculation? I tried the following code, but I can't tell whether the result is right or not, since I'm not sure how to check the solutions, and the F_UDMI couldn't be displayed. Could anyone please tell me whether this is the correct way to do it? Thank you very much! DEFINE_ADJUST(my_adjust, domain) { Thread *t; cell_t c; thread_loop_c(t,domain) { begin_c_loop(c,t) { C_UDMI(c,t,0) = C_T(c,t); }end_c_loop(c,t) } Thread *tf = Lookup_Thread (domain, 3); face_t f; begin_f_loop(f, tf) { F_UDMI(f,tf,1) = Dm; //a constant } end_f_loop(f,tf) } thank you, ljp |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
question about uds | tanven | FLUENT | 2 | July 5, 2015 11:22 |
Unanswered question | niklas | OpenFOAM | 2 | July 31, 2013 16:03 |
Question about Table applicaiton. | universez | OpenFOAM Running, Solving & CFD | 0 | January 12, 2010 20:31 |
CHANNEL FLOW: a question and a request | Carlos | Main CFD Forum | 4 | August 23, 2002 05:55 |
question | K.L.Huang | Siemens | 1 | March 29, 2000 04:57 |