Giter Site home page Giter Site logo

lkampoli / freecappuccino Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nikola-m/freecappuccino

0.0 1.0 0.0 28.2 MB

A three-dimensional unstructured finite volume code for fluid flow simulations.

License: GNU General Public License v3.0

Makefile 0.69% Fortran 98.66% C++ 0.54% GLSL 0.11%

freecappuccino's Introduction

freeCappuccino

The freeCappuccino is a three-dimensional fully unstructured finite volume code for Computational Fluid Dynamics which comes in serial and parallel version.

Moreover, freeCappuccino is a fortran library for manipulation of discrete tensor fields, defined over polyhedral meshes.

Name 'Cappuccino' encapsulates the idea that it is CAFFA (Computer Aided Fluid Flow Analysis) with some FOAM (Field Operation and Manipulation).

freeCappuccino is free both as a free coffee and as free speech.

         MM          MMM
        NMN.           MM
       MMM..   OMM.    MMM.
      .MMO.    MMM      MMM                         ...
      MMM:     MMM      MMM                       .. .?DMD7..
      MMM      MMM      MMM                      ..MMMMMMMMMMM~
      MMM:     .M       MMM.                    .NMMMMMMMMMMMMMM
      .MMM     .M.     .MMM.    ... .?MMMMM .. .MMMMMMMMMMMMMMMMM
       MMM.    .M .    MMM. ....MMMMMMMMMMMM$..MMMMMM?     .7MMMMM.
          MM.  M  M   MM  ..MMMMMMM~.. .MMMMM7MMMMMM.        7MMMMN
                        =MMMMMM7..  ..MMM.MMMMMMMMM+         .MMMMM.
                     DMMMMMD..  . . MMMM. .MMMMMMMM.        ..MMMMM.
                ..=MMMMMZ.     ...MMMM      MMMMMMMI.        .MMMM$.
                MMMMM8.   ..  .NMMMM..      :MMMMMMM         :MMMM.
             :MMMMM.......  ~MMMMN           MMMMMMMMO.      MMMM+
         . ?MMMM:. ....  ,MMMMM              .MMMMMMMMM.    :MMMM.
       ..IMMMM  .  .  =MMMMMI                ..MMMMMMMM.    MMMM=
       .MMMM. .... DMMMMM?                     8MMMMM=     NMMMM
      +MMM.   .~MMMMMM~                        .MMMM.     ,MMMM.
     ~MM?.~MMMMMMM$                              MMMD    .MMMMM
    .DMMMMMMM$                                   MMMM.  .MMMMM
     .MMMM.                                      .MMMN..MMMMM,
     ..MMMM.                                     .MMMM.MMMMMM
       =MMMZ..   .=. ..         ..      =. ,:     .MMMMMMMMM
       .MMMM~..  7  .MM.M   M   MM.    M.  ..  M  .MMMMMMMM+
         MMMM....Z. .MM.M...M...MM..O:.  M . ~.M...ZMMMMMMM
          MMMM,. ., :  ,:   :  :  :    .,  ,,  ,  . MMMMMMM
           MMMM7. ..................................MMMMMM
            MMMM8 ..................................MMMMMM
             NMMMM  ................................MMMMD
              7MMMM ............................... MMMM
                MMMMO............................. :MMM
                 MMMMM..............................MMM
                   MMMMM..........................MMMMM
                    ZMMMMD.......................MMMMM
                      MMMMMM.................. MMMMM
                        MMMMMM. ............OMMMMMZ
                          NMMMMM8.......=MMMMMMMI
                            =MMMMMMMMMMMMMMMMM
                               NMMMMMMMMMM

Introduction

The purpose of the code is to enable experimentation in discretizations and mathematical models. Therefore we have included many discretization options and we are in the process of implementation of many turbulence models and scalar equations for different variables.

The code is based on the reference:

N Mirkov, B Rašuo, S Kenjereš, On the improved finite volume procedure for simulation of turbulent flows over real complex terrains, Journal of Computational Physics, Vol. 297 (2015), pp.18-45.

The code allows meshes in OpenFOAM® polyMesh format. Only slight changes are necessary in the 'boundary' file.

Discretized equations are written in CSR (Compressed Sparse Row) format, which allows easy interface with many linear solver libraries, such as LIS. Also, one can use linear solvers provided in the code such as, Incomplete Cholesky Conjugate Gradient (ICCG), ILU(0) preconditioned Bi-Conjugate Gradient Stabilised method for non-symmetric systems, etc.

Requirements

The code is written in modern fortran, so you will need fortran compiler (e.g. gfortran). Code may be built to use external library for solution of sparse linear systems LIS or be used without it, just using built in linear solvers.

Getting started

Clone the git repository or download the zip archive of the most recent source, compile and build the code, and checkout the examples such as the lid-driven cavity, Pitz-Daily backward facing step, channel, and many more to come.

Basic sequence of commands to get started:

Compile.

cd src
make

Update PATH environment variable to point to point to bin/ subfolder.

cd ~
gedit .bashrc

Add following line at the end of .bashrc file.

export PATH=/where/is/it/freeCappuccino/bin/:$PATH

Move to example case folder.

cd ../examples/cavity/

Unpack the archive with mesh and initial conditions.

tar -zxvf cavity-setup.tar.gz

Check input file using text editor, and make changes if needed.

gedit input

Run simulation script.

./run

During and after run, you can plot residuals.

gnuplot plotResiduals

Open results files in Paraview. Results are in VTK-date-time folder.

paraview

You can skip this for provided examples but in general when working with meshes in polyMesh format you need to create cell conectivity. Cell connectvity data is found in polyMesh/cells file, which is needed to write .vtu files during the run.

Compile cellConnectivity utility program.

cd utilities
make

Before you run the simulation, run cellConnectivity.

cd /location/of/case/folder
cellConnectivity

Have fun!

alt tag alt tag

License

The code is published under GNU General Public License v3.0.

Tribute section

This section tributes some open source CFD developers

alt tag

Andrei Chernousov and his cluster circa 2001.

alt tag

Henry Weller and writing papers.

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.