Code Monkey home page Code Monkey logo

paddlescience's Introduction

Current version of PaddleScience is v0.1.

Introduction

PaddleScience extends the PaddlePaddle framework with reusable software components for developing novel scientific computing applications. Such new applications include Physics-informed Machine Learning, neural network based PDE solvers, machine learning for CFD, and so on. PaddleScience is currently under active development. Its design is evolving and its APIs are subject to change.

Core features and organization

PaddleScience currently focuses on the PINNs model. The core components are as follows.

  • Geometry, a declarative interface for defining the geometric domain. Automatic discretization is supported

  • Neural net, currently supporting fully connected layers with customizable size and depth.

  • PDE, delineating partial differential equations in symbolic forms. Specific PDEs derive the the base PDE class. Two native PDEs are currently included: Laplace2d and NavierStokes2d.

  • Loss, defining what exact penalties are enforced during the training process. By default, the L2 loss is applied. In the current design, the total loss is a weighted sum of three parts, the equation loss, the boundary condition loss and the initial condition loss.

  • Optimizer, specifying which optimizer to use for training. Adam is the default option. More optimizers, such as BFGS, will be available in the future.

  • Solver, managing the training process given the training data in a batchly fashion.

  • Visualization, an easy access to the graph drawing utilities.

The component organization is illustrated in the following figure.

image

Getting started

Prerequisites:

Hardware requirements: NVIDIA GPU V100, NVIDIA GPU A100

Package dependencies: paddle, matplotlib, vtk.

PaddleScience currently relies on new features of the Paddle framework so please be advised to download the latest version of Paddle on GitHub or on Gitee.

For more details on installation, please refer to the offical PaddlePaddle repository on GitHub or PaddlePaddle repository on Gitee.

Download and environment setup

Download from GitHub: git clone [email protected]:PaddlePaddle/PaddleScience.git
Download from Gitee:  git clone [email protected]:paddlepaddle/PaddleScience.git

cd PaddleScience
export PYTHONPATH=$PWD:$PYTHONPATH

Run examples

Some simple examples are baked in for quick demonstration. Please find them in the examples directory. To run an example, just enter the subdirectory and run the demo code in Python commandline.

cd examples/laplace2d
python3.7 laplace2d.py

cd examples/darcy2d
python3.7 darcy2d.py

cd examples/ldc2d
python3.7 ldc2d.py

Short tutorials on how to construct and solve a PINN model

A tutorial on Lid Driven Cavity flow

A tutorial on Darcy flow in porous medium

paddlescience's People

Contributors

xingfeng01 avatar liu-xiandong avatar levi131 avatar shjnt avatar xym-1 avatar wadefelix avatar tongxin avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.