HyperWorks Solvers

Mforce

Mforce

Previous topic Next topic No expanding text in this topic  

Mforce

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

Model Element

Class Name

Mforce

Description

Mforce defines a distributed force on a flexible body (CMS) in MotionSolve. It is available in three implementation flavors:

The force shape is scaled by a function expression
The force shape is scaled in a compiled user-subroutine
The force shape is scaled in an scripted user-subroutine

Attribute Summary

Name

Property

Modifiable by command?

id    

Int ()

 

label

Str ()

case_index

Int ()

scale    

Function ()

flex_body

Reference (FlexBody)

function

Function ("MFOSUB")

force

Function ()

routine  

Routine ()

 

active

Bool ()

Usage

#1: Scale factor defined in an expression for scaling a modal force shape

Mforce (flex_body=objFlexBody, case_index=int, scale=double, optional_attributes)

 

#2: Scale factor or modal force defined in an compiled user-written subroutine

Mforce (flex_body=objFlexBody, function=userString, routine=string optional_attributes)

 

#3: Scale factor defined in a Python function

Mforce (flex_body=objFlexBody, function=userString, routine=functionPointer, optional_attributes)

Attributes

Description

The force shape is scaled by a function expression

flex_body

Reference to a Flex_Body

Defines the ID of a flex body on which the modal load is applied.

The flex_body attribute is mandatory.

case_index

Integer

Specifies the modal load case number that is used to define the shape of the distributed load.

The case_index attribute is mandatory.

scale

Double

Specifies an expression for the scale factor to be applied to the load case referenced by CASE_INDEX.

The scale attribute is mandatory.

The force shape is scaled in a compiled user-subroutine

flex_body

Reference to a Flex_Body.

Defines the ID of a flex body on which the modal load is applied.

The flex_body attribute is mandatory.

function

String

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

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 Field. The second is the name of the function in the shared library that does the computation.

An example is: routine=”/staff/altair/myfield.dllmymfosub”.

”/staff/altair/mymfosub.dll is the dll
“mymfosub” is the function within this DLL that performs the calculations

The routine attribute is optional. When not specified, it defaults to MFOSUB.

force

String

Specifies whether the user subroutine returns a shape that is to be scaled or the actual modal force itself.  Set this to “USER” to specify that the MFOSUB returns the actual force.

The force attribute is optional. When it is not specified, MotionSolve will assume that the user-subroutine computes a scale factor, not a modal force.

The force shape is scaled in a scripted user-subroutine

flex_body

Reference to a Flex_Body

Defines the ID of a flex body on which the modal load is applied.

The flex_body attribute is mandatory.

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=myModalLoad

myModalLoad 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 MFOSUB.

force

String

Specifies whether the user subroutine returns a shape that is to be scaled or the actual force itself.  Set this to “USER” to specify that the MFOSUB returns the actual force.

The force attribute is optional. When it is not specified, MotionSolve will assume that the user-subroutine computes a scale factor, not a modal force.

Optional attributes – Available to all variants

id

Integer

Specifies the element identification number.  This number must be unique among all the Mforce objects in the model.

This attribute is optional. MotionSolve will automatically create an ID when one is not specified.

Range of values: id > 0

label

String

Specifies the name of the Mforce object.

This attribute is optional. When not specified, MotionSolve will create a label for you.

active

Bool

Select one from True or False.

True indicates that the element is active in the model and it affects the behavior of the system
False indicates that the element is inactive in the model and it does not affect the behavior of the system. It is almost as if the entity was removed from the model, of course with the exception that can be turned “ON”  when desirable.

The attribute active is optional. When not specified, active defaults to True

Comments

1.See Properties, for an explanation about what properties are, why they are used and how you can extend these.
2.For a more detailed explanation about Mforce, see the Comments in the XML syntax section.

Example

The example below shows a definition of a MFORCE.

disturbanceLoad = Mforce (label="Disturbance", flex_body=wing, case_index=1,

                        scale="1.0 + 0.2*sin(360d*time) + 0.1*sin(360d*time*3)")