Hi, everyone.
I want to solve a tracer transport equation that there is a source term in the right of the equation, the source term is a function related to the tracer concentration.
The tracer transport equation I need to solve is (dT/dt)+(u.grad(T))-(1/h.div(h.vt.grad(T)))=β*XWC*(s'-s)*(10/(10*s+1))*T/H, XWC is the settling velocity of sediment, s is the suspended sediment concentration. I have modified the difsou.f as follows:
DO I = 1, NPOIN
IF(ABS(H%R(I)).LE.0.2D0) THEN
PRIVE%ADR(1)%P%R(I)=0.D0
else
PRIVE%ADR(1)%P%R(I)=0.0273D0*2650.D0*(U%R(I)**2+V%R(I)**2)/
& (GRAV*H%R(I))
endif
IF(PRIVE%ADR(1)%P%R(I).GT.CS%ADR(1)%P%R(I)) THEN
PRIVE%ADR(2)%P%R(I)=1.D0
else
PRIVE%ADR(2)%P%R(I)=0.25D0
endif
TEXP%ADR(2)%P%R(I)=PRIVE%ADR(2)%P%R(I)*XWC(1)/
&(PRIVE%ADR(1)%P%R(I)-CS%ADR(1)%P%R(I))*10.D0/(1+
& 10.D0*CS%ADR(1)%P%R(I))*T%ADR(2)%P%R(I)/MAX(H%R(I),1.D-4)
TEXP%ADR(1)%P%R(I)=PRIVE%ADR(2)%P%R(I)*XWC(1)/
&(PRIVE%ADR(1)%P%R(I)-CS%ADR(1)%P%R(I))*10.D0/(1+
& 10.D0*CS%ADR(1)%P%R(I))*T%ADR(1)%P%R(I)/MAX(H%R(I),1.D-4)+T%ADR(2)%P%R(I)
enddo
So, βis PRIVE%ADR(2)%P%R(I) and s' is PRIVE%ADR(1)%P%R(I). The program can work, but the results of tracer1 and tracer2 are wrong, the data are inf.
I do not know if there is any error do it like this. Can you help me?
zqzuoan