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.

Importing data and parameterizing

Please login with a confirmed email address before reporting spam

Hi!

Recently I'm trying to use comsol for evaluating a value which is related to two different physical quantities. For one of them I've made enough simulation data set in comsol, and for the other I've got a data set which is in txt format (or csv) from my friend. Now I am trying to evaluate volume integral in comsol, where the integrant is a combination of two quantities. The problem is that the parameters in the expression of integrant in comsol volume integral must be in the comsol data set, but one of the data set which I've got from my friend is just a txt format data so that I can only import it in a table.

For example, in a specific geometry and boundary conditions, let's say I've got E field data from comsol, and B field data as a txt file from somewhere. I want to evaluate a volume integral of combination of two, such as [ integral(E (outerproduct) B) dV ] , but I cannot figure out how to properly import B field data from txt file and combine it with E field from comsol data set.

I can curve fit the txt data so I can make another data set with different positions.

Any idea or experience about this kind of situation?
Thank you very much!

2 Replies Last Post 18.10.2017, 03:09 GMT-4
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 7 years ago 25.07.2017, 11:12 GMT-4
Updated: 7 years ago 18.10.2017, 08:10 GMT-4
Hello Saebyeok,
You can import this external data into your COMSOL file using an interpolation function (Definitions > Functions > Interpolation). After you update the solution, you will be able to use that interpolation function in all the usual post-processing tools.
Since it's a vector field you want to import, you'll need to define one interpolation function per component, so 3 in 3D.
Best,
Jeff
Hello Saebyeok, You can import this external data into your COMSOL file using an interpolation function (Definitions > Functions > Interpolation). After you update the solution, you will be able to use that interpolation function in all the usual post-processing tools. Since it's a vector field you want to import, you'll need to define one interpolation function per component, so 3 in 3D. Best, Jeff

Please login with a confirmed email address before reporting spam

Posted: 7 years ago 18.10.2017, 03:09 GMT-4

@Jeff Hiller Thank you so much!!

@Jeff Hiller Thank you so much!!

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.