Giter Club home page Giter Club logo

multiphysics's Introduction

MATH 0471: Multiphysics integrated computational project

Build Status Maintenance

Description

This repository contains the implementation of the Discontinuous Galerkin method (DG) applied to systems of possibly coupled non-linear hyperbolic equations, i.e. to physical conservative systems. The geometry is currently assumed to be two-dimensional. The targeted physical application was chosen to be the shallow water equations, but any new system of equations can easily be implemented, by adding new physical fluxes or sources.

The time-integration process is explicit, and uses Runge-Kutta algorithms, up to the fourth order. The mesh is handled using Gmsh, and Eigen is used for the linear algebra operations. Please note that edges of the elements in the mesh are assumed to be straight.

The code is currently parallized locally using OpenMP, such that it can be run on HPC clusters.

This project was part of the 2018-2019 Multiphysics integrated computational project course. Here is a link of the problem statement. The authors are ImperatorS79, tgregov and jmarichal.

Useful information

Some useful information can be found on the wiki. In particular, a small (uncomplete) description of the physical parameters that can be introduced in the context of the shallow water equations is provided.

Compilation procedure

The project use CMake to manage the build system. The run directory contains some predefined configuration for various platforms.

Do not forget to install the Gmsh 4.4.0 SDK as well as the Eigen 3.3.7 SDK on your system.

On NIC4/VEGA

Connect to NIC4/VEGA (using SSH for instance). Then, clone the repositoy:

git clone https://github.com/tgregov/Multiphysics

Move to the code repository:

cd ./Multiphysics

Automatically build the code (<cluster> is either vega or nic4):

. ./build_cluster.sh <cluster>

Submit a batch file for one of the simulations

cd ../simulations
sbatch runObstacleSquare.sh

multiphysics's People

Contributors

imperators79 avatar jmarichal avatar tgregov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

multiphysics's Issues

Structure to contain all the "geometric" information + computation of normals

Construct a structure that will contain:

  • elements tags
  • edges tags
  • link between the edges and the elements
  • normal associated to each edge & sign (for the elements)
  • maybe integration related variables, e.g. Gauss points, jacobians etc
    All this should be done in a clear way that allows to easily understand how data is handled + the link between those variables

Computation of fluxes gx gy in the no BC case

Probably a non-initialized vector or a problem for the index of a vector
File builFlux.cpp, around line 140:

gx[j] = -(factor*fx[element.offsetInU + j] + fx[frontOffsetInU + frontJ])/2 - C*element.edges[s].normal.first*(u[element.offsetInU + j] - valueAtBC())/2;
gy[j] = -(factor*fy[element.offsetInU + j] + fy[frontOffsetInU + frontJ])/2 - C*element.edges[s].normal.second*(u[element.offsetInU + j] - u[frontOffsetInU + frontJ])/2;

Time integration

Implementation of a time integration solver for an equation of the type
du/dt = F(u(t)), where F depends on [M]^{-1} (i.e. matrices operations should be efficient). At least two types of solver:

  • a simple forward explicit Euler method
  • a Runge-Kutta method of order 4

Test on NIC4

Test on NIC4:

  • git
  • gmsh
  • CMake
  • execute a first code

First gmsh file

Create a simple 2D mesh file that could be used for the first tests

OpenMP, scaling and convergence

Tests with different:

  • number of elements
  • number of GP
  • order of SF
  • mesh size
  • time step
  • physical problem (scalar linear flux, linearized wave equations, ...)

Refactor code

The code clearly needs to be cleaned and refactored, especially the readMesh function and the MeshParams structure. Some ideas:

  • "Split" MeshParams into substructure to avoid using vector of vector of vector...
  • Check if they are unneeded operations in readMesh, or if it could be split.
  • Use OOP (class, ...)

Edges list

Count the list of edges so that they can be used for the future code (+ connected elements)

Linear algebra operations

Basic linear algebra operations should be handled easily, most particularly:

  • storage of large matrices/vectors
  • inversion of a block-diagonal matrix
  • matrix-vector multiplication
    using an external library, most probably Eigen

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.