Skip to content

NoiseLabUCSD/OceanPINN

 
 

Repository files navigation

OceanPINN

This repository contains the codes of paper: Predicting ocean pressure field with a physics-informed neural network

Requirements

implemented in cuda 12.2
python 3.9.13
Tensorflow 2.10.0

Usage

The workflow is as follows:

  1. Make the training data (.mat format).
  2. Set the parameters in parameter.json.
  3. Execute the main code.
  4. Generate the pressure field with trained PINN.
  5. Load the PINN-generated data and plot the results.

Details for each procedure:

1. Training data
format: .mat files
Include serveral variables:

  • r: Sampled range
  • z: Sampled depth
  • p_pe_abs : Sampled envelope magnitude
  • f: Frequency
  • SSP_save: Sound speed profile
  • dep_save: Corresponding depth for sound speed profile

For simulation in the SWellEx-96 environmet as the paper, you can use codes in the 'Kraken simulation' folder (requires kraken installed). The simulation data used in the paper is available in the 'data' folder for reference.

2. parameter.json
Includes parameters for training OceanPINN:

  • data_name: training data file name (.mat format)
  • lr : learning rate
  • max_iter : maximum number of iterations
  • num_col: number of collocation points
  • bnd_num: number of boundary points
  • r_bnd : lower and upper bound of range (to sample collocation points)
  • z_bnd : lower and upper bound of depth (to sample collocation points)
  • num_r_test : number of range samples in generated field (for test in the last iteration)
  • num_z_test : number of depth samples in generated field (for test in the last iteration)
  • r_test : lower and upper bound of range for generated field after training (for test in the last iteration)
  • z_test : lower and upper bound of depth for generated field after training (for test in the last iteration)
  • L : Loss weight coefficient for PDE loss
  • seed : random seed
  • kind : Hankel First (1) or Second (2) depend on sign of Fourier transform
  • net_type : If "dnn", it is not pretrained. If you specify the pretrained model name, it is loaded.

3. Main code
Use main.py or Main_jup.ipynb (Same code) to train PINN.

4. Code to generate pressure field with trained PINN
Use Test_PINN.ipynb to generate a pressure field with trained PINN.

5. Example case from the paper
Trained PINN model for SWellEx-96 simulation in noiseless condition is included in 'p_109_noiseless' Folder.
The generated pressure field can be read using 'Load_PINN_results.m' in 'Plot results' folder.
'hotAndCold.mat' is colormap from NoiseLab, thanks to Peter Gerstoft.

Citation

@article{yoon2024predicting,
  title={Predicting ocean pressure field with a physics-informed neural network},
  author={Yoon, Seunghyun and Park, Yongsung and Gerstoft, Peter and Seong, Woojae},
  journal={The Journal of the Acoustical Society of America},
  volume={155},
  number={3},
  pages={2037--2049},
  year={2024}
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 58.9%
  • Python 29.7%
  • MATLAB 11.4%