Solver API example: User field example 3
This is an example of using the advection API to predict thermal degradation of polymers, applying a specific viscosity model using user-specified coefficients, and writes details to the screen at the start of the analysis.
Double-click MoldflowUserFunctions_UserfieldExample3.vcxproj from inside C:\Program Files\Autodesk\Moldflow Insight 20XX\data\solverapi, to launch your compiler, or open it in a text editor to examine the code. This API is applicable only to the Flow solver.
This example
- defines one dimensional user node fields and initilizes user node fields,
- reads the parameter strings from the config string,
- sets up an evolution function for the transport equation for the first order Arrhenius model to calculate thermal degradation of polymers,
- modifies the standard Cross-WLF viscosity model according to the calculated thermal degradation. The viscosity equation is defined in the file CrossWLFViscosity.cpp, which is found in the same installation folder as this example .vcxproj file.
- checks and fixes user node field to be less than 1.