Solver API example: User field example 4
This is an example of using the advection API to predict crystallization based on a simple crystallization model, applying a Tait PVT model and a specific viscosity model using a set of coefficients read from the parameter string stored in the study file and writes details to the screen at the start of the analysis.
Double-click MoldflowUserFunctions_UserfieldExample4.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 Nakamura model to calculate crystallization,
- applies a Tait PVT model, which is defined in the file TaitPVT_1phase.cpp that can be found in the same installation folder as this example .vcxproj file.
- applies the Cross-WLF viscosity model to the melt, which is defined in the file CrossWLFViscosity.cpp that can be found in the same installation folder as this example .vcxproj file.
- plots crystallinity.