capytaine / capytaine

Python BEM solver for linear potential flow, based on Nemoh.
https://capytaine.github.io
GNU General Public License v3.0
160 stars 74 forks source link

RAO transfer function calculation question #370

Closed degoeden closed 1 year ago

degoeden commented 1 year ago

Hello,

I am confused by the way the RAO transfer function is calculated in the rao_transfer_function function of the impedence.py file. Lines 46-48 have this calculation:

H = (-omega**2*(dataset['inertia_matrix'] + dataset['added_mass'])
         - 1j*omega*dataset['radiation_damping']
         +  dataset['hydrostatic_stiffness'])

It is my understanding that the radiation_damping term should not be subtracted, but should be added instead. The subtraction doesn't makes sense to me physically because that would represent a "damping" force that would push the object in the direction it is already going instead of opposing the object in the direction of motion. Is there something missing in my understanding?

Thank you, Nate

mancellin commented 1 year ago

Could this be an issue with the frequency domain sign convention (cf. #102 #153)?

The RAO computation is supposed to be the frequency domain counterpart of

(M + A) \frac{d^2 X}{d t^2} + B \frac{d X}{d t} + S X(t) = F

with

X(t) = \Re \left( \hat{X} e^{-i \omega t} \right)

and the minus sign comes from the time derivative.

degoeden commented 1 year ago

Yes, that makes sense. I forgot about the exp(-iomegat) convention.

Thank you for the clarification