Notes on MatLab & Octave
Notice that the coefficients for each cell can be stored in a 2-dimensional array of any size (only limited by your computer’s RAM memory). This process can be automated, for example, by using for loops and embedded loop. For example, in pseudo-code
For i = length(mesh variable)
A(i) = value to be assigned
End
Also, the system of equation can be conveniently written in matrix form
[A][𝜙]=[B]
These linear systems of equations can be readily solved using Matlab’s inverse division command ‘’ and, therefore, their solution does not need to be coded (i.e. using low level code within your script/s)
4.0 Literature investigation on convective discretisation schemes
When solving the 1D convection-diffusion problem you will notice, that the solution using the central difference scheme can become unstable or oscillatory in comparison to the analytical solution. This is the result of using this scheme for convective terms. As a result, you are also tasked with carrying out a literature survey and discuss 3 upwind-biased schemes. You will then choose one of these schemes and you will extend/re-write your code to include your chosen scheme to discretise convective terms only (diffusive terms should again be discretised using central difference).
5.0 Reporting the findings
The final step for this coursework is to present your findings via a written formal report. This report should succinctly discuss the various steps followed in order to develop your numerical code. It must also discuss the lessons learnt in regards to the effects of grid density and choice of discretisation scheme for convection-diffusion problems. Make sure to include high-quality graphs comparing your computed results with the analytical solution provided above, making sure to discuss any discrepancies. Apply an in-depth understanding of Fluid Mechanics fundamentals - 7013MAA Finite Volume Method for CFD. For information on how to export MatLab figures into other graphic formats please refer to MatLab’s user guide (the plot, print and hold commands will be particularly useful)
|