From CAELinuxWiki
Revision as of 02:11, 26 July 2010 by JMB (Talk | contribs) (Added the XMGrace plot)

Jump to: navigation, search

Topics: <Under construction!!!>

1. Aster commands for using XMGrace

The standard CodeAster package comes with its own built in plotting ability. The commands for creating the output when embedded into the *.comm file, will create the output. We just need to tell ASTK to assign the results to a logical unit (LU=29) and a suitable output file name assigned with 'R' (i.e. Result). I normally use the extension <*.agr>. Any extension should work, I think.

This tutorial shows how to set up the comm file. Let us use the very nicely written tutorial by Kees Wouters as a base [1]. That tutorial shows you how to conduct a modal and a forced dynamic response of a simple cylinder. The resulting plots of that tutorial were perhaps created using a spreadsheet or another plotting such tool.

Why do I recommend XMGrace? Because it is easy to get plots once the command file has been set up. Thereafter it requires just 3 clicks in the ASTK window. One on the file name '*.agr', the secon on 'Tools' and the third on 'Grace'. The immense benefit is one can see very quickly graphically, if your results are what you expected.

Of course a speadsheet, octave, gnuplot, etc. has features that far exceed the plotting capabilities of XMGrace, I believe. But there's nothing to beat the handiness of plotting with 3 clicks!

All we need to add to the comm file just before the "FIN();" command is:


The explanation of this command is:

  1. Load into Function Dz the nodal displacement values from TB_nodf, values from column: DZ (Direction Z) for each INST (Time step). Resulting in tuples where
  2. X values = Time Step instant
  3. Z values = the corresponding Displacement in Z direction

  1. Load into Function T the time step values from TB_nodf, values from column: INST. Resulting in tuples where
  2. X values = Time Step instant
  3. T values = Time Step Instant

(This second step may seem redundant, and if somebody has a more elegant way please let us know here. Essentially we are creating two arrays T & Dz which contain the time instants and corresponding displacements of the top node in the Z direction.)

Then output T versus Dz for plotting with XMGrace

                TITRE='Displacement Dz of the top node',
                LEGENDE_X='Time [s]',
                LEGENDE_Y='Displacement [mm]',);

In ASTK define a 'dat' type output file named 'dynload.agr' with unit number 29 with (R)

Then 3 clicks later (as described earlier) you should see a graphical plot!


2. Topic 2

  Can somebody show me how I can create subsequent pages so all my topics
  are not crowded into this single page?
  Sorry, I am new to publishing in Wiki format...  Thanks!

3. Topic 3