External
The External function is only available with the Global Definitions node. See also model.func() in the COMSOL Multiphysics Programming Reference Manual for details about the interface to external functions, including an example and information about compiling the function on the supported platforms.
An External function () interfaces with other external functions written in the C language (using a native C function or, through a wrapper function, interfacing with source code written in, for example, Fortran). You can use those functions as any other functions defined in COMSOL Multiphysics. For example, use it for a user-created shared library (depending on the platform, a DLL, .so, or .dylib file).
Go to Common Settings for the Function Nodes for information about the Derivatives and Plot Parameters sections.
Functions
Enter a Library path and name (the complete network path), or click Browse to locate a library to import. For each row in the table, enter a Function name (myfun, for example) and a space-separated or comma-separated list of the names of its input Arguments (x y, for example).
Advanced
Enter a value in the Initialization data field. The value is sent to the library when it is loaded. Select the Thread safe check box to declare that the function is a thread-safe pure function (that is, a function that always returns the same results using the same input argument values and that does not have any side effects or output). Select this check box to improve performance.