HyperWorks Solvers

Upost

Upost

Previous topic Next topic No expanding text in this topic  

Upost

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

Model Element

Class Name

Upost

Description

The UPOST element allows you to generate your own results file.

Attribute Summary

Name

Property

Modifiable by command?

function  

Function ("POSTSUB")

 

routine    

Routine ()

 

Usage

# Defined in a compiled user subroutine

Upost (function=userString, routine=string)

 

# Defined in a Python function

Upost (function=userString, routine=functionPointer)

Attribute Description

User-subroutine defined in a compiled DLL


function

String defining a valid user function MotionSolve expression

The list of parameters that are passed from the data file to the user defined subroutine where the Upost is defined.

The function attribute is mandatory.


routine

String

Specifies an alternative name for the user subroutine. The name consists of two pieces of information, separated by “”. The first is the pathname to the shared library containing the function that computes the response of the user-defined Variable. The second is the name of the function in the shared library that does the computation.

An example is: routine=”/staff/Altair/engine.dllmyUpost

”/staff/Altair/engine.dll is the dll
“myUpost” is the function within this DLL that performs the calculations

The attribute routine is optional.

When not specified, routine defaults to “POST_SUB”.


User-subroutine defined in a user-written Python script


function

String defining a valid user function MotionSolve expression

The list of parameters that are passed from the data file to the user defined subroutine where the Variable is defined.

The function attribute is mandatory.


routine

Pointer to a callable function in Python

An example is: routine=myUpost

myUpost is a Python function or method that can be called from wherever the model resides.

The attribute routine is optional.

When not specified, routine defaults to POST_SUB.


Comments

1.See Properties, for an explanation about what properties are, why they are used and how you can extend these.
2.POSTSUB is called every output step. You can perform the required output operations at this point.

Example

1.Define a Python function rocket_fuel_consumption that saves fuel consumption data to a file.

Upost (function="USER()",routine=rocket_fuel_consumption)

2.Define a C++ function rocket_fuel_consumption that saves fuel consumption data to a file. It exists in a dll named Arianne.

Upost (function="USER()",routine=”Ariannerocket_fuel_consumption”)