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 point measurements (coordinates in xyz format) into COMSOL 5.0

Please login with a confirmed email address before reporting spam

Hi all,

I am wondering if it is possible to import point measurements into COMSOL. I have a whole range of flow velocity and depth measurements for a river structure. I have already created the 3d geometry drawing in COMSOL, and would like to import my .txt file with these two measurements per point (only one velocity and one depth measurement per point-location, no repeats, a total of 150 point-locations for this structure), so that I can create a colored visualization of flow velocity and depth profile of this structure.
How exactly should the .txt file be ordered? First column with x coordinates, then y, then z, then measurements?
Can I then import it into COMSOL 5.0 via functions - interpolation? How will post-processing for this work exactly?
I only recently started using COMSOL, and any help would be greatly appreciated.

Thank you,
Jeroen

5 Replies Last Post 24.02.2015, 07:32 GMT-5

Please login with a confirmed email address before reporting spam

Posted: 10 years ago 16.02.2015, 03:38 GMT-5
Anyone who can help me with this query?

Thank you.
Anyone who can help me with this query? Thank you.

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: 10 years ago 24.02.2015, 02:18 GMT-5
Hi

Certainly you might import data, using the "Definition - Functions - Interpolation" node, check the help for the format. You need to load multiple parameter via a file

I'm sure I remember that this has been discussed before on the Forum too

--
Good luck
Ivar
Hi Certainly you might import data, using the "Definition - Functions - Interpolation" node, check the help for the format. You need to load multiple parameter via a file I'm sure I remember that this has been discussed before on the Forum too -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 10 years ago 24.02.2015, 04:49 GMT-5
yes, you should define it as an interpolation function with x,y,z,myfun

it is possible to plot your txt file data after importing it to comsol.
yes, you should define it as an interpolation function with x,y,z,myfun it is possible to plot your txt file data after importing it to comsol.

Please login with a confirmed email address before reporting spam

Posted: 10 years ago 24.02.2015, 05:04 GMT-5
Thank you.

I have now imported the .txt file into Comsol, and have made a plot from it. But how do I combine my plot with my 3d geometry drawing. I tried exporting both my 2d and my 3d plot, but that did not work.

So is there a way to overlay my plot (2d or 3d) onto my 3d geometry drawing, so that both show up in same graphics window?

Thank you.
Thank you. I have now imported the .txt file into Comsol, and have made a plot from it. But how do I combine my plot with my 3d geometry drawing. I tried exporting both my 2d and my 3d plot, but that did not work. So is there a way to overlay my plot (2d or 3d) onto my 3d geometry drawing, so that both show up in same graphics window? Thank you.

Please login with a confirmed email address before reporting spam

Posted: 10 years ago 24.02.2015, 07:32 GMT-5
ok, if I understand correctly, you have two txt files: 1) velocity field and the other one is depth of some points for your river.

Ok, my suggestion is that you can define your depth txt file inside your geometry: first define it as an interpolation curve (which contains x,y,z).
Then define your velocity field txt file as an interpolation function and in post-processing plot them together.

Hope this helps.
Sepideh
ok, if I understand correctly, you have two txt files: 1) velocity field and the other one is depth of some points for your river. Ok, my suggestion is that you can define your depth txt file inside your geometry: first define it as an interpolation curve (which contains x,y,z). Then define your velocity field txt file as an interpolation function and in post-processing plot them together. Hope this helps. Sepideh

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.