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

UDF: define_profile

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 13, 2015, 12:06
Default UDF: define_profile
  #1
Member
 
Join Date: Jan 2015
Posts: 40
Rep Power: 11
philus is on a distinguished road
Hi all,

I am trying to set a particular wall heat transfer coefficient to an external wall. I also wanted to monitor the value computed by my UDF, then I used the user-defined memory. But the correspondent variable (when I search for it in FLuent) is always zero. Note that if I write in the UDF printf('variable name') I get the good values....but I need to put these values into a variable!

I copy paste the simplified UDF:

Code:
DEFINE_PROFILE(name,t,i)
{
  real h;
  begin_f_loop(f,t){
    h=10.0;
    F_UDMI(f,t,0) = h;
    printf("h:%f\n",h);
    F_PROFILE(f,t,i)= h;
  }
  end_f_loop(f,t)
}
I have the impression that the UDF works well for setting the boundary condition, but I cannot monitor the variable (h) that I have created. Can someone explain me what is the problem?

Thanks in advance
philus
philus is offline   Reply With Quote

Old   April 13, 2015, 19:40
Default
  #2
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
There's nothing obviously wrong with your code. Are you sure you're applying it to the correct boundary, running at least one iteration with the profile applied and then displaying contours (or otherwise) of this User-Defined Memory on the same boundary face?
`e` is offline   Reply With Quote

Old   April 14, 2015, 03:30
Default
  #3
Member
 
Join Date: Jan 2015
Posts: 40
Rep Power: 11
philus is on a distinguished road
Nope, it is well set as boundary condition.

I can run the simulation and apparently it works (the heat exchange seems to respect the values that I was expecting), but when I want plot contours of the User Defined Memory 0 this value is always nil...
philus is offline   Reply With Quote

Old   April 14, 2015, 04:05
Default
  #4
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
So you're trying to access the UDM from CFD-Post? Select "User Memory 0" instead of "User Defined Memory 0".
`e` is offline   Reply With Quote

Old   April 14, 2015, 04:09
Default
  #5
Member
 
Join Date: Jan 2015
Posts: 40
Rep Power: 11
philus is on a distinguished road
Actually I am trying to access to the "User Defined Memory 0" with Monitors in Fluent (I would check the evolution of the parameter in the time, it is a transient simulation).
philus is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Dynamic Mesh UDF Qureshi FLUENT 7 March 23, 2017 08:37
WILLING TO PAY/ FREELANCER REQUIRED / small UDF coding force loads over body / 6DOF acasas CFD Freelancers 1 January 23, 2015 08:26
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 23:14
How to add a UDF to a compiled UDF library kim FLUENT 3 October 26, 2011 22:38
UDF...UDF...UDF...UDF Luc SEMINEL FLUENT 0 November 25, 2002 05:03


All times are GMT -4. The time now is 02:47.