A comprehensive Python library designed for the Floating and Submerged Structures course at TU Delft. This library provides essential tools for marine and ocean engineering calculations, including linear wave theory, structural beam analysis, mooring systems, and wave spectrum processing.
- Linear Wave Theory: Dispersion relations, wave length calculations, and 2D linear wave analysis
- Wave Spectrum Processing: Comprehensive spectral analysis tools for irregular waves
- FFT-based Signal Processing: Single-sided spectrum computation and frequency domain analysis
- Beam Matrices: Mass, stiffness, and damping matrices for both 2D and 3D beam elements
- Finite Element Support: Essential matrices for structural dynamics of marine structures
- Catenary Analysis: Mooring line calculations with extensible cable dynamics
- Static Analysis: Position and tension calculations for mooring systems
- Physical Constants: Standard marine engineering constants (gravity, water density, etc.)
- Optimization Tools: Integrated scipy-based solvers for engineering problems
- Python 3.7 or higher
- Required dependencies: numpy, scipy, ipykernel
git clone https://github.com/CMOE-TUDelft/FSSLibrary.git
cd FSSLibrary
python -m pip install -e .python -m pip install -r requirements.txtimport FSSLibrary as fss
import numpy as np
# Linear wave analysis
wave = fss.LinearWave.LinearWave2D(d=50.0, T=8.0, H=2.0)
print(f"Wave length: {wave.L:.2f} m")
# Wave spectrum processing
fs = 10.0 # Sampling frequency
signal = np.random.randn(1024) # Example signal
f, amp, psd = fss.FFTBasic.get_single_sided_spectrum(signal, fs)
# Access physical constants
print(f"Gravity: {fss.Constants.g} m/sยฒ")
print(f"Water density: {fss.Constants.rhoW} kg/mยณ")| Module | Description |
|---|---|
LinearWave |
Linear wave theory, dispersion relations, 2D wave calculations |
WaveSpectrum |
Wave spectral analysis and irregular wave generation |
BeamMatrices |
2D/3D beam finite element matrices for structural analysis |
MoorLib |
Mooring line catenary analysis and calculations |
FFTBasic |
FFT-based signal processing and spectrum analysis |
Constants |
Physical constants for marine engineering |
To generate and serve the documentation locally using pdoc:
# Install pdoc if not already installed
python -m pip install pdoc
# Generate static HTML documentation
pdoc --output-dir docs/ src/FSSLibrary
# Or Generate documentation and serve on localhost
pdoc --http localhost:8080 src/FSSLibraryThe documentation will be available at http://localhost:8080 when using the second command.
Pre-built HTML documentation is available in the docs/ directory. Open docs/index.html in your browser to view the complete API documentation.
from FSSLibrary.LinearWave import getWaveLen
from FSSLibrary.Constants import g
# Calculate wave length for given conditions
depth = 50.0 # m
period = 8.0 # s
wave_length = getWaveLen(g, depth, period)
print(f"Wave length: {wave_length:.2f} m")from FSSLibrary.BeamMatrices import Beam2DMatrices
# Define beam properties
mass_per_length = 100.0 # kg/m
axial_stiffness = 1e9 # N
bending_stiffness = 1e6 # Nโ
mยฒ
node_coords = ([0, 0], [10, 0]) # Start and end coordinates
# Generate matrices
M, K, Q = Beam2DMatrices(mass_per_length, axial_stiffness,
bending_stiffness, node_coords)from FSSLibrary.MoorLib import catenary_xz
# Mooring line parameters
weight_per_meter = 50.0 # N/m
elastic_modulus = 1e8 # Pa
vertical_tension = 1000.0 # N
horizontal_tension = 800.0 # N
suspended_length = 100.0 # m
# Calculate catenary position
x, z = catenary_xz(weight_per_meter, elastic_modulus,
vertical_tension, horizontal_tension, suspended_length)This library is specifically designed for the Floating and Submerged Structures course and provides:
- Educational implementations of fundamental marine engineering concepts
- Ready-to-use functions for course assignments and projects
- Clear, documented code suitable for learning and teaching
- Integration with Jupyter notebooks for interactive analysis
FSSLibrary/
โโโ src/FSSLibrary/ # Main package source
โโโ docs/ # Pre-built documentation
โโโ requirements.txt # Dependencies
โโโ pyproject.toml # Package configuration
โโโ README.md # This file
# Run basic import test
python -c "import FSSLibrary; print('Import successful')"- Shagun Agarwal - shagun.1994@gmail.com
- Oriol Colomรฉs - j.o.colomesgene@tudelft.nl
Delft University of Technology
This project is licensed under the MIT License - see the project configuration for details.
Current version: v0.2.0
For course-related questions and support, please contact the course instructors.