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

UDF problem- time dependent temperature at inlet

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 27, 2015, 12:38
Post UDF problem- time dependent temperature at inlet
  #1
New Member
 
Join Date: Oct 2014
Posts: 17
Rep Power: 12
kaeran is on a distinguished road
Hello everyone,

I am relatively new to UDF and I am facing a problem in interpreting an UDF defined by me.
The UDF is a time dependent temperature profile for the inlet of 3D model.
While interpreting the UDF, I received a problem stating that there is an error in line 11: subscripted expression is not an array or pointer: int.

the UDF is as follows,

#include "udf.h"

DEFINE_PROFILE(temp_inlet, thread, position)
{
face_t f;
real X[ND_ND];
real t = CURRENT_TIME;

begin_f_loop(f, thread)
{
F_CENTROID(f,thread,position) = (3.0e-10*t*t*t*t*t) - (3.0e-07*t*t*t*t) + (0.0001*t*t*t) - (0.0217*t*t) + (1.8728*t) + 70.839
}
end_f_loop(f, thread)
}


I would like to know if this UDF is correct and also will it work on HP cluster (parallel nodes)??

If this UDF is wrong please give me suggestions to improve it.

Thank you in advance

Last edited by kaeran; January 28, 2015 at 03:31. Reason: changing error
kaeran is offline   Reply With Quote

Old   June 16, 2015, 22:48
Default
  #2
Member
 
Shane
Join Date: Oct 2009
Posts: 52
Rep Power: 17
sircorp is on a distinguished road
Quote:
Originally Posted by kaeran View Post
Hello everyone,

I am relatively new to UDF and I am facing a problem in interpreting an UDF defined by me.
The UDF is a time dependent temperature profile for the inlet of 3D model.
While interpreting the UDF, I received a problem stating that there is an error in line 11: subscripted expression is not an array or pointer: int.

the UDF is as follows,

#include "udf.h"

DEFINE_PROFILE(temp_inlet, thread, position)
{
face_t f;
real X[ND_ND];
real t = CURRENT_TIME;

begin_f_loop(f, thread)
{
F_CENTROID(f,thread,position) = (3.0e-10*t*t*t*t*t) - (3.0e-07*t*t*t*t) + (0.0001*t*t*t) - (0.0217*t*t) + (1.8728*t) + 70.839
}
end_f_loop(f, thread)
}


I would like to know if this UDF is correct and also will it work on HP cluster (parallel nodes)??

If this UDF is wrong please give me suggestions to improve it.

Thank you in advance

Please use the Power sign. 10*t*t*t**t*t is different than t^5 or 10^5

F_CENTROID(f,thread,position) = (3.0e-(pow(t,5) - (3.0e-07*pow(t,4) + (0.0001*pow(t,3) - (0.0217*pow(t,2)) + (1.8728*t) + 70.839

Shane
sircorp 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
[openSmoke] libOpenSMOKE Tobi OpenFOAM Community Contributions 562 January 25, 2023 10:21
Time dependent angular velocity calculation UDF shashankmechguy Fluent UDF and Scheme Programming 1 July 26, 2018 03:23
If statement for time dependent UDF serhan Fluent UDF and Scheme Programming 1 July 29, 2014 00:44
Low Mixing time Problem Mavier CFX 5 April 29, 2013 01:00
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 19:07


All times are GMT -4. The time now is 15:46.