SoilDyn/SubDyn: reaction loads when REDWIN is used#3319
Merged
andrew-platt merged 7 commits intoOpenFAST:devfrom Apr 28, 2026
Merged
SoilDyn/SubDyn: reaction loads when REDWIN is used#3319andrew-platt merged 7 commits intoOpenFAST:devfrom
andrew-platt merged 7 commits intoOpenFAST:devfrom
Conversation
…to propagate SoilDyn nonlinear loads flag
…tive to prevent misleading reaction outputs
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes misleading SubDyn reaction load outputs when SoilDyn is using REDWIN (nonlinear soil reactions) by propagating a nonlinear-SSI flag from SoilDyn to SubDyn and invalidating SubDyn’s ReactSS outputs in that mode.
Changes:
- Add a new
SlDNonLinearflag to SubDyn init/parameter types (registry + generated types) to indicate nonlinear SoilDyn reactions are active. - Pass
SlDNonLinearfrom SoilDyn (via glue code) to SubDyn and setReactSSoutputs toNaNwhen nonlinear SoilDyn loads are enabled. - Update SoilDyn console messaging to clarify stiffness transfer and REDWIN nonlinear load usage.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| modules/subdyn/src/SubDyn_Types.f90 | Adds SlDNonLinear to SubDyn init/param types and updates copy/pack/unpack. |
| modules/subdyn/src/SubDyn_Registry.txt | Registers SlDNonLinear in InitInput and Parameter types for code generation/serialization. |
| modules/subdyn/src/SubDyn_Output.f90 | Sets ReactSS outputs to NaN when SlDNonLinear is true. |
| modules/subdyn/src/SubDyn.f90 | Copies SlDNonLinear from init input into p for runtime access. |
| modules/soildyn/src/SoilDyn.f90 | Updates console output to better explain linear stiffness transfer and REDWIN nonlinear loads. |
| modules/openfast-library/src/FAST_Subs.f90 | Sets Init%InData_SD%SlDNonLinear based on SoilDyn’s REDWIN interface usage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ar loads are active
andrew-platt
approved these changes
Apr 28, 2026
Collaborator
|
Oops. I meant to put this on rc-5.0.1. Will open a PR to backport it. |
andrew-platt
added a commit
that referenced
this pull request
Apr 29, 2026
…ort3319 Backport #3319 SoilDyn/SubDyn: reaction loads when REDWIN is used
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is ready to be merged.
Feature or improvement description
The proposed code introduces a new flag (
SlDNonLinear) to pass from SoilDyn to SubDyn in order to correctly identify when SoilDyn is computing nonlinear soil reaction forces (REDWIN DLL,CalcOption=3).The new flag
SlDNonLinearis set internally in SoilDyn based onCalcOption, ensuring it is only TRUE when the REDWIN DLL is active. When nonlinear forces are active, SubDyn reaction outputs (ReactSS) are set to NaN to prevent the user from using reaction loads that only have the linear part. Users should instead use the SoilDyn output sensors (e.g.,Sld1Fxg,Sld1Fyg) which correctly account for the total soil reaction at each node.Additionally, the linear soil stiffness transfer from SoilDyn to SubDyn is now better documented in the console (
SoilDyn: linear stiffness passed directly to SubDyn as a stiffness matrix).For reference, in the current code before these changes,
SlDNonLinearForcePortionOnlyseems to be defined as TRUE whenever SoilDyn is called, regardless of whether nonlinear forces are actually being computed. This seems a bit confusing. See at the bottom the "Future improvements?" part.Related issue, if one exists
This PR addresses issues #3317 and #3318
Impacted areas of the software
SubDyn reaction load sensor when REDWIN (
CalcOption= 3 in SoilDyn) is used.SoilDyn messages in the console at run time.
Test results, if applicable
This PR impacts the SubDyn outputs
ReactFXss,ReactFYss,ReactFZss,ReactMXss,ReactMYss,ReactMZss. However, there are no r-test cases with REDWIN. So, no differences are expected.For verification purposes, you can find examples of the new messages and results below:

CalcOption= 1 uses a linear stiffness matrix.In this case all sensors (SubDyn and SoilDyn) are available:

CalcOption: 3 uses a linear stiffness matrix AND non-linear forces computed by REDWIN.In this case, the reaction loads from SubDyn return NaN. The proper results (including the linear and nonlinear part) are available in SoilDyn.

Additional information: some drama compiling OpenFAST...
I tried to compile OpenFAST in Visual Studio Code by means of GCC. Although I could compile without issues, when I executed the code I ended up with the issues reported here: #3301
Then I decided to move to GitHub Actions and compile with Intel Fortran Compiler. @andrew-platt Somehow, when running the
deploy.yml, GitHub was not generating from scratch theSubDyn_Types.f90file based on my updatedSubDyn_Registry.txt. I'm not sure if this is a limitation of thedeploy.ymlapproach. To overcome this, I took the updatedSubDyn_Types.f90from my local run in Visual Studio Code and added it to my branch: 67db890.Future improvements?

When looking at the
Calc_StiffDampandCalc_REDWINin the SoilDyn.f90 file, the linear and nonlinear loads are computed as expected. However, we can find the condition:if (p%SlDNonLinearForcePortionOnly) thenin several places. I do believe this is indeed always TRUE and could be removed. But I'm not sure if there was a reason for it during the development.