Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wave_load #1

Open
kristmro opened this issue Mar 17, 2025 · 3 comments
Open

Wave_load #1

kristmro opened this issue Mar 17, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@kristmro
Copy link

kristmro commented Mar 17, 2025

  1. wave_loads.py -> deg2rad(rao_phase) #Roa_phase is in grad from the json file, and needs to be converted
    SOLUTION:

    phase = np.array(self._params["forceRAO"]["phase"])[:, :, :, 0]

    This needs to be changed to this:
    phase = np.deg2rad(np.array(self._params['forceRAO']['phase'])[:, :, :, 0])

  2. wave_loads.py -> tau_sv = self.second_order_loads(time, eta[-1]) #Changed from eta[-2] to eta[-1]
    SOLUTION:

    tau_sv = self.second_order_loads(time, eta[-2])

    This needs to be changed to this:
    tau_sv = self.second_order_loads(time, eta[-1])

  3. wave_loads.py -> change from + to - in second second_order_loads for self._P -- Aligns with wf loads
    SOLUTION:

    self._amp @ (Q * np.exp(self._W * (1j * t) + 1j * self._P)) @ self._amp

    This and the line over and under needs to be:

tau_sv = np.real(self._amp@(Qnp.exp(self._W(1jt) - 1jself._P))@self._amp)

Credz Håkon bakke

@incebellipipo incebellipipo added the bug Something isn't working label Mar 17, 2025
@incebellipipo
Copy link
Member

Can you please provide the reasons for those changes? You can reference the relevant equations from books or research articles if possible.

@kristmro
Copy link
Author

kristmro commented Mar 17, 2025

  1. Printing the values one gets from the phase one can see that it is in degrees. In orca you can choose the output: Orca documentation
    This needs to be in rad because of the calculations that follow, e.g. that the frequency is in rad/s and here:


    were the trigonometric functions expect angles in radians.

  2. we need heading, and -2 is not heading. Just a typo, can be shown most easily with what the function excepts as an input:

    def second_order_loads(self, t, heading):

  3. (Hygen, 2023) In the equations 2.37 and 2.38 describe Jan-Erik Hygen how he intended the formula to be, but in equation 4.9 he wrote with a positive sign as he also did in

    self._amp @ (Q * np.exp(self._W * (1j * t) + 1j * self._P)) @ self._amp

    for me, it seems like a mismatch. I think Håkon Bakke also made a point about the first and second forces needing to be in phase with each other. I think he is referring to how the first order is calculated with being negative. I will ask him to comment here to specify better. However, it might be wise to contact Roger about this because in this paper Yue & Dick ,1989 the phase is left out when calculating the sv drift forces for a unidirectional sea (equation 5). This might be, without analyzing it thoroughly, because when taking the real of the equation, as done in
    self._amp @ (Q * np.exp(self._W * (1j * t) + 1j * self._P)) @ self._amp

    the phase will be gone or small enough to ignore. This further explains why having the phase in grad, instead of rad, did not affect the results.

@incebellipipo
Copy link
Member

@rskjetne Can we have you input here

(Hygen, 2023) In the equations 2.37 and 2.38 describe Jan-Erik Hygen how he intended the formula to be, but in equation 4.9 he wrote with a positive sign as he also did in

self._amp @ (Q * np.exp(self._W * (1j * t) + 1j * self._P)) @ self._amp

for me, it seems like a mismatch. I think Håkon Bakke also made a point about the first and second forces needing to be in phase with each other, I will ask him to comment here to specify better. However, this might be wise to contact Roger about because in this paper Yue, Dick 1989 the phase is left out when calculating the sv drift forces for a unidirectional sea (equation 5).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants