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.

Plot of B vs theta in an electrical machine's air gap

Please login with a confirmed email address before reporting spam

Hi,

I am trying to plot B vs angle in a cylindrical electrical machine's air gap (actually a magnetic gear). I have set up a circle in the center of the air gap with corresponding identity pairs. So the simulation works, I just don't know how to plot B vs theta for a single time step (or the stationary solution). Can someone please help?

Kind regards, Robert Holm


3 Replies Last Post Sep 8, 2021, 6:49 p.m. EDT
Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 3 years ago Sep 7, 2021, 12:16 p.m. EDT
Updated: 3 years ago Sep 7, 2021, 12:22 p.m. EDT

If all you want to do is plot an already-available computed quantity around a circle, and you already have the circle (the curve) defined in your geometry, and you already have executed the model run successfully, THEN: In the Model Builder, right-click on Results. Choose 1D Plot Group. Right-click that 1D Plot Group and select Line Graph. Under Settings, expand Selection. Now use the mouse to select the circle so its segments (by default, a circle has 4) appear in the list of selected items there. Go back to the top of the settings window and click "Plot." This will plot the quantity vs. arc length around the circle you selected. But you can change that if you want, in the settings window under x-axis Data, where you can choose the Parameter. In your case, you may wish to enter an Expression. For example, atan2(y,x) may yield an angle of interest to you? I hope that helps. If your circle isn't centered around the origin, you may need some other expression to correspond to angle.

-------------------
Scientific Applications & Research Associates (SARA) Inc.
www.comsol.com/partners-consultants/certified-consultants/sara
If all you want to do is plot an already-available computed quantity around a circle, and you already have the circle (the curve) defined in your geometry, and you already have executed the model run successfully, THEN: In the Model Builder, right-click on Results. Choose 1D Plot Group. Right-click that 1D Plot Group and select Line Graph. Under Settings, expand Selection. Now use the mouse to select the circle so its segments (by default, a circle has 4) appear in the list of selected items there. Go back to the top of the settings window and click "Plot." This will plot the quantity vs. arc length around the circle you selected. But you can change that if you want, in the settings window under x-axis Data, where you can choose the Parameter. In your case, you may wish to enter an Expression. For example, atan2(y,x) may yield an angle of interest to you? I hope that helps. If your circle isn't centered around the origin, you may need some other expression to correspond to angle.

Please login with a confirmed email address before reporting spam

Posted: 3 years ago Sep 7, 2021, 2:30 p.m. EDT

Hi Robert,

Thank you, that did it. However, when I plot wrt angle, the startpoint and endpoint is connected with a line. See attached. Any ideas on how to get rid of it please?

Kind regards, Robert

Hi Robert, Thank you, that did it. However, when I plot wrt angle, the startpoint and endpoint is connected with a line. See attached. Any ideas on how to get rid of it please? Kind regards, Robert


Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 3 years ago Sep 8, 2021, 6:49 p.m. EDT
Updated: 3 years ago Sep 8, 2021, 6:53 p.m. EDT

If you don't like seeing the return line, there are various solutions to that. You can always export the plot and use a different plotting tool. You can set the options so that you simply plot the points and not any line that connects them. Or, you can create a circle with a tiny gap in an appropriate location, so the plot doesn't hit the double-valued-angle point twice. Or you can plot your quantity vs arc length, but then scale that x-value so the arc length runs from 0 to 360 units (thereby creating a 0 to 360 deg plot). I think there are several other ways. Don't be afraid to experiment a little!

-------------------
Scientific Applications & Research Associates (SARA) Inc.
www.comsol.com/partners-consultants/certified-consultants/sara
If you don't like seeing the return line, there are various solutions to that. You can always export the plot and use a different plotting tool. You can set the options so that you simply plot the points and not any line that connects them. Or, you can create a circle with a tiny gap in an appropriate location, so the plot doesn't hit the double-valued-angle point twice. Or you can plot your quantity vs arc length, but then scale that x-value so the arc length runs from 0 to 360 units (thereby creating a 0 to 360 deg plot). I think there are several other ways. Don't be afraid to experiment a little!

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.