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.

Importing an Excel point XYZ elevation file into COMSOL for modeling ice flow

Please login with a confirmed email address before reporting spam

Hello,

I have an microsoft excel spreadsheet that has 475 point locations with known latitude, longitude surface elevation, and depth of ice for each point on a valley glacier. I also have 40 locations with known velocity vectors (for ice flow), ice temperature information, and bed condition knowledge (frozen non-slip bed).

I hope to create a 3D representation of our research site using COMSOL and the data I have obtained. My question is very simple but the answer is likely complex: What is the easiest way to import the point data set from excel into COMSOL to create a 3D solid which I can then manipulate the properties and boundary conditions of?

So far I have figured out that I can convert the point dataset to a DXF file and import the file into COMSOL but COMSOL will not read the DXF file for some reason. I can also grid the point file in ArcGIS 9.3 or Golden Software Surfer, or any other number of programs but Im not sure if this is an appropriate way to do it.

Not having a strong MATLAB programming background, is their a relatively easy way to import a surface elevation and bed topography data set, merge the two data sets in COMSOL, and create the medium between the two data sets that of ice (known temperatures, viscosity, etc.)?

The excel file has columns labeled A: Latitude B:Longitude C: Elevation D: Bed elevation

A long and complex question I know... but any help would be useful.

Thanks

Seth


26 Replies Last Post 09.03.2017, 07:49 GMT-5
COMSOL Moderator

Hello Seth Campbell

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 26.03.2010, 12:10 GMT-4
I got the same cuestion, it will be nice if there is an option like that, because using arcgis to modeling someplaces, like rivers and sea shore...

i hope somebody help us....
I got the same cuestion, it will be nice if there is an option like that, because using arcgis to modeling someplaces, like rivers and sea shore... i hope somebody help us....

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 18.03.2011, 09:00 GMT-4
Hi people

I have 7 excel sheets, with x,y,z coordinates, of different geological layers, to be imported into COMSOL, to set up the basic model of the reservoir. Any ideas how to import an excel sheet into COMSOL?
Appreciate your time and kindness!

regards from Berlin


I got the same cuestion, it will be nice if there is an option like that, because using arcgis to modeling someplaces, like rivers and sea shore...

i hope somebody help us....


Hi people I have 7 excel sheets, with x,y,z coordinates, of different geological layers, to be imported into COMSOL, to set up the basic model of the reservoir. Any ideas how to import an excel sheet into COMSOL? Appreciate your time and kindness! regards from Berlin [QUOTE] I got the same cuestion, it will be nice if there is an option like that, because using arcgis to modeling someplaces, like rivers and sea shore... i hope somebody help us.... [/QUOTE]

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 18.03.2011, 09:24 GMT-4
Hi

check the forum, for some months ago a file was posted with a short instruction how to import a geometry from a series of xyz coordinated from an external file (origine COMSOL France I believe)

--
Good luck
Ivar
Hi check the forum, for some months ago a file was posted with a short instruction how to import a geometry from a series of xyz coordinated from an external file (origine COMSOL France I believe) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 02.05.2011, 11:50 GMT-4
Hi,

I don't find the instructions. Could you tell me exactly where to find them?

Thanks
Hi, I don't find the instructions. Could you tell me exactly where to find them? Thanks

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 02.05.2011, 11:52 GMT-4
Hi

In my case, I imported .stl file (both ASCII or binary type) into COMSOL to build my geometry. It works perfectly!

regards


Hi,

I don't find the instructions. Could you tell me exactly where to find them?

Thanks


Hi In my case, I imported .stl file (both ASCII or binary type) into COMSOL to build my geometry. It works perfectly! regards [QUOTE] Hi, I don't find the instructions. Could you tell me exactly where to find them? Thanks [/QUOTE]

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 02.05.2011, 12:15 GMT-4
Hi,

I have a xyz coordinates file, Could you tell me how can import the topography in COMSOL?

Thank you
Hi, I have a xyz coordinates file, Could you tell me how can import the topography in COMSOL? Thank you

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 03.05.2011, 09:53 GMT-4
Hi there

I have xzy files, which I converted into .stl files with ParaView, and then I imported the .stl files into COMSOL.

regards
Liwah
Hi there I have xzy files, which I converted into .stl files with ParaView, and then I imported the .stl files into COMSOL. regards Liwah

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 04.05.2011, 10:09 GMT-4
Hi,

I downloaded Paraview, but It doesn't read my xyz file, Could you tell me how I must format the xyz file?

This is an axample of my file

474490.113 4176294.165 431.308
475490.113 4181294.165 958.246
475490.113 4180294.165 809.776

Column are separeted by tabulation.

Thank you very much
Hi, I downloaded Paraview, but It doesn't read my xyz file, Could you tell me how I must format the xyz file? This is an axample of my file 474490.113 4176294.165 431.308 475490.113 4181294.165 958.246 475490.113 4180294.165 809.776 Column are separeted by tabulation. Thank you very much

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 11.08.2011, 05:04 GMT-4
Are there any new regarding the import of XYZ-Data?

On this page
www.comsol.com/support/knowledgebase/838/
It is told that "The new Parametric Surfaces feature in 4.2 allows for creation of surfaces based on analytical expressions or look-up table data." But I can't find the lookup-table function.

How is this done, if I have a point set consisting of (X,Y,Z)-Data?

Best regards,
Christian
Are there any new regarding the import of XYZ-Data? On this page http://www.comsol.com/support/knowledgebase/838/ It is told that "The new Parametric Surfaces feature in 4.2 allows for creation of surfaces based on analytical expressions or look-up table data." But I can't find the lookup-table function. How is this done, if I have a point set consisting of (X,Y,Z)-Data? Best regards, Christian

Dulakshi Karunasinghe

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 20.09.2011, 06:26 GMT-4
Did you get it solved? I too have the same problem. Want to know how a set of x,y,z coordinates can be transformed into stl format, so that it can be imported in COMSOL.
thank you very much.

Did you get it solved? I too have the same problem. Want to know how a set of x,y,z coordinates can be transformed into stl format, so that it can be imported in COMSOL. thank you very much.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 20.09.2011, 06:56 GMT-4
hey peeps, I gave up importing all those coordinates into COMSOL from scratch, instead I build 3D geometries with other software and import into COMSOL, it makes things easier and COMSOL can handle them better, obviously when the final file size is huge, COMSOL cant handle properly and always gave unexpected error. :)

regards
Liwah
hey peeps, I gave up importing all those coordinates into COMSOL from scratch, instead I build 3D geometries with other software and import into COMSOL, it makes things easier and COMSOL can handle them better, obviously when the final file size is huge, COMSOL cant handle properly and always gave unexpected error. :) regards Liwah

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 20.09.2011, 11:34 GMT-4
Hi, no! I did'nt solve my problem yet. What software do you use to build the 3D geometry?

regards
silvia
Hi, no! I did'nt solve my problem yet. What software do you use to build the 3D geometry? regards silvia

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 20.09.2011, 11:43 GMT-4
I don't want to reveal too much, but you can expect news in the area of Digital Elevation Model import in the upcoming version 4.2a (premiered at the COMSOL conference in Boston in October).
I don't want to reveal too much, but you can expect news in the area of Digital Elevation Model import in the upcoming version 4.2a (premiered at the COMSOL conference in Boston in October).

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 20.09.2011, 11:55 GMT-4
I have the 3.5a version of COMSOL.

regards
silvia
I have the 3.5a version of COMSOL. regards silvia

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 21.09.2011, 04:07 GMT-4
I was told that version 4.0a and former are lacking funtionalities, in this case, before I upgrade to the latest version, my workaround is:

- decrease the geometry size i.e. dimension, number of elements, number of 3D geometries in one model
- use only the default features in COMSOL i.e. instead of importing a (complicated) 3D geometry, start with a block (etc), or a 2D rectangle (etc) and extrude/revolve it into 3D
- include as least geometries and physics as possible, I mean only the important ones, to optimize the runtime of COMSOL

I had bad time running COMSOL when I build a model which is of a best scenario, it takes 2-3 days (even with a super computer or server), so I split my model into a few sub models, and COMSOL 4.0a and former work better finally.
I was told that version 4.0a and former are lacking funtionalities, in this case, before I upgrade to the latest version, my workaround is: - decrease the geometry size i.e. dimension, number of elements, number of 3D geometries in one model - use only the default features in COMSOL i.e. instead of importing a (complicated) 3D geometry, start with a block (etc), or a 2D rectangle (etc) and extrude/revolve it into 3D - include as least geometries and physics as possible, I mean only the important ones, to optimize the runtime of COMSOL I had bad time running COMSOL when I build a model which is of a best scenario, it takes 2-3 days (even with a super computer or server), so I split my model into a few sub models, and COMSOL 4.0a and former work better finally.

Dulakshi Karunasinghe

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 21.09.2011, 05:13 GMT-4

I don't want to reveal too much, but you can expect news in the area of Digital Elevation Model import in the upcoming version 4.2a (premiered at the COMSOL conference in Boston in October).


That's great!!!
In fact I was a little disappointed to find that COMSOL cannot import DEMs when we bought COMSOL with Earth Science module.
[QUOTE] I don't want to reveal too much, but you can expect news in the area of Digital Elevation Model import in the upcoming version 4.2a (premiered at the COMSOL conference in Boston in October). [/QUOTE] That's great!!! In fact I was a little disappointed to find that COMSOL cannot import DEMs when we bought COMSOL with Earth Science module.

Dulakshi Karunasinghe

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 22.09.2011, 00:41 GMT-4
Finally, I got my problem solved. I followed the example rock_fracture_flow_3d_42. I used an interpolation function (with a text file giving x,y,z coordinates which defines the land surface), a block, parametric surface (using the interpolation function), then convert to solid, split and delete entities to create the geometry. Hope the example will help you all. This needs comsol 4.2.

Finally, I got my problem solved. I followed the example rock_fracture_flow_3d_42. I used an interpolation function (with a text file giving x,y,z coordinates which defines the land surface), a block, parametric surface (using the interpolation function), then convert to solid, split and delete entities to create the geometry. Hope the example will help you all. This needs comsol 4.2.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 22.09.2011, 03:42 GMT-4
right, I used to check out different examples provided by COMSOL 4.0a and former, but obviously nothing works. the tutorial aint that helpful anyway.
right, I used to check out different examples provided by COMSOL 4.0a and former, but obviously nothing works. the tutorial aint that helpful anyway.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 26.09.2011, 10:29 GMT-4
Hi there

I tried out the Interpolation in 4.0, it somehow works fine but I wonder how can I show all interpolated data (says I have a few interpolations for different geological layers) in one GUI? when I plot one, the others are replaced...


Finally, I got my problem solved. I followed the example rock_fracture_flow_3d_42. I used an interpolation function (with a text file giving x,y,z coordinates which defines the land surface), a block, parametric surface (using the interpolation function), then convert to solid, split and delete entities to create the geometry. Hope the example will help you all. This needs comsol 4.2.


Hi there I tried out the Interpolation in 4.0, it somehow works fine but I wonder how can I show all interpolated data (says I have a few interpolations for different geological layers) in one GUI? when I plot one, the others are replaced... [QUOTE] Finally, I got my problem solved. I followed the example rock_fracture_flow_3d_42. I used an interpolation function (with a text file giving x,y,z coordinates which defines the land surface), a block, parametric surface (using the interpolation function), then convert to solid, split and delete entities to create the geometry. Hope the example will help you all. This needs comsol 4.2. [/QUOTE]

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 07.08.2013, 07:01 GMT-4
Hi,

I hope this can help you.
1. under Global definitions > Functions> Interpolation, select Data source "file", Brows for your file, Select the sheet (Sheet1 for example), the range and then in your case, Number of arguments 2, under function name pick what you want (I like "Altitude") . This can take quite some time.
2. plot to check that everything is ok
3. under Model>Geometry> More primitives>Parametric surface
insert
name s1
min 0
max x1x2

name s2
min 0
max y1y2

under expressions set:
x: s1
y: s2
z=Altitude(s1+x1,s2+x2)

where x1 is your x_min, x2 your x_max, y1 your y_min and y2 your y_max

Axis type: Cartesian
x: 0
y:0
z:1

change the number of knots to >100 (or until you get a good enough resolution of your surface)
Build Selected

4. Create a Solid block with the dimensions of your analysis volume (Note, if you have a plateu, i.e. a flat surface, the interpolation might have some trouble, jut edit your xls file so the points are not exaclty the same), intersected by the surface

5. use Partition to separate the strata

Hope this helped!

Hi, I hope this can help you. 1. under Global definitions > Functions> Interpolation, select Data source "file", Brows for your file, Select the sheet (Sheet1 for example), the range and then in your case, Number of arguments 2, under function name pick what you want (I like "Altitude") . This can take quite some time. 2. plot to check that everything is ok 3. under Model>Geometry> More primitives>Parametric surface insert name s1 min 0 max x1x2 name s2 min 0 max y1y2 under expressions set: x: s1 y: s2 z=Altitude(s1+x1,s2+x2) where x1 is your x_min, x2 your x_max, y1 your y_min and y2 your y_max Axis type: Cartesian x: 0 y:0 z:1 change the number of knots to >100 (or until you get a good enough resolution of your surface) Build Selected 4. Create a Solid block with the dimensions of your analysis volume (Note, if you have a plateu, i.e. a flat surface, the interpolation might have some trouble, jut edit your xls file so the points are not exaclty the same), intersected by the surface 5. use Partition to separate the strata Hope this helped!

Sarath Gopalakrishnan

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 25.08.2013, 12:17 GMT-4

Hi there

I have xzy files, which I converted into .stl files with ParaView, and then I imported the .stl files into COMSOL.

regards
Liwah


Hi,
Could you tell the steps you followed in ParaView for converting the xyz file into .stl file, please?
Is it possible to convert it it from .txt / .csv / .xlsx to .stl using it?
[QUOTE] Hi there I have xzy files, which I converted into .stl files with ParaView, and then I imported the .stl files into COMSOL. regards Liwah [/QUOTE] Hi, Could you tell the steps you followed in ParaView for converting the xyz file into .stl file, please? Is it possible to convert it it from .txt / .csv / .xlsx to .stl using it?

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 24.05.2016, 13:21 GMT-4
Hey,

I am new to COMSOL and am using version 4.2.
I am trying to build a model with surface topography. I have the x, y and z coordinates in a .txt-file. When I set up the function "Interpolation" I can only draw the function if i check "use space coordinates as arguments" box. But then I get a fatal error if I try to set up the parametric function: Fatal error during assembly or evaluation.

If I do not check the space coordinate box then I cannot draw the function but do not get the fatal error when trying to build the parametric surface but also I do not get the right topography.

Does anyone know where the problem can lie? Attached is the mph file

Thanks in advance!
Hey, I am new to COMSOL and am using version 4.2. I am trying to build a model with surface topography. I have the x, y and z coordinates in a .txt-file. When I set up the function "Interpolation" I can only draw the function if i check "use space coordinates as arguments" box. But then I get a fatal error if I try to set up the parametric function: Fatal error during assembly or evaluation. If I do not check the space coordinate box then I cannot draw the function but do not get the fatal error when trying to build the parametric surface but also I do not get the right topography. Does anyone know where the problem can lie? Attached is the mph file Thanks in advance!


Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 24.05.2016, 14:14 GMT-4
Hello Sina,
You may want to update your license to the current version: in 5.2 your file works right out of the box, see screenshot attached.
Best,
Jeff
Hello Sina, You may want to update your license to the current version: in 5.2 your file works right out of the box, see screenshot attached. Best, Jeff


Please login with a confirmed email address before reporting spam

Posted: 9 years ago 24.05.2016, 14:34 GMT-4
Hey Jeff,

thanks for the fast reply. We have thought about updating our license but it we do it will still take a while. Do you know where the mistake lies for the 4.2 version? Oh and as I see from your figure: The parameters s1 and s2 range from 0 to 1500 each not from 0 to 150. (In my model it does not make a difference - I still get the same errors or wrong topography). Could you maybe attach a figure with the right ranges just for me to check that with the newest version the topography gets displayed correct?

Thank you!
Hey Jeff, thanks for the fast reply. We have thought about updating our license but it we do it will still take a while. Do you know where the mistake lies for the 4.2 version? Oh and as I see from your figure: The parameters s1 and s2 range from 0 to 1500 each not from 0 to 150. (In my model it does not make a difference - I still get the same errors or wrong topography). Could you maybe attach a figure with the right ranges just for me to check that with the newest version the topography gets displayed correct? Thank you!

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 24.05.2016, 15:00 GMT-4
Hi again,
Sorry, I don't have 4.2 any more.
Attached is the screenshot after I increased the ranges for s1 and s2 to 1500. You'll notice that I increased the number of knots from 10 to 100 to capture your elevation data better.
Best,
Jeff
Hi again, Sorry, I don't have 4.2 any more. Attached is the screenshot after I increased the ranges for s1 and s2 to 1500. You'll notice that I increased the number of knots from 10 to 100 to capture your elevation data better. Best, Jeff


Please login with a confirmed email address before reporting spam

Posted: 8 years ago 09.03.2017, 07:49 GMT-5
I imported the xyz data from text file to gmsh then saved it as *.stl
I imported the xyz data from text file to gmsh then saved it as *.stl

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.