Coder Social home page Coder Social logo

tlab's Introduction

Tlab

Tools to simulate and analyze 2D and 3D turbulent flows. The numerical schemes are based on compact finite differences and Runge-Kutta methods. Meshes are structured and can be nonuniform. There are two possible simulation modes, namely, temporally evolving flows and spatially evolving flows. This mode defines statistically homogeneous variables and the calculation of statistical properties, and it partly defines the boundary conditions. The code implements a hybrid parallelization: MPI for a domain decomposition in the first and third directions, and OpenMPI in big loops.

Some examples of applications can be found in this website.

See doc/manual.pdf for more information.

Install

In order to compile the code, run the following commands:

cd ${PATH_TO_TLAB}
mkdir build
cd build
cmake ../src -DSYST={mpipc,juqueen,...} -DBUILD_TYPE={BIG,LITTLE,PARALLEL,NONBLOCKING}
make

Instead of mpipc or juqueen, you have to use the corresponding file from the directory ${PATH_TO_TLAB}/config

You can also run ./configure.sh, which would create the different build_* directories automatically for your system if appropriately set up.

To clean the tree, simply delete the directories build*

Prerequisites

  • cmake
  • fortran compiler
  • FFTW
  • Optionally, NetCDF for statistical data.

Check

In order to check the code, run the following commands:

cd ${PATH_TO_DNS}
cd examples
make check BINS_PATH=${bins_LITTLE,bins_BIG,...} PRJS=${Case01,Case02,...}

Instead of bins_LITTLE or bins_BIG, use the corresponding directory whose executables you want to check.

If the variable PRJS is not passed, all projects in the directory examples will be checked.

To clean the examples tree, run make clean.

Use valgrind to check for memory leaks.

Run

See directory examples.

Directory organization

  • config: configuration files for different architectures and compilers
  • doc: documentation files
  • examples: sample cases for reference and for debugging
  • scripts: shell and python scripts for job management and postprocessing
  • src: source files
    • src/tools: executables
    • src/mappings: modules with mappings from 3D fields to 3D, 2D and 1D data
    • src/operators: modules with operators that depend only on fdm routines
    • src/fdm: modules with finite difference schemes
    • src/utils: modules with basic generic operators
    • src/modules: constants, variables, arrays and basic procedures
    • ...

Library dependencies

tools → mappings → operators → {fdm,filter,io,thermo,utils} → tlab

Data structure

Restart files

  • IEEE double precision floating point representation
  • Sequential access mode
  • Unformatted records
  • Endianness determined in the compiler options
  • No record length information: first 4-bytes are an integer pointing to the field array after the header

Arrays

  • The inner-most index is the first (streamwise) direction
  • The outer-most index is the third (spanwise) direction
  • MPI domain decomposition in these two directions

tlab's People

Contributors

jkostelecky avatar jpmellado avatar katherine-fodor avatar shreyas995 avatar zrick 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

Watchers

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

tlab's Issues

compiler version for install

Thank you for making the code available. I just wonder if the authors can kindly share the compiler version/environment that has been tested, so that we can follow.
I was trying to compile the code on my personal Linux computer, everything is okay for the serial version, but one type of issue (Program received signal SIGFPE: Floating-point exception) always occurs when parallel is enabled. I was using "archlinux.cmake" with fortran version 10/11 on Ubuntu 20/22, and tried both openmpi and mpich. I also noticed a few warnings only when compiling the parallel version. Hopefully someone can help. Thanks again!

Bug: inigrid.x gives Floating-point exception

I compiled the master branch with the file uhhpc, and changed only the DEBUG flags:

set(USER_Fortran_FLAGS_DEBUG "-O0 -p -ggdb -Wall -fbacktrace -ffpe-trap=invalid,zero,overflow,underflow,precision,denormal")
#set(USER_Fortran_FLAGS_DEBUG "-O0 -ggdb -Wall -fbacktrace -fconvert=little-endian -fallow-argument-mismatch -ffpe-trap=invalid,zero,overflow")

If I use this setup, the grid doesn't get initialized with the test case Case05. (inigrid.x), but instead gives an error

Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

Backtrace for this error:
#0  0x7fc04b8098c2 in ???
#1  0x7fc04b808a55 in ???
#2  0x7fc04b47096f in ???
	at /build/glibc-6iIyft/glibc-2.28/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
#3  0x406f19 in inigrid
	at /home/zmaw/u234116/Coding/tlab/src/tools/initialize/grid/grid_main.f90:65
#4  0x409f2f in main
	at /home/zmaw/u234116/Coding/tlab/src/tools/initialize/grid/grid_main.f90:7
Floating point exception

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.