To use this repository, it is recommended to create an environment using the "requirements.txt" file provided. If not, you will need to install Capytaine (https://capytaine.github.io/stable/) and potentially other python packages. Regardless, you will need to install SWAN software (https://gitlab.tudelft.nl/citg/wavemodels/swan) if you want to run the SWAN files (in "swan" folder and "run_all" folder).
This code finds the transmission (Kt) and reflection coefficients (Kr) for different wave energy converter archetypes and computes wave height reduction as a function of distance from the device. The devices modeled in this code are:
- Heaving Point Absorber Wave Energy Converter
- Oscillating Surge Wave Energy Converter
- Attenuator Wave Energy Converter
- Floating Breakwater
The transmission and reflection coefficients are calculated in the "hydro" folder using the "run_coeffs.py" script. More details are found in the folder README.md file. The SWAN command file is generated in the "swan" folder. To alter the input commands, see the SWAN documentation (linked above) for details on their functions. The using the "big_run.py" script in the "run_all" folder will do all of the following:
- Generate the floating body of your choice
- Solve the hydrodynamics of the floating body and the surrounding wave elevation
- Compute the transmission and reflection coefficients for each body
- Input those coefficients as obstacles in a SWAN simulation
- Compute the wave height on the computational grid due to said obstacles
- Save the wave height data as a .csv file and generate a contour plot