|
[Sponsors] |
October 25, 2013, 05:52 |
interpret UDF Error????
|
#1 |
New Member
hadi
Join Date: May 2013
Posts: 10
Rep Power: 13 |
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, 19:05 |
|
#2 |
Senior Member
A-A Azarafza
Join Date: Jan 2013
Posts: 226
Rep Power: 14 |
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
hadi
Join Date: May 2013
Posts: 10
Rep Power: 13 |
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 |
|
October 27, 2013, 13:32 |
|
#4 |
Senior Member
A-A Azarafza
Join Date: Jan 2013
Posts: 226
Rep Power: 14 |
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: 13 |
oh.yes.
Tanks |
|
|
|
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 |