It allows to define the default values of a function defined by xy points. The parameters are as follows,
n - Name used to reference the field, especially when writing the .dat file.
pn - Label that will be visualized by the user. It can be translated.
variable - Name of the variable shown in the GUI.
units - Its value is the default unit shown in the GUI, which could be changed, if desired.
<function> <functionVariable n="interpolator_func" pn="Interpolation function" variable="x" units="°C">
In this example the proc density_function referenced by the 'function' attribute is implemented in the xml .spd file but it is very simple and only invokes another procedure named MyDensityFunction adding some arguments. The body of the tcl procedure could be implemented separatelly in a .tcl file (sourced in the problemtype), this facilitate its edition and debug.
The proc referenced by the 'function' must return as value something like this:
interpolator_func is the same name used in <
x is the same variable name used in
Temp is the magnitude accoding to the units used in
The graphical interface will show something like this and pressing the rigth button will open a window to edit the xy graph: