Computational Hydraulics, Lecture Notes- Physics - 2, Study notes of Physics

Advection-diffusion equation

Typology: Study notes

2010/2011

Uploaded on 09/08/2011

the-princess
the-princess 🇬🇧

4.5

(4)

15 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CFD Advection-Diffusion Equation - 1 David Apsley
ADVECTION-DIFFUSION EQUATION SPRING 2011
1. Notes on the program
2. Assigned exercise (hand-in deadline: Friday 11th March, 10 am)
1. NOTES ON THE PROGRAM
1.1 Accessing and Running the Program
Download the following executable program file from the web page for this unit:
adeqn.exe
The program can be run by double-clicking on it.
1.2 Equation to be Solved
The program solves the 1-d advection-diffusion equation
S
x
AuA
x
=
φ
φ )
d
d
(
d
d
on the interval [0, L], for various types of source S(x). φ is specified at x = 0, whilst either φ
or dφ/dx may be specified at x = L. The equation can also be written in integral form:
=
φ
φ
e
w
e
w
xS
x
AuA d
d
d
i.e. sourcefluxflux we = for any subinterval [w,e].
1.3 Parameters
(density), u (velocity), A (cross-sectional area), (diffusivity), and L (length) are constants
with (mainly obvious) restrictions:
, A, L > 0; > 0; u 0.
S is the source per unit length and is the sum of:
a constant part S0;
a solution-dependent part S1φ , where, for stability, we require 0
1S;
a point source of size Spt at location xpt.
1.4 Program Operation
Most work can be done by clicking buttons, or editing menus. The main button classes are:
set-up cases – sets up one of 4 pre-defined cases;
edit parameters – change a default set-up;
actions – solve or plot; self-explanatory;
results – display the numerical output or save a graphics file (type .png).
The following equation and solution parameters may be set.
pf3
pf4

Partial preview of the text

Download Computational Hydraulics, Lecture Notes- Physics - 2 and more Study notes Physics in PDF only on Docsity!

ADVECTION-DIFFUSION EQUATION SPRING 2011

  1. Notes on the program
  2. Assigned exercise (hand-in deadline: Friday 11th^ March, 10 am)

1. NOTES ON THE PROGRAM

1.1 Accessing and Running the Program

Download the following executable program file from the web page for this unit: adeqn.exe The program can be run by double-clicking on it.

1.2 Equation to be Solved

The program solves the 1-d advection-diffusion equation

S x

uA A x

φ φ − ) d

d ( d

d

on the interval [0, L ], for various types of source S ( x ). φ is specified at x = 0, whilst either φ or dφ/d x may be specified at x = L. The equation can also be written in integral form:

 φ φ−

e

w

e

w

S x x

uA A d d

d

i.e. flux (^) efluxw = source for any subinterval [ w , e ].

1.3 Parameters

(density), u (velocity), A (cross-sectional area), (diffusivity), and L (length) are constants with (mainly obvious) restrictions: , A , L > 0; > 0; u 0. S is the source per unit length and is the sum of:

  • a constant part S 0 ;
  • a solution-dependent part S 1 φ , where, for stability, we require S 1 (^) ≤ 0 ;
  • a point source of size Spt at location xpt.

1.4 Program Operation

Most work can be done by clicking buttons, or editing menus. The main button classes are: set-up cases – sets up one of 4 pre-defined cases; edit parameters – change a default set-up; actions – solve or plot; self-explanatory; results – display the numerical output or save a graphics file (type .png).

The following equation and solution parameters may be set.

Name Parameter Restrictions RHO (^) , density > 0 U (^) u , velocity (^) ≥ 0

GAMMA , diffusivity > 0 S0 S 0 , constant part of source density S1 (^) S 1 , solution-dependent source density (^) ≤ 0 SPT (^) Spt , point-source strength XPT xpt , location of point source (if any) AREA (^) A , area > 0 L (^) L , length of domain > 0 Nature of boundary condition at x = 0 (^) VALUE (hard-coded here) Nature of boundary condition at x = L (^) VALUE or DERIV Value of φ or dφ/d x at x = 0 Value of φ or dφ/d x at x = L Number of control volumes > 0 (integer) Advection scheme (if u > 0) (^) UPWIND, CENTRAL, HYBRID, QUICK, UMIST or VANLEER Under-relaxation factor (^) 0 < under-relaxation factor ≤ 1 Maximum iterations > 0 (integer)

2. ASSIGNED EXERCISES

The assigned exercises use the pre-defined test cases 2, 3 and 4. You should note the definitions of these in Part 1 before doing this assignment.

Case 2

(a) Set up case 2; solve and plot. Save plot and data files and include them in your report.

(b) Describe the main features of the solution and give physical reasons for its shape.

(c) Edit the equation parameters to solve on meshes of 5, 10, 50 and 100 control volumes. Tabulate the maximum absolute error for each. Plot a graph of log 10 (max|error|) against log 10 ( x ). Is this consistent with an order-2 numerical method? Consider also this last question if you ignore the two coarsest-grid solutions (5 and 10 control volumes).

(d) Using the cell-centre values for the numerical solution with 5 control volumes, calculate the total rate of heat loss from the rod. Show that this can also be obtained from the end fluxes only, and confirm that the two methods yield the same results.

Case 3

(a) Set up case 3. Solve for central differencing (the default), upwind differencing and Van Leer advection schemes with 5 control volumes. Include a plot of each in your report. Comment on the relative performance of these advection schemes.

(b) For the central differencing scheme with 5 control volumes, calculate the cell Peclet number (notes: Section 4.8.1). Is this within the range for which the central-differencing scheme is bounded? How many cells would be needed to give a Peclet number of 1.0? Compute the solution with this Peclet number and include the plot in your report.

Case 4

(a) Set up and solve with 7 control volumes. Run with central, upwind, QUICK and UMIST advection schemes ( Note part (b) below for the last of these schemes ). Include the plots and comment on whether the solutions obtained with each are physically realistic.

(b) For the UMIST scheme you will have to reduce the under-relaxation parameter. State the value that you have used to get a converged solution. Why is under-relaxation used and what difference it makes to the final solution? (notes: Section 4.13.3).

(c) For each of the four advection schemes used in part (a) state whether it is bounded and/or transportive (notes: Sections 4.9-4.10).

(d) For the central differencing scheme, how many control volumes are required to give a cell Peclet number ≤ 2? Comment on the relative effectiveness of central differencing compared with a flux-limited scheme like UMIST in this case.