13.10. Example: Monopole Incident Wave Scattering of a Rigid Sphere

This example problem demonstrates the use of FLUID221 to predict the acoustic scattering of a monopole incident wave of a rigid sphere (radius = 1 m).

The monopole spherical source is located at (2, 0, 0).

PML is used for truncation of the open space.

For more information, see Perfectly Matched Layers (PML) in the Mechanical APDL Theory Reference.

/batch,list
/com, harmonic analysis – scattering from a rigid sphere
/title,Scattering of a Rigid Sphere
/nopr
/prep7
pi=3.1415926535
                                    ! material properties
rho=1.21                            ! air mass density
c0=343                              ! sound speed
ra=1                                ! radius of sphere
ka=5                                ! product of wavenumber and radius
wave2=2.*pi*ra/ka                   ! wavelength
h=wave2/10                          ! mesh size
freq=c0/wave2                       ! frequency
p0=1./(ka/ra)                       ! amplitude of incident pressure
                                    ! 10-node tetrahetral
et,1,221,,1                         ! normal tet 
et,2,221,,1,,1                      ! pml tet
mp,dens,1,rho                       ! define density
mp,sonc,1,c0                        ! define sound speed
                                    ! define the model
xs=2.
n=nint((xs-1.01*ra)/h)              ! keep source outside of model
npml=4
nb=2
na=n-npml-nb
*if,na,le,0,then
 na=1
*endif
a=ra+na*h
b=a+nb*h
c=b+npml*h
sphere,0,ra,0,180
block,-a,a,0,a,-a,a
block,-b,b,0,b,-b,b
block,-c,c,0,c,-c,c
vsbv,4,3,,delete,keep
vsbv,3,2,,delete,keep
vsbv,2,1,,delete,delete
alls
vglue,all
                                    ! meshing
mshape,1,3d
mat,1
type,1
vsel,all
vsel,u,,,5
esize,h
vmesh,all
vsel,all
type,2
mat,1
esize,h
vsel,s,,,5
vmesh,all
alls
                                     ! define equivalent source surface
nsel,s,loc,x,-a,a
nsel,r,loc,y,0,a
nsel,r,loc,z,-a,a
esln,s,1,all                         ! elements with selected nodes
nsel,s,loc,x,a
nsel,a,loc,x,-a
nsel,a,loc,y,a
nsel,a,loc,z,-a,
nsel,a,loc,z,a
sf,all,mxwf                          ! equivalent source surface
alls
                                     ! define boundary condition on pml
nsel,s,loc,x,c
nsel,a,loc,x,-c
nsel,a,loc,y,c
nsel,a,loc,z,-c
nsel,a,loc,z,c
d,all,pres,0.                        ! pressure=0 on pml exterior
allsel,all
                                     ! define external monopole incident wave
awave,1,mono,pres,ext,p0,0,xs,0,0,rho,c0
fini
                                     ! perform solution
/solu
eqslv,sparse
antype,harmic
harfrq,freq
solve
fini
                                     ! pos-processing
/post1
set,1,1
hfsym,0,,shb,,                       ! sound-hard x-z plane
prnear,point,psum,0,-5,0,0           ! near pressure at (-5,0,0)
prnear,point,psum,0,5,0,0            ! near pressure ar (5,0,0)
prfar,pres,sumc,0,0,0,-90,90,18,5.   ! far pressure at r=5 
fini