%--------------------------------------------------------------
%     Create harmonic wave initial solution.
%--------------------------------------------------------------
ROinf= 1.2;     % kg/m3
Uinf = 0;       % m/s
Pinf = 101325;  % Pa
Cinf = sqrt(GAS.GCNT*Pinf/ROinf);  % m/s

Pref    = 2e-5;   % Pa
decibel = 100;    % dB

deltaP  = Pref*sqrt(2)*10^(decibel/20);
deltaU  = deltaP/ROinf/Cinf;
deltaRO = deltaU*ROinf/Cinf;

ROINIT = deltaRO*sin(MSH.XCP*2*pi/(X2-X1)) + ROinf;
UINIT  =  deltaU*sin(MSH.XCP*2*pi/(X2-X1)) +  Uinf;
PINIT  =  deltaP*sin(MSH.XCP*2*pi/(X2-X1)) +  Pinf;

SOLV.RO =        ROINIT;
SOLV.RU = UINIT.*ROINIT;
SOLV.ET = PINIT/(GAS.GCNT-1.) + .5*ROINIT.*UINIT.^2;

