Giter VIP home page Giter VIP logo

dsmcpp's Introduction

DSMCpp

Simple DSMC simulation code written in C++.

Building

You need C++11+ and CMake 3.12+. To build, you can run the common CMake commands from the project's root:

mkdir build && cd build
cmake ..
cmake --build .

CMake will automatically fetch and download from github the necessary dependencies using FetchContent.

Dependencies

Using the code

After building you can change the simulation parameters in the config file. To specify the path for the config file used, you can either modify the variable DEFAULT_CONFIG_PATH in the cmake file or pass the path as an argument when executing the binary:

./DSMCpp path/to/config.json

For the moment, to change some initial conditions, it is necessary to modify the code (more specifically the function void Simulation::init() in simulation.cpp) and compile it again. However in the future this will be configurable in the input file.

The output files are saved to the same directory as the binary. The output can be saved either as a .csv or .npy. By default the code saves in .npy; however, to save in .csv you can remove the NPY_OUTPUT definition from the cmake file.

Notes

  • For the moment it simulates a cartesian rectangular domain with reflective walls.
  • In the future, I will add the possibility for other geometries, boundary conditions and intial conditions.
  • I will also add the possibility of adding different run-time diagnostics and saving the output in different times.

dsmcpp's People

Contributors

luihabl avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 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.