GithubHelp home page GithubHelp logo

lynx-delta / hyper_pde_1d_travelwave Goto Github PK

View Code? Open in Web Editor NEW
1.0 0.0 0.0 119 KB

Hyperbolic partial differential equation solver: visualization of 1-dimensional travelling wave (for teaching purposes)

License: MIT License

Python 100.00%

hyper_pde_1d_travelwave's Introduction

hyper_pde_1d_travelwave

Hyperbolic partial differential equation solver: visualization of 1-dimensional travelling wave (for teaching purposes)

Wave Equation with Non-constant Wavespeed

The scripts in this repository are used to solve and visualize the hyperbolic Partial Differential Equation (PDE) governing the motion of a tsunami (or similar) in the open ocean, in the case of a variable height seabed:

Wave equation with non-constant wavespeed

with u(x, t) the non-dimensional sea surface height and h(x) the non-dimensional still-water height (see figure below).

Sea surface and still-water height

The initiation of the tsunami (e.g. a subsea earthquake) can be modelled by the initial displacement

Initiation of tsunami

centered at x1, with (additional) sea surface height α1 and spread σ1. The subsea hill (or depression) is modelled as

Subsea hill

with the center at xB, the elevation αB and the spread σB. To model infinite spatial domains, an open boundary at x = 0 respectively at x = L given by the condition

Open boundary

is implemented.

Solution and Visualization

The hyperbolic PDE is solved employing finite difference methods. To model, solve and visualize the hyperbolic PDE for time t, use the files pde_hyper_1Dtravelwave.py and pde_DEMO_1Dtravelwave.py.

Solution for time t

For an animated solution, use file pde_hyper_1Dtravelwave_anim.py (pde_hyper_1Dtravelwave.py is imported and used for solving the PDE for a certain time frame).

hyper_pde_1d_travelwave's People

Contributors

lynx-delta avatar

Stargazers

周明玉 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.