Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,20 @@ All notable changes to CableDyn are recorded in this file. The format follows
outer iterations per step. The junction converges to the same tolerance, so results differ
only within it, and by no more than the tolerance already allowed against a tightly converged
run: tensions by about 2e-6 relative and the body position by under 1 µm.
- The OpenFAST linearisation check (`validation/scripts/openfast_lin_ab.py`) now compares
CableDyn's quasi-static mooring stiffness entry by entry with stock MoorDyn's zero-frequency
reduction `D - C A^-1 B`, and fails above 0.5 %. It writes the `.lin` files with the
full-precision `OutFmt` `ES24.15E3`, lets MoorDyn settle its initial condition, and
linearises at t = 0. Its default case is the `examples/openfast` IEA-15 UMaine twin. On
that case the per-fairlead stiffness agrees to 0.07–0.10 % (0.29 % for the transverse
term), and the platform 6 × 6 diagonals agree to 0.10 % or better. The earlier record had
called MoorDyn's reduction unusable; with the 4-digit default `OutFmt` the same case
reproduces that asymmetric reduction, so the check now refuses a reference written below
full precision. VALIDATION.md and the OpenFAST page of the manual are updated.
- The FAST.Farm shared-mooring comparison with stock MoorDyn now covers 600 s of the r-test
`MD_Shared` farm (`validation/scripts/fastfarm_shared_ab.py`): tension means agree to 0.02 %,
extremes to 0.25 %, and platform motions to millimetres. The migration guide now says that on
a line with no `Fixed` end `FairTen` and `AnchTen` name the opposite ends from MoorDyn's.

### Fixed

Expand Down
6 changes: 6 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,12 @@ cmake -S <openfast> -B <openfast-build-dir> -DCABLEDYN_ROOT=<CableDyn checkout>
powershell -File integration/openfast/openfast_build_gate.ps1 -BuildDir <openfast-build-dir> -CaseFst <case.fst>
```

With the MinGW gfortran of the conda environment, add
`-DCMAKE_EXE_LINKER_FLAGS="-Wl,--stack,16777216"` to the configure line. OpenFAST's
CMake raises the 2 MB default stack to 16 MB only for Cygwin and Visual Studio builds,
and a MinGW `FAST.Farm.exe` (`-DBUILD_FASTFARM=ON`) with the default stack stops with a
stack overflow while ElastoDyn initialises.

`openfast_build_gate.ps1` builds `openfast.exe`, runs a `CompMooring = 5` case,
checks that the CableDyn banner appears in the log, and checks that the output is
finite.
Expand Down
11 changes: 8 additions & 3 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,14 @@ only the `cabledyn` package and its metadata.
`openfast.exe` with CableDyn, checks that a coupled run prints the CableDyn
banner, and checks that the output is finite.
2. **Linearisation check**: with the built executable, run
`python validation/scripts/openfast_lin_ab.py --exe <openfast.exe> --case-dir <case-dir>`.
The CableDyn mooring block must be symmetric to ≤ 1e-3 with negative restoring
diagonals and bounded sway coupling.
`python validation/scripts/openfast_lin_ab.py --exe <openfast.exe> --case-dir <case-dir>`,
where `<case-dir>` holds the `examples/openfast` IEA-15 UMaine twin decks and
the r-test `MD_Shared` turbine-1 ElastoDyn, HydroDyn, SeaState and HydroData
inputs (listed in the script docstring). The CableDyn mooring block must be
symmetric to ≤ 1e-3 with negative restoring diagonals and bounded sway
coupling. Its per-fairlead blocks and platform 6×6 stiffness must match stock
MoorDyn's quasi-static reduction to 0.5%. The script writes the `.lin` files
at full precision.
3. Confirm that [VALIDATION.md](VALIDATION.md) matches the results at the release
commit.

Expand Down
22 changes: 20 additions & 2 deletions VALIDATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,24 @@ scripts, results, and source provenance are in
bit-identical (`correction_rewind`); a 40 s `NumCrctn = 1` OpenFAST run matches
stock MoorDyn to **≤0.16%** of range and is bit-identical to its own
`NumCrctn = 0` run.
- *Linearisation*
([`validation/scripts/openfast_lin_ab.py`](https://github.com/SMI-Lab-Inha/CableDyn/blob/main/validation/scripts/openfast_lin_ab.py)):
the twin decks linearise once at t = 0. Each run has platform DOFs only, still water, and HydroDyn
`ExctnMod = RdtnMod = 0`. MoorDyn's relaxation runs for `TmaxIC = 400 s`, and both `.lin` files are
written with `OutFmt = ES24.15E3`. CableDyn's quasi-static `dYdu` (no states) is compared with
MoorDyn's zero-frequency reduction `D − C A⁻¹ B` over 882 states. The per-fairlead stiffness agrees
to **0.07–0.10%** (line 1: 49 741 / 49 706 N/m in-plane horizontal) and the transverse `H/X` term
to 0.29%. The platform 6×6 diagonals agree to **≤0.10%** (surge 77 211 / 77 156 N/m,
roll 2.6473e8 / 2.6466e8 N·m/rad), and every entry to ≤1.0e-3 of √(KᵢᵢKⱼⱼ). Standalone CableDyn
static solves reproduce the block by finite differences to 1.5e-5, and its transverse term equals
the analytic `H/X`. Both 50-segment models sit 7–12% above the continuous elastic catenary
because of the touchdown discretisation; refining to 800 segments converges to it within 0.1%.
MoorDyn's reduction needs the full-precision `OutFmt`. With the usual `ES10.3E2` (4 digits),
`D ≈ 1e8 N/m` cancels to a ~1e4 N/m result and the block is 57% asymmetric with sign-flipped
diagonals; the script refuses such a reference. In the full-system ElastoDyn linearisation, roll
and pitch are 7.29e6 N·m/rad below the module-level 6×6 for both mooring modules. A run with no
mooring and only a constant −6.084e6 N vertical load at the platform reference point (HydroDyn
`AddF0`) reproduces this term, so it comes from ElastoDyn/glue code and not from the mooring module.

The mooring-only A/B compares an all-chain system that both codes model in the same
way; the finite-EI cable under coupled motion is compared with OrcaFlex in L4-1c.
Expand Down Expand Up @@ -707,8 +725,8 @@ stop with a named error.
| Correction iterations (`NumCrctn > 0`) | Pass verified | bit-identical to own `NumCrctn = 0` run |
| SeaState wave/current kinematics | Pass verified | wave A/B ≤0.16% of range |
| Checkpoint-restart (incl. Free/Connect points) | Pass verified | restarted window = continuous run to 0.0 |
| Linearisation | Pass scoped | quasi-static `dYdu`; invariants tested; not compared entry by entry with MoorDyn's `-lin` output, which is sensitive to the seabed-contact operating point in this case |
| FAST.Farm shared moorings + clumps + channel record | Pass verified | 60 s farm A/B against stock MoorDyn; tension differences range from 0.04% to 3% across the compared statistics |
| Linearisation | Pass verified (quasi-static stiffness) | quasi-static `dYdu` compared entry by entry with stock MoorDyn's zero-frequency reduction `D − C A⁻¹ B` (full-precision `.lin` output): fairlead stiffness 0.07–0.10%, transverse `H/X` term 0.29%, platform 6×6 diagonals ≤0.10%; standalone static FD 1.5e-5; transverse term equals `H/X`. Velocity/acceleration columns are zero by design ([`openfast_lin_ab.py`](https://github.com/SMI-Lab-Inha/CableDyn/blob/main/validation/scripts/openfast_lin_ab.py)) |
| FAST.Farm shared moorings + clumps + channel record | Pass verified | 600 s A/B of the r-test `MD_Shared` farm against stock MoorDyn (same deck, analysis from 100 s; [`fastfarm_shared_ab.py`](https://github.com/SMI-Lab-Inha/CableDyn/blob/main/validation/scripts/fastfarm_shared_ab.py)): tension means ≤0.02%, minima and maxima ≤0.25%, platform motions within millimetres and 0.001°; shared-line tension std 2.2–2.7% lower, 1.0% at half the mooring step (CableDyn's implicit step at the 0.05 s coupling step against MoorDyn's 1e-4 s explicit step). On the shared lines, which have no Fixed end, `FairTen`/`AnchTen` name the opposite ends from MoorDyn's (see the migration guide). MoorDyn's initial settling does not converge for the anchor legs 6 and 7 (2.4 m excess length at t = 0), a start-up transient over by 100 s that most likely set the 3% end of the earlier 60 s record |
| Slack-line tension convention | Pass verified | tension-only dynamics; BA on slack lines matches `MoorDyn_Line.f90` |
| Farm + restart / Farm + linearisation | Not applicable | FAST.Farm has no restart and does not call module linearisation; the same applies to stock MoorDyn |
| Line failures (`FAILURE` table) | Pass verified | MoorDyn semantics on both paths (reserve-point pre-allocation, time or tension trigger, detach onto a massless Free point); standalone (point systems and free Rigid6 bodies), coupled, and checkpoint-replay tests |
Expand Down
9 changes: 7 additions & 2 deletions doc/migrating.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ elements — exactly equivalent to a CableDyn ``LINES`` row ``1 4 1 -`` plus one
``1 chain 850.0 50``. MoorDyn writes lines anchor-first; when ``AttachA`` is a ``Fixed`` anchor
and ``AttachB`` a ``Vessel``/``Coupled``/``Body`` fairlead, CableDyn swaps the ends so that
**End A is the fairlead**, as everywhere in CableDyn. Endpoint channels therefore keep their
physical meaning: ``FairTen`` is at the fairlead, ``AnchTen`` at the anchor.
physical meaning: ``FairTen`` is at the fairlead, ``AnchTen`` at the anchor. A line with no
``Fixed`` end (a shared line between two turbines or through a clump) keeps the order written:
CableDyn's ``FairTen`` is at ``AttachA`` and ``AnchTen`` at ``AttachB``, while MoorDyn writes
``FairTen`` at ``AttachB`` (its last node) and ``AnchTen`` at ``AttachA``. Compare such lines
by end, not by channel name.

``examples/openfast/MoorDyn_UMaine.dat`` is such a stock deck. For a standalone run it needs
only what OpenFAST (maintained by NLR, the National Laboratory of the Rockies, formerly NREL)
Expand Down Expand Up @@ -112,7 +116,8 @@ Keyword map
decks in OpenFAST (the standalone driver rejects it). A deck with a finite-EI cable
rejects both
* - ``FairTen``, ``AnchTen``, point/node channels
- same names; tensions in N (:doc:`outputs`)
- same names; tensions in N (:doc:`outputs`). On a line with no ``Fixed`` end the two
end channels name the opposite ends from MoorDyn's (see above)

What differs on purpose
~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
5 changes: 4 additions & 1 deletion doc/openfast.rst
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,10 @@ without an auxiliary process:
``MooringFile`` and removed after use, so side files resolve as on restart. Set ``dtM = DT`` and linearise at the initial
operating point (``CalcSteady = False``,
``LinTimes = 0``, platform at its still-water equilibrium, rotor speed and pitch at their
steady values). Contact switching makes derivatives near touchdown non-smooth. A deck with
steady values). Contact switching makes derivatives near touchdown non-smooth. OpenFAST writes
the ``.lin`` matrices in the ``.fst`` ``OutFmt``; to compare them with MoorDyn's
``D - C A^-1 B``, use a full-precision format such as ``"ES24.15E3"``, because the usual
4-digit format cannot resolve that reduction. A deck with
Rigid6 bodies or rods is rejected at initialisation: the quasi-static reduction would hold
them at their deck pose instead of re-solving their equilibrium.
* **FAST.Farm** selects CableDyn with ``Mod_SharedMooring = 5`` for shared lines and
Expand Down
Loading
Loading