Giter Club home page Giter Club logo

multi_aw's Introduction

multi_aw

This is the sound pressure analysis program for focused beams. This program can analyze plane waves, Bessel beams, focused beams and those superpositions.

analysis model

Usage of example code

  1. type 'make' command to compile. libpng is required.
    The executable example1.out, example2.out, example3.out are created. The example1.out is the executable of source code example1.c, it shows a simplest example and verification results using "multi_aw". The example2.out is the executable of source code example2.c, it shows a example of sound pressure and particle velocity intensity analysis. The example3.out is the executable of source code example3.c, it shows a example of outputting the instantaneous value of the sound pressure and particle velocity as an image.

  2. type './example1.out'.
    This executable calculates sound pressure and particle velocity. The beam datafile "mfb.txt" is used. This program searches for a beam datafile in the current directory using the default beam datafile name and reads the found files. The default beam datafile name is defined for plane wave as "mpw.txt", for Bessel beam as "mbb.txt", for focused beam as "mfb.txt". The samples of beam datafile are in the folder beam_sample, please copy and use.

  3. type './example2.out'.
    This executable calculates sound pressure and particle velocity intensity distributions, outputs them to text files. The I_example2.png is the visualization result of the intensity distributions, created by using Gnuplot script gscritp.plt (converted eps to png by using ImageMagick).  

  4. type './example3.out'.
    This executable calculates instantaneous value of the sound pressure and particle velocity, outputs them to png image files. The image files are output to the folder "images" that is automatically created at runtime. Each image file has a name that indicates the cross section, field component, and number of time steps (ex. xz_p_014.png). The color bar is output as color_bar.png in the same folder. The range of color bar in each cross section is output to the info.txt file (xy_info.txt for z=0 plane). The xz_p.gif and the xy_p.gif are animated gifs that concatenate the png files created by using the shell script gif_animation.sh.

Please see maw_src/multi_aw.h for detail of functions. The main parts of the code is parallelized by using OpenMP. The number of threads is controlled by the environment variable OMP_NUM_THREADS.

intensity distributions
xz_pxy_p  

Analysis sample 1 (in the folder analysis_sample1)

This is the analysis result of two focused beams cross at the origin. It is simply the placement of the wave sources and does not take into account the reflections between the transducers.

intensity distributions 1  

xz_p 1yz_p 1   xy_p 1  

References

  1. The command-line driven graphing utility gnuplot
  2. The utilities for manipulating images ImageMagick
  3. The official PNG reference library libpng

multi_aw's People

Contributors

akohta avatar

Watchers

 avatar  avatar

Forkers

dalerxli

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.