|
[Sponsors] |
If C_UDMI(c,t,0) has been defined, can i directly use F_UDMI(c,t,0)? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 29, 2015, 10:04 |
If C_UDMI(c,t,0) has been defined, can i directly use F_UDMI(c,t,0)?
|
#1 |
Member
Peter Aestas
Join Date: Dec 2013
Posts: 64
Rep Power: 13 |
Hello friends
I defined C_UDMI(c,t,0) in my udf for the whole area, but on the boundary, i need to use the face value of UDM 0 to define my boundary profile. If C_UDMI(c,t,0) has been defined, can i directly use F_UDMI(c,t,0)? if not, can i use this form?(can i replace F_UDMI(c,t,0) to C_UDMI(c,t,0) at the boundary by this method?) DEFINE_PROFILE(example,t,i) { face_t f; cell_t c0=-1; Thread *t0=NULL; begin_f_loop(f,t) { c0=F_C0(f,t); t0=F_C0_THREAD(f,t); F_PROFILE(f,t,i)=C_UDMI(c0,t0,0); } end_c_loop(f,t) } |
|
April 30, 2015, 08:41 |
|
#2 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
You've started your loop with "begin_f_loop" and ended this loop with "end_c_loop"; you should end with "end_f_loop" instead.
Your logic of setting a boundary profile based on the adjacent cell UDM sounds fine. Have you tried running this UDF? |
|
April 30, 2015, 09:47 |
|
#3 |
Member
Peter Aestas
Join Date: Dec 2013
Posts: 64
Rep Power: 13 |
well, i have corrected it in my udf, and run it. No error occurred, the boundary condition can be used in UDF, but right now i cannot figure out whether it is right or wrong.
|
|
April 30, 2015, 18:55 |
|
#4 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
If you want to check if the code is working you need to compare the face values with the adjacent cells. Perhaps first apply a non-uniform distribution of UDM adjacent to the boundary (with a quick DEFINE_ON_DEMAND; as a function of position) and run the boundary profile (either initialise your simulation or run a time step). Lastly, visualise the boundary face and adjacent cells in Fluent or CFD-Post.
|
|
May 1, 2015, 03:48 |
|
#5 | |
Member
Peter Aestas
Join Date: Dec 2013
Posts: 64
Rep Power: 13 |
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Gradient of a User defined Variable | Ramadas | CFX | 2 | August 21, 2007 10:19 |
User defined memory | Hp | FLUENT | 0 | September 24, 2004 01:10 |
defined order of react ???? | joby | FLUENT | 0 | November 27, 2001 02:00 |
How to use user defined Subroutine | Ning Yang | FLUENT | 6 | November 14, 2000 07:32 |
Naming User Defined Scalars | Greg Perkins | FLUENT | 0 | March 7, 2000 00:10 |