Skip to content

The simulation package for offshore multi-floater farm

Notifications You must be signed in to change notification settings

Hugo-build/OFFarmLab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OffarmLab

OffarmLab is a minimal MATLAB-based simulation framework for offshore and marine applications, focusing on hydrodynamic analysis and environmental load simulations.

The solving flow

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. The cage array

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.

Overview

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

Project Structure

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

Getting Started

Prerequisites

  • MATLAB (version requirements TBD)
  • MATLAB Parallel Computing Toolbox (for parallel simulations)

Installation

  1. Clone this repository to your local machine
  2. Add the project to your MATLAB path by running:
addpath("/path/to/offarmLab");
initOffarmLab();

Usage

Basic Simulation

% 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);

Parallel Processing

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);

Key Components

Wave Analysis

  • Wave spectrum generation
  • Regular and irregular wave modeling
  • Directional spreading functions

Force Models

  • Current forces
  • Wave forces
  • Drag calculations
  • Mooring forces

Numerical Methods

  • RK4 solver
  • Verlet integration
  • Custom solvers for specific applications

Visualization

  • System display utilities
  • Wave animation tools
  • Custom color maps (Blues, Reds)
  • 3D rotation utilities

Input/Output

The framework uses JSON configuration files for:

  • System configuration
  • Line types
  • Environmental conditions
  • Simulation parameters

Key configuration files are stored in the usr0/ directory.

Contributing

Please refer to the project's contribution guidelines (TBD) for details on how to contribute to this project.

License

TBD

Contact

For questions and support, please contact the project maintainers (contact information TBD).

About

The simulation package for offshore multi-floater farm

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages