Commit 545c01fb by Dany Dumont

### Test du schema advection localisee a vitesse variable

parent c946efdb
 ... ... @@ -391,6 +391,41 @@ Y(k)=Y(k)-1./float(it)*dt*((cu(k)-cu(k-1))/ & h(k)-Y(k)*(ww(k)-ww(k-1))/h(k)) enddo elseif (mode.eq.3) then do k=1,N ! compute courant number c=-ww(k)/float(it)*dt/(0.5*(h(k)+h(k+1))) if (k .lt. N-1) then Yu=Y(k+2) ! upstream value else Yu=Y(k+1) endif Yc=Y(k+1) Yd=Y(k ) ! compute slope ratio if (abs(Yc-Yd) .gt. 1e-10) then r=(Yu-Yc)/(Yc-Yd) else r=(Yu-Yc)*1.e10 endif ! compute flux limiter x = one6th*(1.-2.0*c) Phi = (0.5+x)+(0.5-x)*r ! Superbee limiter limit=max(_ZERO_, min(_ONE_, 2.0*r), min(r,2.*_ONE_) ) ! compute limited flux cu(k) =ww(k)*(Yc+0.5*limit*(1-c)*(Yd-Yc)) cu(k-1)=ww(k)*(Yd+0.5*limit*(1-c)*(Yd-Y(k-1))) ! advection step Y(k)=Y(k)-1./float(it)*dt*((cu(k)-cu(k-1))/h(k)) enddo else ! conservative do k=1,N Y(k)=Y(k)-1./float(it)*dt*((cu(k)-cu(k-1))/h(k)) ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!