Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

From Weichao Zhao to Everyone: 11:49 AM

hhhh

From Rifat Mahammod to Everyone: 11:50 AM

wow

From Haibiao Wang to Everyone: 11:50 AM

hhhhhhh

From Prabh Bhambra to Everyone: 11:50 AM

you should be able to mute all

From Haibiao Wang to Everyone: 12:10 PM

i am a c++ fan

From Timo Betcke to Everyone: 12:10 PM

From Prabh Bhambra to Everyone: 12:11 PM

c++ is too difficult for me

if c++ is the meaning of life, i'm not entirely sure I want to love anymore

From Haibiao Wang to Everyone: 12:11 PM

indeed, a life of learning,hhhhh

From Prabh Bhambra to Everyone: 12:11 PM

existential crisis time

From Tiantian He to Everyone: 12:15 PM

Should we set the time step to be as small as 10^(-12) in order to get the 12 digits accuracy t*? But in
this case, we should iterate for about 4.24*10^11 times to reach t* = 0.424... My computer cannot do
that many iterations.

From Aiwei Bian to Everyone: 12:17 PM

Should we apply Neuman boundary condition at the three boundaries without heating?

From Jianyue Wang to Everyone: 12:17 PM

To get higher accuracy, we need more computing time. What should we choose?

So we still need to control the run time to within 2 mins?

From Prabh Bhambra to Everyone: 12:18 PM


for backward euler we can choose the time-step, but it's very computationally expensive. is it possible to
vary the time-step so we can use finer discretization when we're close to the expected solution?

From Timo Betcke to Everyone: 12:20 PM

Bye.

From Haibiao Wang to Everyone: 12:20 PM

is u= 1 is the center of the graph (u vs. t)?

From Tiantian He to Everyone: 12:21 PM

Are we allowed to use numpy and numba?

From Timo Betcke to Everyone: 12:21 PM

Yes. You are allowed to use them.

u=1 is measured at the center of the plate.

From Haibiao Wang to Everyone: 12:22 PM

so u =1 is the centre of u, as we solve the list of u ,

so the u = 1 is the middle point

From Tiantian He to Everyone: 12:22 PM

I am a bit confused about how to set u between [-1,1]*[-1,1].

From Timo Betcke to Everyone: 12:22 PM

I don't understand what you mean. You have a square and you measure the value u at the centre of it,
and you ask when is this value going to be 1.

From Pranav V Kalidindi to Everyone: 12:23 PM

Are we only required to use forward and backward euler or are we also expected to experiment with
more complicated finite difference schemes?

From Timo Betcke to Everyone: 12:23 PM

You are not setting u. u is the temperature distribution over your domain at each timestep. It is a
function u(x, t).

You are only required to use forward and backward Euler. If you want to impress us, try something else
as well.

From Haibiao Wang to Everyone: 12:24 PM

so each time step I calculate u_i and use it to calculate u_i+1, stop until the centre of u = 1.we can get t
base on the steps

From Tiantian He to Everyone: 12:24 PM


sorry I meant to set x and y belongs to [-1,1]

From Pranav V Kalidindi to Everyone: 12:24 PM

Thank you

From Tiantian He to Everyone: 12:24 PM

and how to choose suitable h (delta x and delta y)

From bowen.zheng.20@ucl.ac.uk to Everyone: 12:25 PM

I considered the easiest case(N=3) when it only contains (0,0) the center as interior point. But the time I
calculate is 0.2...

From Timo Betcke to Everyone: 12:25 PM

Yes. It is a plate. Both x and y are between -1 and 1 in their dimensions.


Bowen, this is by far not a sufficient approximation. You need to refine. If you have refined quite a bit
and you are still getting the wrong number, there might be a bug in your code.

From bowen.zheng.20@ucl.ac.uk to Everyone: 12:27 PM

I have no code for now.. I calculate the easiest theought writing.

through writing down the calculation

From Tomo Pavicic to Everyone: 12:27 PM

Just to be clear, the Del u is the Laplacian which we approximate with the 5-point stencil?

From Timo Betcke to Everyone: 12:27 PM

I see. Nice idea. But it is not enough to get a physically relevant approximation.

@Tomo. Yes.

From Tomo Pavicic to Everyone: 12:27 PM

Thank you

From bowen.zheng.20@ucl.ac.uk to Everyone: 12:28 PM

Does it mean N must be big enough if we want to get the correct approximation?

From Yue Zhang to Everyone: 12:28 PM

the discretization points means we need increase the grid size of plane of the delta t?

From Timo Betcke to Everyone: 12:28 PM

@Bowen. Yes. The bigger N, the more digits you get.

From Yue Zhang to Everyone: 12:29 PM

the discretization points means we need increase the grid size of plane or the delta t?
From Timo Betcke to Everyone: 12:29 PM

@Yue. You have two discretisations, one in t and the other one in x. You need to refine both.

From Yue Zhang to Everyone: 12:30 PM

And are we expected to show the mathematical process for approximation method?

From Timo Betcke to Everyone: 12:30 PM

Not sure what you mean. You should well describe what you are doing, as always.

From bowen.zheng.20@ucl.ac.uk to Everyone: 12:32 PM

Should we explain both code and the theoretical idea behind it?

From Yue Zhang to Everyone: 12:32 PM

Thank you.

From Timo Betcke to Everyone: 12:33 PM

@Bowen. See answer to @Yue.

I want to discuss more about the value of x and y. They should belong to [-1,1]. Now I only know how to
set the width and length of the plate to be 2, but don't know how to set them exactly between -1 and 1.

From Yue Zhang to Everyone: 12:34 PM

what kind of packages we can use? scipy ,numpy, numba, time??

From Timo Betcke to Everyone: 12:35 PM

@Tiantian. You discretise the plate with a finite difference grid. We have done exactly this many times.
The only difference is that we have chosen until now the square [0, 1]\times [0, 1]

From Yue Zhang to Everyone: 12:38 PM

And are we expected to use %timeit rather than %time as always?

From Timo Betcke to Everyone: 12:38 PM

Your choice.

I personally prefer %timeit

From Yue Zhang to Everyone: 12:39 PM

Yeah, because it seems to be a lot of variable here. And I worried about the total processing time .

From Timo Betcke to Everyone: 12:40 PM

Why? If you have the discretisation matrix $A$ for the Laplacian as sparse matrix, each time-step is very
fast.
From Yue Zhang to Everyone: 12:39 PM

Yeah, because it seems to be a lot of variable here. And I worried about the total processing time .

From Timo Betcke to Everyone: 12:40 PM

Why? If you have the discretisation matrix $A$ for the Laplacian as sparse matrix, each time-step is very
fast.

From Yue Zhang to Everyone: 12:43 PM

Yeah, I will do more testing! Maybe it is a signal that I need to change my computer ,haha

From William Pegler to Everyone: 12:46 PM

So we just need to compute the laplacian A sparse matrix at t0?

From Timo Betcke to Everyone: 12:48 PM

The matrix A that discretises the Laplacian is the same for each timestep. So you only do this once. You
can take as template for example the discretise_poisson function. Just be careful with the sign and the
boundary conditions.

From William Pegler to Everyone: 12:51 PM

thank you!

just to be sure, so we have zero boundary conditions for the assignment 4?

From Timo Betcke to Everyone: 12:51 PM

No. Your initial condition is u=0. One boundary side has the value u=5. The other ones have the values
u=0.

From William Pegler to Everyone: 12:52 PM

I see, thanks

From Timo Betcke to Everyone: 12:52 PM

You need to distinguish between initial conditions and boundary conditions.

From Haibiao Wang to Everyone: 12:52 PM

I don’t know where should I put x,y with [-1, 1] interval, as we use discretise_poission function, I only
need to set the input vector, where should I set the x and y.

From Tiantian He to Everyone: 12:54 PM

we should have u=5 for one boundary and 0 for the rest boundaries. Does that mean they equal to 5 (or
0 ) at any t?

and also, do the two vertexes of the boundary (u=5) equal to 5 or 0? thank you!
From Timo Betcke to Everyone: 12:55 PM

Yes. The sides always equal 5 or 0, depending on where you are. The corner point is a good question.
There is some good mathematics involved. In principle, for us it does not matter. Just choose.

Adaptive time stepping - scipy

You might also like