next up previous contents
Next: Rigid Pendulum Up: Free Rigid Body Previous: Execution   Contents

Plotting: gnuplot Example

Let's move to some graphical tool to display scientific data, e.g. gnuplot (for more details, see http://www.gnuplot.info/):

    prompt> gnuplot

        G N U P L O T
        Linux version 3.7
        patchlevel 0
        last modified Thu Jan 14 19:34:53 BST 1999

        Copyright(C) 1986 - 1993, 1998, 1999
        Thomas Williams, Colin Kelley and many others

        Type `help` to access the on-line reference manual
        The gnuplot FAQ is available from
                <http://www.uni-karlsruhe.de/~ig25/gnuplot-faq/>

        Send comments and requests for help to <info-gnuplot@dartmouth.edu>
        Send bugs, suggestions and mods to <bug-gnuplot@dartmouth.edu>


    Terminal type set to 'x11'
    gnuplot>

To plot the movement of the rigid body, we can use:

    gnuplot> plot "rigidbody.mov" using (1.e-3*$0):($4)
to see the vertical displacement of the node (note that there is no information about the timing in the mov file, so we need to reconstruct the time axis from the line number, multiplied by the time step), Figure [*], or
    gnuplot> splot "rigidbody.mov" using 2:3:4
to see the trajectory in a 3D view, Figure [*].

Figure: Rigid body Z position
\includegraphics[width=110mm]{rigidbody_1}

Figure: Rigid body trajectory
\includegraphics[width=110mm]{rigidbody_2}

The third file (ine), in the same format of the previous one, will contain the momentum, the momenta moment and their time derivatives for each dynamic node. The fourth file (frc), in case only mechanical forces are used, will contain Nforces by Ntimesteps lines formatted as:

Other entities may contribute to the frc output file. They will be discussed later.


next up previous contents
Next: Rigid Pendulum Up: Free Rigid Body Previous: Execution   Contents
MBDyn: MultiBody Dynamics Software
Document version:
Last update: Thu Aug 30, 2007
Maintained by mbdyn@aero.polimi.it