Skip to content

Commit

Permalink
added ofx reference files and
Browse files Browse the repository at this point in the history
added code to remove inf freq added-mass/damping when importing from ofx
  • Loading branch information
RubendeBruin committed Nov 6, 2021
1 parent 45fc870 commit 2aec729
Show file tree
Hide file tree
Showing 5 changed files with 13,163 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/mafredo/hyddb1.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,20 @@ def to_phase_rad(values):
amps = np.array(amps, dtype=float)
phases = np.array(phases, dtype=float)


# If added mass and damping start with infinite frequency
if freqs[0] == np.inf:
# remove infinite frequency added mass and damping values
freqs = freqs[1:]

amass_inf = amass[0]
damp_inf = damp[0]

amass = amass[1:]
damp = damp[1:]



# check that the frequencies for wave-forces and added-mass-and-damping are equal
from numpy.testing import assert_allclose

Expand Down
Loading

0 comments on commit 2aec729

Please sign in to comment.