CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   UDF: define_profile (https://www.cfd-online.com/Forums/fluent/151586-udf-define_profile.html)

philus April 13, 2015 11:06

UDF: define_profile
 
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

`e` April 13, 2015 18:40

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?

philus April 14, 2015 02:30

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...

`e` April 14, 2015 03:05

So you're trying to access the UDM from CFD-Post? Select "User Memory 0" instead of "User Defined Memory 0".

philus April 14, 2015 03:09

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).


All times are GMT -4. The time now is 03:20.