Code Monkey home page Code Monkey logo

tma4220_project_1's Introduction

TMA4220 Project 1 Build Status

We present our solution to project 1 in the course TMA4220 at NTNU Trondheim in autumn semester 2018. The code impelements all required components to solve simple evolutionary and static PDEs in 2D on a triangular mesh. In particular, we implemented a solver for the Helmholtz problem and the homogenous unsteady heat equation. A third solver extends the dynamic solver to cope with the homogenous wave equoation in 2D. Solution to the Helmholtz problem

Installation

The program is written in Python 3. The installation is shown via pip.

Requirements

Additional requirements are listed in the setup.py and requirements.txt, namely

  • scipy
  • matplotlib
  • numpy
  • tqdm

With pip these packages can be installed by using $ pip install -r requirements.txt. We recommend to create a new virtual environment using venv. Afterwards, install the project using pip: $ pip install -e /path/to/parent/folder/of/setup.py. Now, the main file of the project can be executed by navigating into project_1 and executing $ python main.py.

Execution

The program is started by executing the main file located in the root. Without any arguments passed, the software will calculate and plot the solution to the Helmholtz problem.

Arguments

  • -v Visualizes the analytical solution of the Helmholtz problem for debugging the basic functionality of the vis functions.
  • -vd Visualizes the analytical solution of the time dependant problem for debugging.
  • -m Generates and plots a triangular mesh for debugging.
  • -s Solves the Helmholtz problem and plots the solution
  • -sd Solves the unsteady heat equation and generates an animation of the solution as well as a picture of the final frame. Video of the solution
  • -w Solves the 2D wave equation and generates an animation
  • -r Genaterates the required plots for the report, including the error analysis

Testing

Several unittests are defined in project_1/tests/test.py. The can be invoked by calling $ python test.py after navigating in the correct folder.

tma4220_project_1's People

Contributors

sieversleon avatar

Watchers

 avatar  avatar

tma4220_project_1's Issues

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.