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.

How can I import 2-dimensional array value to one variable using text file?

kunok Kyung Hee University/Nuclear Materials

Please login with a confirmed email address before reporting spam

Hi, all

I saw COMSOL 3.5a Phase field tutorial movie and in their movie, they import initial random state from the file to one variable. (This variable should depends on the position (x,y)).

How can I do this? Is there any format for this txt file?

Now I am suing COMSOL 4.2a.

In enclosed image,

First column is x coordinate
Second column is y coordinate
Third column is u_init values.

I want to put u_init, which is function of x,y values from that txt file.

Thank you very much
Kunok


2 Replies Last Post 2012年4月5日 GMT-4 15:54

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年4月5日 GMT-4 15:23
You need to use Interpolation Function and choose source of data as file.
You need to use Interpolation Function and choose source of data as file.

kunok Kyung Hee University/Nuclear Materials

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年4月5日 GMT-4 15:54
Thanks!
Thanks!

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.