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.

Selective mesh plotting

Please login with a confirmed email address before reporting spam

Hi,

How do I make nice mesh visualizations like the one in the attachment? I.e.

1) How can I assign colors to different domains? I have colors added to materials, and Preferences -> Graphics and Plot Windows -> Show Material Color and Texture is checked

2) How do I filter only certain domains away -in this case air- and leave the coil and core intact?


3 Replies Last Post 23 gen 2017, 14:52 GMT-5
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 1 ott 2015, 08:59 GMT-4
Hello Juha,

There are many resources on creating nice plots with COMSOL, including
- the "Reference Manual" (chapter 20 in particular, but also chapter 6) ,
- the "Essentials of Postprocessing and Visualization in COMSOL Multiphysics" manual,
- postprocessing webinars (www.comsol.com/events/4671/postprocessing-simulation-results---how-its-done-in-comsol/ ),
- postprocessing videos ( www.comsol.com/videos?workflow[]=workflowstep-results&sortOrder=&s= )

Plotting domains in a single color is simple: just make sure to specify a uniform (possibly custom) color of your choice instead of one of the predefined color themes in your plot settings (The default behavior for mesh plots is set so as to plot element Quality, rather than a uniform color). To do that on only one of several domains, add a Selection to the Data Set in question. You can use different data sets for different plots within a single plot group to achieve the most stunning results.

Plotting a fraction of a mesh can be done by using a Filter node.

See the attached files for an illustration of these ideas, and again refer to the above resources for more details and ideas for cool postprocessing in COMSOL.
Best,
Jeff
Hello Juha, There are many resources on creating nice plots with COMSOL, including - the "Reference Manual" (chapter 20 in particular, but also chapter 6) , - the "Essentials of Postprocessing and Visualization in COMSOL Multiphysics" manual, - postprocessing webinars (http://www.comsol.com/events/4671/postprocessing-simulation-results---how-its-done-in-comsol/ ), - postprocessing videos ( http://www.comsol.com/videos?workflow[]=workflowstep-results&sortOrder=&s= ) Plotting domains in a single color is simple: just make sure to specify a uniform (possibly custom) color of your choice instead of one of the predefined color themes in your plot settings (The default behavior for mesh plots is set so as to plot element Quality, rather than a uniform color). To do that on only one of several domains, add a Selection to the Data Set in question. You can use different data sets for different plots within a single plot group to achieve the most stunning results. Plotting a fraction of a mesh can be done by using a Filter node. See the attached files for an illustration of these ideas, and again refer to the above resources for more details and ideas for cool postprocessing in COMSOL. Best, Jeff


Please login with a confirmed email address before reporting spam

Posted: 8 years ago 23 gen 2017, 14:16 GMT-5
Thanks for posting this example. Very useful. :)

how do i view my mesh inside a domain (ie using a filter) without having to first generate a solution?
Thanks for posting this example. Very useful. :) how do i view my mesh inside a domain (ie using a filter) without having to first generate a solution?

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 23 gen 2017, 14:52 GMT-5
Hi Nathan,
You do not need to have a solution to create a mesh plot, in fact you don't even need to have any physics defined. Just right-click on the Mesh 1 (or whatever the number might be) node in the Model Builder tree and select Plot to create a plot group containing a mesh plot in the Results branch. See attached screenshot.
Best,
Jeff
Hi Nathan, You do not need to have a solution to create a mesh plot, in fact you don't even need to have any physics defined. Just right-click on the Mesh 1 (or whatever the number might be) node in the Model Builder tree and select Plot to create a plot group containing a mesh plot in the Results branch. See attached screenshot. Best, Jeff

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.