# Understanding some unfamiliar words

1. Dec 24, 2015

### mr.tea

Hi,

I have a python project to do that related to building a mesh class that represents triangles.
(I am a bachelor student of mathematics in my first year, so all this material is pretty new to me)

I should get as an input two matrices:
*one which represents the coordinates of the nodes.
*one which represents the elements(triangles) using the node numbers.

My problem is that I really don't know what it is node numbers. How do they numbered?

I have attached the file of the project
I really can't start doing it without understanding those words and what do the numbers in the matrices represent.

Thank you,
Thomas

2. Dec 24, 2015

### Staff: Mentor

The nodes are the points at which the vertex points of the triangles meet, I believe. The node numbers are just a way of numbering the nodes. Take a look at the files that are mentioned in your problem. The first pair of numbers in coord1.txt should give the coordinates of a node. The first number in elementnode1.txt should identify the first node that is listed in coord1.txt.

3. Dec 24, 2015

### mr.tea

I think I should have uploaded the files because, it seems reasonable for the nodes coordinate, but there are too many numbers in the numbers, it doesn't make sense at all (for me at least), according to what it should be.

Thank you.

#### Attached Files:

File size:
674 bytes
Views:
43
• ###### elementnode1_1.txt
File size:
1.3 KB
Views:
45
4. Dec 24, 2015

### Staff: Mentor

In your post you showed the files as coord1.txt and elementnode1.txt, which are slightly different from the ones you attached. Are you able to open the files mentioned in your problem?

In the files you attached, I think that coord1_1.txt contains 42 numbers, which would be the coordinates of 21 points. In the other file, elementnode1_1.txt, there are 84 numbers, but I have no idea what they mean. All of the numbers in that file could have been stored as integers, but whoever made that file chose to not do so..

I think your best course of action is to contact your instructor to get an explanation of what the information in the elementnode files means.

5. Dec 24, 2015

### SteamKing

Staff Emeritus
This is a picture of a simple region which has been divided into triangles:

There are three triangular elements: e1, e2, e3
There are five nodes: n1, n2, n3, n4, n5

Since this is a two-dimensional region, there will be two numbers used to specifiy each nodal coordinate (x,y)

For instance:

Code (Text):

Node     x    y
1     x1  y1
2     x2  y2
3     x3  y3
4     x4  y4
5     x5  y5

The elements can be described using just the node numbers, so that you don't need to repeat using the actual coordinates:

Code (Text):

Element    Node 1   Node 2  Node 3
1          1        3       4
2          1        4       2
3          2        4       5

By setting up data tables, when the program needs access to information about element 1, it sees a list of three node numbers, each of which in turn can be accessed to give the coordinates of the nodes for that element to use in subsequent calculations. This keeps storage for the description of a region to a minimum.

Since there will be a discrete number of nodes and elements, there's no need to use floating point numbers to access them. Only the coordinate values need to be floating point.

Your data files are difficult to read because all the data is written onto one long line of text. This might be easy for a computer program to read, but it's hard for a human to interpret, unless one knows how the data were originally arranged and written to the file.

6. Dec 25, 2015

### mr.tea

Thank you SteamKing. That makes sense now.

Merry Christmas! :)

Thomas

7. Dec 27, 2015

### bigfooted

The file 'coord1_1.txt' contains 2 lines and 21 columns. The first line contains all the x-coordinates and the second line contains all the y-coordinates. There are 21 columns, representing 21 points. In the file 'elementnode1_1.txt', the connectivity of the triangles are described. This file contains 3 lines and 28 columns. Each column represents a triangle and the number refers to the columns in 'coord1_1.txt'.

The first column in elementnode1_1.txt says:
5
6
18

So this triangle is the triangle (-0.866, 0.5), (-0.5,-0.866),(-0.25,-0.433)