Dear All,
I am trying to solve advection-diffusion-reaction equation (dC/dt + UdC/dx = [Ex]d2C/dC2 -KC) in a 10.0 KM long channel with depth 10 m and width 50 m .
The channel is having a constant inflow discharge of 15 m3/s and downstream elevation is held constant at 10.0 m. At the upstream end I have a non-conservative tracer with constant conc. of 30 mg/l which is supplied for 6 hrs. I am running the simulation for 6 days, the horizontal diffusivity (COEFFICIENT FOR HORIZONTAL DIFFUSION OF TRACERS)[Ex] for tracer has been specified at 30.0 m2/s . The decay rate[K] for tracer is 1.0 per day. I understand that to code in your decay rate you have to use SOURCE-TRAC subroutine and my code is as follows
K1 = 1 ! rate in per days
K1 = K1/(86400.0)
IF(NTRAC .GE. 1) THEN
DO ITRAC=1,NTRAC
S0TA%ADR(ITRAC)%P%TYPR='Q'
S1TA%ADR(ITRAC)%P%TYPR='Q'
ENDDO
DO IPOIN2 = 1, NPOIN2
DO IPLAN = 1, NPLAN
IPOIN3 = IPOIN2 + (IPLAN-1)*NPOIN2
S0TA%ADR(1)%P%R(IPOIN3) = TA%ADR(1)%P%R(IPOIN3)*K1/2.0D0
S1TA%ADR(1)%P%R(IPOIN3) = K1/2.0D0
END DO
With this code in place I don't catch the peak of the analytical solution, could some one please take a look at my code and let me know if I am doing some thing wrong. I am attaching both numerical and analytical solution. All help is greatly appreciated.
Best regards,
Sumit