MbdLoads (hwx.inspire.motion)

Loads (forces, torques, accelerations) from an MbdAnalysis that are applied to a part (parts if in a Rigid Group or ground) at specified time steps.

The forces will sum to 0 at each time step. They are used to create load cases for Inspire FE Optimize & Analyze.

Generate loads for part using the current MbdAnalysis loads = MbdLoads (part)

Filter loads to contain peak force time steps between 1 and 10 seconds peaks = loads.timeSlice(1, 10).peaks ()

Add in every 5 time steps loads = loads[::5] + peaks

Generate load cases, write to csv loads.createLoadCases () loads.writeCsv (‘test.csv’)

Public Methods

analyzePart (self, sumAtRegion=False, params={}, runOptions={})

copy (self, items=None)

countLoadCases (self, **kwds)

createLoadCases (self, deactivateRest=False, **kwds)

evenlySpaced (self, numSamples, includeBounds=True)

filter (self, filter)

getChannels (self, load, components)

optimizePart (self, sumAtRegion=False, params={}, runOptions={})

peaks (self, peaksPerComp=5, components=’FX FY FZ FM TX TY TZ TM’, forceThreshold=1e-05, torqueThreshold=0.001)

timeSlice (self, start=None, end=None)

writeCsv (self, file, wrtDesignPos=False)

Method Details

analyzePart(self, sumAtRegion=False, params={}, runOptions={})

Run an OptiStructAnalysis using loads.

param sumAtRegion

use a Summed at Contact Region representation of the contact forces instead of the individual contact forces themselves.

type sumAtRegion

bool

param params

See OptiStructAnalysis.Params.

type params

dict

param runOptions

See OptiStructAnalysis.RunOptions.

type runOptions

dict

returns

The synthesis with results.

rtype

OptiStructAnalysis

copy(self, items=None)

Create a copy of self containing the passed items

countLoadCases(self, **kwds)

How many load cases will be created so we can warn the user if there are a lot

createLoadCases(self, deactivateRest=False, **kwds)

Create inspire LoadCases out of the load data.

evenlySpaced(self, numSamples, includeBounds=True)

Returns a filtered set of loads. Try to evenly space the output steps There should not be any contact frames

includeBounds == False will give evenly spaced time steps, but may or not not include the start/end time

includeBounds == True will include the start/end time but loads will not not be exactly evenly if the numSamples does not divide evenly into the number of timeSteps. In this case we try to get as evenly spaced as possible

filter(self, filter)

Filter time steps using filter function

getChannels(self, load, components)

Get run data for a load at every timeStep

optimizePart(self, sumAtRegion=False, params={}, runOptions={})

Run a TopologyOptimization using loads.

param sumAtRegion

use a Summed at Contact Region representation of the contact forces instead of the individual contact forces themselves.

type sumAtRegion

bool

param params

See TopologyOptimization.Params.

type params

dict

param runOptions

See TopologyOptimization.RunOptions.

type runOptions

dict

returns

The synthesis with results.

rtype

TopologyOptimization

peaks(self, peaksPerComp=5, components='FX FY FZ FM TX TY TZ TM', forceThreshold=1e-05, torqueThreshold=0.001)

Returns a filtered set of loads. For each joint, ‘peaksPerComp’ peaks are gathered per requested component. The consolidated list of these values are returned removing duplicates.

The values at the start and end times are considered peaks since they might be a min/max value.

Peaks whose absolute value is < forceThreshold / torqueThreshold (in base units) are ignored

timeSlice(self, start=None, end=None)

Get all time steps between a start and end time inclusive

writeCsv(self, file, wrtDesignPos=False)

Write loads to csv file

wrtDesignPos Means force / torque directions will be transformed to the

parts model position.