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.

function depending on two variables

Please login with a confirmed email address before reporting spam

Hi there,

I want create a pressure field in which the pressure is decreasing in both the x and y direction (or basically increasing with depth).
I have written it as 10^5+(200-x)*(0.3*10^5)/200+9.81*910^3)*(50-y).
I get the error "wrong number of function arguments".
Does anyone know if it is even possible to solve a multivariable linear function in comsol? And if yes, any suggestions on what might be giving the error?

kind regards,

M.Deen

2 Replies Last Post Aug 2, 2012, 5:24 p.m. EDT

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Aug 2, 2012, 2:45 p.m. EDT
in here: "10^5+(200-x)*(0.3*10^5)/200+9.81*910^3)*(50-y)" you are missing "(" somewhere.
in here: "10^5+(200-x)*(0.3*10^5)/200+9.81*910^3)*(50-y)" you are missing "(" somewhere.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Aug 2, 2012, 5:24 p.m. EDT
It is possible to declare a multivariable function.

Did you declare both x,y in the argument section of the function ? from the error it looks like you have just declared a single argument. If that is not the case, please provide more information about the error, expression, arguments you are using.

Good Luck.
It is possible to declare a multivariable function. Did you declare both x,y in the argument section of the function ? from the error it looks like you have just declared a single argument. If that is not the case, please provide more information about the error, expression, arguments you are using. Good Luck.

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.