HLPA.f90 - HLPA approximation for convective term
From CFD-Wiki
Subroutine HLPA(Uw,Fww,Fw,Fp,Fe,Delta_f)
If (Uw.GE.0.) then
if ( ABS( Fp - 2.* Fw + Fww ).LT.ABS( Fp - Fww ) ) then
Alpha_pl = 1. else
Alpha_pl = 0.
End If
If ( (Fp - Fww).NE.0. ) then
Delta_f = Alpha_pl * (Fp - Fw)* (Fw - Fww) / (Fp - Fww)
End If
End If
!-------------------------------------------------------------------------
If (Uw.LT.0.) then
if ( ABS( Fw - 2.* Fp + Fe ).LT.ABS( Fw - Fe ) ) then
Alpha_mn = 1. else
Alpha_mn = 0.
End If
If ( (Fw - Fe).NE.0. ) then
Delta_f = Alpha_mn * (Fw - Fp)* (Fp - Fe) / (Fw - Fe)
End If
End If
100 continue
Return
End