Giter VIP home page Giter VIP logo

apecss's Introduction

APECSS

Issues License Latest version

APECSS is a software toolbox to compute pressure-driven bubble dynamics and the resulting acoustic emissions. It is written in C and has been developed with simplicity, versatility and performance in mind. The acronym APECSS stands for "Acoustic Pulse Emitted by Cavitation in Spherical Symmetry".

Key features of APECSS are:

  • Bubble dynamics using widely-used models (Rayleigh-Plesset, Keller-Miksis, Gilmore), solved using an in-built 5th-order Runge-Kutta scheme with adaptive time-stepping.
  • Acoustic emissions of the bubble under different assumptions (incompressible, quasi-acoustic, fully compressible).
  • Prediction of the formation and attenuation of shock fronts emitted by the bubble.
  • Viscoelastic media (Kelvin-Voigt, Zener, Oldroyd-B).
  • Lipid monolayer coating of the bubble as used for ultrasound contrast agents.
  • APECSS has no external dependencies, aside from the standard math library and some common C headers (math.h, stdio.h, stdlib.h, string.h).

For more information, please consult the JOSS paper discussing the features of APECSS as well as the PoF paper introducing the theoretical foundation.

Developers

License and Copyright

APECSS is under the copyright of its developers and made available as open-source software under the terms of the Mozilla Public License Version 2.0.

Requirements

APECSS has been developed and tested on Unix systems, using Linux and MacOS operating systems. The only mandatory requirement to compile and run APECSS is a standard C compiler, such as gcc.

Optionally, cmake (version 3.12 or higher) is required if you would like to make use of the provided compilation and test scripts. To use the provided Python scripts for visualizing the output of APECSS, Python (version 3), numpy and matplotlib are required.

Quick Start Guide

Installation

Getting started with APECSS is easy. After downloading APECSS in the directory <path to APECSS>, define the following environment variables:

  • APECSS_DIR to the directory in which APECSS is located. Using bash, for instance, simply execute the command export APECSS_DIR=<path to APECSS> or, even better, add this command to your bash profile.
  • USRLIB_DIR to the directory in which libm.a or libm.dylib (the standard math library) is located. This may, for instance, be /usr/lib64/ on Linux systems or /usr/lib/ on MacOS systems.

Now, navigate into the folder $APECSS_DIR/lib and execute ./compile_lib.sh. This shell script will compile the APECSS library using cmake with the CMakeLists.txt file provided in this folder. By default, APECSS is compiled with double precision and in Release mode, meaning all optimization flags are enabled. That's it, you've successfully compiled APECSS!

Examples

There are several ways in which you can use the APECSS library. You can either incorporate selected features of APECSS into your own software or you can program an interface to use APECSS as a standalone program. Some representative examples are given in the $APECSS_DIR/examples directory. Each directory contains the following:

  • A README.md file explaining the purpose and specificities of this/these example(s).
  • A src folder with a file called *_apecss.c that acts as the standalone interface to the APECSS library. This file contains the main() function and any additional functionality required to simulate a specific scenario.
  • A build folder containing the CMakeLists.txt file and a shell script compile.sh with which this example can be compiled using the command ./compile.sh.
  • One or several *.apecss files in which the options for a specific case are defined.
  • One or several plot_*.py Python scripts to plot the results of the example. These Python scripts require numpy and matplotlib, and plot the results into a pdf-file.
  • Some examples have a reference-data folder, which contains results of previous studies to quickly validate the overall correct working of APECSS and which are plotted alongside the results produced by APECSS using the Python script(s).

You can run all examples by executing ./run_all.sh in the examples folder. This shell script compiles, runs and plots the results of all test cases. This is a great way of testing the installation of APECSS and see what sort of results can be output and how these results may be visualized. The script also compares the results computed for a respresentative example (the Rayleigh collapse with emissions) with reference results of APECSS, checking whether the installation produces correct results. Note that run_all.sh assumes that Python can be executed using the command python3; please adjust this if necessary.

Alternatively, if you're, for instance, specifically interested in an ultrasound-driven bubble, navigate to $APECSS_DIR/examples/ultrasound. There you can find different test cases, described in more detail in the accompanying README.md. Execute the compile.sh script in the build directory. You can now choose which test case to run, by using the corresponding execution command suggested in the README.md. Also, the settings and options given by the execution command and the corresponding *.apecss file typically reproduce a case previously presented in the literature, as indicated in the README.md file.

More information about each example, how to run it and what the results might be compared to can be found in the accompanying README.md file.

Repository Structure

The APECSS repository is structured as follows:

  • The documentation folder contains a short pdf documentation of APECSS. The documentation discusses the theory behind APECSS, explains the code structure and how to use APECSS. The documentation will be amended and expanded over time.
  • The examples folder contains representative examples of how to use APECSS and to demonstrate the most important features of APECSS. A short explanation on how to run the examples is given in the Quick Start Guide above.
  • The include folder contains the apecss.h header file, in which all variables, macros and functions of APECSS are defined.
  • The lib folder in which the APECSS library is compiled (at least if you follow the Quick Start Guide above).
  • The src folder contains all source files (*.c) of APECSS.
  • The .clang-format file, which defines the formatting rules for the source code.
  • The .gitignore file telling git which folders and files to ignore.
  • The CODE_OF_CONDUCT.md file containing outlining the code of conduct for this repository.
  • The CONTRIBUTING.md file containing brief guidelines on how to contribute to APECSS.
  • The LICENSE.txt file containing the Mozilla Public License Version 2.0.
  • The README.md file is the file you are currently reading.

How to cite us

If you use APECSS for your scientific work, please consider citing the paper introducing the features and capabilities of APECSS

F. Denner and S. Schenke, APECSS: A software library for cavitation bubble dynamics and acoustic emissions. Journal of Open Source Software 8 (2023), 5435. https://doi.org/10.21105/joss.05435 

as well as the version of APECSS you've used for your work, e.g.

F. Denner and S. Schenke, APECSS (v1.2), Zenodo (2022). https://doi.org/10.5281/zenodo.7465050

All releases of APECSS and the corresponding DOIs can be found on the Zenodo page of APECSS.

Acknowledgements

The development of APECSS has directly benefitted from research funding provided by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation), grant number 441063377.

apecss's People

Contributors

fabiandenner avatar fossabot 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.