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

UDF problem- time dependent temperature at inlet

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

Reply
 
LinkBack Thread Tools 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: 4
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, 21:48
Default
  #2
Member
 
Shane
Join Date: Oct 2009
Posts: 52
Rep Power: 9
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

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
libOpenSMOKE Tobi OpenFOAM Programming & Development 507 March 4, 2016 05:30
If statement for time dependent UDF serhan Fluent UDF and Scheme Programming 1 July 28, 2014 23:44
Time dependent angular velocity calculation UDF shashankmechguy Fluent UDF and Scheme Programming 0 June 22, 2014 23:25
Low Mixing time Problem Mavier CFX 5 April 29, 2013 00: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 08:04.