Tutorial: Pulsating Sphere (no gui)


Pulsating sphere


We are going to write a configuration file for a classical case in acoustics: the radiation problem of a pulsating sphere for which we have an analytical solution.
Let's assume to have a unit radius kphere immersed in standard air that is pulsating with a radial velocity of unit amplitude. Microphones are places on the x axis.



The configuration file for this problem is:
# RUN SECTION runinfo = { active = 1; # run is active title = "PulsatingSphere"; # Run Title owner = "Acousto"; # Name of run's owner ksymm = 0; # no symmetry is considered here vsound=344.0; # speed of sound krow=10; # loading 10 rows each loop. # For this small case this # can be set to -1 # Here we define a 2x2 process grid nprows=2; # Number of rows in the process grid npcols=2; # Number of columns in the process grid row_block_size=16; # block factor for the process grid rows col_block_size=16; # block factor for the process grid columns }; # GEOMETRY DEFINITION SECTION modgeom = { active = 1; # geometry is active geoms=[ "sphere1" ]; # the geometry is # in section "sphere1" defined below chief_file = "acousto.chief.mesh"; # name of the chief points # file (empty in this case) mics_file = "microphones.mesh"; # name of the microphone locations # file, described below nchief=0; # no chief point nmics=20; # 20 microphone }; # BODY COEFFICIENT SECTION modcoefac={ active = 1; # body coefficient evaluation is active }; # MICROPHONES COEFFICIENT SECTION modcoemic={ active = 1; # microphones coefficient evaluation is active }; # SOLUTION SECTION modsol={ active = 1; # microphones coefficient evaluation is active sources_file = "acousto.sources.mesh"; # sources file, empty in this case nsourc=0; # no sources imped_file = "acousto.zetas.mesh"; # impedences file, empty in this case nimped=0; # no impedent panels radiants_file = "acousto.radians.mesh"; # Non empty file with intensities # of the radiant panels, described below nradian=-1; # number of radiant panels = the sphere is # radiant thus we set this to -1 radiant_real = 1.0; # intensity of the radiant field (1.0 + i*0.0) radiant_imag = 0.0; planw_file = "acousto.planw.mesh"; # planar waves file, empty in this case nplanw=0; # no planar waves knw=2; # second formulation (see manual) rho=1.225; # fluid density maxsig=0.0; # the case is analysed for Sigma=0, minsig=0.0; # thus no range is defined here nsig=0.0; # and only one sample is considered minome=99.0; # the solution will be evaluated # for omega=99 maxome=100.0; nome=1; printvtk=1; # Print solution on master node for graphic post-proc }; # Definition of geometry. The section has been named in the modgeom section. # We use the internal sphere generation method of AcouSTO sphere1={ type="sphere"; # Type of geometry, for supported type, read the manual. radius=1.0; # unit radius segments=8; # 8 segments x... rings=9; # 9 rings = 72 panels };

The above configuration will be written in the pulsatingsphere.cfg file In the present application no isolated sources nor incoming waves are present, thus no additional file is required for the definition of the problem. Also, in the microphones.mesh we have to declare the location (x,y and z) of the 20 microphones at which the solution will be evaluated, as follows:

1.0 0.0 0.0 2.0 0.0 0.0 ... 20.0 0.0 0.0



We can now run AcouSTO with the files we configured above. In the file pulsatingsphere.cfg we declared a process grid of 2 rows and 2 columns, thus we will run the program on four processes. Let's assume we want to run the process on the four nodes: node1, node2, node3, node4 of our cluster and that the AcouSTO is in /usr/local/bin, we have to invoke AcouSTO with the following command line:

mpirun -np 4 -host node1,node2,node3,node4 /usr/local/bin/acousto -f pulsatingsphere.cfg

The configuration files must be on the node from where the run is started because they are processed only by the master node.



AcouSTO writes the output files only on the master node. The output is given in two different files, one for the microphones and one for the body, in terms of Pressure (Scattering and Total), Potential at the microphones and Potential at the body.
Pulsating sphere: Scattering pressure
The Pressure and Potential at the microphones are in a file named:
<run title>-mics-<freq in Hz>.out

Thus in this case, for the only frequency present, the file will be
PulsatingSphere-mics-99.0000Hz.out
.
The file has 16 columns with the following values:
  1. Microphone index
  2. Microphone x
  3. Microphone y
  4. Microphone z
  5. Solution (real part)
  6. Solution (imaginary part)
  7. Solution (absolute value)
  8. Incident Potential (real part)
  9. Incident Potential (imaginary part)
  10. Incident Potential (absolute value)
  11. Total pressure (real part)
  12. Total pressure (imaginary part)
  13. Total pressure (absolute value)
  14. Scattering pressure (real part)
  15. Scattering pressure (imaginary part)
  16. Scattering pressure (absolute value)

The Potential at the surface is in the file:

<run title>-surf-<freq in Hz>.out

that has 10 columns with:
  1. Panel index
  2. Panel Control point x
  3. Panel Control point y
  4. Panel Control point z
  5. Solution (real part)
  6. Solution (imaginary part)
  7. Solution (absolute value)
  8. Incident Potential (real part)
  9. Incident Potential (imaginary part)
  10. Incident Potential (absolute value)
In the figure you can see the real and imaginary part of the scattering pressure plotted against the analytical solution