pyyeti.ode.SolveUnc.get_f2x¶
- SolveUnc.get_f2x(phi, velo=False)[source]¶
Get force-to-displacement or force-to-velocity transform
- Parameters:
phi (2d ndarray) – Transform from ODE coordinates to physical DOF
velo (bool; optional) – If True, get force to velocity transform instead
- Returns:
flex (2d ndarray) – Force to displacement (or velocity) transform
Notes
This routine was written to support Henkel-Mar simulations; see [1]. The equations of motion for two separate bodies are solved simultaneously while enforcing joint compatibility. This is handy for allowing the two bodies to separate from each other. The flex matrix is part of the matrix in the upper right quadrant of equation 27 in ref [1]; the remaining part comes from the other body.
The interface DOF are those DOF that interface with the other body. The force is the interface force and the displacement (or velocity) is of the interface DOF.
The reference does not discuss enforcing joint velocity compatibility. This routine however lets you choose between the two since the velocity method is fundamentally more stable than the displacement method.
Let (see also
__init__()):phir = phi[:, rb] # for complex phik = phi[:, kdof] # for both; if real, includes rb phirf = phi[:, rf] # for both B = pc.B[:, None] # for real Bp = pc.Bp[:, None] # for real A = pc.A # for complex Ap = pc.Ap # for complex Be = pc.Be[:, None] # for complex ur_inv_v = pc.ur_inv_v # for complex rur_d = pc.rur_d # for complex iur_d = pc.iur_d # for complex rur_v = pc.rur_v # for complex iur_v = pc.iur_v # for complex
For real, if velo is False:
flex = phik @ (B * phik.T) + phirf @ (ikrf * phirf)
For real, if velo is True:
flex = phik @ (Bp * phik.T)
For complex, if velo is False:
flex_rb = phir @ (0.5*A*(imrb @ phir.T)) temp = Be*(ur_inv_v @ invm @ phik.T) flex_el = phik @ (rur_d @ temp.real - iur_d @ temp.imag) flex_rf = phirf @ ikrf @ phirf.T flex = flex_rb + flex_el + flex_rf
For complex, if velo is True:
flex_rb = phir @ (Ap*(imrb @ phir.T)) temp = Be*(ur_inv_v @ invm @ phik.T) # same as above flex_el = phik @ (rur_v @ temp.real - iur_v @ temp.imag) flex = flex_rb + flex_el
Note
A zeros matrix is returned if order is 0.
- Raises:
NotImplementedError – When systype is not float.
References