Supported interfaces

User functions

In 3D analyses run by the mhb3d flow or the warp3d solvers, you can supply functions that will be called whenever the solver invokes the viscosity model, the PVT model, or the core shift model, depending on which ones you select. You can also supply a function that will calculate the property at a given node in the model, or at a given laminate of a beam node in the model.

Solver API capabilities include:
User viscosity functions for 3D Flow
You supply your own function to calculate viscosity as a function of temperature, shear rate, and pressure.
User PVT functions for 3D Flow
You provide specific volume and its derivatives to the flow solver from your own code, based on current pressures, temperatures.
User PVT functions for 3D Warp
You provide specific volume to the warp solver from your own code, based on current pressures and temperatures.
User Core shift for 3D Flow
You provide node displacement to the flow solver from your own code, based on current pressures, temperatures, and constraints.

If you supply them, the solver calls an initialization function at the start of the solve and a cleanup function at the end of the solve, in case your function needs to allocate memory or open a file. For flow analyses, the solver also calls a user function at the end of each time step.

You can supply a configuration string in the "Parameter Text" field of the advanced solver parameters, which will be made available in a utility function. You are invited to put coefficients for your model, or the name of a file containing additional configurations, into this string.

For 3D Flow, you can even call your own code during analysis without turning on the PVT, core shift or viscosity options. For example, you can extract additional data from a standard analysis, process them for your own special needs, and write them to a file.

Note: Some user functions, such as viscosity and PVT user functions, are called from within parallel loops in the solver. Be careful to ensure such user functions are thread-safe. Other user functions, such as initialization, end of time step, and cleanup, are not called from parallel code.

Utility functions

If your user function needs to know a solver parameter or mesh information such as the position of a node in the model, it can call back into the solver to get this information. These functions are listed in the Solver API Reference document, which you can access from the Help drop-down menu on the top right-hand of the user interface. Click the small triangle next to the ? then select Solver API Reference. For multi-shot moldings there is a separate parameter string for the second shot, and a utility function to obtain the shot number.

3D Flow solver
In addition to mesh information and text strings, you can also obtain core shift constraints and about 20 different nodal results.
3D Warp solver
You can obtain mesh information and text strings from the warp solver during analysis.