Skip to content

Commit

Permalink
Fixed drag coefficient scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanDavies19 committed Oct 18, 2023
1 parent d0d9a2e commit 458f40a
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions modules/moordyn/src/MoorDyn.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2074,9 +2074,23 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er
CALL WrScr(" Finalizing initial conditions using dynamic relaxation."//NewLine) ! newline because next line writes over itself

! boost drag coefficient of each line type <<<<<<<< does this actually do anything or do lines hold these coefficients???
DO I = 1, p%nLineTypes
m%LineTypeList(I)%Cdn = m%LineTypeList(I)%Cdn * InputFileDat%CdScaleIC
m%LineTypeList(I)%Cdt = m%LineTypeList(I)%Cdt * InputFileDat%CdScaleIC ! <<<<< need to update this to apply to all objects' drag
DO I = 1, p%nLines
m%LineList(I)%Cdn = m%LineList(I)%Cdn * InputFileDat%CdScaleIC
m%LineList(I)%Cdt = m%LineList(I)%Cdt * InputFileDat%CdScaleIC
END DO

DO I = 1, p%nBodies
m%BodyList(I)%bodyCdA = m%BodyList(I)%bodyCdA * InputFileDat%CdScaleIC
END Do

DO I =1, p%nRods
m%RodList(I)%Cdn = m%RodList(I)%Cdn * InputFileDat%CdScaleIC
m%RodList(I)%Cdt = m%RodList(I)%Cdt * InputFileDat%CdScaleIC
m%RodList(I)%CdEnd = m%RodList(I)%CdEnd * InputFileDat%CdScaleIC
END Do

DO I = 1, p%nPoints
m%PointList(I)%pointCdA = m%PointList(I)%pointCdA * InputFileDat%CdScaleIC
END DO

! allocate array holding 10 latest fairlead tensions
Expand Down Expand Up @@ -2206,6 +2220,20 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er
m%LineTypeList(I)%Cdt = m%LineTypeList(I)%Cdt / InputFileDat%CdScaleIC
END DO

DO I = 1, p%nBodies
m%BodyList(I)%bodyCdA = m%BodyList(I)%bodyCdA / InputFileDat%CdScaleIC
END Do

DO I =1, p%nRods
m%RodList(I)%Cdn = m%RodList(I)%Cdn / InputFileDat%CdScaleIC
m%RodList(I)%Cdt = m%RodList(I)%Cdt / InputFileDat%CdScaleIC
m%RodList(I)%CdEnd = m%RodList(I)%CdEnd / InputFileDat%CdScaleIC
END Do

DO I = 1, p%nPoints
m%PointList(I)%pointCdA = m%PointList(I)%pointCdA / InputFileDat%CdScaleIC
END DO

end if ! InputFileDat%TMaxIC > 0


Expand Down

0 comments on commit 458f40a

Please sign in to comment.