Skip to content

Simulating Incompressible Flow with Physics-Informed Neural Networks

License

Notifications You must be signed in to change notification settings

s9latimm/pinnse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f1a30db · Oct 28, 2024

History

96 Commits
Oct 20, 2024
Oct 28, 2024
Oct 28, 2024
Oct 28, 2024
Sep 29, 2024
Oct 28, 2024
Oct 16, 2024
Oct 20, 2024
Oct 11, 2024
Oct 16, 2024
Oct 11, 2024
Oct 28, 2024
Oct 28, 2024
Oct 16, 2024

Repository files navigation

                   _   _______ ______
    ____  __ ___  / | / / ___// ____/
   / __ \/ / __ \/  |/ /\__ \/ __/   
  / /_/ / / / / / /|  /___/ / /___   
 / .___/_/_/ /_/_/ |_//____/_____/   
/_/                                  

Build (master) Build (develop)

UML

UML

Setup

Virtual Environment

Windows (Powershell)

$ python -m venv .venv
$ .\.activate.ps1

Linux

$ python -m venv .venv
$ source ./venv/bin/activate

Dependencies

$ python -m pip install --upgrade pip
$ python -m pip install wheel
$ python -m pip install torch --index-url https://download.pytorch.org/whl/cu124
$ python -m pip install -r requirements.txt

Usage

usage: nse [-h] -E {empty,step,slalom,block,slit,cylinder,wing} [--inlet <u>] [--nu <nu>] [--rho <rho>] [--id <id>] [-N <train>] [-L <layers>] [-D {cpu,cuda}] [--supervised] [--dry] [-P] [-F] [-G] [-R]

options:
  -h, --help            show this help message and exit
  -L <layers>           size of layers seperated by colon (default: 100:100:100)

initialization:
  -E {empty,step,slalom,block,slit,cylinder,wing}
                        choose experiment
  --inlet <u>           set intake (default: 1.0)
  --nu <nu>             set viscosity (default: 0.1)
  --rho <rho>           set density (default: 1.0)

optimization:
  --id <id>             identifier / prefix for output directory (default: timestamp, example: 2024-10-28_09-26-09)
  -N <train>            number of optimization steps (default: 0)
  -D {cpu,cuda}         device used for training (default: cpu)
  --supervised          set training method to supervised approach (requires -F)
  --dry                 dry run

output:
  -P                    plot NSE in output directory
  -F                    initialize OpenFOAM experiment
  -G                    grade prediction (requires -F and -P)
  -R                    plot NSE with high resolution grid in output directory (requires -P)

Examples

$ python -m src.nse -E step --inlet 5 --nu .08 -N 100
$ python -m src.nse -E wing --id wing -L 100:100:100:100 --inlet 1 --nu .01 -D cuda -PRFGN 30000
$ python -m src.nse -E block

References

About

Simulating Incompressible Flow with Physics-Informed Neural Networks

Resources

License

Stars

Watchers

Forks