


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Advection-diffusion equation
Typology: Study notes
1 / 4
This page cannot be seen from the preview
Don't miss anything!



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 (^) e − fluxw = 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:
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)
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.