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

Kelley Rabjohns
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 Oct 12, 2012, 1:32 PM EDT
Posted: 5 years ago Oct 11, 2012, 1:30 AM EDT
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

Kelley Rabjohns
Posted: 5 years ago Oct 12, 2012, 1:07 PM EDT
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?


Kelley Rabjohns
Posted: 5 years ago Oct 12, 2012, 1:32 PM EDT
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.