Code_Aster ®
Version
7.4
Titrate:
Operator CALC_FONC_INTERP
Date:
31/01/05
Author (S):
COURTEOUS Mr., J.P. LEFEBVRE, L. VIVAN Key
:
U4.32.01-F Page
: 1/6
Organization (S): EDF-R & D/AMA, CS-SI
Handbook of Utilization
U4.3- booklet: Function
Document: U4.32.01
Operator CALC_FONC_INTERP
1 Goal
To build a concept of the function type starting from a function FORMULE to 1 or 2 variables. Can
to be defined real functions with real and complex variables and tablecloths.
One can also produce a new real or complex function, or a tablecloth while interpolating
another real, complex function or a tablecloth.
The use of CALC_FONC_INTERP allows a preliminary tabulation of the formula. Its use is
recommended before any transitory and/or nonlinear analysis for reasons of performances.
The operator is not any more réentrant: he takes a formula in argument and produces a function or one
tablecloth.
Handbook of Utilization
U4.3- booklet: Function
HT-66/05/004/A
Code_Aster ®
Version
7.4
Titrate:
Operator CALC_FONC_INTERP
Date:
31/01/05
Author (S):
COURTEOUS Mr., J.P. LEFEBVRE, L. VIVAN Key
:
U4.32.01-F Page
: 2/6
2 Syntax
Fr = CALC_FONC_INTERP
(
FONCTION
=
F
/
[formula]
/
[function]
/
[fonction_c]
/
[tablecloth]
NOM_RESU
=/“TOUTRESU”
,
[DEFAUT]
/
NR,
[K8]
NOM_PARA =
Np,
/
VALE_PARA
=
lvale
, [l_R]
/
LIST_PARA
=
will lpara
,
[listr8]
PROL_DROITE
=
/“CONSTANT”,
/“LINEAIRE”,
/“EXCLU”
,
[DEFAUT]
PROL_GAUCHE =/“CONSTANT”,
/“LINEAIRE”,
/“EXCLU”
,
[DEFAUT]
Interpol
=/
“LIN”,
[DEFAUT]
/
“LOG”,
[l_Kn]
/
“NON”,
NOM_PARA_FONC = npf,
/VALE_PARA_FONC = lvalef,
[l_R]
/
LIST_PARA_FONC
=
lparaf,
[listr8]
PROL_DROITE_FONC
=/“CONSTANT”,
/“LINEAIRE”,
/“EXCLU”
,
[DEFAUT]
PROL_GAUCHE_FONC =
/“CONSTANT”,
/“LINEAIRE”,
/“EXCLU”
,
[DEFAUT]
INTERPOL_FONC
=
/
“LIN”,
[DEFAUT]
/
“LOG”,
[l_Kn]
/
“NON”,
INFO
=
/
1,
[DEFAUT]
/2,
TITER
=
Ti
,
[l_Kn]
)
The type of Fr is a function, fonction_c or tablecloth according to arguments'.
Handbook of Utilization
U4.3- booklet: Function
HT-66/05/004/A
Code_Aster ®
Version
7.4
Titrate:
Operator CALC_FONC_INTERP
Date:
31/01/05
Author (S):
COURTEOUS Mr., J.P. LEFEBVRE, L. VIVAN Key
:
U4.32.01-F Page
: 3/6
3 Operands
3.1 Operand
FONCTION
FONCTION = F
Name of the FORMULE (interpretable function (FORMULE Cf. [U4.31.05])).
This function can be with one or two variables.
One can however create a new function (respectively fonction_c, tablecloth) to leave
of a function (respectively fonction_c, tablecloth) by interpolating the first on a list
parameters different. This probability is primarily used in
macro-commands.
3.2 Operand
NOM_RESU
NOM_RESU = NR
Indicate the name of the result, the function thus created is a function whose value is of
name NR (8 characters).
3.3 Operand
NOM_PARA
NOM_PARA = NR
Indicate the name of the parameter of the function or tablecloth. By defect, the name of the parameter
formula or provided function is employed.
3.4 Operands
VALE_PARA/LIST_PARA
/VALE_PARA = lvale,
lvale is the list of the values of the parameter.
/LIST_PARA = will lpara,
will lpara is the list of the values of the parameter: it is a concept of the listr8 type created
previously by command DEFI_LIST_REEL [U4.34.01].
3.5 Operands
PROL_DROITE and PROL_GAUCHE
PROL_DROITE and PROL_GAUCHE =
Define the type of prolongation on the right (on the left) of the field of definition of
parameter of the function or the tablecloth
“CONSTANT”
for a prolongation with the last (or first) value of
function,
“LINEAIRE”
for a prolongation along the first definite segment
(PROL_GAUCHE) or of the last definite segment (PROL_DROITE),
“EXCLU”
the extrapolation of the values apart from the field of definition of
parameter is prohibited (in this case if a calculation requires a value
function out of the field of definition, the code will stop in
fatal error),
Handbook of Utilization
U4.3- booklet: Function
HT-66/05/004/A
Code_Aster ®
Version
7.4
Titrate:
Operator CALC_FONC_INTERP
Date:
31/01/05
Author (S):
COURTEOUS Mr., J.P. LEFEBVRE, L. VIVAN Key
:
U4.32.01-F Page
: 4/6
3.6 Operand
Interpol
Interpol
=
Type of interpolation of the function enters the values of the variable or type of interpolation of
tablecloth enters the values of the parameter. Behind this key word one awaits a parameter list
(two to the maximum).
“LIN”: linear,
“LOG”: logarithmic curve,
“NON”: one does not interpolate (and thus the program will stop if for the value is asked
function for a value of the parameter where it was not defined).
If only one value is given, the interpolation will be identical for the X-coordinates and them
ordinates. If two values are given, the first corresponds to the interpolation of
X-coordinates and the second with the interpolation of the ordinates.
3.7 Operand
NOM_PARA_FONC
NOM_PARA_FONC = NR
Indicate the name of the variable of the functions defining the tablecloth.
3.8 Operands
VALE_PARA_FONC/LIST_PARA_FONC
/VALE_PARA_FONC = lvale,
lvale is the list of the values of the variable of the functions defining the tablecloth.
/LIST_PARA_FONC = will lpara,
will lpara is the list of the values of the variable of the functions defining the tablecloth: it is one
concept of the listr8 type created previously by command DEFI_LIST_REEL
[U4.34.01].
3.9 Operands
PROL_DROITE_FONC and PROL_GAUCHE_FONC
PROL_DROITE_FONC and PROL_GAUCHE_FONC =
Define the type of prolongation on the right (on the left) of the field of definition of
variable of the functions of the tablecloth:
“CONSTANT”, “LINEAIRE”, “EXCLU” have the same direction as previously.
3.10 Operand
INTERPOL_FONC
INTERPOL_FONC
=
Defining type of interpolation of the functions between the values of the variable of the functions
tablecloth. Behind this key word one awaits a parameter list (two to the maximum).
Operation is identical to Interpol.
3.11 Operand
INFO
INFO
=
Specify the options of impression on file MESSAGE.
1: no the impression (default option)
2: impression of the parameters plus the list of the first 10 values in the order
crescent of the parameter
3.12 Operand
TITER
TITER = Ti
Titrate attached to the concept produced by this operator [U4.03.01].
Handbook of Utilization
U4.3- booklet: Function
HT-66/05/004/A
Code_Aster ®
Version
7.4
Titrate:
Operator CALC_FONC_INTERP
Date:
31/01/05
Author (S):
COURTEOUS Mr., J.P. LEFEBVRE, L. VIVAN Key
:
U4.32.01-F Page
: 5/6
4 Examples
4.1
Case of a function
4.1.1 To define function FORMULE sin (T)
IF = FORMULA (NOM_PARA = “INST”,
VALE = sin (INST))
4.1.2 Tabuler
sin (T) starting from a list of realities
DEPI =
2.* pi
PAS0 =
DEPI/200.
LI1
= DEFI_LIST_REEL (BEGINNING = 0, INTERVALLE=_F (JUSQU_A=DEPI, PAS=PAS0),)
SI1
= CALC_FONC_INTERP (FONCTION= IF, LIST_PARA = LI1, NOM_RESU =
“DEPL”,
PROL_GAUCHE=' EXCLU',
PROL_DROITE=' CONSTANT',
INTERPOL=' LIN', TITER=' FUNCTION SINUS')
4.1.3 Tabuler
sin (T) starting from a list of values
LI2
= (0., 0.01, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.10)
SI2
= CALC_FONC_INTERP (FUNCTION = IF, VALE_PARA = LI2,
NOM_PARA
= ' INST',
PROL_GAUCHE
=
“EXCLU”,
PROL_DROITE
=
“EXCLU”,
Interpol
=
“FLAX”, TITLE = “FUNCTION SINE”)
4.2
Case of a tablecloth
4.2.1 To define function FORMULE sin (T)
IF = FORMULA (NOM_PARA = (“INST”, “FREQ”),
VALE = sin (2 * pi * FREQ * INST))
4.2.2 Tabuler
sin (T) starting from a list of moments
The parameter of the tablecloth is “FREQ”, the variable of the functions defining the tablecloth is “INST”.
LI_FREQ =
DEFI_LIST_REEL
(BEGINNING = 10, INTERVALLE=_F (JUSQU_A=100, PAS=10),)
LI_INST =
DEFI_LIST_REEL
(BEGINNING = 0, INTERVALLE=_F (JUSQU_A=100, PAS=1),)
SI1
= CALC_FONC_INTERP (FONCTION= IF,
NOM_RESU = “DEPL”,
NOM_PARA_FONC=' INST',
LIST_PARA_FONC = LI_INST
PROL_GAUCHE_FONC=' EXCLU',
PROL_DROITE_FONC=' CONSTANT',
INTERPOL_FONC=' LIN',
NOM_PARA=' FREQ',
LIST_PARA = LI_FREQ
PROL_GAUCHE=' LINEAIRE',
PROL_DROITE=' LINEAIRE',
INTERPOL=' LIN',
TITER=' FUNCTION SINUS',)
Handbook of Utilization
U4.3- booklet: Function
HT-66/05/004/A
Code_Aster ®
Version
7.4
Titrate:
Operator CALC_FONC_INTERP
Date:
31/01/05
Author (S):
COURTEOUS Mr., J.P. LEFEBVRE, L. VIVAN Key
:
U4.32.01-F Page
: 6/6
Intentionally white left page.
Handbook of Utilization
U4.3- booklet: Function
HT-66/05/004/A
Outline document