wecopttool.core.WEC.from_impedance
- static WEC.from_impedance(freqs, impedance, exc_coeff, hydrostatic_stiffness, f_add=None, constraints=None, min_damping=1e-06, uniform_shift=False)[source]
Create a WEC object from the intrinsic impedance and excitation coefficients.
The intrinsic (mechanical) impedance \(Z(ω)\) linearly relates excitation forces \(F(ω)\) to WEC velocity \(U(ω)\) as \(ZU=F\). Using linear hydrodynamic coefficients, e.g. from a BEM code like Capytaine, the impedance is given as \(Z(ω) = (m+A(ω))*iω + B(ω) + B_f + K/(iω)\). The impedance can also be obtained experimentally. Note that the impedance is not defined at \(ω=0\).
- Parameters:
freqs (ArrayLike) – Frequency vector [\(Hz\)] not including the zero frequency,
freqs = [f1, 2*f1, ..., nfreq*f1]
.impedance (DataArray) – Complex impedance of size
(nfreq, ndof, ndof)
.exc_coeff (DataArray) – Complex excitation transfer function of size
(ndof, nfreq)
.hydrostatic_stiffness (ndarray) – Linear hydrostatic restoring coefficient of size
(ndof, ndof)
.f_add (Mapping[str, StateFunction] | None) – Dictionary with entries
{'force_name': fun}
, wherefun
has a signaturedef fun(wec, x_wec, x_opt, waves):
, and returns forces in the time-domain of size(2*nfreq, ndof)
.constraints (Iterable[Mapping] | None) – List of constraints, see documentation for
scipy.optimize.minimize()
for description and options of constraints dictionaries. IfNone
: empty list[]
.min_damping (float | None) – Minimum damping level to ensure a stable system. See
wecopttool.check_impedance()
for more details.uniform_shift (bool | None) – Boolean determining whether damping corrections shifts the damping values uniformly for all frequencies or only for frequencies below
min_damping
. Seewecopttool.check_radiation_damping()
for more details.
- Raises:
ValueError – If
impedance
does not have the correct size:(ndof, ndof, nfreq)
.- Return type: