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.

Angular resolution in line plot export

Please login with a confirmed email address before reporting spam

Hi,

I am looking to be able to control the angular resolution of 2D line plots. Specifically for when I export the line plot data.

Background:

I am doing polar acoustic pressure studies and am beginning to investigate the effects of data resolution.
In the line plot, for x-axis data, I can select either 'Arc Length' or expression.
I currently have defined a cylindrical coordinate system so that I can choose 'cylindrical system'.phi as the x-axis data for my line plot.

But I would like to take this a step further in terms of customizing the x-axis data.

I had some ideas:

1. Use range( ) to create my own set of discrete angle points and use this set as input for the x-axis data field in the line plot. Unfortunately I could not figure out how to get this to work as range( ) does not seem to evaluate in the plot expression entry field.
2. Use range( ) somewhere up in the parameter definitions and feed the plot field this identifier. That didn't work either as range( ) refused to evaluate in Global Parameters also.


Has anyone else worked through this already?
Or is there a flaw in my thinking of how to get my desired outcome?

Thanks,

Will

5 Replies Last Post 2012年9月15日 GMT-4 05:23
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年9月12日 GMT-4 14:39
Hi

you should not wrok on the plots, but on the data sets and the export partial data sets, or create cut lines, planes etc and export those, here you can define more about ranges, and how data is interpolated. Check the doc (in particular the latest version ...)

--
Good luck
Ivar
Hi you should not wrok on the plots, but on the data sets and the export partial data sets, or create cut lines, planes etc and export those, here you can define more about ranges, and how data is interpolated. Check the doc (in particular the latest version ...) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年9月12日 GMT-4 16:56
Thanks for the suggestion Ivar! This definitely sent me in the right direction.

But now I think I am (almost) back to where I started.

I have created a Edge 2D data set to be on the model edges I want, and can export the expressions I desire over this geomerty.

But I still have two problems:

1. I cannot seem to have comsol NOT include the x and y coordinate points in the spreadsheet output and I see no option to change this behavior. All I want is angle (phi) and calculated data. (so I can output sorted data sorted by phi)
2. I still cannot really set "resolution" as I want (to force a certain angle step of cylindrical_system.phi). Changing the lagrange element order is of no use to me (at least that which I understand yet)


Are either of these issues reconcilable?

Thanks
Thanks for the suggestion Ivar! This definitely sent me in the right direction. But now I think I am (almost) back to where I started. I have created a Edge 2D data set to be on the model edges I want, and can export the expressions I desire over this geomerty. But I still have two problems: 1. I cannot seem to have comsol NOT include the x and y coordinate points in the spreadsheet output and I see no option to change this behavior. All I want is angle (phi) and calculated data. (so I can output sorted data sorted by phi) 2. I still cannot really set "resolution" as I want (to force a certain angle step of cylindrical_system.phi). Changing the lagrange element order is of no use to me (at least that which I understand yet) Are either of these issues reconcilable? Thanks

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年9月12日 GMT-4 17:43
Update,

I believe I am one step closer to my goal.

I have found that under the export tab, I can indeed select to evaluate the expression at manual points via 'Points to evaluate in' but here is the root of my original question...

Am I forced to evaluate the points in terms of x,y coordinates, or is it possible to 'evaluate' the data set in terms of my cylindrical coordinate system? (or some other system other than simple x,y for that matter)
If the later were true, I could simply tell the export to evaluate my edge for given phi values which would go back to the cylindrical coordinate system and determine what x,y point that corresponds to. This should work since Comsol would have the edge (r) and my input phi values, so it could completely describe a point to evaluate on.

From what I have gathered though, in order to do what I want, I must MANUALLY create these x,y points and feed them into comsol, which will then evaluate to give me my desired values.

Is this correct?

Thanks,
Will
Update, I believe I am one step closer to my goal. I have found that under the export tab, I can indeed select to evaluate the expression at manual points via 'Points to evaluate in' but here is the root of my original question... Am I forced to evaluate the points in terms of x,y coordinates, or is it possible to 'evaluate' the data set in terms of my cylindrical coordinate system? (or some other system other than simple x,y for that matter) If the later were true, I could simply tell the export to evaluate my edge for given phi values which would go back to the cylindrical coordinate system and determine what x,y point that corresponds to. This should work since Comsol would have the edge (r) and my input phi values, so it could completely describe a point to evaluate on. From what I have gathered though, in order to do what I want, I must MANUALLY create these x,y points and feed them into comsol, which will then evaluate to give me my desired values. Is this correct? Thanks, Will

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年9月13日 GMT-4 10:13
Just in case this is useful to anyone, this is how I solved my problem:

1. Insert a Data Sets > Parameterized Curve 2D
Here define the x and y points as 'radius of interest'*cos and likewise for sin.
Also define the range of angle I want via Minimum and Maximum parameter values.

2. Set resolution in terms of number of points I want in the Resolution entry field.

3. In the data export, leave 'Points to evaluate in' as 'Data set'

Done!


Now I have to say, I still think there should be functionality where instead of inputting an expression, this could somehow be done in the Data Sets > Edge 2D with extra options for resolution and what points to evaluate based on the type of geometry found (eg. phi for circular geometry; x and y for rectangular geometry...) but I suppose this is more work for developers ;)


Will
Just in case this is useful to anyone, this is how I solved my problem: 1. Insert a Data Sets > Parameterized Curve 2D Here define the x and y points as 'radius of interest'*cos and likewise for sin. Also define the range of angle I want via Minimum and Maximum parameter values. 2. Set resolution in terms of number of points I want in the Resolution entry field. 3. In the data export, leave 'Points to evaluate in' as 'Data set' Done! Now I have to say, I still think there should be functionality where instead of inputting an expression, this could somehow be done in the Data Sets > Edge 2D with extra options for resolution and what points to evaluate based on the type of geometry found (eg. phi for circular geometry; x and y for rectangular geometry...) but I suppose this is more work for developers ;) Will

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年9月15日 GMT-4 05:23
Hi

I'm not sure its general enough, if your shape is elliptic, which phy to use ? and why not something else ?

when you write it out you know what you have, in all generality

--
Good luck
Ivar
Hi I'm not sure its general enough, if your shape is elliptic, which phy to use ? and why not something else ? when you write it out you know what you have, in all generality -- Good luck Ivar

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.