联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp

您当前位置:首页 >> C/C++编程C/C++编程

日期:2020-06-12 11:29

NS_ass_5_June_2020.docx 1

Numerical solutions assessment 5, June 2020

This is the fifth and final Numerical Solutions assessment. It is worth 40% of the total mark available for this

module. The deadline for submission is Sunday 28th June 2020 by 23:59. Please submit a .pdf and a .zip to

BlackBoard. This assessment is an individual assessment.

Solving the Poisson equation on a non-rectangular grid

Let Ω ? ?

2 be a connected subset of ?

2 with boundary Γ = ??Ω. The 2-dimensional Poisson equation takes

the form

is the Laplace operator, ?? ∶ Ω → ? is a source term, ?? ∶ Ω → ? is the function to be

determined, and a boundary condition on Γ is supplied. The C++ application PDE_Poisson_FD_v5 solves

the 2-dimensional Poisson equation numerically on a rectangular domain Ω with either Dirichlet or Neumann

boundary conditions.

For the assessment you must write and test an application that can solve the 2-dimensional Poisson

equation for general domains Ω ? ?

2 with Dirichlet boundary conditions. You may if you choose base your

code on PDE_Poisson_FD_v5, adapting it to the requirements of this assessment.

You may assume that

i) Ω is a compact subset of ?

2 with a single component.

ii) For every ?? ∈ Ω ? an open ball ???? ? Ω with ?? ∈ ????, the closure of ???? in ?2.

Condition (ii) means that ‘Ω is everywhere two dimensional,’ that is, every point in Ω is either an internal

point or is ‘next to’ an internal point: Ω contains no isolated 1-dimensional line segments.

Let ??1 be the final digit in your JNU ID and ??2

the penultimate digit. Let ???? = (???? + 1)/3 and ???? =

(???? + 3)/4. Use your code to value the PDEs with:

domain Ω??, ?? = 1,2,3, each ofi) Ω1. The area enclosed by the points

??1 = {(2,4), (4,4), (4,3), (5,3), (5,2), (4,2), (4,1), (2,1), (1,2), (1,3)}.

See Figure 1. This is a fish shape.

ii) Ω2. The area enclosed by the points

??2 = {(1,5), (5,5), (5,1), (1,1), (2,4), (4,4), (4,2), (2,2)}.

See Figure 2. This is a hollow square having a square hole in the middle.

iii) Ω3 = {(??, ??) ∈ ?2| (?? ? 1)2 + (?? ? 1)2 ≤ 1}, a disk of radius 1 centred at (1,1);

source term ????, ?? = 1,2, each ofa) ??1(??, ??) = ??1 + ?? sin ??;b) ??2

(??, ??) = ??2 + ????

??;

and Dirichlet boundary condition ????∶ Γ → ?, ?? = 1,2, each of1) ??1(??, ??) = sin(????) ? ??1;2) ??2(??, ??) = ?????? ? ??2;

yielding 12 combinations in all.

Figure 2. Ω2

NS_ass_5_June_2020.docx 2

For the discretization you may assume if you wish a grid composed of rectangular elements. It may be

helpful to form a gird on a rectangle enclosing Ω??

, then discard points that are not required

In each case comment on the accuracy of your numerical solution. You should apply your code with different

mesh sizes to explore the convergence properties. Comment on any difficulties that you encounter with

particular combinations.

You will be assessed on

a) The degree to which your code has the required functionality.

b) Your assessment and discussion of the accuracy of your numerical solutions.

c) The quality of your code in terms of functionality, readability, maintainability, clarity,

efficiency, sophistication, generalizability, and general presentation.

d) The presentational quality of the report as a whole.

The submission

You must submit two files: (a) a report in .pdf format and (b) a .zip file containing code.

The report, as a single pdf file, must contain:

i) A brief description of your implementation

ii) The results of your valuations.

iii) An assessment of the accuracy of your numerical solutions.

iv) A code listing.

For parts(ii) and (iii) you may wish to include graphical or tabular representations. Between them, parts (i),

(ii), and (iii) should be less than five sides excluding plots, tables, and displayed equations.

If you base your code on PDE_Poisson_FD_v5 you need list only (a) code that you have ‘touched’

for example the new objects you have written, and objects of mine that you have altered, and (b) sufficient

other application code so that I can understand the programme flow through your application. If in doubt as

to what you should or should not include in your listing, please contact me. The code listing must follow the

module guidelines.

The zip file must contain your C++ code according to the module guidelines. Your application code must be

object oriented with a clear client interface. The code you submit must be the complete application, able to

run without addition or modification with DevCpp on my standard Windows laptop. The .zip must contain

only the .cpp, .h, and .dev files (plus, if used, any I/O files).

Nick Webber

June 2020


版权所有:留学生编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp