Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

wrong number of function arguments

Please login with a confirmed email address before reporting spam

Hello,

I keep getting the same error for my analytical function

"Wrong number of function arguments
Number of arguments expected: 3"

But as far as I can tell, I have defined 3 arguments in my function.. so I don't understand the error!

expression: a_c*pore_V(x,y,z)
Arguments: x, y, z

(a_c = a variable and pore_V(x,y,z) = random fxn)

Does anyone know whats happening?

Thank you!

Kelley

3 Replies Last Post 12.10.2012, 13:32 GMT-4
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 11.10.2012, 01:30 GMT-4
Hi

no, not like that, probably you must make a simple model example and post that too (you do not need to give the full model, "just" reproduce the error in a simple new model

--
Good luck
Ivar
Hi no, not like that, probably you must make a simple model example and post that too (you do not need to give the full model, "just" reproduce the error in a simple new model -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 12.10.2012, 13:07 GMT-4
Here is a simplified (but very similar) model with the same error. Maybe I am misunderstanding how to define the arguments?
Here is a simplified (but very similar) model with the same error. Maybe I am misunderstanding how to define the arguments?


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 12.10.2012, 13:32 GMT-4
I think I figured out the error... I was trying to use the analytic function in the model in an anisotropic flow field. I was defining the flow field like

f(x) f(y) f(z)

but I think I needed to do

f(x,x,x) f(y,y,y) f(z,z,z)

for there to be 3 arguments in the model. Does that sound correct?
or should it be defined

f(x,y,z) for each flow direction (xx, yy, zz)?
I think I figured out the error... I was trying to use the analytic function in the model in an anisotropic flow field. I was defining the flow field like f(x) f(y) f(z) but I think I needed to do f(x,x,x) f(y,y,y) f(z,z,z) for there to be 3 arguments in the model. Does that sound correct? or should it be defined f(x,y,z) for each flow direction (xx, yy, zz)?

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.