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.

Plot 3d result only in specific area

Please login with a confirmed email address before reporting spam

Hi everyone,

Is it possible to plot a 3d surface data only in specific designated area? I have a 3d temperature data that has a rectangular shape and I want to plot only the upper-right area of that data. The reason is because I want to make a chart for that area using Matlab. Therefore I need the other area to be 0.

Regards.

8 Replies Last Post 2 juin 2014, 12:51 UTC−4
Gunnar Andersson COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 29 mai 2013, 02:10 UTC−4
You can do this with a filter node: Select the Surface plot node. Right-click and select Filter from the context menu. In the Filter node's settings, you enter a logical expression that selects the domain that you want to evaluate. E.g., to only evaluate in the positive octant, you can enter (x>=0) && y>=0) && (z>=0). The boundary between the region that is evaluated and the region that isn't might become jagged as the filter node operates on elements.
You can do this with a filter node: Select the Surface plot node. Right-click and select Filter from the context menu. In the Filter node's settings, you enter a logical expression that selects the domain that you want to evaluate. E.g., to only evaluate in the positive octant, you can enter (x>=0) && y>=0) && (z>=0). The boundary between the region that is evaluated and the region that isn't might become jagged as the filter node operates on elements.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 30 mai 2013, 02:14 UTC−4
First of all thanks for the reply.

My temperature data is located in the domain of 0<x<0.593 m, -0.25<y<0.25m, and 0.055<z<0.105. I try to fill the filter expression: (x<=0.2) && (y<=0) && (z=0.08), but a "Syntax error in expression" error came out. Did I do something wrong?
First of all thanks for the reply. My temperature data is located in the domain of 0

Gunnar Andersson COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 30 mai 2013, 02:50 UTC−4

My temperature data is located in the domain of 0<x<0.593 m, -0.25<y<0.25m, and 0.055<z<0.105. I try to fill the filter expression: (x<=0.2) && (y<=0) && (z=0.08), but a "Syntax error in expression" error came out. Did I do something wrong?


Multiphysics' comparison operator is ==, not =, so you have to replace "z=0.08" with "z==0.08". In your case, the expression (0<x) && (x<0.593) && (-0.25<y) && (0.25<y) && (0.055<z) && (z<0.105) should do the trick.
[QUOTE] My temperature data is located in the domain of 0

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 1 juin 2013, 01:38 UTC−4
Oh I see! Everything okay now. Thanks a lot!
Oh I see! Everything okay now. Thanks a lot!

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 30 mai 2014, 16:00 UTC−4
The filter node seems like kind of a clunky way of accomplishing selective results display in post-processing. It is fine if your geometry is simple but what if you have complicated geometric features? There should be a way to create a nodal selection based on a surface (any modeled surface) and then plot only these results, or at the very least a way to hide unwanted surfaces in a 3D surface plot. Anyone know a workaround for this?
The filter node seems like kind of a clunky way of accomplishing selective results display in post-processing. It is fine if your geometry is simple but what if you have complicated geometric features? There should be a way to create a nodal selection based on a surface (any modeled surface) and then plot only these results, or at the very least a way to hide unwanted surfaces in a 3D surface plot. Anyone know a workaround for this?

Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2 juin 2014, 04:58 UTC−4
Hi,

There are a couple of things that you can do to hide surfaces or to plot only on some surfaces:

- Under the View node (typically Component>Definitions>View), add a Hide Geometric Entities node, where you can specify which entities to hide, such as boundaries (surfaces) in a 3D model. The boundaries that you add to the Geometric Entity Selection in the Hide Geometric Entities node's settings window are then hidden for that view when you plot 3D results, for example.

- Under the Results>Data Sets node, for the data set (such as a Solution data set) that you plot, add a Selection subnode, where the default selection is the entire geometry, but you can choose to include only some domains or boundaries (depending on the type of plot). The plots using that data set then only include the selected geometric entities.

Best regards,
Magnus Ringh, COMSOL
Hi, There are a couple of things that you can do to hide surfaces or to plot only on some surfaces: - Under the View node (typically Component>Definitions>View), add a Hide Geometric Entities node, where you can specify which entities to hide, such as boundaries (surfaces) in a 3D model. The boundaries that you add to the Geometric Entity Selection in the Hide Geometric Entities node's settings window are then hidden for that view when you plot 3D results, for example. - Under the Results>Data Sets node, for the data set (such as a Solution data set) that you plot, add a Selection subnode, where the default selection is the entire geometry, but you can choose to include only some domains or boundaries (depending on the type of plot). The plots using that data set then only include the selected geometric entities. Best regards, Magnus Ringh, COMSOL

Lexi Carver COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2 juin 2014, 11:59 UTC−4
Hello,

Here are a couple more resources for what you were asking about, Matt. These pages give a good rundown of how to plot a solution on only the surfaces you want selected, how to hide different parts of a component, etc:

How to include different surfaces in results plots: www.comsol.com/blogs/include-geometry-surfaces-solution-plots/

Short videos that give an overview of advanced visualization techniques (they are from 4.3b, but the information still applies): www.comsol.com/blogs/advanced-visualization-techniques-in-postprocessing/

Several shortcuts and tricks using the Graphics window (the last section discusses the view and selection features that Magnus mentioned): www.comsol.com/blogs/the-graphics-window-effective-beautiful-postprocessing/

Regards,
Lexi Carver, COMSOL
Hello, Here are a couple more resources for what you were asking about, Matt. These pages give a good rundown of how to plot a solution on only the surfaces you want selected, how to hide different parts of a component, etc: How to include different surfaces in results plots: http://www.comsol.com/blogs/include-geometry-surfaces-solution-plots/ Short videos that give an overview of advanced visualization techniques (they are from 4.3b, but the information still applies): http://www.comsol.com/blogs/advanced-visualization-techniques-in-postprocessing/ Several shortcuts and tricks using the Graphics window (the last section discusses the view and selection features that Magnus mentioned): http://www.comsol.com/blogs/the-graphics-window-effective-beautiful-postprocessing/ Regards, Lexi Carver, COMSOL

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2 juin 2014, 12:51 UTC−4
Thank you both for your replies. I knew there had to be a better way.
Thank you both for your replies. I knew there had to be a better way.

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.