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.

Restricting a plot to a domain or boundary without a separata data set?

Please login with a confirmed email address before reporting spam

Hello,
I have a parametric solution set. I have created a 2D plot group, where each sub-plot of this group is using the parent plot group's data set. This allows me to switch all plots to different parameter values with one click.
Now, I would like to add another plot to this group, which is restricted only to a boundary. As far as I know I can do this by creating a data set, and adding a selection to it, and then use this data set in that particular plot. The problem with this approach is that this plot is NOT using its parent group's dataset, but its own data set, and I need to change parameter values at two different nodes. This is a guarantee for messing it up at some point, and show an inconsistent plot, some parts of it showing the results belonging to one parameter, and some other parts of it showing the results of another parameter.
Can this be done in a more consistent way?
Thank you
Daniel

2 Replies Last Post 30 giu 2016, 08:45 GMT-4
Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 30 giu 2016, 05:40 GMT-4
Hi,

You can add a Filter subnode to the boundary plot and use that filter to restrict the plot to a single boundary using a logical expression such as

dom==3

which restricts the boundary plot to boundary 3 only. This approach works similarly for domains. You can use a more complex logical expression to include another boundary, for example.

Best regards,
Magnus Ringh, COMSOL
Hi, You can add a Filter subnode to the boundary plot and use that filter to restrict the plot to a single boundary using a logical expression such as dom==3 which restricts the boundary plot to boundary 3 only. This approach works similarly for domains. You can use a more complex logical expression to include another boundary, for example. Best regards, Magnus Ringh, COMSOL

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 30 giu 2016, 08:45 GMT-4
Hello,
Thanks a lot, that's great!
A question for a more complicated case: in my geometry, there is the following structure:
If (param<0.5)
Circle (contribute to a named selection 'MySel')
Else
Polygon (contribute to a named selection 'MySel')
Else
That is, depending on the value of 'param', I have either a circle or a polygon. They contribute (either one or the other) the the same selection, so elsewhere in the model I can refer to this variable boundary by name. I can not refer to it by numbers, since boundary numbering changes between the two cases.

I want to restrict my plot to this named boundary. How can this be done?

Thank y ou
Daniel
Hello, Thanks a lot, that's great! A question for a more complicated case: in my geometry, there is the following structure: If (param

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.