tmdsimpy.utils.continuation.print_epmc_stats

tmdsimpy.utils.continuation.print_epmc_stats(XlamP, dirP_prev, fname)

Saves EPMC key statistics to a text file for easy monitoring.

This function is intended for monitoring active runs. For final solution details, save the full solution and plot based on those results, not based on the results written out by this summary file.

Parameters:
XlamP(N+1,) numpy.ndarray

Solution at the current step in physical coordinates (including continuation parameter) to an EPMC set of equations. First entries are harmonic displacements of mass normalized mode, XlamP[-3] is frequency (rad/s), XlamP[-2] is mass proportional self excitation factor, XlamP[-1] is log10(modal amplitude).

dirP_prev(N+1,) numpy.ndarray

Direction for prediction from previous step to this step. Can be used to get slope of solution at previous point w.r.t. lam by dividing dirP / dirP[-1]

fnamestr

Filename to save variables to. The output is a text file. Recommended file extension is ‘.dat’.

Returns:
None.

See also

tmdsimpy.Continuation

Class for continuation where this function is intended to be used as a callback function.

tmdsimpy.VibrationSystem.epmc_res

EPMC residual function. This assumes that XlamP matches the unknowns vector for this residual function.

combine_callback_funs

Function for combining multiple callback functions for Continuation.

continuation_save

Function for saving the full solution points.

Notes

The output includes the log modal amplitude, the natural frequency, and the damping factor for the current solution.

Examples

Define a callback function handle to pass to tmdsimpy.Continuation as

>>> callback_fun = lambda XlamP, dirP_prev : print_epmc_stats(XlamP, 
...                                            dirP_prev, 'epmc_sum.dat')