================================ MbdAnalysis (hwx.inspire.motion) ================================ An analysis of the model using MotionSolve ---------- Properties ---------- +----------+ | wrtPart_ | +----------+ -------------- Public Methods -------------- +------------------------------------------------------------------------------------------------------+ | classmethod load_ (cls, fname=None) | +------------------------------------------------------------------------------------------------------+ | classmethod setupEvent_ (cls, mbdModel=None, end=None, dtout=None, type=None) | +------------------------------------------------------------------------------------------------------+ | abortAnalysis_ (self) | +------------------------------------------------------------------------------------------------------+ | analyze_ (self, mbdModel=None, end=None, dtout=None, type=None, animate=None, validate=True, **kwds) | +------------------------------------------------------------------------------------------------------+ | getContactRunData_ (self, obj, component, frame=None) | +------------------------------------------------------------------------------------------------------+ | getOutputPath_ (self) | +------------------------------------------------------------------------------------------------------+ | getRunComponent_ (self, name, obj=None) | +------------------------------------------------------------------------------------------------------+ | getRunData_ (self, obj, component, units=None, frame=None) | +------------------------------------------------------------------------------------------------------+ | getRunObjects_ (self) | +------------------------------------------------------------------------------------------------------+ | getRunPartPosition_ (self, part, frame) | +------------------------------------------------------------------------------------------------------+ | getRunPosition_ (self, part, frame, pos=None) | +------------------------------------------------------------------------------------------------------+ | getRunPositions_ (self, part, startFrame=0) | +------------------------------------------------------------------------------------------------------+ | getRunTimeFrames_ (self, static=True, intermediate=True, animationRange=False) | +------------------------------------------------------------------------------------------------------+ | getRunTimeSteps_ (self, convertUnits=True) | +------------------------------------------------------------------------------------------------------+ | getRunTimeStepsForGui_ (self, **kwds) | +------------------------------------------------------------------------------------------------------+ | getSystemRunPositions_ (self, system, startFrame=0) | +------------------------------------------------------------------------------------------------------+ | getTypeOfRunContactData_ (self) | +------------------------------------------------------------------------------------------------------+ | hasRunData_ (self, obj) | +------------------------------------------------------------------------------------------------------+ | isValid_ (self) | +------------------------------------------------------------------------------------------------------+ | onIntegrationStepDoneCB_ (self) | +------------------------------------------------------------------------------------------------------+ | onSensorTriggered_ (self, **kwds) | +------------------------------------------------------------------------------------------------------+ | onTimeStepDoneCB_ (self) | +------------------------------------------------------------------------------------------------------+ | openHG_ (self) | +------------------------------------------------------------------------------------------------------+ | openHV_ (self) | +------------------------------------------------------------------------------------------------------+ | resetTheModel_ (self, redraw=True) | +------------------------------------------------------------------------------------------------------+ | save_ (self, fname=None) | +------------------------------------------------------------------------------------------------------+ | setAnimationRange_ (self, enabled=None, startFrame=None, endFrame=None) | +------------------------------------------------------------------------------------------------------+ | setPositionsAtFrame_ (self, frame) | +------------------------------------------------------------------------------------------------------+ | updateModelPositions_ (self, updateSpringPreloads=True) | +------------------------------------------------------------------------------------------------------+ | usingUnits_ (self) | +------------------------------------------------------------------------------------------------------+ | writePartDependentsLocations_ (self, part, file) | +------------------------------------------------------------------------------------------------------+ ---------------- Property Details ---------------- .. _wrtPart: .. property:: wrtPart (inspire.Part | None) Animate parts relative to a reference part when calling setPositionsAtFrame. -------------- Method Details -------------- .. _load: .. classmethod:: load(cls, fname=None) Reload a saved analysis This creates and returns a new MbdAnalysis .. _setupEvent: .. classmethod:: setupEvent(cls, mbdModel=None, end=None, dtout=None, type=None) Creates and returns an mbd.Event populated with input arguments if specified or mbdModel.analysisSettings if they were not specified .. _abortAnalysis: .. method:: abortAnalysis(self) Let the GUI abort the analysis .. _analyze: .. method:: analyze(self, mbdModel=None, end=None, dtout=None, type=None, animate=None, validate=True, **kwds) Run a analysis on the model end[float] : Number of seconds to run the analysis. dtout[float] : Time between consecutive output steps. type[str] : TRANSIENT or STATICS or "STATICS TRANSIENT". validate[bool] : Call valdidateMdb on the model, if there are any errors or warnings dont analyze. animate[bool] : Update part positions and redraw. **kwds : Passed to MbdModel constructor. .. _getContactRunData: .. method:: getContactRunData(self, obj, component, frame=None) Get run data from contact. Can request: location, normal, tangential, regionLocation, regionNormal, regionTangential, off of a Contact object. .. _getOutputPath: .. method:: getOutputPath(self) The directory for the solver output files generated from "Run history path in the settings made unique from the model name and a time stamp .. _getRunComponent: .. method:: getRunComponent(self, name, obj=None) Called from the PlotManager to return a RunObject Component from the specified name .. _getRunData: .. method:: getRunData(self, obj, component, units=None, frame=None) Return the list of values for the specified obj.component obj is the inspire object component is a dot seperated name the identifies the mbd request.component for the realized inspire object To get the maximum force for a CoilSpring self.getRunData (spring, "FORCE.FM", 'force') This will return an empty list if the data can not be found because the component is invalid or the Request are turned off .. _getRunObjects: .. method:: getRunObjects(self) Return all of the RunObjects for this run Used by MotionSolve.py to populate the compomemnts at each output step .. _getRunPartPosition: .. method:: getRunPartPosition(self, part, frame) Return a Matrix44 for the part at the specified frame Used by MbdLoads to position transforce vectors to design position .. _getRunPosition: .. method:: getRunPosition(self, part, frame, pos=None) Return the specified position wrt the part at the frame Used by Loads, Traceers, ... to calculate a point on a part at a time .. _getRunPositions: .. method:: getRunPositions(self, part, startFrame=0) Get list of part positions at every time step .. _getRunTimeFrames: .. method:: getRunTimeFrames(self, static=True, intermediate=True, animationRange=False) Return a list of output time frames This is a derived list of derived doubles It looks like the run timeSteps with additional functionality to make it useful in animation and plotting: it supports usingUnits can be filter out static and or intermediate (contact) steps can be trimmed to the range in the ReviewContext animation bar .. _getRunTimeSteps: .. method:: getRunTimeSteps(self, convertUnits=True) Return the time data for this run Useful for a plotting time in the X axis .. _getRunTimeStepsForGui: .. method:: getRunTimeStepsForGui(self, **kwds) Return a filtered list of time steps for animation the static steps are removed and if motionReviewsSettings.showOutputOnly the contact frames are removed The returned list an instance of TimeFrames which is derived from list with extra functionality to map the filtered time steps to the true time steps. This so we can pass the list to the analimation frame as the time values, and when the user drags the animation tool bar slider we can get the true animation frame for setting the models part positions use self.getRunTimeSteps for things like plotting where the number of xs need to match the number of ys since we dont filter non-time run data .. _getSystemRunPositions: .. method:: getSystemRunPositions(self, system, startFrame=0) Get list of system positions at every time step .. _getTypeOfRunContactData: .. method:: getTypeOfRunContactData(self) Used by the ForceDrawer to determine of it can sum the vectors Can not rely on the settings to because we have to support backward compatability .. _hasRunData: .. method:: hasRunData(self, obj) Any run data for the specified object? .. _isValid: .. method:: isValid(self) Did the analyze succeed in getting results .. _onIntegrationStepDoneCB: .. method:: onIntegrationStepDoneCB(self) Called at each integration step, updates the gui so the user can abort the simulation .. _onSensorTriggered: .. method:: onSensorTriggered(self, **kwds) Called by MbdModel when a sensor is triggered .. _onTimeStepDoneCB: .. method:: onTimeStepDoneCB(self) Called at each output step, updates inspire part positions from the 'solved' mbd part positions from MotionSolve and calls user's onTimeStepDone, which can redraw model or process GUI inputs .. _openHG: .. method:: openHG(self) Opens the current analyis results file in HG. Requires analysis to be run in same session. .. _openHV: .. method:: openHV(self) Opens the current analyis results file in HV. Requires analysis to be run in same session. .. _resetTheModel: .. method:: resetTheModel(self, redraw=True) Called when analysis is done to reset model positions .. _save: .. method:: save(self, fname=None) Save the run to a file so it can be reloaded without running an analysys .. _setAnimationRange: .. method:: setAnimationRange(self, enabled=None, startFrame=None, endFrame=None) Called from the ReviewContext animation toolbar when the user changes the animation range. .. _setPositionsAtFrame: .. method:: setPositionsAtFrame(self, frame) Set animation position of all the inspire parts to the specified frame. Pass None to exit animation and reset the model .. _updateModelPositions: .. method:: updateModelPositions(self, updateSpringPreloads=True) Set the design space positions of all the inspire parts to their position in the current analysis frame Spring preloads can also be updated .. _usingUnits: .. method:: usingUnits(self) Context manager to use when working with analysis run data. E.g. - Creating / updating core objects using run data - Get unit labels for showing run data in the gui .. _writePartDependentsLocations: .. method:: writePartDependentsLocations(self, part, file) Write the locations of the i and j markers of the objects that are dependent on self.part