Commit 8b7765c
feat(foundations): introduce type/SSI split API + NREL 5MW OC3 dossier (PR #1/N)
Establishes the new foundation API that separates TYPE (monopile,
tripod, jacket, suction bucket) from SSI FIDELITY (fixed, 6x6, lumped
BNWF, physical BNWF, Craig-Bampton). v1.0 API frozen; legacy path
continues to work with a DeprecationWarning.
Context
-------
op3 v1.0 conflated two axes into one enum: ``FoundationMode.{FIXED,
STIFFNESS_6X6, DISTRIBUTED_BNWF, DISSIPATION_WEIGHTED}`` was described
as "four foundation modes" but actually encodes SSI fidelity levels,
not foundation topologies. There is no place for a Tripod or Jacket
to live its own geometry, mass, and coupling interface.
This PR scaffolds the clean split so model-by-model V&V&C work can
begin. The pattern is validated against the smallest published
monopile benchmark (NREL 5MW OC3 Phase I, Passon 2008). Tripod and
Jacket land in future PRs.
New API surface
---------------
- op3/foundations/base.py
* FoundationType enum (MONOPILE, TRIPOD, JACKET, SUCTION_BUCKET, GBS)
* FoundationProtocol (duck-typed contract)
* BaseFoundation ABC with as_legacy_foundation() back-compat bridge
- op3/foundations/types/monopile.py
* Monopile dataclass with diameter, wall thickness, embed length,
stub length, soil profile, material properties
* .from_oc3_spec() factory for NREL 5MW OC3 Phase I geometry
* .from_yaml(model_dir) factory loading from dossier
* .with_ssi(strategy) fluent API; .head_stiffness_6x6() queries it
- op3/ssi/base.py: SSIProtocol
- op3/ssi/stiffness_6x6.py: Stiffness6x6 strategy (pre-computed K,
.rigid() fixed-base factory, .from_csv() loader)
- op3/ssi/pisa.py: PISA strategy wrapping pisa_pile_stiffness_6x6
Dossier pattern
---------------
op3/models/nrel_5mw_oc3_monopile/ becomes the template for every
future validated model:
- site.yaml: site metadata, references, DOIs
- geometry.yaml: foundation + tower + RNA geometry with provenance
- soil.yaml: layered soil profile (placeholder for OC3 Phase I, real
profile comes from OC3 Phase II/III in PR #2)
- vvc.yaml: Verification / Validation / Calibration dossier with
per-metric RED / YELLOW / GREEN status, acceptance tolerances,
reference citations, and test module pointers
- build.py: build_monopile(ssi) and build_tower_model(ssi) entry
points using the new API; bridges to op3.composer for eigen
A model is only cleared for use in dissertation results when every
vvc.yaml metric reads GREEN. PR #1 ships the nrel_5mw_oc3_monopile
dossier with one metric GREEN (f1_Hz_oc3_coupled within 5% of the
Passon 2008 benchmark: 0.2815 Hz vs 0.276 Hz published, 2% error)
and the rest NOT-STARTED / BLOCKED pending PR #2.
Back-compat
-----------
- op3/foundations.py is now a package (not a module); all legacy
imports (``from op3.foundations import Foundation, FoundationMode,
build_foundation, apply_scour_relief, foundation_from_pisa``) are
preserved verbatim via ``op3/foundations/_legacy.py`` +
``op3/foundations/__init__.py`` re-export.
- build_foundation() now emits DeprecationWarning pointing at the
new API. The Monopile back-compat bridge constructs Foundation()
directly and is deprecation-silent.
- composer.py, opensees_foundations/*, openfast_coupling/*,
standards/*, uq/*, anchors/*, and all existing tests are
UNCHANGED. The 271-framework + 134-anchor regression suite
remains green.
Tests (tests/test_model_nrel_5mw_oc3_monopile.py, 11 new)
---------------------------------------------------------
- Dossier files exist
- Monopile.from_oc3_spec / from_yaml contract
- head_stiffness_6x6 without SSI raises clearly
- with_ssi chaining, rigid K > 1e19 diagonal
- as_legacy_foundation returns STIFFNESS_6X6 with correct provenance
- Bridge emits no DeprecationWarning; direct build_foundation() does
- compose_tower_model accepts bridged Foundation
- f1 eigen matches OC3 Phase I within 5% (Passon 2008)
405 tests passing (271 framework + 134 anchors, 11 skipped).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent daed0c8 commit 8b7765c
18 files changed
Lines changed: 1380 additions & 57 deletions
File tree
- op3
- foundations
- types
- models
- nrel_5mw_oc3_monopile
- tests
- ssi
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
50 | 26 | | |
51 | 27 | | |
52 | 28 | | |
| 29 | + | |
53 | 30 | | |
54 | 31 | | |
55 | 32 | | |
| |||
60 | 37 | | |
61 | 38 | | |
62 | 39 | | |
63 | | - | |
| 40 | + | |
64 | 41 | | |
65 | 42 | | |
66 | 43 | | |
67 | 44 | | |
68 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
69 | 52 | | |
70 | 53 | | |
71 | 54 | | |
| |||
188 | 171 | | |
189 | 172 | | |
190 | 173 | | |
| 174 | + | |
191 | 175 | | |
192 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
193 | 185 | | |
194 | 186 | | |
195 | 187 | | |
196 | 188 | | |
197 | 189 | | |
198 | | - | |
| 190 | + | |
| 191 | + | |
199 | 192 | | |
200 | 193 | | |
201 | 194 | | |
| |||
211 | 204 | | |
212 | 205 | | |
213 | 206 | | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
219 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
220 | 223 | | |
221 | 224 | | |
222 | 225 | | |
| |||
358 | 361 | | |
359 | 362 | | |
360 | 363 | | |
361 | | - | |
| |||
0 commit comments