tmdsimpy.utils.harmonic.predict_harmonic_solution

tmdsimpy.utils.harmonic.predict_harmonic_solution(vib_sys, w, Fl, h, solver, equation, Xstat=None, fmag=None, control_amp=None, control_recov=None, control_order=None, rhi=None, neigs=3, vib_sys_nl=None, vprnm_calc_grad=True)

Generate an initial guess to an harmonic balance method (HBM) type problem based on a linear system.

Parameters:
vib_systmdsimpy.VibrationSystem

Vibration system for the initial prediction. The initial prediction is linear, so this should be linear around the state of interest (e.g., for frictional systems create a new tmdsimpy.VibrationSystem around the prestressed state using the linearized stiffness). This must use mass and stiffness proportional damping. This system is defined to have N degrees of freedom.

wfloat

frequency in rad/s that the prediction should occur at.

Fl1D numpy.ndarray

Forcing corresponding to the harmonics (each DOF of first component, then each DOF of second component etc.). Only the first harmonic terms of Fl are considered. For equations that do amplitude and phase control, Fl should only include first harmonic cosine forcing terms to get correct results. Size of Fl should be of size at least (2+(h[0]==0))*N.

h(H,) numpy.ndarray, sorted

List of harmonics to include in solution. Should be sorted.

solvertmdsimpy.NonlinearSolver or similar

Solver to be used in calculating an eigenproblem for vib_sys.

equation{‘HBM’, ‘HBM_AMP’, ‘HBM_AMP_PHASE’, ‘VPRNM_AMP_PHASE’}

Which equation to provide an initial guess for. Note that not all options may be implemented yet. Options are

‘HBM’ :

standard HBM for frequency continuation,

‘HBM_AMP’

Amplitude HBM with constant phase forcing ,

‘HBM_AMP_PHASE’ :

Amplitude HBM with constant response phase, variable force phase (for frequency continuation),

‘VPRNM_AMP_PHASE’ :

VPRNM with amplitude and phase controlled HBM.

If you need ‘HBM_AMP_PHASE’ for amplitude continuation, just change the last entry of the returned array to be the desired prediction amplitude instead of frequency.

Xstat(N,) numpy.ndarray, optional

Static displacement vector for the zeroth harmonic solution. If None, zeros will be returned for the zeroth harmonic. Also only applies if harmonic 0 is included in h. The default is None.

fmagfloat, optional

Scaling for the Fl vector. This only matters if the mode is ‘HBM’. Scaling does not apply to the zeroth harmonic. The default is None.

control_ampfloat, optional

Amplitude of response is controlled to. This does not matter for ‘HBM’ The default is None.

control_recov(N,) numpy.ndarray, optional

Recovery vector which extracts the DOF of interest for amplitude control. The default is None.

control_orderint, optional

Power of frequency to multiply amplitude control by. Does not apply for ‘HBM’. 0 corresponds to displacment, 1 corresponds to velocity, 2 corresponds to acceleration. The default is None.

rhiint, optional

Higher harmonic of interest to include in initial guess. This only matters for equation=VPRNM. For VPRNM, this should be the harmonic that shows a superharmonic resonance. The default is None.

neigsint, optional

The number of modes that should be used in constructing the linear prediction of the response amplitude. The default is 3.

vib_sys_nltmdsimpy.VibrationSystem or None

Vibration system with nonlinear forces (linear portions do not matter). Used exclusively for predicting nonlinear forces acting on superharmonic for ‘VPRNM’ prediction.

vprnm_calc_gradbool, optional

‘calc_grad’ flag to pass to VPRNM. This code does not need the gradient of VPRNM. However, not all nonlinear forces support the calc_grad=False input argument. If the nonlinear forces do support this input argument it is recommended to use False because it will be faster. The default is True.

Returns:
Ulam0(N*Nhc+m,) numpy.ndarray

Initial guess for the given set of equations. This will include harmonic displacements as the first entries (N*Nhc). Harmonic components are for all DOFs of the first component, then all DOFs of the next etc. The last m entries vary based on equation as follows

‘HBM’ :

forcing frequency (rad/s)

‘HBM_AMP’

force scaling, frequency (rad/s)

‘HBM_AMP_PHASE’ :

Force cosine scaling, force sine scaling, frequency (rad/s)

‘VPRNM_AMP_PHASE’ :

Force cosine scaling, force sine scaling, frequency (rad/s), control amplitude.

See also

tmdsimpy.VibrationSystem

Class with residual methods for solving many systems of equations that the present function makes predictions for.