Here is a set of codes to simulate the propagation and interaction of waves in Cartesian

geometry, specifically designed to address problems in helioseismology. The methods,

validation, and verification are described in detail in the following publications:

*Solar Acoustic Simulator: Applications and Results*

Hanasoge & Duvall (2007), * Astronomische Nachrichten*, **328**, 319

*Forward Modeling In Helioseismology: Sensitivities, Realization Noise Subtraction And Kernels*

Hanasoge, Duvall, & Couvidat (2007), *Astrophysical Journal*, **664**, 1234

*Impact of Locally Suppressed Wave Sources on Helioseismic Travel Times*

Hanasoge, Couvidat, Rajaguru, & Birch (2008), * Monthly Notices of the Royal Astronomical Society*, **391**, 1931

*Theoretical Studies of Wave Propagation in the Sun*

Hanasoge (2007), Ph.D. Thesis, * Stanford University*

*Seismic Halos Around Active Regions: A Magnetohydrodynamic Theory*

Hanasoge (2008), *Astrophysical Journal*, **680**, 1457

*An absorbing boundary formulation for the stratified, linearized, ideal MHD equations
based on an unsplit, convolutional perfectly matched layer*

Hanasoge, Komatitsch, & Gizon (2010),

The CODE can be downloaded from *THIS LINK.*

The documentation in PDF form is *HERE*.

The background model must be convectively stable. The points at which the grid are sampled are typically

distributed according to the criterion that the points per wavelength be maintained roughly constant with depth.

Here are a set of routines to compute the appropriately sampled background models (for a polytrope with

an
isothermal atmosphere; and for the altered model of Hanasoge et al. (2006) ):
*Various IDL codes*

Here are a couple of sample models, ready for use:
*Altered form of model S*
*Polytrope with isothermal atmophere*

To compute the power spectrum and collate the output, use *this.*

To compute the magneto-hydrostatic (MHS) state for given flux, tube size, and background model;
we apply

the self-similar Schluter-Temesvary technique, use *this IDL code.*
Note that this code can also be used to convert

a cylindrical co-ordinate description of an MHS state to Cartesian co-ordinates.

The following two libraries are required to compile and run the code in its current form:

*FITSIO*

*FFTW*

The message passing routines are written in accordance to OpenMPI.

the highly-efficient Convolutional Perfectly Matched Layer (CPML) wave

absorption formulation at the boundaries (Hanasoge et al. 2010).

Many thanks to D. Dombroski (CORA), H. Schunker (MPS), H. Moradi (MPS), for being patient

and assisting significantly in debugging the code.
A. Birch (CORA), R. Cameron (MPS), and

L. Gizon (MPS) have been very helpful and supportive.

If you encounter bugs or have any comments, feel free to * email me.*