1.84k likes | 3.33k Views
The Finite Volume Method. Flux Limiters TVD. Ingo Philipp. Computational Astrophysics. I ntegral F orm. impermeable wall. x 1. x 2. flow to the right. flow to the left. substance neither created nor destroyed in [x 1 , x 2 ].
E N D
The Finite Volume Method FluxLimitersTVD Ingo Philipp ComputationalAstrophysics
Integral Form impermeable wall x1 x2 flowtotheright flowtotheleft substanceneither creatednordestroyedin [x1, x2] mass in [x1, x2] at time t2 > t1 in termsofthe total massat time t1 & the total (integrated) fluxateachboundaryduring [t1, t2] integral form oftheconservationlaw!
Differential Form differential form r(x,t) and v(x,t) aredifferentiablefunctions, i.e. thisdoesn‘t hold ifthedensity isdiscontinuous The integral form ismore fundamental physically andthustheappropriaterepresentation integral form continuestobe valid evenfordiscontinuoussolutions
General Form a dS outflowdefines a lost ofsomesubstance! outflow inflow integral form differential form: balancelaw differential form
The Finite Volume Method Ui Ui+1 Ui-1 Vi stationarymesh – constantDx integral lawistransferredto smallcontrolvolumes vertexcentered xi-1 xi xi+1 xi-1/2 xi+1/2 with piecewiseconstantcellaverageforeach U trueforany integrateoversmall time stepDt – howdoesthecellmeanevolve in time? x1 xN meanevolutionequationwithoutapproximation
The Finite Volume Method (0,1) yj+1/2 Dy (1,0) (-1,0) (i,j) Dx yj-1/2 xi+1/2 xi-1/2 1D & withoutsourcesQ 2D & fluxapproximation quadrature – mid-pointrulewith thetruefluxattheinterfacesisreplacedby a numericalfluxfunctionbased on (0,-1)
PiecewiseLinear Reconstruction use the cell averages to compute a polynomial representation of U for each cell the easy way out: polynomial of 0th order we could instead assume a linear behavior for for where xi+1 xi-1 xi the average value of over the control volume is regardless of the slope
The Advection Equation solve with IC and newsetof variables andgiveswith profiledoesn‘tchange in shape – itshifts in positivev>0or in negativev<0direction t characteristic tn x characteristic x t DODforU(x,t)is just the singlepoint(x-v(t-tn), tn) t x
The Advection Equation sinceweknowtheanalyticalsolutionweareabletocomputethefluxintegrals (numericalfluxfunctions) withthehelpofthepolynomialreconstructed , i.e. and characteristics outflow – backtrackintoithcellatthenthtime level inflow – backtrackinto (i-1)thcellatthenthtime level tn+1 for characteristics tn xi-1 xi xi+1
The Advection Equation tn+1 tn xi-1 xi xi+1
Choice ofSlopes upwind (Godunov‘smethod) centeredslope (Fromm) upwindslope (Beam-Warming) downwindslope (Lax-Wendroff) numerical DOD containsphysical DOD & von Neumann stable if
Upwind artificialdiffusion upwind (Godunov‘smethod) U(x,t) x numericaldiffusion localdiscretizationerror
Lax Wendroff artificialdiffusion downwindslope (Lax-Wendroff) U(x,t) x numericaldispersion localdiscretizationerror
Beam Warming upwindslope (Beam-Warming) U(x,t) x numericaldispersion localdiscretizationerror
Beam Warming upwindslope (Beam-Warming) periodicboundarycondition U(x,t) x
Fromm centeredslope (Fromm) U(x,t) x numericaldissipation localdiscretizationerror
Whatwent wrong ? downwindslope (Lax-Wendroff) appliedto 1 initialprofile 0 J J+1 J-1
Whatwent wrong ? downwindslope (Lax-Wendroff) appliedto 1 0 J J+1 J-1
Whatwent wrong ? downwindslope (Lax-Wendroff) appliedto 1 0 J J+1 J-1 tn+2 tn+1 tn J J+1 J J+1 J-1
Whatwent wrong ? downwindslope (Lax-Wendroff) appliedto overshoot 1.125 1 overshoot 0.375 0 J J+1 J-1 tn+2 tn+1 tn J J+1 J J+1 J-1
Whatwent wrong ? downwindslope (Lax-Wendroff) appliedto 1.172 1 0.98 0.7 0.14 initialprofile 0 J J+1 J-1 overshoot overshoot overshoot undershoot
Whatwent wrong ? any negative slope in theJthcellleadsto a volumeaverage > 1attn+1 toavoidoscillations just settheslopetozero gives1st order upwindmethod but in smooth regionswewant2ndorder accuracy (Lax-Wendroff) benefitfromboth • near a discontinuitywemaywanttolimittheslope • in smooth regionswechoosesth. liketheLax-Wendroffslope …howmuchshouldwelimittheslope? …howtocontroltheflux? …how do wemeasureoscillations in thesolution? TOTAL VARIATION
Flux Limiter …howtocontroltheflux? the time averagedfluxattheinterface should now be determined by the jump xi-2 xi+1 xi xi-1 givesus a jump in smooth regionsand limited versionofthe jump farfrom 1 near a discontinuity wemightwant a fluxlimiterffunctionthat hasvaluesnear 1 forq~1, but thatreduces orincreasestheslopewherethedatais not smooth fluxlimiterfunction for for measureofthesmoothnessofthedatanear
Flux Limiter upwind (Godunov‘smethod) centeredslope (Fromm) upwindslope (Beam-Warming) downwindslope (Lax-Wendroff)
*High Resolution Schemes for Hyperbolic Conservation Laws Total Variation Howdoesf(x)vary on [a,b]? supremumof sums over all partitions toavoidoscillationswerequirethatthemethod doesn‘tincreasethe total variation(TVNI) 1 foranystartingdata Amiram Harten*(1983) 0 p 2p a monotone scheme is TVNI if initial condition is then a TVNI scheme is monotonicity preserving -1 Godunov‘stheorem monotone schemes can be at most 1st order accurate
Harten’s Theorem may in generalbedatadependent THEOREMForanyschemeoftheabove form, a sufficientconditionforthescheme tobe TVNI isthatthecoefficientssatisfy advectionequation CFL for all valuesofand and ifweareat an extremumandweshouldtake Osher and Chakravarthy(1984) TVD schemes must degenerate to 1st order accuracy at extremal points
* High resolution schemes using flux-limiters for hyperbolic conservation laws Total Variation and P.K. Sweby*(1984) Fromm Fromm Beam-Warming Beam-Warming 2 2 Lax-Wendroff Lax-Wendroff 1 1 TVNI 2nd order TVNI Godunov 2 Godunov 2 1 3 1 3 noneoftheselinearlimitersgenerate a TVNI scheme any2nd order scheme relying on must be a weighted average of the LW and BW scheme
MinMod 2 U(x,t) minmod 1 2nd order TVNI 2 1 3 x slopelimiterversion Lax-Wendroff downwindslope Beam-Warming upwindslope Godunov‘smethod upwind
Monotonized Central Difference 2 MC U(x,t) 1 2nd order TVNI 2 1 3 x slopelimiterversion ~Lax-Wendroff downwindslope Godunov‘smethod upwind Fromm centeredslope ~Beam-Warming upwindslope
References www.cfd-online.com
Upwind&CFL tn+1 tn+1 updatingscheme=upwind informationtravelsmorethanonegridcell in one time step necessary CFL stabilitycondition fulfilled tn tn informationtravelslessthanonegridcell in one time step upwindmethodcertainlyunstable!
Numerical Solution centeredslope (Fromm) upwind (Godunov‘smethod) U(x,t) upwindslope (Beam-Warming) downwindslope (Lax-Wendroff) x
Lax Wendroff downwindslope (Lax-Wendroff) periodicboundarycondition U(x,t) x