Share

Solver API example: User field example 5

This is an example of using the advection API for simulation of coinjection of multiple materials, applying a specific viscosity model to different materials using user-specified coefficients, and writes details to the screen at the start of the analysis.

Double-click MoldflowUserFunctions_UserfieldExample5.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 user node fields whose dimension is equal to the number of injection nodes and initilizes user node fields to be zero,
  • reads the parameter strings from the config string,
  • sets up an evolution function for the transport equation to be zero,
  • applies the Cross-WLF viscosity model to the melt of different materials injected from corresponding injection nodes. 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 that if a node is close to a certain injecton node, the value corresponding to that injection node in the user nodal field is set to be 1,
  • plots the material number that has the highest concentration at the node.

Was this information helpful?