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

problem with coupling UDFs

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 26, 2016, 06:32
Default problem with coupling UDFs
  #1
New Member
 
Hamidreza
Join Date: Jun 2014
Posts: 9
Rep Power: 12
hamidreza118 is on a distinguished road
Hello,

I wrote a UDF and it is compiled and loaded without any error, but there seems to be a deficiency as it is not ending in the result i'm expecting.

I have a DEFINE_PROFILE macro with a begin and end loop and there's another UDF called "void transformation (Thread *f_thread)" which i introduced in my udf to store some vectors in F_UDMI. but my problem is that i can not couple these UDFs when i'm compiling. I think i need something like if (RP_Get_Integer (...)) transformation (f_thread) in the first udf but i have no idea how to trigger the coupling as i'm inexperienced in this subject.
Thanks in Advance.
hamidreza118 is offline   Reply With Quote

Old   April 26, 2016, 07:30
Default
  #2
Senior Member
 
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 13
Bruno Machado is on a distinguished road
Quote:
Originally Posted by hamidreza118 View Post
Hello,

I wrote a UDF and it is compiled and loaded without any error, but there seems to be a deficiency as it is not ending in the result i'm expecting.

I have a DEFINE_PROFILE macro with a begin and end loop and there's another UDF called "void transformation (Thread *f_thread)" which i introduced in my udf to store some vectors in F_UDMI. but my problem is that i can not couple these UDFs when i'm compiling. I think i need something like if (RP_Get_Integer (...)) transformation (f_thread) in the first udf but i have no idea how to trigger the coupling as i'm inexperienced in this subject.
Thanks in Advance.
can you post your UDF or the void transformation (Thread *f_thread) so we can see it and try to come with a solution?
Bruno Machado is offline   Reply With Quote

Old   April 26, 2016, 08:29
Default
  #3
New Member
 
Hamidreza
Join Date: Jun 2014
Posts: 9
Rep Power: 12
hamidreza118 is on a distinguished road
Quote:
Originally Posted by Bruno Machado View Post
can you post your UDF or the void transformation (Thread *f_thread) so we can see it and try to come with a solution?
I've already done that but as i previously mentioned the links between DEFINE_PROFILE and void is not there! I see somewhere used the if(RP_Integer ... ) to trigger the link, so my code looks like this now:

DEFINE_PROFILE(HF,f_thread,index)

/*declaring all variables*/
if (RP_Get_Integer(“needing_transformation")==1) transformation (f_thread)
{
..
..
..
}


void transformation(Thread *f_thread)
{
..
..
..
}

but when i'm trying to compile this Fluent says:
there is a missing ';' before '{' in my if line !!

but i'm sure after if we shouldn't use semi colon, should we??
and I'm very sorry but do you have any idea how should i assign "needing_transformation" a value like 1 to link these two, since i don't know what RP_Integer.. really does although i've read a lot about it..
Thank you so so so much
hamidreza118 is offline   Reply With Quote

Reply

Tags
rp_get_integer, udfs coupling, void


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
Problem in using system coupling in ANSYS 14.5 yhy20081016 FLUENT 1 April 16, 2016 08:39
problem using property udfs in parallel mode EllenW FLUENT 0 June 23, 2009 18:18
UDFs' problem Benny FLUENT 14 June 13, 2005 12:05
Fluid-structure coupling problem bluebird Main CFD Forum 4 January 25, 2003 11:04
Fluid-structure coupling problem bluebird CFX 1 January 17, 2003 06:46


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