Plugin functions in expressions

You can customize the thermal solver, by writing plugin functions that you specify in thermal boundary conditions of the Simcenter 3D solution. When you apply a plugin function to a property of a boundary condition, the thermal solver calls these functions for each element of the boundary condition. With these functions you can develop:

  • Special boundary conditions.
  • Customized material properties and model parameters.
  • Customized correlations.

Plugin functions are written in C++ programming language using any text editor. The source code file is saved with a .cpp extension. One source file can contain a single or multiple plugin functions.

To write a plugin function you use predefined API methods, which allow you to access:

  • Unit system of the solution, element areas, radius, thickness, and coordinates of element centroid.
  • Elemental and boundary conditions data during the solve, such as element rotational speed, upstream mass flow rate and fluid temperature, generic entity data.
  • Material properties including density, enthalpy, thermal conductivity, specific heat, dynamic viscosity, Young's modulus, Poisson ratio, and thermal expansion coefficient.
  • Current iteration count and/or time step of a transient solution.