Analytic
An Analytic function () is defined by a symbolic expression. Analytic functions have the ability to bind arguments during function calls. In other words, they do not require the actual argument names in an expression when writing the function. For example, you can define a function f(x) = x2 with the input argument x and the expression x^2 and then call it as f(T), where T is the temperature in a heat transfer model. The default Function name is an1.
See Function Names and Calling Functions for information about allowed function names.
See Units for information about the Units section.
See Plot Parameters for information about Plot Parameters (plot range) settings. For an Analytic function, you can use the checkboxes in the Plot column to control which arguments to use in the plot (you can select a maximum of three arguments). If you clear a checkbox, a constant value, taken from the argument’s lower limit, is used. Constant arguments do no use an axis in the plot.
See also Expression Operator for information about defining an expression operator as an alternative to an analytic function.
Definition
In the Expression field, enter the mathematical expression that defines the function, such as sin(x)*cos(y)+g_const or a+b*cos(c). Enter Arguments to the analytic function as comma-separated entries (x, y and a, b, c for the functions above, respectively). In addition to the arguments that are defined, analytic functions also recognize global parameters and physical constants (such as g_const in the example above). It is also possible to call another function.
From the Derivatives list, Automatic is selected by default and computes the derivatives symbolically. The COMSOL Multiphysics software uses the derivatives of a function if a variable that depends on the solution is used in a function argument. Select Manual to specify the function derivatives with respect to its arguments in a table. If Manual is selected, enter the derivatives with respect to the function’s arguments. For undefined derivatives, COMSOL Multiphysics uses 0 as the value of the derivative. In the second example above, enter a, b, and c in the top three rows of the Argument column, and 1, cos(c), and -b*sin(c)in the associated text fields in the Partial derivative column.
Periodic Extension
Select the Make periodic checkbox to make the function periodic and extend its definition within an interval to the whole real axis. Then define the interval by entering values in the Lower limit (default: 0) and Upper limit (default: 1) fields.
Local Parameters
In this section, you can add local parameters to, for example, make it easier to create and maintain a material library where material data is obtained by fitting parameters in some general function expression. Add names for the local parameters in the Name column and expressions for the local parameters in the corresponding rows in the Expression column.
You can also use the Move Up (), Move Down (), Delete (), and Clear Table () buttons underneath the table to move and remove rows and to clear the table. Use the Load from File () and Save to File () buttons to load or save data to or from the table. You can also click the downward arrow beside the Load from File button and choose Load From () to open the fullscreen Select File window.
Advanced
Select the May produce complex output for real arguments checkbox if the defined function works similarly to sqrt; that is, if it sometimes returns complex values for a real-valued input.
If you have the AC/DC Module, see A Geoelectrical Forward Problem: Application Library path ACDC_Module/Devices,_Resistive/geoelectrics.
If you have the RF Module, see Second Harmonic Generation of a Gaussian Beam: Application Library path RF_Module/Tutorials/second_harmonic_generation.