Skip to content

Commit

Permalink
Lumped mass example update to use complex motion RAOs
Browse files Browse the repository at this point in the history
I mistakenly discarded the imaginary part of the fairlead RAOs used in examples\lumped_mass.py when saving the pkl file. This could mislead users to think that the lumped mass approach requires real RAOs. Fixing that to make the example clearer.
  • Loading branch information
lucas-carmo committed Nov 14, 2024
1 parent 29ce25d commit 731cc5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Binary file modified examples/RAO_fl.pkl
Binary file not shown.
4 changes: 2 additions & 2 deletions examples/lumped_mass.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def JONSWAP(ws, Hs, Tp, Gamma=None):
# Get the dynamic tension along the line
line = ms.lineList[0] # Get the line object
RAO_data = pickle.load(open(os.path.join(current_dir, 'RAO_fl.pkl'), 'rb')) # Read the nFreq x 3 RAO matrix (nFreq x 4 complex numpy array, first column are the frequencies in rad/s)
RAO_fl = RAO_data[:, 1:] # Motion RAOs of the fairlead
w = RAO_data[:, 0] # Frequencies of the RAO data
RAO_fl = RAO_data['RAO_fl'] # Motion RAOs of the fairlead
w = RAO_data['w'] # Frequencies of the RAO data
Sw = JONSWAP(ws = w, Hs = 6, Tp = 8) # Arbitrary wave spectrum
T_nodes_amp, T_nodes_psd,T_nodes_std,s,r_static,r_dynamic,r_total,X = line.dynamicSolve(w, Sw, RAO_A=0,RAO_B=RAO_fl, depth=np.abs(line.rA[2]))

Expand Down

0 comments on commit 731cc5f

Please sign in to comment.