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.

bugs in formula evaluation and plotting

Please login with a confirmed email address before reporting spam

I want to report a couple of weird bugs in formula evaluation and function range:

a) In the attachment GlobalDefinitions / Analytic 1 has a specified range of 0<x<1, but the plot shows from 0 to 0.305.

b) In Geometry 1 / Parametric Curve 1, the formula cos(5.0002*pi*s) evaluates to 1 for s<2 for some strange reason. sin(5.0002*pi*s) works normal.

--Chris


1 Reply Last Post 19.07.2016, 02:38 GMT-4
Henrik Sönnerlind COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 19.07.2016, 02:38 GMT-4
Hi,

a) If you use any other variable than x, y, or, z (the coordinates) in your function it works as expected. The weird behavior that you see, seems to be a side effect of using non-SI geometry units. So plotting to '1' implicitly plots to 1[ft], which is 0.3048[m]. It seems that the unit of 'x' is transformed when it should not.

I have reported this behavior as a bug.

I would, by the way, recommend that you always fill in the 'Units' section when defining a function.

b) This problem is not present in 5.2a. In 5.2, you can solve it by setting 'Relative tolerance' to 1E-3 in the 'Advanced Settings' section.

Regards,
Henrik
Hi, a) If you use any other variable than x, y, or, z (the coordinates) in your function it works as expected. The weird behavior that you see, seems to be a side effect of using non-SI geometry units. So plotting to '1' implicitly plots to 1[ft], which is 0.3048[m]. It seems that the unit of 'x' is transformed when it should not. I have reported this behavior as a bug. I would, by the way, recommend that you always fill in the 'Units' section when defining a function. b) This problem is not present in 5.2a. In 5.2, you can solve it by setting 'Relative tolerance' to 1E-3 in the 'Advanced Settings' section. Regards, Henrik

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.