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.

2D plot of a specific area witin a 3D model.

Please login with a confirmed email address before reporting spam

Hello all,

I have a 3D simulation, and I need to create a 2D surface plot of a specific area within the solved volume.

My initial though was to plot along a Cut plane. However, by defintion a cut plane spans the entire volume (see the attached picture of the 2D plot group).

After scouring the forms for a bit, I found someone who suggested limited the range in which the expression is calucated: in my case mf.normB(y>-25e-6)(y<25e-6)*(z>-50e-6). See the attached 3d plot group to see this result. This is close, however, an export still conatins all the "unactive" area and the scale bar is skewed due to the "unactive" area as well.

Is there a better way to define a particuar area to plot in comsol?

Thanks in advance, Sami



1 Reply Last Post Apr 4, 2018, 1:12 p.m. EDT

Please login with a confirmed email address before reporting spam

Posted: 7 years ago Apr 4, 2018, 1:12 p.m. EDT
Updated: 7 years ago Apr 4, 2018, 1:13 p.m. EDT

Use something like the following expression. The use of nan is not included in the extents of the colorbar. Thus, your colorbar will update appropriately for values of u that are actually plotted.

if(y>-25e-6 && y<25e-6 && z>-50e-6, mf.normB, nan)

-------------------
Jason Nicholson
Use something like the following expression. The use of nan is not included in the extents of the colorbar. Thus, your colorbar will update appropriately for values of u that are actually plotted. >if(y>-25e-6 && y-50e-6, mf.normB, nan)

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.