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.

Outputting identical data points in multiple models

Please login with a confirmed email address before reporting spam

Hello,

I'm building multiple, nearly-identical models, but with minor changes between the models to see if certain factors need to be included.

In order to minimize error, I'd like to automatically have COMSOL output the same data points between the models. Otherwise, I'll have to go through each model, click on the relevant areas, copy the results and then I can perform some post processing to compare the resulting data points.

For example, I have a square, and I want to take 5 data points in that square, but in rather specific locations. Then, I'm adding a thin layer on one side of the square; I now want to take the same 5 data points to see how much the values have changed. My actually model is a bit more complicated than I'm describing here, as I actually have quite a number of areas that I want to pull data from.

If there are any recommendations or articles that already discussed this (I tried searching, but my verbiage didn't give me any useful results), I'd appreciate any and all inputs.

Thank you all in advance.

Ben D.

Note: I'm using the AC/DC module, although I don't think that will matter since this is all post-processing related.

5 Replies Last Post 2011/08/29 22:01 GMT-4

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011/07/08 12:43 GMT-4
Cut Point 3D

I don't have access to Comsol at the moment, but look for this under the Data Sets node in Results.

Cut Point 3D can be used to add evaluation points at explicit coordinates, regardless of the underlying mesh.

Refer to page 926 in version 4.2 Multiphysics Users Guide pdf.
Cut Point 3D I don't have access to Comsol at the moment, but look for this under the Data Sets node in Results. Cut Point 3D can be used to add evaluation points at explicit coordinates, regardless of the underlying mesh. Refer to page 926 in version 4.2 Multiphysics Users Guide pdf.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011/07/26 21:46 GMT-4
Fantastic! I was able to use the Cut Point 2D. For the posterity of the COMSOL community, here's what I did in COMSOL version 4.2.0.150:

1. After successfully running my model, I right clicked on "Data Sets" and chose to create a "Cut Point 2d" set.
2. I then changed my data set to the proper solution I wanted (necessary if multiple types of physics are being used).
3. I then changed my "Entry Method" to "From File."
4. This required me to produce a text file of x and y data points. I created a simple two column Excel table where my first column represented X and my second column represented Y. I saved the file as a text extension and chose "tab delimited" to further define how the file was saved. This was the file I used in the "Filename:" field. Note: your text document that you create can't include ANYTHING besides two columns for x and y. If you try putting in anything because specific points, COMSOL will get confused.
5. Next, I right clicked on Export within Results and selected Data.
6. Within the Data tab, I changed the data set to the Cut Point 2d set I was working on.
7. I set my factor of interest (I'm looking at the electric field so I used ec.normE).
8. Then I changed the units to compensate for any factor (M, k, milli, micro, etc).
9. I typed in a name for the data file to be called in the "Filename:" field.
10. Lastly, I right clicked on Data and selected export. This creates the file based on your (x,y) points.

Now, I was free to load my data into MATLAB, Excel, or whatever else tickled my fancy.
FYI, COMSOL seemed to have automatically used spaces delimited.

I hope this helps somebody out there in the world.
Fantastic! I was able to use the Cut Point 2D. For the posterity of the COMSOL community, here's what I did in COMSOL version 4.2.0.150: 1. After successfully running my model, I right clicked on "Data Sets" and chose to create a "Cut Point 2d" set. 2. I then changed my data set to the proper solution I wanted (necessary if multiple types of physics are being used). 3. I then changed my "Entry Method" to "From File." 4. This required me to produce a text file of x and y data points. I created a simple two column Excel table where my first column represented X and my second column represented Y. I saved the file as a text extension and chose "tab delimited" to further define how the file was saved. This was the file I used in the "Filename:" field. Note: your text document that you create can't include ANYTHING besides two columns for x and y. If you try putting in anything because specific points, COMSOL will get confused. 5. Next, I right clicked on Export within Results and selected Data. 6. Within the Data tab, I changed the data set to the Cut Point 2d set I was working on. 7. I set my factor of interest (I'm looking at the electric field so I used ec.normE). 8. Then I changed the units to compensate for any factor (M, k, milli, micro, etc). 9. I typed in a name for the data file to be called in the "Filename:" field. 10. Lastly, I right clicked on Data and selected export. This creates the file based on your (x,y) points. Now, I was free to load my data into MATLAB, Excel, or whatever else tickled my fancy. FYI, COMSOL seemed to have automatically used spaces delimited. I hope this helps somebody out there in the world.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011/08/28 22:18 GMT-4
4. This required me to produce a text file of x and y data points. I created a simple two column Excel table where my first column represented X and my second column represented Y. I saved the file as a text extension and chose "tab delimited" to further define how the file was saved. This was the file I used in the "Filename:" field. Note: your text document that you create can't include ANYTHING besides two columns for x and y. If you try putting in anything because specific points, COMSOL will get confused.

Would you please attach one simple example of your created file for which you have explained no.4 point??

Than you too much for your suggestions.
4. This required me to produce a text file of x and y data points. I created a simple two column Excel table where my first column represented X and my second column represented Y. I saved the file as a text extension and chose "tab delimited" to further define how the file was saved. This was the file I used in the "Filename:" field. Note: your text document that you create can't include ANYTHING besides two columns for x and y. If you try putting in anything because specific points, COMSOL will get confused. Would you please attach one simple example of your created file for which you have explained no.4 point?? Than you too much for your suggestions.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011/08/28 22:48 GMT-4
Someone asked me to include an example file of step 4. This is where I create the file of data points that will be used in COMSOL.

Attached is a word document with screen shots and instructions as to how to create the file. I would have attached the text file, but COMSOL forums apparently doesn't allow that anymore, so I attached the Excel document shown in the word document.

Good luck.
Someone asked me to include an example file of step 4. This is where I create the file of data points that will be used in COMSOL. Attached is a word document with screen shots and instructions as to how to create the file. I would have attached the text file, but COMSOL forums apparently doesn't allow that anymore, so I attached the Excel document shown in the word document. Good luck.


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011/08/29 22:01 GMT-4
Dear Ben Danziger

Thank you very much for your attachments. I would also like to provide my gratitude to your persional email adress directly.

Regards
Anwar
email: anwar.ee113@gmail.com
Dear Ben Danziger Thank you very much for your attachments. I would also like to provide my gratitude to your persional email adress directly. Regards Anwar email: anwar.ee113@gmail.com

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.