Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/CableDyn_DeckDriver.f90
Original file line number Diff line number Diff line change
Expand Up @@ -4062,7 +4062,7 @@ SUBROUTINE torsion_after_attachments(est, emt)
! the weights at the twisted state: an attachment the twist moved within its radius of the
! surface carries another share of its buoyancy (once more, with the loads of this state)
CALL attachment_static_weight(q_static, att_node, ln%att, opts, f_att_now, surface=.TRUE.)
IF (.NOT. has_drag .AND. ALL(f_att_now == f_att)) RETURN
IF (.NOT. has_drag .AND. ALL(f_att_now <= f_att .AND. f_att_now >= f_att)) RETURN
IF (MAXVAL(ABS(q_static - q_prev)) <= FIXED_POINT_TOL) RETURN
END DO
est = CD_DECKDRV_SOLVEFAIL
Expand Down
6 changes: 3 additions & 3 deletions src/CableDyn_HermiteCableDynamic.f90
Original file line number Diff line number Diff line change
Expand Up @@ -12557,7 +12557,7 @@ SUBROUTINE CD_HermiteCable_Drag_Element(qe, ve, l0, fluid, waterline_z, rho, dia
END DO
! the immersed fraction moves with the height of the point (in the surface band only):
! d wf/d qe(b) = dwf H(sp) for the vertical DOFs, dwf = d wf/d z
IF (dwf /= CD_ZERO) THEN
IF (.NOT. (ABS(dwf) <= CD_ZERO)) THEN
DO sp = 1, 4
b = 3*sp
djq(a, b) = djq(a, b) + gw(g)*speed*H(s)*fpl(c)*dwf*H(sp)
Expand Down Expand Up @@ -12668,7 +12668,7 @@ SUBROUTINE CD_HermiteCable_VIV_Lift_Element(qe, ve, l0, fluid, waterline_z, k_no
djq(a, b) = djq(a, b) + gww*H(s)*dH(sp)*(speed*jtan(c, cp) + fpl(c)*tangent(cp))
END DO
END DO
IF (dwf /= CD_ZERO) THEN ! the immersed fraction moves with the height of the point
IF (.NOT. (ABS(dwf) <= CD_ZERO)) THEN ! the immersed fraction moves with the height of the point
DO sp = 1, 4
b = 3*sp
djq(a, b) = djq(a, b) + gw(g)*speed*H(s)*fpl(c)*dwf*H(sp)
Expand Down Expand Up @@ -12984,7 +12984,7 @@ SUBROUTINE CD_HermiteCable_FK_Element(qe, l0, waterline_z, rho, diam, can, cat,
fjq(a, b) = fjq(a, b) + (gw(g)*wf)*H(s)*dH(sp)*jq3(c, cp)
END DO
END DO
IF (dwf /= CD_ZERO) THEN ! the immersed fraction moves with the height of the point
IF (.NOT. (ABS(dwf) <= CD_ZERO)) THEN ! the immersed fraction moves with the height of the point
DO sp = 1, 4
b = 3*sp
fjq(a, b) = fjq(a, b) + gw(g)*speed*H(s)*fpl(c)*dwf*H(sp)
Expand Down
14 changes: 8 additions & 6 deletions src/CableDyn_VIV.f90
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ PURE SUBROUTINE CD_VIV_Amplitude_Update(st, yd, dt)
IF (.NOT. (dt > CD_ZERO)) RETURN
y_old = st(4)
p = y_old
IF (.NOT. (p /= CD_ZERO)) p = st(1)
IF (ABS(p) <= CD_ZERO) p = st(1)
IF ((p > CD_ZERO .AND. yd < CD_ZERO) .OR. (p < CD_ZERO .AND. yd > CD_ZERO)) THEN
! theta = 0 when the step starts on the sample at zero that ends the half cycle
theta = y_old/(y_old - yd)
Expand Down Expand Up @@ -619,6 +619,7 @@ PURE SUBROUTINE CD_VIV_Check_Amp_Table(amp, amp_n, cl, msg)
INTEGER, INTENT(IN) :: amp_n(:)
CHARACTER(*), INTENT(OUT) :: msg
INTEGER :: e, n, i
REAL(wp) :: prev
REAL(wp), PARAMETER :: big = 1.0e15_wp
msg = ''
IF (SIZE(amp, 1) /= 3 .OR. SIZE(amp, 2) /= CD_VIV_AMP_MAXP .OR. SIZE(amp, 3) /= SIZE(cl) .OR. &
Expand All @@ -637,18 +638,19 @@ PURE SUBROUTINE CD_VIV_Check_Amp_Table(amp, amp_n, cl, msg)
msg = 'a VIV amplitude table needs the cross-flow lift (cl > 0) on its element'
RETURN
END IF
! the previous row's A/D; below every valid first row, which the range check holds at >= 0
prev = -CD_ONE
DO i = 1, n
IF (.NOT. (amp(1, i, e) >= CD_ZERO .AND. amp(1, i, e) <= big .AND. amp(2, i, e) >= CD_ZERO .AND. &
amp(2, i, e) <= big .AND. amp(3, i, e) > CD_ZERO .AND. amp(3, i, e) <= big)) THEN
msg = 'VIV amplitude table rows need finite A/D >= 0, C_v >= 0 and drag factor > 0, each at most 1e15'
RETURN
END IF
IF (i > 1) THEN
IF (.NOT. (amp(1, i, e) > amp(1, i - 1, e))) THEN
msg = 'the A/D of a VIV amplitude table must increase strictly'
RETURN
END IF
IF (.NOT. (amp(1, i, e) > prev)) THEN
msg = 'the A/D of a VIV amplitude table must increase strictly'
RETURN
END IF
prev = amp(1, i, e)
END DO
END DO
END SUBROUTINE CD_VIV_Check_Amp_Table
Expand Down
3 changes: 2 additions & 1 deletion tests/test_model.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1742,7 +1742,8 @@ SUBROUTINE case_substeps_restore_viv_state(inline)
REAL(wp) :: q0(3*NN), v0(3*NN), f_ext(3*NN), pq(3*NN), pv(3*NN), pa(3*NN), fluid(3, NN), wl(NN)
REAL(wp) :: l0(NE), ea(NE), rho_a(NE), cl(NE), dia(NE), cf(NE), df(NE), phi0(NN), w, t, phx0(NN)
REAL(wp) :: tab(3, CD_VIV_AMP_MAXP, NE)
INTEGER :: tab_n(NE), ev0
INTEGER :: tab_n(NE)
INTEGER(KIND(auto_m%sub_stats%events)) :: ev0
LOGICAL :: conv, stalled, all_conv
CHARACTER(200) :: em

Expand Down
Loading