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

interpret UDF Error????

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 25, 2013, 05:52
Question interpret UDF Error????
  #1
New Member
 
hadi
Join Date: May 2013
Posts: 10
Rep Power: 13
h.iraji is on a distinguished road
Hi
I have been a udf as follow:

#include "udf.h"
#include "mem.h"
DEFINE_GEOM(deforming,domain,dt,position)
{
cell_t c;
Thread *t;
real *position;
begin_c_loop_all(c,t)
{
position=0.2601*exp(-6.147e-05*C_P(c,t)) + 0.5091*exp(-0.0007079*C_P(c,t));
}
end_c_loop_all(c,t)
return;
}

After trying to interpret it, error reports was seen as follow:
Error: line 10: invalid type for pointer dereference: float.
How eliminate these error?
Anyhelp would be appreciated.
h.iraji is offline   Reply With Quote

Old   October 26, 2013, 19:05
Default
  #2
Senior Member
 
A CFD free user's Avatar
 
A-A Azarafza
Join Date: Jan 2013
Posts: 226
Rep Power: 14
A CFD free user is on a distinguished road
It seems that Fluent considers simple variable in equation as pointer. You can rearrange the equation. For instance, instead of 0.5*C_P(c,t), you'd better use C_P(c,t)*0.5.
I had the same error before. You need to do something like that.
__________________
Regard yours
A CFD free user is offline   Reply With Quote

Old   October 27, 2013, 10:31
Default ???????
  #3
New Member
 
hadi
Join Date: May 2013
Posts: 10
Rep Power: 13
h.iraji is on a distinguished road
Thanks a lot for your Answer

I want to deforming thickness variations of the pressure plate in each cell(Cells of the upper face plate):
y=0.2601*exp(-6.147e-X*0.5) + 0.5091*exp(X*(-0.0007079))
(X=pressure , Y= thickness variation).

for this purpose i writed below udf but incorect:

#include "udf.h"
#include "mem.h"
DEFINE_GEOM(deforming,domain,dt,position)
{
cell_t c;
Thread *t;
real *position;
begin_c_loop_all(c,t)
{
position=0.2601*exp(-6.147e-C_P(c,t)*0.5) + 0.5091*exp(C_P(c,t)*(-0.0007079));
}
end_c_loop_all(c,t)
return;
}

Error: line 10: parse error

can anyone help me in regarding with above problem….
thanks
Attached Images
File Type: jpg 07-12-2013 01-17-32 ?-?.jpg (74.9 KB, 0 views)
h.iraji is offline   Reply With Quote

Old   October 27, 2013, 13:32
Default
  #4
Senior Member
 
A CFD free user's Avatar
 
A-A Azarafza
Join Date: Jan 2013
Posts: 226
Rep Power: 14
A CFD free user is on a distinguished road
It sounds that you've made mistaken in writing equation. I think, the problem is in the " -6.147e-C_P(c,t) " . what's "e -C_P(c,t) " here. Have a deeper look at correct it.
__________________
Regard yours

Last edited by A CFD free user; October 28, 2013 at 17:01.
A CFD free user is offline   Reply With Quote

Old   October 28, 2013, 04:52
Smile
  #5
New Member
 
hadi
Join Date: May 2013
Posts: 10
Rep Power: 13
h.iraji is on a distinguished road
oh.yes.

Tanks
h.iraji 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
[OpenFOAM] an error in Calculator's equation immortality ParaView 12 June 29, 2021 01:10
[OpenFOAM.org] compile error in dynamicMesh and thermophysicalModels libraries NickG OpenFOAM Installation 3 December 30, 2019 01:21
[General] 2 datas on one plot Akuji ParaView 46 December 1, 2013 15:06
Errors in UDF shashank312 Fluent UDF and Scheme Programming 6 May 30, 2013 21:30
How to get the max value of the whole field waynezw0618 OpenFOAM Running, Solving & CFD 4 June 17, 2008 06:07


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