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

If C_UDMI(c,t,0) has been defined, can i directly use F_UDMI(c,t,0)?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 29, 2015, 09:04
Default 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: 12
aestas is on a distinguished road
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)
}
aestas is offline   Reply With Quote

Old   April 30, 2015, 07:41
Default
  #2
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
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?
`e` is offline   Reply With Quote

Old   April 30, 2015, 08:47
Default
  #3
Member
 
Peter Aestas
Join Date: Dec 2013
Posts: 64
Rep Power: 12
aestas is on a distinguished road
Quote:
Originally Posted by `e` View Post
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?
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.
aestas is offline   Reply With Quote

Old   April 30, 2015, 17:55
Default
  #4
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
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.
`e` is offline   Reply With Quote

Old   May 1, 2015, 02:48
Default
  #5
Member
 
Peter Aestas
Join Date: Dec 2013
Posts: 64
Rep Power: 12
aestas is on a distinguished road
Quote:
Originally Posted by `e` View Post
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.
Sounds great!Thank you my friend! I will try this
aestas is offline   Reply With Quote

Reply


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
Gradient of a User defined Variable Ramadas CFX 2 August 21, 2007 09:19
User defined memory Hp FLUENT 0 September 24, 2004 00:10
defined order of react ???? joby FLUENT 0 November 27, 2001 01:00
How to use user defined Subroutine Ning Yang FLUENT 6 November 14, 2000 06:32
Naming User Defined Scalars Greg Perkins FLUENT 0 March 6, 2000 23:10


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