HyperWorks Solvers

RequestResult

RequestResult

Previous topic Next topic No expanding text in this topic  

RequestResult

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

Results Element

Class Name

RequestResult

Description

RequestResult is an object that contains all the simulation results associated with single Request. At each output time, the following results are stored:

Entity

Component Name

Displacement Request

MAG, X, Y, Z, PSI, THETA, PHI

Velocity Request

VM, VX, VY, VZ, WM, WX, WY, WZ

Acceleration Request

ACCM, ACCX, ACCY, ACCZ, WDTM, WDTX, WDTY, WDTZ

Force Request

FM, FX, FY, FZ, TM, TX, TY, TZ

User Request

F1, F2, F3, F4, F5, F6, F7, F8

The following occurs automatically when the model.simulate() method is invoked with returnResults=True.

At T=0, for each Request in the model
oA RequestResult object is created
oThe object is stored in the SimulationResults container object
At each output time (including T=0):
ofor each Request in the model
The Request results are appended to the RequestResult object
Thus at the end of the simulation, the SimulationResults object is fully “populated”

Usage

See SimulationResult

Comments

1.See Properties, for an explanation about what properties are, why they are used and how you can extend these.
2.The SimulationResults may be queried to get access to the time histories of its various components. See the examples below.

Example

1.Demonstrate the use of RequestResult to create plots from MotionSolve results.

Assume a model, M, is given to you.

Perform a dynamic simulation from 0 to 2 seconds with 200 output steps.
Extract the time history for the FZ component of force request forceRequest1
Plot the FZ time history in matplotlib

# Perform a simulation

run   = M.simulate(type=”DYNAMICS”, end=2, steps=200, returnResults=True)

 

# Get the force request data from the run object

req   = run.getObject (model.forceRequest1)

 

# Extract the time and FZ signals

times = req.getComponent (“times”)

FZ    = req.getComponent ("FZ")

 

# Plot the signal

import matplotlib.pyplot as plt

plt.plot   (times, FZ)

plt.title  (“Fz vs. Time”)

plt.xlabel (“Time”)

plt.ylabel (“force [N]”)

plt.grid   (True)

plt.show   ()