Challenge

Week 6 Challenge-FVM Fundamentals 101

1. Derive the expression for the `∂f/dx` for a forward difference of second order

To derive the expression for the forward difference of second order, we start by using Taylor series expansion for the function

The general form of the Taylor series expansion:

`f(x+h) = f(x) + hf'(x) + (h^2/2!)f''(x) + (h^3/3!)f'''(x) + ...`

where h is the step size, and f'(x), f''(x), and f'''(x) are the first, second, and third derivatives of f(x)

at f(i+1) , x=i, h=1

The general form of the Taylor series expansion as:

`f(i+1) = f(i) + Δxf'(i) + (Δx^2/2!)f''(i) + (Δx^3/3!)f'''(i) + ...`

at f(i+2) , x=i, h=2

`f(i+2) = f(i) + 2Δxf'(i) + (2Δx^2/2!)f''(i) + (2Δx^3/3!)f'''(i) + ...`

Subtracting the above equations, we get

`f(i+2) - f(i+1) = Δxf'(i) + (Δx^2/2!)f''(i) + (Δx^3/3!)f'''(i) + ...`

`f'(i) = (f(i+2) - f(i+1))/Δx - (Δx/2)f''(i) - (Δx^2/6)f'''(i) - ...`

This is the expression for the forward difference of second order using the Taylor series expansion of f(i+1)

2. Apply Finite Volume Formulation to the equation `(∂ρ ϕ)/ (∂t) + ∇ . ( ρ u ϕ ) = 0`

`(∂ρ ϕ)/ (∂t) + ∇ . ( ρ u ϕ ) = 0`

The finite volume formulation of the equation can be obtained by integrating it over a control volume V and applying the divergence theorem :

`∫ ((∂ρϕ)/(∂t)) + ∫∇.(ρUϕ) = 0`

Multiply with dV

`∫ ((∂ρϕ)/(∂t)) dV + ∫∇.(ρUϕ) dV = 0`

Applying the divergence theorem

`∫V ((∂ρϕ)/(∂t)) dV + ∫S ρUϕ . dS = 0`

where S is the boundary surface of the control volume V and has vector above it

After applying the divergence theorem the time derivative term can be left unchanged and so that we will modify the second term

`∫ S ρ ϕU . d S = ∑ f S f ⋅ ( ρ U ϕ ) f`

The continuity equation can be written as

`∂ /(∂ t) ∫ V ρ ϕ d V + ∑ f S f ⋅ ( ρ U ϕ ) f = 0`

3. Write a note on the van Leer TVD scheme

The van Leer Total Variation Diminishing (TVD) scheme is a numerical method used for solving hyperbolic partial differential equations. It is a high-resolution scheme that preserves the monotonicity and stability of the solution, while providing accurate results.

The TVD scheme achieves this by limiting the fluxes across the cell interfaces based on the magnitude and direction of the gradient of the solution. The scheme ensures that the solution remains smooth and does not develop spurious oscillations, while also capturing sharp gradients accurately.

The TVD scheme uses a flux limiter function that is designed to reduce the fluxes in regions of steep gradients while allowing full fluxes in regions of smooth variation. The van Leer flux limiter is a popular choice for the TVD scheme due to its simplicity and accuracy.

The TVD scheme with the van Leer flux limiter can be visualized using a Sweby diagram, which is a graph of the flux limiter function as a function of r. The Sweby diagram for the van Leer flux limiter is a piecewise linear function with a slope of 1 at r=0 and a slope of 2 at r=1.

The Sweby diagram can be used to determine the CFL (Courant-Friedrichs-Lewy) condition, which is the maximum time step that can be used for a given spatial resolution to ensure the stability of the numerical scheme. The CFL condition for the TVD scheme with the van Leer flux limiter is given by:

CFL ≤ min(1, Δx/|u|)

where CFL is the Courant number, Δx is the cell size, and u is the velocity of the solution.

In summary, the van Leer TVD scheme is a high-resolution numerical method that preserves the monotonicity and stability of the solution, while providing accurate results. The scheme achieves this by limiting the fluxes across the cell interfaces based on the magnitude and direction of the gradient of the solution using the van Leer flux limiter. The CFL condition for the scheme can be determined using the Sweby diagram.

(a)Sweby Diagram

The van Leer flux limiter is given by:

where r is the ratio of the gradient of the solution in the current cell

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.