OffarmLab is a minimal MATLAB-based simulation framework for offshore and marine applications, focusing on hydrodynamic analysis and environmental load simulations.
The current configuration file in usr0 is tested for user specific working path, the project inside is related to an academical concept--An array of semi-sub fish farming cages.

A Sobol indice based global sensitivity analysis is performed based on this package of code. The paper is under review and the relevant project code will be provided later.
This toolbox provides a comprehensive set of tools for:
- Wave field simulation and analysis
- Hydrodynamic force calculations
- Static cable analysis
- Environmental load modeling
- Numerical integration methods
- Visualization utilities
offarmLab/
├── forces/ # Force calculation modules
├── hydros/ # Hydrodynamic analysis tools
├── integrates/ # Numerical integration solvers
├── io/ # Input/output utilities
├── staticCables/ # Static cable analysis
├── tests/ # Test suite
├── usr0/ # User configuration and input files
├── utils/ # Utility functions
├── viz/ # Visualization tools
└── waves/ # Wave field analysis
- MATLAB (version requirements TBD)
- MATLAB Parallel Computing Toolbox (for parallel simulations)
- Clone this repository to your local machine
- Add the project to your MATLAB path by running:
addpath("/path/to/offarmLab");
initOffarmLab();% Initialize paths
initOffarmLab();
% Set up simulation parameters
file_inp = 'usr0/INPUT_manifest.json';
resultsPre = struct();
resultsPre.nCase = 1;
resultsPre.batchCasesID = 1;
resultsPre.caseMatrix = [5, 11, 0.5, 0, 0]; % [Hs, Tp, Uc1, waveDir, currentDir]
resultsPre.savingDir = 'results';
% Run simulation
simOffarm(file_inp, resultsPre);The framework supports parallel processing for multiple simulation cases:
% Set up parallel cluster
cluster = parcluster();
numWorkers = 4;
cluster.NumWorkers = numWorkers;
% Configure batch processing
numCases = resultsPre.nCase;
casePerJob = 100;
numJobs = ceil(numCases/casePerJob);- Wave spectrum generation
- Regular and irregular wave modeling
- Directional spreading functions
- Current forces
- Wave forces
- Drag calculations
- Mooring forces
- RK4 solver
- Verlet integration
- Custom solvers for specific applications
- System display utilities
- Wave animation tools
- Custom color maps (Blues, Reds)
- 3D rotation utilities
The framework uses JSON configuration files for:
- System configuration
- Line types
- Environmental conditions
- Simulation parameters
Key configuration files are stored in the usr0/ directory.
Please refer to the project's contribution guidelines (TBD) for details on how to contribute to this project.
TBD
For questions and support, please contact the project maintainers (contact information TBD).
