Contrib:JMB
From CAELinuxWiki
| Revision as of 00:11, 26 July 2010 JMB (Talk | contribs) Added the XMGrace plot ← Previous diff |
Revision as of 00:25, 26 July 2010 JMB (Talk | contribs) Still playing with contents Next diff → |
||
| Line 1: | Line 1: | ||
| - | '''Topics: <Under construction!!!>''' | + | ==Topics: <Under construction !!!== |
| - | 1. '''Aster commands for using XMGrace'''<br> | + | ==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. | 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 [http://www.caelinux.org/wiki/index.php/Contrib:KeesWouters/dynamicload]. 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. | + | This tutorial shows how to set up the comm file. Let us use the very nicely written tutorial by Kees Wouters as a base [http://www.caelinux.org/wiki/index.php/Contrib:KeesWouters/dynamicload]. 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 such plotting 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. | + | 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 second on 'Tools' and the third on 'Grace'. The immense benefit is, one can see very quickly graphically, if the 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! | + | 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! Especially when one is making several runs or a parametric study. |
| All we need to add to the comm file just before the "FIN();" command is: | All we need to add to the comm file just before the "FIN();" command is: | ||
| Line 18: | Line 18: | ||
| The explanation of this command is: | The explanation of this command is: | ||
| - | # 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 | + | # Load into function Dz the nodal displacement values from table TB_nodf, values from column: DZ (Displacement Z) for each INST (Time step). Resulting in tuples where |
| # X values = Time Step instant | # X values = Time Step instant | ||
| - | # Z values = the corresponding Displacement in Z direction | + | # Z values = the corresponding displacement in Z direction |
| Line 27: | Line 27: | ||
| PARA_Y='INST',); | PARA_Y='INST',); | ||
| - | # Load into Function T the time step values from TB_nodf, values from column: INST. Resulting in tuples where | + | # Load into function T the time step values from table TB_nodf, values from column: INST. Resulting in tuples where |
| - | # X values = Time Step instant | + | # X values = Time step instant |
| - | # T values = Time Step Instant | + | # 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.) | (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.) | ||
| Line 50: | Line 50: | ||
| - | 2. '''Topic 2'''<br> | + | ==Topic 2== |
| Can somebody show me how I can create subsequent pages so all my topics | Can somebody show me how I can create subsequent pages so all my topics | ||
| - | are not crowded into this single page? | + | are not crowded into this single page? |
| Sorry, I am new to publishing in Wiki format... Thanks! | Sorry, I am new to publishing in Wiki format... Thanks! | ||
| - | 3. '''Topic 3'''<br> | + | ==Topic 3== |
| + | [[A new page]] | ||
Revision as of 00:25, 26 July 2010
Contents |
Topics: <Under construction !!!
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 such plotting 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 second on 'Tools' and the third on 'Grace'. The immense benefit is, one can see very quickly graphically, if the 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! Especially when one is making several runs or a parametric study.
All we need to add to the comm file just before the "FIN();" command is:
Dz=RECU_FONCTION(TABLE=TB_nodf,
PARA_X='INST',
PARA_Y='DZ',);
The explanation of this command is:
- Load into function Dz the nodal displacement values from table TB_nodf, values from column: DZ (Displacement Z) for each INST (Time step). Resulting in tuples where
- X values = Time Step instant
- Z values = the corresponding displacement in Z direction
T=RECU_FONCTION(TABLE=TB_nodf,
PARA_X='INST',
PARA_Y='INST',);
- Load into function T the time step values from table TB_nodf, values from column: INST. Resulting in tuples where
- X values = Time step instant
- 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
IMPR_FONCTION(FORMAT='XMGRACE',
UNITE=29,
COURBE=_F(FONC_X=T,
FONC_Y=Dz,),
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!
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!

