Skip to content

Commit

Permalink
Merge pull request #2401 from luwang00/f/SD_API_Update
Browse files Browse the repository at this point in the history
SD: Remove the misleading CBMod input
  • Loading branch information
andrew-platt committed Sep 4, 2024
2 parents 1075839 + d6ab7c0 commit 8a90413
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 24 deletions.
16 changes: 4 additions & 12 deletions docs/source/user/subdyn/input_files.rst
Original file line number Diff line number Diff line change
Expand Up @@ -229,13 +229,6 @@ static gravity and buoyancy loads, and high-frequency loads transferred
from the turbine. Recommended to set to True.


**GuyanLoadCorrection** is a flag to specify whether the extra moment due to
the lever arm from the Guyan deflection of the structure is to be added to the loads
passed to SubDyn, and, whether the FEM representation should be expressed in the rotating
frame in the floating case (the rotation is induced by the rigid body Guyan modes).
See section :numref:`SD_Loads` for details. Recommended to set to True.


FEA and Craig-Bampton Parameters
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand All @@ -257,12 +250,11 @@ recommend using **NDiv** > 1 when modeling tapered members.
should be carried out by the module. If FALSE, then the full
finite-element model is retained and **Nmodes** is ignored.

**Nmodes** sets the number of internal C-B modal DOFs to retain in the
**Nmodes** sets the number of internal C-B modal DOF to retain in the
C-B reduction. **Nmodes** = 0 corresponds to a Guyan (static)
reduction. **Nmodes** is ignored if **CBMod** is set to FALSE,
meaning the full finite-element model is retained by keeping all modes
(i.e. a modal analysis is still done, and all the modes are used as DOFs) .

reduction. With **Nmodes** < 0 (equivalent to **CBMod** set to FALSE
in previous versions), SubDyn will retain all C-B modes, leading to the
same number of DOF as the full finite-element model.

**JDampings** specifies value(s) of damping coefficients as a
percentage of critical damping for the retained C-B modes. Distinct
Expand Down
2 changes: 1 addition & 1 deletion docs/source/user/subdyn/theory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1780,7 +1780,7 @@ Corrections to the baseline formulation ("GuyanLoadCorrection")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The baseline FEM implementation needs to be corrected to account for the fact that loads are provided to SubDyn at the displaced positions, and to account for the rigid body motions in the floating case.
The corrections are activated by setting the parameter **GuyanLoadCorrection** to True.
In previous versions of SubDyn, the corrections are activated by setting the parameter **GuyanLoadCorrection** to True. This input parameter has been removed from the SubDyn primary input file, and the load corrections will always be used in current and future versions of SubDyn.



Expand Down
18 changes: 8 additions & 10 deletions modules/subdyn/src/SubDyn.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1015,21 +1015,22 @@ SUBROUTINE SD_Input(SDInputFile, Init, p, ErrStat,ErrMsg)
CALL ReadCom ( UnIn, SDInputFile, ' FEA and CRAIG-BAMPTON PARAMETERS ', ErrStat2, ErrMsg2, UnEc ); if(Failed()) return
CALL ReadIVar ( UnIn, SDInputFile, Init%FEMMod, 'FEMMod', 'FEM analysis mode' ,ErrStat2, ErrMsg2, UnEc ); if(Failed()) return ! 0= Euler-Bernoulli(E-B); 1=Tapered E-B; 2= Timoshenko; 3= tapered Timoshenko
CALL ReadIVar ( UnIn, SDInputFile, Init%NDiv , 'NDiv' , 'Number of divisions per member',ErrStat2, ErrMsg2, UnEc ); if(Failed()) return
CALL ReadLVar ( UnIn, SDInputFile, Init%CBMod , 'CBMod' , 'C-B mod flag' ,ErrStat2, ErrMsg2, UnEc ); if(Failed()) return

IF (Check( (p%IntMethod < 1) .OR.(p%IntMethod > 4) , 'IntMethod must be 1 through 4.')) return
IF (Check( (Init%FEMMod < 0 ) .OR. ( Init%FEMMod > 4 ) , 'FEMMod must be 0, 1, 2, or 3.')) return
IF (Check( Init%NDiv < 1 , 'NDiv must be a positive integer')) return
IF (Check( Init%FEMMod==2 , 'FEMMod = 2 (tapered Euler-Bernoulli) not implemented')) return
IF (Check( Init%FEMMod==4 , 'FEMMod = 4 (tapered Timoshenko) not implemented')) return

! Nmodes - Number of internal modes to retain. Retain all modes if Nmodes<0.
CALL ReadIVar ( UnIn, SDInputFile, p%nDOFM, 'Nmodes', 'Number of internal modes',ErrStat2, ErrMsg2, UnEc ); if(Failed()) return
IF ( p%nDOFM >= 0 ) THEN
Init%CBMod = .TRUE.
ELSE
Init%CBMod = .FALSE.
ENDIF
IF (Init%CBMod) THEN
! Nmodes - Number of interal modes to retain.
CALL ReadIVar ( UnIn, SDInputFile, p%nDOFM, 'Nmodes', 'Number of internal modes',ErrStat2, ErrMsg2, UnEc ); if(Failed()) return

IF (Check( p%nDOFM < 0 , 'Nmodes must be a non-negative integer.')) return

if ( p%nDOFM > 0 ) THEN
IF ( p%nDOFM > 0 ) THEN
! Damping ratios for retained modes
CALL AllocAry(Init%JDampings, p%nDOFM, 'JDamping', ErrStat2, ErrMsg2) ; if(Failed()) return
Init%JDampings=WrongNo !Initialize
Expand All @@ -1054,12 +1055,9 @@ SUBROUTINE SD_Input(SDInputFile, Init, p, ErrStat,ErrMsg)
ELSE
CALL ReadCom( UnIn, SDInputFile, 'JDamping', ErrStat2, ErrMsg2, UnEc ); if(Failed()) return
END IF

ELSE !CBMOD=FALSE : all modes are retained, not sure how many they are yet
!note at this stage I do not know nDOFL yet; Nmodes will be updated later for the FULL FEM CASE.
p%nDOFM = -1
!Ignore next line
CALL ReadCom( UnIn, SDInputFile, 'Nmodes', ErrStat2, ErrMsg2, UnEc ); if(Failed()) return
!Read 1 damping value for all modes
CALL AllocAry(Init%JDampings, 1, 'JDamping', ErrStat2, ErrMsg2) ; if(Failed()) return
CALL ReadVar ( UnIn, SDInputFile, Init%JDampings(1), 'JDampings', 'Damping ratio',ErrStat2, ErrMsg2, UnEc ); if(Failed()) return
Expand Down

0 comments on commit 8a90413

Please sign in to comment.