Results Element |
||||||||||||||||||||||||||
Class NameRequestResult Description |
||||||||||||||||||||||||||
RequestResult is an object that contains all the simulation results associated with single Request. At each output time, the following results are stored:
The following occurs automatically when the model.simulate() method is invoked with returnResults=True.
|
||||||||||||||||||||||||||
Usage |
||||||||||||||||||||||||||
Comments
|
||||||||||||||||||||||||||
Example
Assume a model, M, is given to you.
|
||||||||||||||||||||||||||
# 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 () |