### Contact CIMNE

International Center for Numerical Methods in Engineering
C1 Building, Campus Norte UPC
Gran Capitan, s/n
08034 Barcelona, Spain

 Creation and meshing of a line
 Prev:  First steps Main page Next:  Creation and meshing of a surface

### Creation and meshing of a line

We will begin the example creating a line by defining its origin and end points, points 1 and 2 in the following figure, whose coordinates are (0,0,0) and (10,0,0) respectively.

It is important to note that in creating and working with geometric entities, GiD follows the following hierarchical order: point, line, surface, and volume.

To begin working with the program, open GiD, and a new GiD project is created automatically.

From this new database, we will first generate points 1 and 2.

Next, we will create points 1 and 2. To do this, we will use an Auxiliary Window that will allow us to simply describe the points by entering coordinates. It is accessed by the following sequence: Utilities->Tools->Coordinates window

Then, from the Top Menu, select GeometryCreatePoint

In the coordinate window opened previously, enter the coordinates of point 1 in the "x", "y", "z" entries and click Apply or press Enter on the keyboard.

And create point 2 in the same way, introducing its coordinates in the Coordinates window.

The last step in the creation of the points, as well as any other command, is to press Escape, either via the Escape button on the keyboard or by pressing the central mouse button. Select Close to close the Coordinates window.

Now, we will create the line that joins the two points. Choose from the Top Menu: Geometry->Create->Straight line. Option in the Toolbar shown below can also be used.

Next, the origin point of the line must be defined. In the Mouse Menu, opened by clicking the right mouse button, select Contextual->Join Ctrl-a.

NOTE: It is important to note that the Contextual submenu in the Mouse Menu will always offer the options of the command that is currently being used. In this case, the corresponding submenu for line creation, has the following options:

NOTE: With option Join, a point already created can be selected on the screen. The command No Join is used to create a new point that has the coordinates of the point that is selected on the screen. We can see that the cursor changes form for the Join and No Join commands.

Now, choose on the screen the first point, and then the second, which define the line. Finally, press Escape to indicate that the creation of the line is completed. Press Escape again to end the line creation function, if you don't press Escape you can continue creating lines.

Once the geometry has been created, we can proceed to the line meshing. In this example, this operation will be presented in the simplest and most automatic way that GiD permits. To do this, from the Top Menu select: Mesh->Generate mesh.

And an Auxiliary Window appears, in which the size of the elements should be defined by the user.

NOTE: The size of an element with two nodes is the length of the element. For, surfaces or volumes, the size is the mean length of the edge of the element.

In this example, the size of the element is defined in concordance with the length of the line, chosen for this case as size 1. Click OK.

Once the mesh has been generated a window with the mesh information appears. Click View mesh.

Automatically GiD generates a mesh for the line. The finite element mesh is presented on the screen in a grey color.

The mesh is formed by ten linear elements of two nodes. To see the numbering of the nodes and mesh elements, select from the Mouse Menu: Label->All, and the numbering for the 10 elements and 11 nodes will be shown, as below.

Once the mesh has been generated, the project should be saved. To save the example select from the Top Menu: Files->Save.

The program automatically saves the file if it already has a name. If it is the first time the file has been saved, the user is asked to assign a name. For this, an Auxiliary Window will appear which permits the user to browse the computer disk drive and select the location in which to save the file. Once the desired directory has been selected, the name for the current project can be entered in the space titled File Name. Save it as initiation.gid.

NOTE: Next, the manner in which GiD saves the information of a project will be explained. GiD creates a directory with a name chosen by the user, and whose file extension is .gid. GiD creates a set of files in this directory where all the information generated in the present example is saved. All the files have the same name of the directory to which they belong, but with different extensions. These files should have the name that GiD designates and should not be changed manually.

Each time the user selects option save the database will be rewritten with the new information or changes made to the project, always maintaining the same name.

To exit GiD, simply choose Files->Quit.

To access the project that we have just created, simply open GiD and select from the Top Menu: Files->Open. An Auxiliary Window will appear which allows the user to access and open the directory initiation.gid.

Creation and meshing of a line

 Prev:  First steps Main page Next:  Creation and meshing of a surface