Code_Aster
®
Version
8.2
Titrate:
Operator
IMPR_FONCTION
Date:
22/02/06
Author (S):
COURTEOUS Mr.
Key
:
U4.33.01-G1
Page:
1/10
Instruction manual
U4.3- booklet: Function HT-62/06/004/A
Organization (S):
EDF-R & D/AMA
Instruction manual
U4.3- booklet: Function
Document: U4.33.01
Operator
IMPR_FONCTION
1 Goal
To print the contents of objects of the function type or list of realities in a file intended for a tracer of
curves.
Replace, with IMPR_TABLE, old procedure IMPR_COURBE.
Code_Aster
®
Version
8.2
Titrate:
Operator
IMPR_FONCTION
Date:
22/02/06
Author (S):
COURTEOUS Mr.
Key
:
U4.33.01-G1
Page:
2/10
Instruction manual
U4.3- booklet: Function HT-62/06/004/A
2 Syntax
IMPR_FONCTION
(
FORMAT =
/“TABLE”,
/
“XMGRACE”,
/
“AGRAF”,
# Definition of the logical unit to format AGRAF
UNIT
=/
links,
[I]
/
25,
[DEFECT]
UNITE_DIGR
=
/
unit_digr, [I]
/
26,
[DEFECT]
# Definition of the logical unit to format XMGRACE and the pilot of impression
UNIT
=/
links,
[I]
/
29,
[DEFECT]
PILOT
=/
“
,
[DEFECT]
/
“POSTSCRIPT”,
[KN]
/
“EPS”,
/
“MIF”,
/
“SVG”,
/
“PNM”,
/
“Png”,
/
“JPEG”,
/
“Pdf”,
/
“INTERACTIVE”,
# Definition of the logical unit to the format TABLE
UNIT
=/
links,
[I]
/
8,
[DEFECT]
# Put on graphic page common to XMGRACE and AGRAF
BORNE_X = (xmin, xmax), [l_R]
BORNE_Y = (ymin, ymax), [l_R]
ECHELLE_X
=
/
“FLAX”,
[DEFECT]
/“LOG”,
ECHELLE_Y
=
/
“FLAX”,
[DEFECT]
/“LOG”,
ROAST
_
X
=
/
0,
[DEFECT]
/
nx,
[R]
ROAST
_
Y
=
/
0,
[DEFECT]
/
ny,
[R]
LEGENDE_X
=
xlegen
,
[KN]
LEGENDE_Y
=
ylegen
,
[KN]
# Put on page of the table
SEPARATOR
=
/
separ,
[DEFECT]
/
'
',
[KN]
COMMENT
=
/
COM, [kN]
/
“#”, [DEFECT]
DEBUT_LIGNE
=
/
deb., [kN]
/
“
,
[DEFECT]
FIN_LIGNE
=
/
end, [kN]
/
“\,
[DEFECT]
Code_Aster
®
Version
8.2
Titrate:
Operator
IMPR_FONCTION
Date:
22/02/06
Author (S):
COURTEOUS Mr.
Key
:
U4.33.01-G1
Page:
3/10
Instruction manual
U4.3- booklet: Function HT-62/06/004/A
# Definition of the function to be traced
CURVE = _F (
# Formatted of the function at formats XMGRACE and AGRAF
CAPTION = legend,
[KN]
STYLE
= sty, [I]
COLOR
=
coul,
[I]
MARKER
= marq,
[I]
FREQ_MARQUEUR
=
freqmarq,
[I]
# Recovery of the function to be traced
/
FUNCTION =
Fr, [function]
LIST_PARA = will lpara,
[listr8]
/
FUNCTION =
FC, [fonction_C]
PART =/“REAL”,
/
“IMAG”,
LIST_PARA = will lpara,
[listr8]
/
FONC_X = fx, [function]
FONC_Y = fy, [function]
LIST_PARA
=
will lpara,
[listr8]
/
LIST_PARA
=
will lpara,
[listr8]
LIST_RESU
=
lresu,
[listr8]
/
X-COORDINATE = labs,
[l_R]
ORDINATE = lordo,
[l_R]
# Tri possible
SORTING =/“,
[DEFECT]
/
“X”,
/
“Y”,
/
“XY”,
/
“YX”,
# Commun runs with all the formats
TITRATE
=
titrate,
[KN]
SOUS_TITER =
sous_titer,
[KN]
INFORMATION =
/
1,
/2,
),
)
Code_Aster
®
Version
8.2
Titrate:
Operator
IMPR_FONCTION
Date:
22/02/06
Author (S):
COURTEOUS Mr.
Key
:
U4.33.01-G1
Page:
4/10
Instruction manual
U4.3- booklet: Function HT-62/06/004/A
3 Operands
3.1
Presentation of the curves
A whole of operands optional makes it possible to define the presentation of the curve. All have one
default value.
3.1.1 Operand
FORMAT
FORMAT =
Format of impression of the function
“AGRAF”
impression intended for the software agraf, which also makes it possible to adapt them
parameters of presentation in interactive,
“TABLE”
the impression in columns makes it possible to import the data in one easily
spreadsheet, if several curves are given, it is the list of the X-coordinates of
first function which is used to interpolate the values of the others
functions,
“XMGRACE”
impression intended for the software xmgrace. One can also adapt them
parameters of presentation in interactive. The use of the PILOT key word
allows to directly produce a file image or postscript.
3.1.2 Operand
UNIT
UNIT = links
UNITE_DIGR = unit_digr
if FORMAT =
'
AGRAF
'
Allow to choose on which logical unit one prints the functions. The value of links
must be the same one as in the interface astk.
If many curves are plotted, it is more flexible to use the repe type combined with
order DEFI_FICHIER, the files will be in the index./REPE_OUT.
With format AGRAF, the data are written in UNIT whereas the directives are written
in UNITE_DIGR (is worth 26 per defect).
The default value of links is worth:
· 8 with the format TABLE (corresponds to the file result),
· 25 with format AGRAF,
· 29 with format XMGRACE (optional if PILOT = “INTERACTIVE”)
3.1.3 Operand
PILOT
By choosing FORMAT = “XMGRACE”, one has the pilots of exit used by xmgrace in
using the PILOT key word. This amounts using the functions of export of xmgrace via its menu
“File/Print Setup…”.
The exact list of the pilots available on your server is provided by the option “- version” of xmgrace.
Possible values of PILOT:
· “
: in this case, no pilot is used, the file obtained is
the .agr or .dat of xmgrace (file containing them
data and directives of the graph),
· “POSTSCRITP”, “EPS”
: file postscript full-page or encapsulated,
· “PNG”, “JPEG”, “PNM”
: file of the image type,
· “PDF”, “MIF”, “SVG”
: formats
private individuals,
· “INTERACTIVE”
: no file is turned over if one can open xmgrace with
the screen.
NB: “JPEG” and “pdf” are not available on the server of calculation EDF (clayastr).
Code_Aster
®
Version
8.2
Titrate:
Operator
IMPR_FONCTION
Date:
22/02/06
Author (S):
COURTEOUS Mr.
Key
:
U4.33.01-G1
Page:
5/10
Instruction manual
U4.3- booklet: Function HT-62/06/004/A
3.1.4 Page-setting of the graph common to
XMGRACE
and
AGRAF
3.1.4.1 Operands
BORNE_X
/
BORNE_Y
BORNE_X =
Layout of the function in an interval of the X-coordinates given.
BORNE_Y =
Layout of the function in an interval of the ordinates given.
3.1.4.2 Operands
ECHELLE_X
/
ECHELLE_Y
ECHELLE_X =
Type of scale desired for the X-coordinates,
FLAX
éaire or
LOG
arithmic.
ECHELLE_Y =
Type of scale desired for the ordinates,
FLAX
éaire or
LOG
arithmic.
3.1.4.3 Operands
LEGENDE_X
/
LEGENDE_Y
LEGENDE_X =
Caption associated with the X-axis.
LEGENDE_Y =
Caption associated with the Y-axis.
3.1.4.4 Operands
GRILL_X
/
GRILL_Y
GRILL_X = nx
For xmgrace, NOC is the distance between two vertical successive lines of the grid.
For agraf, nx is the entirety defining the frequency of layout of these lines.
GRILL_Y = ny
Even thing for the horizontal lines of the grid.
3.1.5 Page-setting with the format TABLE
One can define here the membership of the printed table: of a conventional table in columns with a format
compatible csv or HTML…
Note:
The labels of the columns are suffixées by “_ + n° of column” (while starting to 0) so
to avoid the repetition because the names all of columns must be different.
SEPARATOR = separ
The separator used between two columns (a space by defect) defines.
COMMENT = COM
Character inserted at the beginning of line to indicate a line in comment (or titrates, # by defect).
DEBUT_LIGNE = deb.
Chain inserted into the beginning of each line (vacuum by defect).
FIN_LIGNE = fine
Chain inserted at the end of the line (“\ by defect).
Code_Aster
®
Version
8.2
Titrate:
Operator
IMPR_FONCTION
Date:
22/02/06
Author (S):
COURTEOUS Mr.
Key
:
U4.33.01-G1
Page:
6/10
Instruction manual
U4.3- booklet: Function HT-62/06/004/A
3.1.6 Key words common to all the formats
TITRATE
SOUS_TITER
Allow to define the main and secondary titles graph or table.
3.2 Word
key
CURVE
CURVE
Key word factor allowing to print the definite functions or to trace one or more
functions in the same graph (a function by occurrence of the key word factor).
3.2.1 Complementary attributes for the layout of each function by the software
xmgrace or
agraf
STYLE = sty
This key word defines the style of feature of the curve.
For xmgrace, the correspondence is as follows:
0 pitch of line 1 continuous feature 2 dotted lines
3 short dashes 4 long dashes
5, 6, 7, 8 alternate dashes dotted lines
For agraf, the styles are:
0 line
1 dotted lines
2 point
MARKER = marq
This key word defines the type of marker or symbol of the points of the curve.
For xmgrace:
0 pitch of marker
1 circle
2 square
3 rhombus
4 high triangle
5 left triangle
6 low triangle 7 right triangle 8 more
9 crosses
10
star
For agraf, the markers are:
0 circle
1 square
2 more
3 rhombus
4 full circle
5 full square
6 full rhombus 7 cercle+croix 8 losange+croix
COLOR = coul
This key word defines the color of the curve.
For xmgrace, the colors are:
0 white
1 black
2 red
3 green
4 blue
5 yellow
6 brown
7 gray
8 purple
9 cyan
10 magenta
11 orange
12 chestnut
13 indigo
14 turquoise
15
green
dark
For agraf, the colors are:
0 black
1 red
2 dark green
3 blue
4 magenta
5 cyan
6 green
7 chestnut
8 orange
9 mauve
10 yellow
11 clear chestnut
CAPTION = legend
Caption given to the function (by defect one recovers the name of the function).
FREQ_MARQUEUR
= freqmarq
Entirety indicating the frequency of impression of the marker associated with a function. All them
im
points of discretization of the function, a marker is printed (by defect all points).
Code_Aster
®
Version
8.2
Titrate:
Operator
IMPR_FONCTION
Date:
22/02/06
Author (S):
COURTEOUS Mr.
Key
:
U4.33.01-G1
Page:
7/10
Instruction manual
U4.3- booklet: Function HT-62/06/004/A
3.2.2 Attributes
additional
for the layout by the software
agraf
SORTING = tr
This key word makes it possible to sort by order ascending the parameters defining the function:
·
tr = “, not of sorting,
·
tr = “X”, sorting of the points of the function according to the order ascending of X-coordinates X,
·
tr = “Y”, sorting of the points of the function according to the order ascending of the ordinates y,
·
tr = “XY”, sorting of the points of the function according to the order ascending of X-coordinates X and in
case of equality according to the order ascending of the ordinates,
·
tr = “YX”, sorting of the points of the function according to the order ascending of the ordinates y and in
case of equality according to the order ascending of the X-coordinates,
3.2.3 Impression or layout of a real function
/
FUNCTION = Fr
Name of the real function to print or trace.
LIST_PARA = Lr
Impression or layout of the function according to the list of the parameters given.
3.2.4 Impression or layout of a complex function
One trace either the real part, or the imaginary part. If one wants to trace the real part and the part
imaginary in the same graph, it is necessary to repeat the key word factor
CURVE
.
/
FUNCTION = FC
Name of the function complexes to print or trace.
PART =
Impression or layout of the part
REALITY
or
IMAG
inaire.
LIST_PARA = Lr
Impression or layout of the function according to the list of the parameters given.
Without effect during an impression in column (format
“EXCEL”
).
3.2.5 Impression or layout of a function defined by 2 lists of realities
/
LIST_PARA = will lpara
Name of the list of the X-coordinates.
LIST_RESU = lresu
Name of the list of the ordinates.
Or:
/
X-COORDINATE = labs
List python of the X-coordinates.
ORDINATE = lordo
List python of the ordinates.
Code_Aster
®
Version
8.2
Titrate:
Operator
IMPR_FONCTION
Date:
22/02/06
Author (S):
COURTEOUS Mr.
Key
:
U4.33.01-G1
Page:
8/10
Instruction manual
U4.3- booklet: Function HT-62/06/004/A
3.2.6 Impression or layout of a parametric function
/
FONC_X = fx
Name of the parametric function X = F (T) to print or trace.
FONC_Y = fy
Name of the parametric function y = G (T) to print or trace.
LIST_PARA = Lr
Impression or layout of the function according to the list of the parameters given.
3.2.7 Functionalities which existed in IMPR_COURBE
Working of the graphs starting from table from now on is ensured by IMPR_TABLE.
The layout of a resu_gene in a node of shock must be made in two times: to recover a function
with RECU_FONCTION, key word RESU_GENE, then to print the graph with IMPR_FONCTION.
Code_Aster
®
Version
8.2
Titrate:
Operator
IMPR_FONCTION
Date:
22/02/06
Author (S):
COURTEOUS Mr.
Key
:
U4.33.01-G1
Page:
9/10
Instruction manual
U4.3- booklet: Function HT-62/06/004/A
4 Examples
4.1
Curve representing a complex function
FC = DEFI_FONCTION (NOM_PARA=' INST', NOM_RESU=' DX',
VALE_C= (0., 0., 0., 1., 2., 3.,
2., 3., 4., 3., 4., 5.,
4., 5., 6., 5., 6., 7. ),)
IMPR_FONCTION (
UNIT = 24,
FORMAT = “XMGRACE”,
PILOT = “POSTSCRIPT”,
LEGENDE_X = “Time (S)”,
LEGENDE_Y = “DX (mm)”,
CURVE = (
_F (FUNCTION = FC,
PART = “REAL”,
COLOR = 4,
STYLE = 2,
MARKER = 5,
CAPTION = “left real”,),
_F (FUNCTION = FC,
PART = “IMAG”,
COLOR = 2,
STYLE = 5,
MARKER = 8,
CAPTION = “left imaginary”,),
),
TITRATE = “Traced of a complex function”,
)
Code_Aster
®
Version
8.2
Titrate:
Operator
IMPR_FONCTION
Date:
22/02/06
Author (S):
COURTEOUS Mr.
Key
:
U4.33.01-G1
Page:
10/10
Instruction manual
U4.3- booklet: Function HT-62/06/004/A
4.2 Curve
parametric
lt = DEFI_LIST_REEL (BEGINNING = 0., INTERVALLE=_F (JUSQU_A=10., PAS=0.01),)
fx = FORMULA (NOM_PARA=' you,
VALE= """ 2.* cos (T) - cos (2.* T) """,)
cardioX=CALC_FONC_INTERP (
FUNCTION = fx,
LIST_PARA = lt,)
fy = FORMULA (NOM_PARA=' you,
VALE= """ 2.* sin (T) - sin (2.* T) """,)
cardioY=CALC_FONC_INTERP (
FUNCTION = fy,
LIST_PARA = lt,)
IMPR_FONCTION (
UNIT = 27,
FORMAT = “XMGRACE”,
TITRATE = “Ardioid”,
CURVE = (
_F (FONC_X = cardioX,
FONC_Y = cardioY,),
),
)
A file thus is obtained that one can visualize in xmgrace:
Additional working in xmgrace: small Stud/Graph appearance, fixed type (grid
square), and to remove the legend by stripping the box Display legend.