Difference between revisions of "Contrib potentialWaveFoam"
(Created the page) |
(No difference)
|
Revision as of 07:22, 17 February 2009
Contents
1 Short description
A one-line solver that solves a wave equation, fvm::d2dt2(phi) == c * c *fvc::laplacian(phi).
2 Overview
potentialWaveFoam solves a linear wave equation
(1)
where is a scalar variable, is time and is the speed of wave propagation (group velocity). If we take so that sound pressure and acoustic particle velocity satisfy
(2) ,
(3) ,
where is the medium density, the wave equation is considered to represent a linear sound propagation.
A boundary condition frequently used in linear acoustics is a normal acousic impedance boundary condition. The normal acoustic impedance is represented by sound pressure and the normal component of acoustic particle velocity as
.
With substituting Eqs. (2) and (3), we obtain a convection equation of phi
(4)
with the convective velocity represented by
.
For more detailed discussions, please have a look at reference [1].
3 Prerequisites
Python and funkySetFields are required to run the test case.
4 Package description and installation
4.1 Manifest
The package contains the following subdirectories:
potentialWaveFoam-YYYYMMDD/ convectiveOutlet-YYYYMMDD/ a convection BC code potentialWaveFoam/ the main solver probeToAudio/ a postprocessing utility reverberationRoom/ a test case
4.2 Installation
Unpack the package under any suitable place under $WM_PROJECT_USER_DIR, e.g. $WM_PROJECT_USER_DIR/applications, go into the package directory and type ./Allrun.
cd $WM_PROJECT_USER_DIR/applications tar -zxf potentialWaveFoam-YYYYMMDD.tar.gz cd potentialWaveFoam-YYYYMMDD ./Allrun
These steps will install a library under $FOAM_USER_LIBBIN:
- libconvectiveOutlet.so - a BC code that calculates Eq. (4). For detailed usage, please see README under convectiveOutlet-YYYYMMDD in the package. The BC code can also be used as a nonreflective outlet BC for incompressible CFDs. Please also consult the reference [2] and a discussion at a forum thread if you intend to do so.
and applications under $FOAM_USER_APPBIN:
- potentialWaveFoam - the main solver that solves Eq. (1).
- probeToAudio - a postprocessing utility that converts probed sound pressure at a point to 16-bit PCM .wav audio format. For detailed usage, please have a look at the utility page.
and finally, a test case will be run.
5 Test case
The test case provided under the reverberationRoom subdirectory is a propagation problem of an acoustic impulse given in a room that has an open window (represented by ). The walls other than the opening are assigned an acoustic impedance of 136791.7 which is equivalent to the acoustic absorption factor , given the relationship
.
The speed of sound and the medium density are assumed to be 343.7 m/s and 1.205 kg/m^3 respectively.
The solver will be run twice, with all the settings except endTime are identical. A first run is for visualization of the initial propagation of the acoustic pulse until s, whose result can be viewed by paraFoam as usual. Another run is for auralization of the impulse response until s recorded at a point in the room. After the second run you will have an audible impulse response as p_1.wav under the case directory, which should be heard as a gradually decaying reverberation.
6 Cleanup
To cleanup the library/application build directories and the case directory, type
./Allclean
at the package directory.
7 Download
For now, the package can be downloaded either via Subversion
svn co https://foac.svn.sourceforge.net/svnroot/foac/trunk/survey/OpenFOAM/potentialWaveFoam
or as a snapshot tarball from our SourceForge repository.
8 References
[1] T. Oshima et al., Proceedings of Inter-Noise 2008, No. 287, 2008
[2] J. H. Ferziger and M. Peric. Computational Methods for Fluid Dynamics. Springer-Verlag (Berlin), 1996
9 History
7islands 08:22, 17 February 2009 (CET) (Takuya OSHIMA): Created this page.