Home    Search    Up    Reference Manuals    Return   





Users Manual for Program GPLOT  




Table of contents


   Introduction

   Description of the upper menu

   Description of the lower menu

   Body commands

   Couplings

   Step by step methods for animations in GPLOT
      Animation of modal analysis
      Animation of time simulation
      Animation of wheel/rail geometry properties

   Examples



Introduction

Program GPLOT is a three-dimensional geometry plotting program, for graphical representation of the calculation model. The geometry of the model are read from BODY-commands given in the CALC input data file, with extension .frespf, .modalf, .quasif, .runf or .tsimf. Description of available BODY-commands is given in this manual page. Execution of program GPLOT starts by pressing the gplot-button, or writing by the command "gplot".

Program GPLOT can read two arguments:
In the GPLOT-window the mouse buttons are defined as:


Description of the upper menu

File
If the user clicks on "File" or presses <Alt>F on the keyboard, following sub-menu will appear:

Read_Runf = Read geometry from input data file *.runf, *.frespf, *.modalf, *.quasif, or '.tsimf.
Read_GPdat = Read data from a GPdat-file.
Print = Send current picture to printer or file.
Create Video = Create a video file in wmv- and/or ogg- format.
Command = Possibility to give commands to program GPLOT, is kept for backward compatibility reasons, not supported any longer.
Exit = Stops the execution of program GPLOT.

View
If the user clicks on "View" or presses <Alt>V on the keyboard, following sub-menu will appear:

Show 1 diag = Show the model in one big diagram. In the popup-window which appear, the user can choose if the deformed and/or undeformed state shall be shown or not.
Show 4 diags = Split the window into four smaller diagrams allowing the user to select between plotting the model or a close-up view of the wheel- and rail-profile including its track forces, contact forces, creepage and contact ellipse.
Scale_xy = Change the scale factor for the geometry.
View_Center = Define the point to be located in the center of the window.
View_Angle = Define view angle in which the model shall be seen from
View_Default = Sets the View_Angle to the angles 15, 0 and 45.
View_Top = Sets the View_Angle to the angles 90, 0 and 0.
View_Side = Sets the View_Angle to the angles 0, 0 and 0.
View_Front = Sets the View_Angle to the angles 0, 0 and 90.

Deform
If the user clicks on "Deform" or presses <Alt>D on the keyboard, following sub-menu will appear:

Draw_Deform = Selects deformation from the GPdat-file.
Deform_Scale = Change the scale factor for the deformed shape.
Coord_Scale = Change the scale factor for the coordinate systems.
Force_Scale = Change the scale factor for the animated forces.
Deform_Phase = Define the phase angle of the deformed shape.
Draw_Symbols = Select if symbols shall be drawn or not.

Prev
A push button that changes to the previous state.
When animating results from MODAL the Prev-button will change to the previous eigen-mode.
In TSIM-mode the Prev-button will change to the previous picture. Pressing a long time on the Prev-button is similar to a click on the Back-button

Next
A push button that changes to the next state.
When animating results from MODAL the Next-button will change to the next eigen-mode.
In TSIM-mode the Next-button will change to the next picture. Pressing a long time on the Next-button is similar to a click on the Fwd-button

Symbols
A push button that opens the "Select Symbol" popup menu. In this menu the user can select which symbols that shall be shown.

Forces
A push button that opens the "Select Forces" popup menu. In this menu the user can select which forces that shall be shown.

Bodies
A push button that opens the "Select Bodies" popup menu. In this menu the user can select which bodies that shall be shown.

Help
If the user clicks on "Help" or presses <Alt>H on the keyboard, following sub-menu will appear:

Users Manual = Opens the documentation with the web-browser defined in the environmentvariable $genhtml.
Tool tips = Toggle button where the user can turn on or off tool tips.
About = Creates a popup-menu showing the GPLOT program version.


Description of the lower menu

Short Scale
In the short scale the user can control the speed of the animation.

Back A push button that starts backward animation.

Stop A push button that stops animation.

Fwd A push button that starts forward animation.

Long Scale
In the long scale the user can manually control current picture of the animation.



Body commands.

The body commands is normally given in the *.runf, *.frespf, *.modalf, *.quasif, or '.tsimf-file, and is read by program GPLOT by clicking "File->Read_Runf". The directive contains information regarding the geometrical shape of the masses in the model. The BODY-command has the following subcommands:

box_lsys = Defines a box shape body, the shape is described in coordinates of a lsys.
box_mass = Defines a box shape body, the shape is described relative to the center of gravity of the mass.
box_lsys_522 = Defines a box shape body with 5*2*2 number of nodes in order to show flexible modes in the body.
box_mass_522 = As in BOX_LSYS_522, but the shape is described relative to the center of gravity of the mass.
box_lsys_733 = Defines a box shape body with 7*3*3 number of nodes in order to show flexible modes in the body.
box_mass_733 = As in BOX_LSYS_733, but the shape is described relative to the center of gravity of the mass.
car_lsys_522 = Similar to BOX_LSYS_522 but end a0 of the box is shaped like a front of railway a vehicle.
car_mass_522 = Similar to BOX_MASS_522 but end a0 of the box is shaped like a front of railway a vehicle.
cylx_lsys = Defines a cylindrical shaped body, the shape is described in relation to a lsys.
cylx_mass = Defines a cylindrical shaped body, the shape is described relative to the center of gravity of the mass.
figure_lsys = Defines an arbitrary shaped body, the shape is described in coordinates of a lsys.
figure_mass = Defines an arbitrary shaped body, the shape is described relative to the center of gravity of the mass.
opengl_mass = Defines a geometric primitive according to OpenGL. The geometric figure is described relative to the center of gravity of the mass.
opengl2_mass = Defines geometric figures consisting of several OpenGL geometric primitives. The geometric figure is described relative to the center of gravity of the mass.
whe_set_lsys = Defines a wheelset shaped body, the shape is described in coordinates of a lsys.
whe_set_mass = Defines a wheelset shaped body, the shape is described relative to the center of gravity of the mass.

Subcommand: box_lsys, box_lsys_522, car_lsys_522

Both box_lsys and box_lsys_522 are used to create a figure in box shape, and both have the same set of input data. The difference between box_lsys and box_lsys_522, is that box_lsys_522 has 5 nodes along each side which are parallel to the X-axle. The idea for creating a box with several nodes lying on a straight line is to make it possible to animate structural flexibility of the body. The corners of the box are given relative to a local coordinate system lsys. The input data consists of the following items:

                                                      
  body box_lsys_522  bname lsys (+-')a0 (+-')a1       
                                (+-')b0 (+-')b1       
                                (+-')h0 (+-')h1       
                                                      
bname = Name of the created body. NB. The name must be equal to the name of the mass stored on the GPdat-file, if plotting of the deformation shapes shall be possible.
lsys = The name of the lsys-system in which the values a0,a1,b0,,, etc. should refer to.
a0 = Distance from the reference point to the front edge of the box
a1 = Distance from the reference point to the rear edge of the box
b0 = Distance from the reference point to the right side of the box
b1 = Distance from the reference point to the left side of the box
h0 = Distance from the reference point to the lower edge of the box
h1 = Distance from the reference point to the upper edge of the box

Subcommand: box_mass, box_mass_522, car_mass_522

Both box_mass and box_mass_522 are used to create a figure in box shape, and both have the same set of input data. The difference between box_mass and box_mass_522, is that box_mass_522 has 5 nodes along each side which are parallel to the X-axle. The idea for creating a box with several nodes lying on a straight line is to make it possible to animate structural flexibility of the body. The corners of the box are given relative to the center of gravity of the mass. The input data consists of the following items:

                                                                                
  body box_mass_522  bname (+-')a0 (+-')a1 (+-')b0 (+-')b1 (+-')h0 (+-')h1      
                                                                                
bname = Name of the created body. NB. The name must be equal to the name of the mass stored on the GPdat-file, if plotting of the deformation shapes shall be possible.
The center of gravity of the mass is the reference point in which the values a0,a1,b0,,, etc. will refer to.
a0 = Distance from the reference point to the front edge of the box
a1 = Distance from the reference point to the rear edge of the box
b0 = Distance from the reference point to the right side of the box
b1 = Distance from the reference point to the left side of the box
h0 = Distance from the reference point to the lower edge of the box
h1 = Distance from the reference point to the upper edge of the box

Subcommand: box_lsys_733

Box_lsys_733 is used to create a figure in box shape. The box consists of 36 nodes in total, in order to give a better shape of the flexible mode.

Input data Syntax:

                                                                
  body box_lsys_733  bname lsys (+-')a111 (+-')b111 (+-')h111   
                                (+-')a113 (+-')b113 (+-')h113   
                                (+-')a131 (+-')b131 (+-')h131   
                                (+-')a133 (+-')b133 (+-')h133   
                                (+-')a711 (+-')b711 (+-')h711   
                                (+-')a713 (+-')b713 (+-')h713   
                                (+-')a731 (+-')b731 (+-')h731   
                                (+-')a733 (+-')b733 (+-')h733   
                                                                
bname = Name of the created body. NB. The name must be equal to the name of the mass stored on the GPdat-file, if plotting of the deformation shapes shall be possible.
lsys = The name of the lsys-system in which the values a11,b111,,, etc. should refer to.
a111, b111, h111 = Front lower right hand corner of the box
a113, b113, h113 = Front upper right hand corner of the box
a131, b131, h131 = Front lower left hand corner of the box
a133, b133, h133 = Front upper left hand corner of the box
a711, b711, h711 = Rear lower right hand corner of the box
a713, b713, h713 = Rear upper right hand corner of the box
a731, b731, h731 = Rear lower left hand corner of the box
a733, b733, h733 = Rear upper left hand corner of the box

Subcommand: box_mass_733

Box_mass_733 is used to create a figure in box shape. The box consists of 36 nodes in total, in order to give a better shape of the flexible mode.

Input data Syntax:

                                                                
  body box_mass_733  bname      (+-')a111 (+-')b111 (+-')h111   
                                (+-')a113 (+-')b113 (+-')h113   
                                (+-')a131 (+-')b131 (+-')h131   
                                (+-')a133 (+-')b133 (+-')h133   
                                (+-')a711 (+-')b711 (+-')h711   
                                (+-')a713 (+-')b713 (+-')h713   
                                (+-')a731 (+-')b731 (+-')h731   
                                (+-')a733 (+-')b733 (+-')h733   
                                                                
bname = Name of the created body. NB. The name must be equal to the name of the mass stored on the GPdat-file, if plotting of the deformation shapes shall be possible.
a111, b111, h111 = Front lower right hand corner of the box
a113, b113, h113 = Front upper right hand corner of the box
a131, b131, h131 = Front lower left hand corner of the box
a133, b133, h133 = Front upper left hand corner of the box
a711, b711, h711 = Rear lower right hand corner of the box
a713, b713, h713 = Rear upper right hand corner of the box
a731, b731, h731 = Rear lower left hand corner of the box
a733, b733, h733 = Rear upper left hand corner of the box

Subcommand: cylx

Subcommand cylx creates a body with a cylindrical shape. The location of the cylinder is defined in the reference point. The input data consists of the following items:

                                                  
  body cylx  bname ref_point(1:3)  radius height  
                                                  
bname = Name of the created body. NB. The name must be equal to the name of the mass stored on the GPdat-file, if plotting of the deformation shapes shall be possible.
ref_point(1:3) = X-,Y- and Z- coordinates relative to lsys to the reference point in which the values radius and height refers to. The coordinate system lsys is the linear local coordinate system which the body is related to.
radius = The radius of the cylinder.
height = The height of the cylinder.

Subcommand: cylx_lsys

Subcommand cylx_lsys creates a body with a cylindrical shape. The location of the cylinder is defined in lsys. The input data consists of the following items:

                                                
  body cylx_lsys  bname lsys  radius height     
                                                
bname = Name of the created body. NB. The name must be equal to the name of the mass stored on the GPdat-file, if plotting of the deformation shapes shall be possible.
lsys = The name of the lsys-system which defines the center of the cylinder.
radius = The radius of the cylinder.
height = The height of the cylinder.

Subcommand: cylx_mass

Subcommand cylx_mass creates a body with a cylindrical shape. The location of the cylinder is defined by the center of gravity of the mass. The input data consists of the following items:

                                           
  body cylx_mass  bname  radius height     
                                           
bname = Name of the created body. NB. The name must be equal to the name of the mass stored on the GPdat-file, if plotting of the deformation shapes shall be possible. The center of the cylinder will be equal to the center of gravity of the mass.
radius = The radius of the cylinder.
height = The height of the cylinder.

Subcommand: figure

The shape of the body is built-up of a number of polygons. All the coordinates are given in relation to a reference point, in order to simplify the copying of the figures. The input data consists of the following items:

                                                                              
  body figure  bname (+-')ref_point(1:3)                                      
                     (+-')Npolygons                                           
                     (+-')Npoints1   (+-')point11(1:3) (+-')point12(1:3),,,   
                     (+-')Npoints2   (+-')point21(1:3) (+-')point22(1:3),,,   
                      . . . . . . . . . . . .                                 
                                                                              
bname = Name of the created body. NB. The name must be equal to the name of the mass stored on the GPdat-file, if plotting of the deformation shapes shall be possible.
ref_point(1:3) = X-,Y- and Z- coordinates relative to lsys to the reference point in which the values point11,point12,point21,,, etc. refers to. The coordinate system lsys is the linear local coordinate system which the body is related to.
Npolygons = Number of polygons which builds up the body
Npoints1 = Number of nodes in polygon number 1
point11(1:3) = X-,Y- and Z- coordinates for node #1 in polygon #1 relative to ref_point
point12(1:3) = X-,Y- and Z- coordinates for node #2 in polygon #1 relative to ref_point
point13(1:3) = Etc.
Npoints2 = Number of nodes in polygon number 2
point21(1:3) = X-,Y- and Z- coordinates for node #1 in polygon #2 relative to ref_point
point22(1:3) = X-,Y- and Z- coordinates for node #2 in polygon #2 relative to ref_point
point23(1:3) = Etc.

Subcommand: figure_lsys

The shape of the body is built-up of a number of polygons. All the coordinates are given relative to lsys. The input data consists of the following items:

                                                                                
  body figure_lsys  bname lsys                                                  
                   (+-')Npolygons                                               
                   (+-')Npoints1  (+-')point11(1:3) (+-')point12(1:3),,,        
                   (+-')Npoints2  (+-')point21(1:3) (+-')point22(1:3),,,        
                    . . . . . . . . . . . .                                     
                                                                                
bname = Name of the created body. NB. The name must be equal to the name of the mass stored on the GPdat-file, if plotting of the deformation shapes shall be possible.
lsys = The name of the lsys-system in which the coordinates of the figure refers to.
Npolygons = Number of polygons which builds up the body
Npoints1 = Number of nodes in polygon number 1
point11(1:3) = X-,Y- and Z- coordinates for node #1 in polygon #1 relative to ref_point
point12(1:3) = X-,Y- and Z- coordinates for node #2 in polygon #1 relative to ref_point
point13(1:3) = Etc.
Npoints2 = Number of nodes in polygon number 2
point21(1:3) = X-,Y- and Z- coordinates for node #1 in polygon #2 relative to ref_point
point22(1:3) = X-,Y- and Z- coordinates for node #2 in polygon #2 relative to ref_point
point23(1:3) = Etc.

Subcommand: figure_mass

The shape of the body is built-up of a number of polygons. All the coordinates are given relative to the center of gravity of the mass. The input data consists of the following items:

                                                                                
  body figure_mass  bname                                                       
                   (+-')Npolygons                                               
                   (+-')Npoints1  (+-')point11(1:3) (+-')point12(1:3),,,        
                   (+-')Npoints2  (+-')point21(1:3) (+-')point22(1:3),,,        
                    . . . . . . . . . . . .                                     
                                                                                
bname = Name of the created body. NB. The name must be equal to the name of the mass stored on the GPdat-file, if plotting of the deformation shapes shall be possible.
Npolygons = Number of polygons which builds up the body
Npoints1 = Number of nodes in polygon number 1
point11(1:3) = X-,Y- and Z- coordinates for node #1 in polygon #1 relative to ref_point
point12(1:3) = X-,Y- and Z- coordinates for node #2 in polygon #1 relative to ref_point
point13(1:3) = Etc.
Npoints2 = Number of nodes in polygon number 2
point21(1:3) = X-,Y- and Z- coordinates for node #1 in polygon #2 relative to ref_point
point22(1:3) = X-,Y- and Z- coordinates for node #2 in polygon #2 relative to ref_point
point23(1:3) = Etc.

Subcommand: opengl_mass

Defines a geometric primitive according to OpenGL. The geometric figure is described relative to the center of gravity of the mass. The input data consists of the following items:

                                                                                
  body opengl_mass  mname                                                       
                   (+-')Red (+-')Green (+-')Blue (+-')Alpha                     
                        Primitive                                               
                   (+-')Nnodes                                                  
                   (+-')Coords(1:3,1:Nnodes)                                    
                   (+-')Normals(1:3,1:Nnodes)                                   
                                                                                
bname = Name of mass to which this figure shall be related to.
Red = Portion of red color of this geometric primitive. The value of Red must be in between 0-1.
Green = Portion of red color of this geometric primitive. The value of Green must be in between 0-1.
Blue = Portion of red color of this geometric primitive. The value of Blue must be in between 0-1.
Alpha = Transparency. The value of Alpha must be in between 0-1. Alpha=1. gives solid colors.
Primitive = Define type of geometric primitive, see table and figure below.
Nnodes = Number of nodes which builds up the geometric primitive.
Coords = The X-, Y- and Z-coordinates for all nodes.
Normals = The normal direction for the surface at the node.

Valid geometric primitives are:

GL_POINTS Draws a point at each of the n vertices.
GL_LINES Draws a series of unconnected line segments. Segments are drawn between v0 and v1, between v2 and v3, and so on. If n is odd, the last segment is drawn between vn-3 and vn-2, and vn-1 is ignored.
GL_LINE_STRIP Draws a line segment from v0 to v1, then from v1 to v2, and so on, finally drawing the segment from vn-2 to vn-1. Thus, a total of n-1 line segments are drawn. Nothing is drawn unless n is larger than 1. There are no restrictions on the vertices describing a line strip (or a line loop); the lines can intersect arbitrarily.
GL_LINE_LOOP Same as GL_LINE_STRIP, except that a final line segment is drawn from vn-1 to v0, completing a loop.
GL_TRIANGLES Draws a series of triangles (three-sided polygons) using vertices v0, v1, v2, then v3, v4, v5, and so on. If n isn't an exact multiple of 3, the final one or two vertices are ignored.
GL_TRIANGLE_STRIP Draws a series of triangles (three-sided polygons) using vertices v0, v1, v2, then v2, v1, v3 (note the order), then v2, v3, v4, and so on. The ordering is to ensure that the triangles are all drawn with the same orientation so that the strip can correctly form part of a surface. Preserving the orientation is important for some operations, such as culling. n must be at least 3 for anything to be drawn.
GL_TRIANGLE_FAN Same as GL_TRIANGLE_STRIP, except that the vertices are v0, v1, v2, then v0, v2, v3, then v0, v3, v4, and so on.
GL_QUADS Draws a series of quadrilaterals (four-sided polygons) using vertices v0, v1, v2, v3, then v4, v5, v6, v7, and so on. If n isn't a multiple of 4, the final one, two, or three vertices are ignored.
GL_QUAD_STRIP Draws a series of quadrilaterals (four-sided polygons) beginning with v0, v1, v3, v2, then v2, v3, v5, v4, then v4, v5, v7, v6, and so on. n must be at least 4 before anything is drawn. If n is odd, the final vertex is ignored.
GL_POLYGON Draws a polygon using the points v0, ... , vn-1 as vertices. n must be at least 3, or nothing is drawn. In addition, the polygon specified must not intersect itself and must be convex. If the vertices don't satisfy these conditions, the results are unpredictable.

gplot_GL_Primitive.png

Subcommand: opengl2_mass

Defines geometric figures consisting of several OpenGL geometric primitives. The command simplifies the input data generation of common figures. The geometric figure is described relative to the center of gravity of the mass.

                                                                                
  body opengl2_mass  mname                                                      
                   (+-')Red (+-')Green (+-')Blue (+-')Alpha                     
                        Primitive                                               
                   (+-')Input_data                                              
                                                                                
bname = Name of mass to which this figure shall be related to.
Red = Portion of red color of this geometric primitive. The value of Red must be in between 0-1.
Green = Portion of red color of this geometric primitive. The value of Green must be in between 0-1.
Blue = Portion of red color of this geometric primitive. The value of Blue must be in between 0-1.
Alpha = Transparency. The value of Alpha must be in between 0-1. Alpha=1. gives solid colors. Alpha=0. gives an invisible geometric figure.
Primitive = Valid geometric figures are:
BOX Creates a box consisting of six GL_QUADS.
CYL_W_DISKCreates a horizontal cylinder with two disks at both ends.
Input_data = Input data to the geometric figures BOX or CYL_W_DISK, see table below.

Input data to the geometric figures:

BOX X0, X1, Y0, Y1, Z0, Z1
Creates a box with the following size: (X1-X0, Y1-Y0, Z1-Z0).
CYL_W_DISK ro N H1 H2
Creates a cylinder with two disks (top and bottom). The cylinder is oriented in lateral direction.
ro the radius of the cylinder
the number of divisions of the circle
H1 the distance to the bottom of the cylinder
H2 the distance to the top of the cylinder


Subcommand: whe_set

Subcommand whe_set creates a body which resembles a wheelset. The body is built-up of two circles which are connected by a straight line. The center of the wheelset is defined in the reference point. The input data consists of the following items:

                                                                    
  body whe_set  bname (+-')whe_set_center(1:3)  (+-')ro (+-')bo     
                                                                    
bname = Name of the created body. NB. The name must be equal to the name of the mass stored on the GPdat-file, if plotting of the deformation shapes shall be possible.
whe_set_center(1:3)= X-,Y- and Z- coordinates relative to lsys to the reference point in which the values Ro and Bo refers to. The coordinate system lsys is the linear local coordinate system which the body is related to.
ro = The radius of the wheels.
bo = The lateral semi-distance between the wheels.

Subcommand: whe_set_lsys

Subcommand whe_set_lsys creates a body which resembles a wheelset. The body is built-up of two circles which are connected by a straight line. The center of the wheelset is defined in lsys. The input data consists of the following items:

                                                  
  body whe_set_lsys  bname lsys (+-')ro (+-')bo   
                                                  
bname = Name of the created body. NB. The name must be equal to the name of the mass stored on the GPdat-file, if plotting of the deformation shapes shall be possible.
lsys = The name of the lsys-system in which the wheelset refers to.
ro = The radius of the wheels.
bo = The lateral semi-distance between the wheels.

Subcommand: whe_set_mass

Subcommand whe_set_mass creates a body which resembles a wheelset. The body is built-up of two circles which are connected by a straight line. The center of the figure is defined relative to the center of gravity of the mass. The input data consists of the following items:

                                                  
  body whe_set_mass  bname (+-')ro (+-')bo        
                                                  
bname = Name of the created body. NB. The name must be equal to the name of the mass stored on the GPdat-file, if plotting of the deformation shapes shall be possible.
ro = The radius of the wheels.
bo = The lateral semi-distance between the wheels.


Couplings

Couplings are in GPLOT called symbols.

If a coupling is named with the keyword ky_guard_rail_$1r, where $2 is the number of the axle. Then also the force in the guard rail will be animated.



Step by step methods for animations in GPLOT.

Animation of modal analysis.


Animation of time simulation.


Animation of wheel/rail geometry properties.

Click on the icon to see an animation of wheel/rail geometry properties: graphIcon.gif

Examples

See examples under directory ../tutorial .