Git Product home page Git Product logo

ug2lib's Introduction

A library for handling 2-D unstructured grids

At present the library supports reading only gmsh grids consisting of linear elements of triangles and quadrilaterals. The mesh can consist of both types of cells. It uses the older version of Gmsh grid format, so set

Mesh.MshFileVersion = 2.2;

in your geo file. Or specify the format on the command line

gmsh -2 -format msh22 foo.geo -o foo.msh
  • src/main.cc : test grid preprocessor
  • src/ccfv1.cc: first order FV code
  • src/ccfv2.cc: second order FV code

Test the grid preprocessor

cd src
make
cd ../tests
gmsh -2 cylinder.geo
../src/main

See the output files cylinder.vtk and test_msh.msh.

visit -o cylinder.vtk
gmsh test_msh.msh

Test first order FV code: src/ccfv1.cc

cd tests
gmsh -2 square_tri.geo -o ccfv1.msh
../src/ccfv1
visit -o sol*.vtk

Test second order FV code: src/ccfv2.cc

This code reads some parameters from an input file, see tests/input.txt file.

Formatting using astyle

Run astyle on source code before committing it

astyle --options=./astyle.rc grid.cc

References

To understand the methods used in this code, you can refer to the following two books.

  • Rainald Lohner: Applied Computational Fluid Dynamics Techniques
  • Jiri Blazek: Computational Fluid Dynamics

Authors

  • Shashwat Tiwari
  • Praveen Chandrashekar

ug2lib's People

Contributors

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