Skip to content

Commit 7835e39

Browse files
committed
Bug fix in fowt.calcQTF_slenderBody()
We were missing the transverse force at the ends of the cylinder from Rainey's formulation
1 parent 173c8be commit 7835e39

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

raft/raft_fowt.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1575,14 +1575,13 @@ def calcQTF_slenderBody(self, waveHeadInd, Xi0=None, verbose=False, iCase=None,
15751575
f_rslb += - rho*v_i * aux
15761576

15771577

1578-
# ----- axial/end effects ------
1578+
# ----- end effects ------
15791579
# note : v_i and a_i work out to zero for non-tapered sections or non-end sections
1580+
# TODO: Should probably skip this part if along the length of the element, i.e. if a_i and v_i are different from zero due to tapering
15801581
if circ:
15811582
v_i = np.pi/12.0 * abs((mem.ds[il]+mem.drs[il])**3 - (mem.ds[il]-mem.drs[il])**3) # volume assigned to this end surface
1582-
a_i = np.pi*mem.ds[il] * mem.drs[il] # signed end area (positive facing down) = mean diameter of strip * radius change of strip
15831583
else:
15841584
v_i = np.pi/12.0 * ((np.mean(mem.ds[il]+mem.drs[il]))**3 - (np.mean(mem.ds[il]-mem.drs[il]))**3) # so far just using sphere eqn and taking mean of side lengths as d
1585-
a_i = (mem.ds[il,0]+mem.drs[il,0])*(mem.ds[il,1]+mem.drs[il,1]) - (mem.ds[il,0]-mem.drs[il,0])*(mem.ds[il,1]-mem.drs[il,1])
15861585

15871586
f_2ndPot += mem.a_i[il]*p_2nd*mem.q # 2nd order pressure
15881587
f_2ndPot += rho*v_i*Ca_End*np.matmul(mem.qMat, acc_2ndPot) # 2nd order axial acceleration
@@ -1593,6 +1592,11 @@ def calcQTF_slenderBody(self, waveHeadInd, Xi0=None, verbose=False, iCase=None,
15931592
p_drop = -2*0.25*0.5*rho*np.dot(np.matmul(mem.p1Mat + mem.p2Mat, u[:,i1, il]-nodeV[:, i1, il]), np.conj(np.matmul(Ca_p1*mem.p1Mat + Ca_p2*mem.p2Mat, u[:,i2, il]-nodeV[:, i2, il])))
15941593
f_conv += mem.a_i[il]*p_drop*mem.q
15951594

1595+
u1_aux = np.matmul(Ca_p1*mem.p1Mat + Ca_p2*mem.p2Mat, u1_aux)
1596+
u2_aux = np.matmul(Ca_p1*mem.p1Mat + Ca_p2*mem.p2Mat, u2_aux)
1597+
f_transv = 0.25*mem.a_i[il]*rho*(np.conj(u1_aux)*nodeV_axial_rel[i2, il] + u2_aux*np.conj(nodeV_axial_rel[i1, il]))
1598+
f_conv += f_transv
1599+
15961600
F_2ndPot += translateForce3to6DOF(f_2ndPot, mem.r[il,:])
15971601
F_conv += translateForce3to6DOF(f_conv, mem.r[il,:])
15981602
F_axdv += translateForce3to6DOF(f_axdv, mem.r[il,:])
0 Bytes
Binary file not shown.
5 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)