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.

Extract Data from a Parameterized Surface

Please login with a confirmed email address before reporting spam

Hello,

In my comsol model I would like to extract the electric and magnetic fields on the surface of a sphere. What I do now is the following:
1) I define a Parameterized Surface in the Results>Data Sets section. I select the Data Set from which I want to extract the fields (eg. Solution3) and define the sphere as the parameterized surface.

2) After that I go to Results>Export>Data and choose as a Data set the Parameterized Surface, then I select the expression I would like to extract from this surface (eg electric field norm). In the output section I select:

Filename: filename.csv
Points to evaluate in: Take from data set
Data format: spreadsheet
Space Dimension: 3
Geometry level: surface

When I open the file I get a list of x,y,z coordinates with the field norm. The x,y and z coordinates satisfy the condition that they have to be on the defined sphere, but in the column with the field norm, I get only one value which is the same for all x,y,z. Also when I try to plot it, I don't see a surface plot of the field norm on the defined surface.

My question therefore is: Does anyone know how to extract data from a predefined parameterized surface (such as a sphere) or anyone who can tell me what I am doing wrong in the previous explanation?


Meanwhile thanks.

Kind regards,
F.Peyskens

2 Replies Last Post Nov 5, 2012, 6:37 a.m. EST
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 3, 2012, 7:26 a.m. EDT
Hi
I would say it's easier to define a sphere or a boundary of the desired shape, in the geometry, and then once solve to select the boundary (be it an internal boundary not of any other specific use - or to define a denser mesh on it for a better value derivation) to derive the values there-on.

Because you can define the mesh also around this internal boundary you have better control of the precision of the results, than if you do everything in the postprocessing part, even if this is a perfectly valid approach.

You can also make some "Definition - Cooordinates" handy coordiantes and refer to these variables to help you make the correct coordinate transform in the postprocesng section, as COMSOL by default delivers everything in the cartesian default frame and coordinates

--
Good luck
Ivar
Hi I would say it's easier to define a sphere or a boundary of the desired shape, in the geometry, and then once solve to select the boundary (be it an internal boundary not of any other specific use - or to define a denser mesh on it for a better value derivation) to derive the values there-on. Because you can define the mesh also around this internal boundary you have better control of the precision of the results, than if you do everything in the postprocessing part, even if this is a perfectly valid approach. You can also make some "Definition - Cooordinates" handy coordiantes and refer to these variables to help you make the correct coordinate transform in the postprocesng section, as COMSOL by default delivers everything in the cartesian default frame and coordinates -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Nov 5, 2012, 6:37 a.m. EST
Hello,

Thank you for the response already.
I actually did define a sphere (as it is an object in the simulation itself), but once solved I can only extract the complete data set. How do you extract the values solely on the surface of the sphere (eg. how can you extract the field components of the electric field only on the surface mesh of the sphere)?

Meanwhile thanks.

Kind regards,
F.Peyskens
Hello, Thank you for the response already. I actually did define a sphere (as it is an object in the simulation itself), but once solved I can only extract the complete data set. How do you extract the values solely on the surface of the sphere (eg. how can you extract the field components of the electric field only on the surface mesh of the sphere)? Meanwhile thanks. Kind regards, F.Peyskens

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.