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.

Use contour plots as geometric entities

Josh Thomas Certified Consultant

Please login with a confirmed email address before reporting spam

I saw in the release highlight video that in v4.3a that you can use contour plots as geometric entities.

How do you do this?

6 Replies Last Post Oct 13, 2015, 10:32 a.m. EDT
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 Nov 20, 2012, 1:29 a.m. EST
Hi

indeed we are a few on the Forum here interested in this, but havent got/found the trick yet ;)
Perhaps somebody from COMSOl could give us a hint.

--
Good luck
Ivar
Hi indeed we are a few on the Forum here interested in this, but havent got/found the trick yet ;) Perhaps somebody from COMSOl could give us a hint. -- Good luck Ivar

Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Nov 20, 2012, 7:31 a.m. EST
Hi,

It is possible to use contour plots as geometric entities with the following steps:

1. Create a contour plot with a single contour.
2. Add it as a Plot data node under Export.
3. Export the contour data to a text file as a Contour plot with the Sectionwise data format.
4. Add an Interpolation Curve node to the Geometry sequence.
5. In the Interpolation Curve settings, use File as the Data source and Sectionwise as the Data format, and browse to the exported contour data file. Click Build Selected to see the curve. You may need to adjust the Relative tolerance setting to get a smooth curve.
6. When the geometry is rebuilt, the curve is included.

You can add several contours by exporting the data for each curve and adding Interpolation Curve nodes for each contour.

I have attached an image of an interpolation curve for a simple example, using a contour for a level of the solution to Poisson's equation on a square.

Best regards,
Magnus Ringh, COMSOL
Hi, It is possible to use contour plots as geometric entities with the following steps: 1. Create a contour plot with a single contour. 2. Add it as a Plot data node under Export. 3. Export the contour data to a text file as a Contour plot with the Sectionwise data format. 4. Add an Interpolation Curve node to the Geometry sequence. 5. In the Interpolation Curve settings, use File as the Data source and Sectionwise as the Data format, and browse to the exported contour data file. Click Build Selected to see the curve. You may need to adjust the Relative tolerance setting to get a smooth curve. 6. When the geometry is rebuilt, the curve is included. You can add several contours by exporting the data for each curve and adding Interpolation Curve nodes for each contour. I have attached an image of an interpolation curve for a simple example, using a contour for a level of the solution to Poisson's equation on a square. Best regards, Magnus Ringh, COMSOL


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 Nov 20, 2012, 7:56 a.m. EST
Hi Magnus

Thanks, indeed in 2D it looks simple but not straighforward though, many manual steps, not really to be done for ten models per hours ;) But still thanks for the tip.

What about 2D, the same way with slice plots ?

--
Good luck
Ivar
Hi Magnus Thanks, indeed in 2D it looks simple but not straighforward though, many manual steps, not really to be done for ten models per hours ;) But still thanks for the tip. What about 2D, the same way with slice plots ? -- Good luck Ivar

Josh Thomas Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Nov 20, 2012, 10:36 a.m. EST
Thanks, Magnus and Ivar!

Regards,
Josh
Thanks, Magnus and Ivar! Regards, Josh

Bethany COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Nov 27, 2012, 4:31 p.m. EST
I just wanted to add to Magnus's comment that there is now a Model Gallery entry on this: www.comsol.com/showroom/gallery/14235/. If you click "Click here to get more information about this model" on this page you will see a step-by-step presentation on how to do this along with an example model that shows this technique implemented in the power transistor model (the original power transistor model is in the Model Gallery here: www.comsol.com/showroom/gallery/8577/). Note that this same general procedure is applicable for using Contour lines in both 2D and 3D geometries.

Best regards,
Bethany Moatts
COMSOL
I just wanted to add to Magnus's comment that there is now a Model Gallery entry on this: http://www.comsol.com/showroom/gallery/14235/. If you click "Click here to get more information about this model" on this page you will see a step-by-step presentation on how to do this along with an example model that shows this technique implemented in the power transistor model (the original power transistor model is in the Model Gallery here: http://www.comsol.com/showroom/gallery/8577/). Note that this same general procedure is applicable for using Contour lines in both 2D and 3D geometries. Best regards, Bethany Moatts COMSOL

Johanna Lippmann-Pipke

Please login with a confirmed email address before reporting spam

Posted: 9 years ago Oct 13, 2015, 10:32 a.m. EDT
Dear Bethany,

it seems like the mentioned link to the step-by-step presentation onhow to do this is no longer existent or inaccurate. Can you help? Thanks, Johanna


I just wanted to add to Magnus's comment that there is now a Model Gallery entry on this: www.comsol.com/showroom/gallery/14235/. If you click "Click here to get more information about this model" on this page you will see a step-by-step presentation on how to do this along with an example model that shows this technique implemented in the power transistor model (the original power transistor model is in the Model Gallery here: www.comsol.com/showroom/gallery/8577/). Note that this same general procedure is applicable for using Contour lines in both 2D and 3D geometries.

Best regards,
Bethany Moatts
COMSOL


Dear Bethany, it seems like the mentioned link to the step-by-step presentation onhow to do this is no longer existent or inaccurate. Can you help? Thanks, Johanna [QUOTE] I just wanted to add to Magnus's comment that there is now a Model Gallery entry on this: http://www.comsol.com/showroom/gallery/14235/. If you click "Click here to get more information about this model" on this page you will see a step-by-step presentation on how to do this along with an example model that shows this technique implemented in the power transistor model (the original power transistor model is in the Model Gallery here: http://www.comsol.com/showroom/gallery/8577/). Note that this same general procedure is applicable for using Contour lines in both 2D and 3D geometries. Best regards, Bethany Moatts COMSOL [/QUOTE]

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.