VM-R083-CA1 221 Input Listing


/COM,ANSYS MEDIA REL. 2024R2 (05/10/2024) REF. VERIF. MANUAL: REL. 2024R2
/VERIFY, VMR083-CA1-221
/TITLE, VMR083-CA1-221, SOUND RADIATION OF A VIBRATING SPHERE
/COM, REFERENCE: NAFEMS BENCHMARKS FOR RADIATION AND SCATTERING OF SOUND
/COM, TEST NAME: CA1, R0038

/OUT,SCRATCH
/NOPR
/PREP7

GEOM = 0
*IF,GEOM,EQ,1,THEN

PI = ACOS(-1)

c0 = 340                    ! SPEED OF SOUND IN m/s
rho = 1.225                 ! DENSITY OF AIR IN kg/m^3

R = 1                       ! SPHERE RADIUS IN m
Vn = 0.1                    ! NORMAL VELOCITY IN m/s

FREQA = 100
FREQB = 500
WAVE = c0/FREQB
H = WAVE/12

ET,1,FLUID221               ! FLUID221 ELEMENT
KEYOPT,1,2,1                ! NO FSI
MP,SONC,1,c0
MP,DENS,1,rho
ET,2,FLUID130               ! FLUID30 ELEMENT
KEYOPT,2,1,2
MSHAPE,1,2D
R,2,R+4*H

SPHERE,R,R+4*H,0,90
TYPE,1
MAT,1
ESIZE,H
VMESH,ALL
ALLSEL,ALL

CSYS,2
NSEL,S,LOC,X,R+4*H
TYPE,2
REAL,2
MAT,1
ESIZE,H
ESURF
ALLSEL,ALL

NSEL,S,LOC,X,R+4*H
SF,ALL,MXWF
ALLSEL,ALL

NSEL,S,LOC,X,R
SF,ALL,SHLD,Vn
CSYS,0
ALLSEL,ALL

CDWRITE,DB,VMR083-CA1-221,CDB
*ELSE
CDREAD,DB,VMR083-CA1-221,CDB
*ENDIF

FINISH

/SOLU
ANTY,HARMONIC
HROPT,AUTO
HARFRQ,0,FREQA
NSUB,5
SOLVE
FINISH

/POST26
N1=NODE(1,0,0)          ! NODE AT LOCATION X=1,Y=0,Z=0
NSOL,2,N1,SPL
/OUT
/COM, ------ r=1m, 0-100 Hz with 5 substeps------
/COM,
PRVAR,2
ALLSEL,ALL
FINISH

/POST1
HFSYM,0,SHB,SHB
SET,LIST
*GET,NUMSET,ACTIVE,0,SET,SBST
*DIM,Freq1,ARRAY,NUMSET
*DIM,SPLR,ARRY,NUMSET
*DIM,SPL1,ARRAY,NUMSET
*DIM,RATIO1,ARRAY,NUMSET
NSET = 0
*DO,i0,1,NUMSET,1
   NSET=NSET+1
   SET,1,i0,,0
   *GET,frq,ACTIVE,0,SET,FREQ
   Freq1(NSET)=frq
   k = 2*PI*Freq1(NSET)/c0
   p = rho*c0*vn*R**2/(1+(k**2)*(R**2))*CXABS(R*k**2,-k)
   p0 = 2e-5
   SPL1(nset)= 20*log10((p/SQRT(2))/p0)
*ENDDO
R1 = 114.161/SPL1(1)
R2 = 118.845/SPL1(2)    
R3 = 120.778/SPL1(3)    
R4 = 121.727/SPL1(4)    
R5 = 122.247/SPL1(5)   
*VFILL,SPLR,DATA,114.161,118.845,120.778,121.727,122.247
*VFILL,RATIO1,DATA,R1,R2,R3,R4,R5     
SAVE,TABLE_1
FINISH

/POST1
HFSYM,0,SHB,SHB
SET,LIST
*GET,NUMSET,ACTIVE,0,SET,SBST
*DIM,Freq2,ARRAY,NUMSET
*DIM,SPL2,ARRAY,NUMSET
*DIM,SPL3,ARRAY,NUMSET
*DIM,RATIO2,ARRAY,NUMSET
NSET = 0
*DO,i0,1,NUMSET,1
   NSET=NSET+1
   SET,1,i0,,0
   *GET,frq,ACTIVE,0,SET,FREQ
   Freq2(NSET)=frq
   PRFAR,PRES,SPLC,0,0,0,0,0,0,15           ! FAR FIELD PRESSURE
   *GET,SPL2(NSET),ACUS,0,SPL   
   k = 2*PI*Freq2(NSET)/c0
   p = rho*c0*vn*R**2/(1+(k**2)*(R**2))*CXABS(R*k**2/15,-k/15)*CXABS(COS(14*k),SIN(14*k))
   p0 = 2e-5
   SPL3(NSET) = 20*log10((p/SQRT(2))/p0)
*ENDDO
R21 = SPL2(1)/SPL3(1)
R22 = SPL2(2)/SPL3(2)
R23 = SPL2(3)/SPL3(3)
R24 = SPL2(4)/SPL3(4)
R25 = SPL2(5)/SPL3(5)
*VFILL,RATIO2,DATA,R21,R22,R23,R24,R25
SAVE,TABLE_2
FINISH

/OUT,SCRATCH
/SOLU
ANTY,HARMONIC
HROPT,AUTO
HARFRQ,FREQA,FREQB
NSUB,4
SOLVE
FINISH

/POST26
N1=NODE(1,0,0)          ! NODE AT LOCATION X=1,Y=0,Z=0
NSOL,3,N1,SPL
/OUT
/COM, ------ r=1m, 100-500 Hz with 4 substeps------
/COM,
PRVAR,3
FINISH

/POST1
HFSYM,0,SHB,SHB
SET,LIST
*GET,NUMSET,ACTIVE,0,SET,SBST
*DIM,Freq3,ARRAY,NUMSET
*DIM,SPL4R,ARRAY,NUMSET
*DIM,SPL4,ARRAY,NUMSET
*DIM,RATIO3,ARRAY,NUMSET
NSET = 0
*DO,i0,1,NUMSET,1
   NSET=NSET+1
   SET,1,i0,,0
   *GET,frq,ACTIVE,0,SET,FREQ
   Freq3(NSET)=frq
   k = 2*PI*Freq3(NSET)/c0
   p = rho*c0*vn*R**2/(1+(k**2)*(R**2))*CXABS(R*k**2,-k)
   p0 = 2e-5
   SPL4(nset)= 20*log10((p/SQRT(2))/p0)
*ENDDO
R31 = 123.053/SPL4(1)
R32 = 123.222/SPL4(2)
R33 = 123.282/SPL4(3)
R34 = 123.310/SPL4(4)
*VFILL,RATIO3,DATA,R31,R32,R33,R34
*VFILL,SPL4R,DATA,123.053,123.222,123.282,123.310
SAVE,TABLE_3
FINISH

/POST1
HFSYM,0,SHB,SHB
SET,LIST
*GET,NUMSET,ACTIVE,0,SET,SBST
*DIM,Freq4,ARRAY,NUMSET
*DIM,SPL5,ARRAY,NUMSET
*DIM,SPL6,ARRAY,NUMSET
*DIM,RATIO4,ARRAY,NUMSET
NSET = 0
*DO,i0,1,NUMSET,1
   NSET=NSET+1
   SET,1,i0,,0
   *GET,frq,ACTIVE,0,SET,FREQ
   Freq4(NSET)=frq
   PRFAR,PRES,SPLC,0,0,0,0,0,0,15           ! FAR FIELD PRESSURES
   *GET,SPL5(NSET),ACUS,0,SPL   
   k = 2*PI*Freq4(NSET)/c0
   p = rho*c0*vn*R**2/(1+(k**2)*(R**2))*CXABS(R*k**2/15,-k/15)*CXABS(COS(14*k),SIN(14*k))
   p0 = 2e-5
   SPL6(NSET) = 20*log10((p/SQRT(2))/p0)
*ENDDO
R41 = SPL5(1)/SPL6(1)
R42 = SPL5(2)/SPL6(2)
R43 = SPL5(3)/SPL6(3)
R44 = SPL5(4)/SPL6(4)
*VFILL,RATIO4,DATA,R41,R42,R43,R44  
SAVE,TABLE_4 
FINISH
/OUT,vmr083-ca1-221,vrt
/COM,
/COM, ---------------------------------------------------------------------
/COM,
/COM, |  Freq(Hz)  |  Mechanical APDL    |  ANALYTICAL     |  RATIO  |
/COM,
/NOPR
RESUME,TABLE_1
/GOPR
/COM,  R=1m, 0-100 Hz
/COM,
*VWRITE,Freq1(1),SPLR(1),SPL1(1),RATIO1(1)
 (4x,e13.6,5x,e13.5,5x,e13.5,5x,f7.4)
/COM,
/NOPR
RESUME,TABLE_2
/GOPR
/COM,  R=15m, 0-100 Hz
/COM,
*VWRITE,Freq2(1),SPL2(1),SPL3(1),RATIO2(1)
 (4x,e13.6,5x,e13.5,5x,e13.5,5x,f7.4)
/COM,
/NOPR
RESUME,TABLE_3
/GOPR
/COM,  R=1m, 100-500 Hz
/COM,
*VWRITE,Freq3(1),SPL4R(1),SPL4(1),RATIO3(1)
 (4x,e13.6,5x,e13.5,5x,e13.5,5x,f7.4)
/COM,
/NOPR
RESUME,TABLE_4
/GOPR
/COM,  R=15m, 100-500 Hz
/COM,
*VWRITE,Freq4(1),SPL5(1),SPL6(1),RATIO4(1)
 (4x,e13.6,5x,e13.5,5x,e13.5,5x,f7.4)
/COM,
/COM, ----------------------------------------------------------------
/OUT,
*LIST,vmr083-ca1-221,vrt
FINISH