• No results found

Computational Fluid Dynamics Exercise 4 – Time integration

N/A
N/A
Protected

Academic year: 2021

Share "Computational Fluid Dynamics Exercise 4 – Time integration"

Copied!
2
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

Computational Fluid Dynamics

Exercise 4 – Time integration Description

Consider the heat equation

∂T

∂t = ∂2T

∂x2, 0 ≤ x ≤ 1, 0 ≤ t ≤ 4, with boundary conditions

T (0, t) = 0 and ∂T

∂x(1, t) = 0, and initial condition

T (x, 0) = x.

This equation is solved with a finite-difference method on a grid with N grid points (N = 10 or 20). The Neumann condition is discretized with a mirror point. The quantity T (1, t) is monitored. As time-integration method the generalized Crank-Nicolson method is used. The discretized heat equation reads

Tjn+1− Tjn

δt = (1 − ω)Tj+1n − 2Tjn+ Tj−1n

h2 + ωTj+1n+1− 2Tjn+1+ Tj−1n+1

h2 .

The simulation program is available as Matlab file cfd 4.m.

Required files

This exercise requires the file cfd 4.m.

Typing the command cfd 4 in Matlab asks for the input of the required parameters for this exercise: N , ω (omega) and δt.

Questions to be solved on the computer

1) First consider the fully explicit method (ω = 0). Vary the number of grid points as N = 10 and N = 20. Solve the heat equation for various time steps, as indicated in the table below. Monitor whether the time integration is stable. In Question 4 you are asked to explain the stability limit on the time step.

time step 0.001 0.00125 0.00126 0.0025 0.005 0.0051 0.01 stable? stable? stable? stable? stable? stable? stable?

N=10 N=20

2) Next, use the Crank-Nicolson method (ω = 0.5) and the generalized Crank-Nicolson method with ω = 0.6. Use N = 10. Set the time step δt at 0.05 and 0.5; see the table below. For the larger time step the solution shows clear oscillations. Make a rough estimate for the damping factor (defined as the quotient of two successive amplitudes) of the oscillations.

1

(2)

time step δt = 0.05 δt = 0.5 stable? stable? damping ω = 0.5

ω = 0.6

3) Finally, again for N = 10, investigate the fully implicit method (ω = 1). Use the same time steps as in Question 2. Observe whether or not the solution shows oscillations.

time step δt = 0.05 δt = 0.5

stable? oscillations? stable? oscillations?

ω = 1.0

Questions to be solved by pencil-and-paper

4) First consider the fully explicit method (ω = 0). Carry out a Fourier analysis of this method. Determine the maximum allowable time step for N = 10 and N = 20.

Compare these stability limits with the empirical observations in Question 1.

5) Carry out a Fourier stability analysis of the generalized Crank-Nicolson method, and determine the amplification factor. Show that the generalized Crank-Nicolson method is unconditionally stable for ω ≥ 0.5. Investigate how the amplification factor behaves when δt → ∞. Now explain the oscillations visible in Question 2. How are these oscillations influenced when ω is increased from 0.5 to 0.6? Give a possible explanation why the observed amplification factors in Question 2 are somewhat different from the theoretical amplification factors computed in this Question.

6) Derive theoretically for which values of the Crank-Nicolson parameter ω the solution is wiggle-free. As a special case, explain why the fully implicit method (ω = 1) does not show oscillations (see Question 3). Hint: Use the concept of a positive operator.

2

Referenties

GERELATEERDE DOCUMENTEN

Key words: Generalized singular value decomposition (GSVD), partial GSVD, Jacobi–Davidson, subspace method, augmented matrix, correction equation, (inexact) accelerated Newton,

Top: The total field computed with aFMM-CFF for the isolated marker problem (oblique incidence, TE-polarization). Bottom: The solution at z = 0.1 with aFMM-CFF and with

- g serial full-decomposition of ~ P8 (present-state), where one of the component state machines uses the information about the present-state of the second component

Bereken exact de waarden van p waarvoor de grafiek van f een perforatie heeft en geef ook de coördinaten van de perforatie.... de

The result of this algorithm Figure 1 is the solution of parabolic equation (two dimension) using Crank-Nicolson method (0 = ) with variable time-stepping, for two time values (top)

The results produced by the program consist of the eigenvalues of the Jacobi matrix, a plot of the iteration error (this error is written to the screen as well), the total number

The results produced by the program consist of the eigenvalues of the Jacobi matrix, a plot of the iteration error (this error is written to the screen as well), the total number

Indeed, the CPU-time per grid point and time step of both methods is comparable, a 50 3 grid has 8 times less grid points than a 100 3 grid, it allows for a twice as large a time