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.

How to obtain x and y coordinates of a curve as function of angle along circumference?

Please login with a confirmed email address before reporting spam

I want to know the x and y coordinates at a certain angle (sys2.phi) from a curve which runs around [0,0]. For a circle with radius R this can be found easily with formula's. However, for curves of different shapes it starts getting complicated. As an example I'm trying to get the radius of an ellipse as function of the angle along circumference (0-2pi). I thus want to know the coordinates from the geometry, is there a simple function to do so?

Thank you for your answers.

4 Replies Last Post 2013年9月24日 GMT-4 10:15
Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年9月23日 GMT-4 09:43

Hi,

an ellipse can easily be parameterized. See: en.wikipedia.org/wiki/Ellipse

Cheers
Edgar

--
Edgar J. Kaiser
emPhys Physical Technology
Hi, an ellipse can easily be parameterized. See: http://en.wikipedia.org/wiki/Ellipse Cheers Edgar -- Edgar J. Kaiser emPhys Physical Technology

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年9月23日 GMT-4 10:34
Thank you for your response but that's not what I mean. A parameterized curve is described by a formula and the radius is obtained from that formula. I want to be able to draw a curve without needing to describe it by a formula and then obtain the radius.

Later I want to alter the geometry in such a way that it gets really complicated to describe it by parameterization, that's why I want to define the radius in a different way.
Thank you for your response but that's not what I mean. A parameterized curve is described by a formula and the radius is obtained from that formula. I want to be able to draw a curve without needing to describe it by a formula and then obtain the radius. Later I want to alter the geometry in such a way that it gets really complicated to describe it by parameterization, that's why I want to define the radius in a different way.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年9月24日 GMT-4 09:48
I don't think there is a built in function within comsol to do this for you (not sure if this is what you were asking). You would have to provide the eqn's. As far as simple functions go, there are equations that describe circles, ellipses, etc but if the geometry gets into an unknown shape you would have to guess at a possible eqn for the curve.

Just as an example, this has the eqn's for an ellipse

www.mathwarehouse.com/ellipse/equation-of-ellipse.php

For solving of two unknowns (x and y here) and since you have two eqns you should be able to do this provided you know all of the other variables.

The other option in comsol is that if you draw a 2D object, you could divide up the object such that you get, say, 4 partitions for a circle (simple example). This way, comsol could provide with the radius but you would have to highlight those lines in the postprocessor.

I don't know if this really answers your question well enough.
I don't think there is a built in function within comsol to do this for you (not sure if this is what you were asking). You would have to provide the eqn's. As far as simple functions go, there are equations that describe circles, ellipses, etc but if the geometry gets into an unknown shape you would have to guess at a possible eqn for the curve. Just as an example, this has the eqn's for an ellipse http://www.mathwarehouse.com/ellipse/equation-of-ellipse.php For solving of two unknowns (x and y here) and since you have two eqns you should be able to do this provided you know all of the other variables. The other option in comsol is that if you draw a 2D object, you could divide up the object such that you get, say, 4 partitions for a circle (simple example). This way, comsol could provide with the radius but you would have to highlight those lines in the postprocessor. I don't know if this really answers your question well enough.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年9月24日 GMT-4 10:15
that's indeed what I'm asking.
Comsol is able to show the solution of the radius of a curve using '1D plot group' -> 'Line graph', select the curve and plot sqrt(x^2+y^2) or sys1.r against the angle. I'm figuring out if I can make the same plot using a global plot where the expression implements the curve in some way. I thought this wouldn't be such a big deal in Comsol, like if the ellipse is called 'e1' that you could use 'e1.x' to find the x coordinates of that ellipse. But it doesn't seem to work that way.

I guess I'll then have to describe each curve with formula's and use for example your idea of partitions of a circle (or maybe boolean operators for the 4 quadrants. I'll try something.

Ellipse equation is indeed like below, but that's not my concern.
upload.wikimedia.org/math/0/3/1/031474cb80469619a7abff7d32dc7e4a.png

anyway, thank you for your reply
that's indeed what I'm asking. Comsol is able to show the solution of the radius of a curve using '1D plot group' -> 'Line graph', select the curve and plot sqrt(x^2+y^2) or sys1.r against the angle. I'm figuring out if I can make the same plot using a global plot where the expression implements the curve in some way. I thought this wouldn't be such a big deal in Comsol, like if the ellipse is called 'e1' that you could use 'e1.x' to find the x coordinates of that ellipse. But it doesn't seem to work that way. I guess I'll then have to describe each curve with formula's and use for example your idea of partitions of a circle (or maybe boolean operators for the 4 quadrants. I'll try something. Ellipse equation is indeed like below, but that's not my concern. http://upload.wikimedia.org/math/0/3/1/031474cb80469619a7abff7d32dc7e4a.png anyway, thank you for your reply

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.