Coder Social home page Coder Social logo

dflo's Introduction

dflo

Discontinuous Galerkin solver for compressible flows. Some features of the code are

  • cartesian and quadrilateral cells
  • Qk basis: nodal Lagrange polynomials on Gauss points
  • Pk basis: Legendre polynomials
  • TVB limiter
  • Positivity preserving limiter
  • Flux functions: Lax-Friedrichs, Roe, HLLC, KFVS

###Getting dflo

git clone https://github.com/cpraveen/dflo

To compile code in "src"

You have to first compile deal.II with Trilinos library, UMFPACK, threads. Serial versions of these libraries are sufficient since the code in "src" is a serial code.

  • cd dflo/src
  • You must set the variable DEAL_II_DIR to your deal.II installation directory. It is good to set this in your bashrc file.
  • cmake .
  • make

By default, this compiles a DEBUG version of the code which is good for code development but runs very slowly. In order to compile optimized version, do

make release

To compile code in "src-mpi"

This is the mpi version which uses p4est. So you must install p4est and compile deal.II with p4est support. It does not require trilinos.

To install p4est, see this page

https://www.dealii.org/developer/external-libs/p4est.html

Obtain latest version of deal.II from github

git clone https://github.com/dealii/dealii

Change into dealii directory

cd dealii
mkdir build
cd build

Configure deal.II. A basic setup is given in the file dealii_mpi.sh. Just run this inside build directory

./dealii_mpi.sh

Now compile deal.II and install it

make all
make install

After this you can compile dflo.

Running the code

Many test cases are included in the examples directory. In most examples, a geo file is provided to generate the mesh. You need Gmsh to generate the mesh as follows

gmsh -2 grid.geo

Then run dflo

dflo input.prm

Some parts of dflo are parallelized with threads. You can specify number of threads to use while starting dflo

dflo input.prm 4

which will run with 4 threads.

To run the mpi version, do

mpirun -np 4 dflo input.prm

dflo's People

Contributors

cpraveen avatar juanpablogallego avatar

Stargazers

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

dflo's Issues

Include path not correct

The include path in source files are not correct. So the CMake generated make file will not work.
For example, inside src/assemble_explicit.cc, the include statement reads

#include <base/quadrature_lib.h>

which should be

#include <deal.II/base/quadrature_lib.h>

Make the code 3-d

Some parts of code like limiter, numerical flux (some of them), etc. are written only for 2-d case.

src_gll: potential can be precomputed

With gravity, potential can be computed and stored as an FE vector rather than recompute every time. update_q_points can then be removed from cell assembly.

scr_mpi runtime error in dealii::FEValuesBase<dim, spacedim>::get_quadrature_points()

Hello,

when running dflo (built against deal.ii >=8.3) from src_mpi, and after fixing external_force function parser initialization, I get a runtime error:

An error occurred in line <4373> of file </home/pkestene/local/dealii_4_dflo/include/deal.II/fe/fe_values.h> in function
const std::vectordealii::Point& dealii::FEValuesBase<dim, spacedim>::get_quadrature_points() const [with int dim = 2; int spacedim = 2]
The violated condition was:
this->update_flags & update_quadrature_points
The name and call sequence of the exception was:
ExcAccessToUninitializedField("update_quadrature_points")
Additional Information:
You are requesting information from an FEValues/FEFaceValues/FESubfaceValues object for which this kind of information has not been computed. What information these objects compute is determined by the update_* flags you pass to the constructor. Here, the operation you are attempting requires the <update_quadrature_points> flag to be set, but it was apparently not specified upon construction.

Following what is done in src, if I add the requested flag, everything seems OK.
I'll place a pull request for that. Please ignore if you can fix this otherwise.

best regards,
Pierre Kestener.

Can this solver solve problems on non-cartesian mesh?

I tested with the naca0012 mesh but found the solution not satisfactory. Is it because this code can not apply to non-cartesian mesh yet ? If I want to add this feature, which part of the code should I modify?

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.