Git Product home page Git Product logo

2steprichtpyer's Introduction

2stepRichtPyer

Bachelor Thesis Structure preserving Lax-Wendroff schemes for low Mach number flows from Jonas Bachmann.

Setup

Simply execute pip install -e . to set up the project. For storing trajectories instead of keeping them in memory, FFmpeg is required.

Usage

Example usage of evolving the Euler equations in 2D with the linearized solutions from 1D (Euler.waves).

from src.PDE_Types import Euler
from src.plotter import Plotter
from src.richtmyer_two_step_scheme import Richtmyer2step
from src.two_step_richtmyer_util import Dimension
import numpy as np

DIM = Dimension.twoD
PDE = Euler(gamma=5. / 3, dim=DIM)

resolution = np.array([100, 100])

Lx = 1
Ly = 1
stepper = Richtmyer2step(PDE, np.array([Lx, Ly]), resolution)

initial_condition = PDE.waves(0, np.array([1, 1, 1]), amp=1e-3)
stepper.initial_cond(initial_condition)

plotter = Plotter(PDE, action="show", writeout=10, dim=stepper.dim)

stepper.step_for(1., callback=lambda S: plotter.write(stepper.grid_no_ghost))

plotter.finalize()

License

MIT

2steprichtpyer's People

Contributors

0xbachmann avatar karoger avatar

Watchers

 avatar  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.