# interpret UDF Error????

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

 October 25, 2013, 04:52 interpret UDF Error???? #1 New Member   hadi Join Date: May 2013 Posts: 10 Rep Power: 4 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.

 October 26, 2013, 18:05 #2 Senior Member     A-A Azarafza Join Date: Jan 2013 Posts: 187 Rep Power: 4 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

October 27, 2013, 10:31
???????
#3
New Member

Join Date: May 2013
Posts: 10
Rep Power: 4

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;
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
 07-12-2013 01-17-32 ?-?.jpg (74.9 KB, 0 views)

 October 27, 2013, 13:32 #4 Senior Member     A-A Azarafza Join Date: Jan 2013 Posts: 187 Rep Power: 4 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.

 October 28, 2013, 04:52 #5 New Member   hadi Join Date: May 2013 Posts: 10 Rep Power: 4 oh.yes. Tanks

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Akuji ParaView 46 December 1, 2013 15:06 immortality OpenFOAM Paraview & paraFoam 11 September 3, 2013 16:18 NickG OpenFOAM Installation 2 August 30, 2013 07:42 shashank312 Fluent UDF and Scheme Programming 6 May 30, 2013 20:30 waynezw0618 OpenFOAM Running, Solving & CFD 4 June 17, 2008 05:07

All times are GMT -4. The time now is 01:38.