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.

Syntax error

Please login with a confirmed email address before reporting spam

Hello, I´m a new user at Comsol and still learning so all the help you guys can give me it will be welcomed.

I´m having issues when trying to make a graph line or table with the y axis being the time a certain variable reaches the value 1.

I tried to simply make a point evaluation on the geometry with the expression: t=u1>1 to make me return that values on a table but it says that i have a sintax error and i get the same when i try to make a line graph. Is there anyway easy i can do what i want?

  • Expression: t=u1>1
  • Subexpression: =u1>1
  • Position: 3

    Best regards, and thank you for you help.


1 Reply Last Post 11.05.2020, 10:19 GMT-4

Please login with a confirmed email address before reporting spam

Posted: 5 years ago 11.05.2020, 10:19 GMT-4

Hi Fernando,

In Comsol, if statements are given by inequalities. So in your case, when you have the expression u1>1, this will be equal to 1 when the inequality is true, and 0 when it is not. Therefore, if you have t*(u1>1), this will be equal to t if the inequality is true, and 0 if it is not. Does that andwer your question?

Cheers,

Alex

Hi Fernando, In Comsol, if statements are given by inequalities. So in your case, when you have the expression u1>1, this will be equal to 1 when the inequality is true, and 0 when it is not. Therefore, if you have t*(u1>1), this will be equal to t if the inequality is true, and 0 if it is not. Does that andwer your question? Cheers, Alex

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.