Till KTH:s startsida Till KTH:s startsida

Discussions Study Questions

Please add discussions/questions etc. to the study questions in this page.

Lärare Philipp Schlatter skapade sidan 7 mars 2012

kommenterade 10 mars 2012

Hej,

I have a mathematical question concerning study question 21:

How is the mathematical way to follow from the advection equation u_t=-a*u_x that u_tt=a^2*u_xx?

Thank you!

kommenterade 10 mars 2012

Hej,

if you derive the advection equation with respect to t you get

u_tt=-a*(u_x)_t=-a*(u_t)_x=-a*(-a*u_x)_x=a^2*u_xx

kommenterade 10 mars 2012

Thanks a lot!

kommenterade 11 mars 2012

Hi,

I have a question concerning exercise 14 part b, and more specifically the part we should derive a condition relating sigma and vita.

Should we take into account the third term of the sinusTaylorexpansion or just assume sin(ksi*Dx)~ksi*Dx ?

Thanks, Michail.

Lärare kommenterade 11 mars 2012

Hi,

it is sufficient to only take into accoutn ksi*Dx for sin(ksi*Dx).

Philipp 

Lärare kommenterade 12 mars 2012

An alternative way to show that u_tt=a^2 u_xx is:

do the derivative of u_t+au_x=0 with respect to x, and then with respect to t. Then, you will get in each a equation a term u_xt and u_tx which are the same due to the symmetry of secondary derivatives. Eliminating thus this terms gives the u_tt=a^2 u_xx.

But of course the above derivation is equivalent.

Philipp 

kommenterade 13 mars 2012

Hi,

I have a question about the definition "ABSOLUTE STABILITY" of a scheme. Does it mean:

a) the scheme is stable when the analytical solution is stable or

b) the scheme is always stable, even if the analytical solution is unstable?

Besides that, if I say "the scheme is "UNCONDITIONALLY STABLE", is this statement equivalent to "the scheme is ABSOLUTE STABLE"?

kommenterade 13 mars 2012

Hello, 
there is one question conserning question 29 (b). Which type of discontinuity is excuded and why? Is it discontinuity of entropy over the shock? Why can we exclude it? We have done the same in the simulation of the shocktube (home work 4), did we neglect something?

 

Lärare kommenterade 13 mars 2012

Concerning the question about absolute stability:

A scheme is absolutely stable if the complete left half-plane is stable (i.e. included in the region of absolute stability of the scheme). This corresponds to your option a).

For the term "unconditionally stable" I guess there are various interpretations possible. My definition would be that unconditionally stable would be much stronger, i.e. including the complete plane (corresponding to your option b) ).

Philipp 

Lärare kommenterade 13 mars 2012

Concerning the shock tube:

 In question 29, we assume the isentropic Euler equations, which is the same as in HW4 (leading to weak shocks). The full Euler equations would have one equation (energy equation) more, i.e. three components. Therefore, we would also get three different characteristics instead of only two as in the example (see notes Lecture10.pdf page 6). The additional feature absent in the isentropic case is the "contact discontinuity", characterised by the same pressure but different densities. The reason for this discontinuity is that it separates regions that have been processed by the shock on the right and by the expansion fan on the left, which leaves the two regions on different entropy levels. However, if these are not allowed due to an isentropy condition, this discontinuity disappear.

Philipp 

kommenterade 13 mars 2012

One question to number 28:

Is there a mathematical difference between the terms "physical" and "numerical" boundary conditions? Or is the difference just the reason why they are needed, e.g. the relation to the number of ingoing characteristics?

Tack.

Lärare kommenterade 14 mars 2012

What we call "physical" boundary conditions are the ones that are needed to solve the physical (or mathematical) problem. For instance that means that in situations where we  solve the advection equation and we have outflow, then no physical condition is allowed. 

Numerical conditions are not needed from the mathematical/physical point of view, i.e. specifying them would render the system ill posed. These are needed for certain (e.g. central) discretisation schemes and must be obtained via extrapolation from the inside.

Philipp 

kommenterade 14 mars 2012

I have some doubts about the question 26:

- The linearisation I did for the barotropic gas dynamic equation give the correct result except the denominator of the last equation:

\(u_t+a^2/(\rho_0+\rho') \rho_x\)

to get rid the last rho' we have to suppose that it is negligible compared to rho_0?

- Moreover  I found that this system is hyperbolic with characteristics =+-a

However I do not get what does it mean characteristic variables thus the characteristic formulation we have to write there.

- Another question is, how much deep we have to go for the last questions? The answer for some of them is the entire topic of 1 lecture,  I want to know, if it is possible, if we have to write every steps or a summary is sufficient.

Thank you

Fabio

kommenterade 14 mars 2012

I also spent hours with this question 26. The trick is to write the system in the linear form q_t+A*q_x=0, where q is the vector with conservative quantities rho and u.

Then you can diagionalize A=V*L*Vinv (L is diagional matrix with eigenvalues, and V is matrix whose columns are eigenvectors of A), so your system can be written as Vinv*q_t+L*Vinv*q_x=0. This becomes decoupled system with characteristic variables: w_t+L*w_x=0, where characteristic variable is w=Vinv*q. Further you can solve the system analyticaly for w=w_0 (x-lamda*t), and obtain q as V*w.

I hope this helps.

kommenterade 14 mars 2012

Hej Slobodan

Really thank you for the answer!!! I get your point and i is a very smart way to find the solution...however I get \((\rho-u;\rho/a*(\rho+u))\) as characteristic variables, I hope you have the same:)

The only thing is that I have a different result for the task e but I have to check it now...I think I made some mistakes:)

thank you again for the help!

kommenterade 14 mars 2012

I think the result I posted is wrong...

Lärare kommenterade 15 mars 2012

Hi,

regarding question 26: Indeed, you start with the variables in *primitive* variables, i.e. $(\rho, u)^T$. To then get to the characteristic variables, the idea is to diagonalise the matrix, as Slobodan writes above, this gives you the eigenvalues and eigenvectors, and with that the rule to transform the state variables into $Vinv*q$, which are called characteristic variables. In fact, the characteristic variables are also called Riemann invariants. In case of a linear problem, the eigenvalues are independent of the solution (for instance $a$ is independent of the solution $\rho$ or $u$), then the two equations are completely uncoupled and can be solved independently. In the general case, the characteristics speeds are only valid close to the point under consideration, but in general the two equations are still coupled (through the eigenvalue). 

 Hope this helps,

Philipp 

 

Lärare kommenterade 15 mars 2012

Hi Fabio,

To get the second equation correctly you need to expand the term

\(\frac{a^2}{(\rho_0+\rho')}}\)

in following way:

\(\frac{a^2}{(\rho_0+\rho')}(\rho_0+\rho')_x\approx\\ a^2 (\frac{1}{\rho_0}-\frac{\rho'}{\rho_0^2})[(\rho_0)_x+\rho_x']\approx\\ \frac{a^2}{\rho_0}\rho'_x\)

here the nonlinear terms are neglected and derivatives av \(\rho_0\) set to zero as it's constant.

It is difficult to say how detauled the answer to study question should be, all steps that is neccessary to proof a theory should be possible to follow. Of course we may ask only about specicific parts of each study question which can require shorter answers.

Regards

Ardeshir

kommenterade 8 mars 2013

Hej,

I was wondering if the given approximation of question 23 should have a minus sign on the RHS instead of the plus sign as in the document. 

$$u_j^{n+1} = u_j^n - \frac{a\Delta t}{2\Delta x}\left(u_{j+1}^n - u_{j-1}^n\right)$$

Is that correct?

Thanks in advance!

Lärare kommenterade 8 mars 2013

yes, sorry, this is correct. I updated the questions now.

Philipp

kommenterade 9 mars 2013

Hej,

I have a question about checking the well-posedness of the backward heat equation presented in the notes of Lecture 4 page 2. If we understood it properly, it says that the backward (implicit) scheme is ill-posed due to amplification of errors. However, performing a Von Neumann analysis, it is the forward (explicit) scheme the one amplificating errors, not the backward. We would like to know if it is a mistake in the lecture notes.

Thank you very much for your attention

Lärare kommenterade 9 mars 2013

Hi, 

indeed, the inverse heat equation is ill posed, as the solution will be dominated by amplification of errors. Consider for instance the "natural" occurance of the inverse heat equation, namely the inverse problem of determining the initial distribution of heat if only the state after some time is known. Then the solution (i.e. the distribution at the earlier time) will depend strongly on the known final solution, i.e. the condition that we have a continuous dependence on the initial condition is not satisfied.

This has at that point nothing to do with implicit or explicit discretisation. Of course, one could use the amplification factor from one time to another to see whether you have growing solutions, but the ill-posedness is a property of the PDE rather than the discretisation.

HOpe this helps.

kommenterade 11 mars 2013

Hej,

I have a few questions about the study questions:

1- You talked above about the absolute stability but I didn't get the point. As for me , if only a region of the plane is stable ,that means that the scheme is not absolutely stable?

2-About question 21), I wrote dow the modified wave equation by using Taylor expansion, but I don't see what type of equation it is? I only know that it would have a dispersive behaviour.

3-About question 25), I don't know how to start, I have begun by trying to find the eigenvalues but I get nowhere.

4-About question 26), I have found the partial differential equations (question d) but I can't find tha analytical solution even if I star from the characteristic formulation.

Thank you very much for your help!

Lärare kommenterade 11 mars 2013

Hi, let my try to give you some hints:

1) yes, this is what absolutely stable means. If a time-integration scheme only has a part of the left-hand side, it might be stable (depending on the time step).

2) The idea is to see what the type of the equation becomes if you only retain the leading order error term (plus of course the terms corresponding to the original PDE). Then you can see what kind of behaviour the error will introduce (dispersion, diffusion).

3) You need to state the conditions for the matrix A if you have a hyperbolic system (what are the eigenvalues and eigenvectors doing).

4) once you have the characteristic form of the equation, you have two independent advection equations, right? So you can construct the solution by combining, in an appropriate way, the solutions of these two advection equations.

Hope this helps, Philipp

kommenterade 12 mars 2013

Yes, it helps thanks!

kommenterade 14 mars 2013

I have couple of questions about the study questions: 

1- About question 39, how do we combine the stability limits , should we take \(min(\Delta t)\) or should we derive another stability limit using both terms in the equation ? how can it differ for 2D case ?

2- About Euler equations, we tried to turn in into quasi-linear form but we don't know wether should we compute \(\partial F / \partial u\) regarding the conservative variables or \((\rho , u , P)\) ? we tried both of them but non resulted as in the lecture notes. How should we proceed.

regards.

Lärare kommenterade 14 mars 2013

1) There are two ways to combine the stability limits: i) one takes the individual limits from the CFL condition (advection) and the diffusion (viscous limit) and takes the minimum. ii) for the advection -diffusion equation there is a combined limit (see study question 14), that add an additional expression (independent of the spatial grid). However, the derivation is a bit tricky (it has been wrong in the literature for nearly 50 years!). The changes when going to 2D are quite important, and this is what we discussed in the project lecture last week (notes).

2) To get the Euler equations in quasi-linear form, essentially you need to change the variables from the conservative ones (rho, rho u, E) to the primitive ones (rho, u, P). The derivation is a bit tedious, but it work in the end.

kommenterade 13 mars 2014

Hi,

When looking at question 42, what is the difference between this and Q16? Is there some special form of the advection-diffusion equation that we should use (part a?). And also, it is not stated what spatial discretizaiton to use in 42. I assume FTCS, but then doing "the terms seperately" (part c) gives that advection is unconditionally unstable - one can only get \(\frac{\sigma_{x}^{2}}{\beta_{x}}+\frac{\sigma_{y}^{2}}{\beta_{y}}\le2\) from considering both together. To get normal CFL one needs to use FTBS/FTFS. Or am I missing something?

Thanks

JP

Lärare kommenterade 13 mars 2014

Question 42 is more general about the applicability of the advection/diffusion equation as a model. Therefore, also part c) is more open, and you can choose what scheme to take. Similarly d) does not require you to do the analysis, but rather to explain what you would be doing. When doing it separately, for c) you can also use the CFL condition and assume, that the diffusion is high enough to damp the instability of the central scheme. 

Philipp

kommenterade 13 mars 2014

Ok Thanks, that makes some sense. With regard to part A though, is there some better form of the advection-diffusion equation that would be more suitable? As the regular advection terms do not appear as simply in the NS - or is it just a good trade off between having hyperbolic and elliptic parts and being easy?  

One more quick question. When working with the dual grid for the first derivative, we had in lectures that \(\int_{V}\frac{\partial u}{\partial x}dV=\int_{\partial V}udy\). I cannot quite work out why. Applying divergence theory I would get something like \(\int_{V}\frac{\partial u}{\partial x}dV=\int_{\partial V}\left(\begin{array}c u\\0\end{array}\right)\cdot ndS\). I'm sure there is something I am missing but I can't seem to work it out. 

Thanks again

kommenterade 14 mars 2014

Isn't it because \(n_i dS = (dy, -dx)\)?

kommenterade 14 mars 2014

Right, sorry that makes sense. Thanks!

kommenterade 18 mars 2014

Hej,

I have a question regarding the second part SQ33, why one does not use an artificial viscosity for upwind schemes.

As we discussed in the lecture, the leading error term of an first order upwind scheme is diffusive, and therefore we wouldn't need an artificial viscosity term, but is this the case for any other order aswell? Or was only a first order upwind scheme assumed in this question?

Thanks in advance,

Randi

kommenterade 18 mars 2014

Question 37:

Can such a question in this extent really come up in the exam? I mean it is important to understand to concept to derive the Navier-Stokes equations on an arbitrary grid and to see that at the end it is equal to using a CDS on a Cartesian grid, but one needs a long time to do all derivations in part a) and b). And actually it is just a lot of maths...

Lärare kommenterade 18 mars 2014

Q33: yes, it was assumed that the upwind scheme is first order.

kommenterade 20 mars 2014

Hello

regarding the question 34 can you explain what exactly are the characteristics and the primitive variables? 

Dimitris

kommenterade 20 mars 2014

Hi,

Regarding question 7 : in the c part can we use the same formula as in b to calculate the relative error? And when we use the term absolute error, we mean just the difference between the two values?

Regarding question 24 : can you point out in which lecture pdf can I find the solution?

Thank you in advance

Maria

kommenterade 20 mars 2014

Maria,

For the question 24 have a look at the lecture notes 10 on the first page.

Mickael

Lärare kommenterade 20 mars 2014

Q34: primitive variables: think of the system as dudt + A*dudx = 0, where u would be velocity and pressure.

conservative variables: think of the system as dvdt + d/dx f(v) = 0, where v might be mass, momentum, energy.

characteristic variables: think of the system as dwdt + B*dwdx = 0 with a diagonal B, such that the components in w are decoupled. This then relates to Riemann invariants, and can be used to determine numerical boundary conditions along characteristics. Note that we have this year NOT discussed that during the lecture. 

Philipp

Lärare kommenterade 20 mars 2014

Q7: yes, you can use the same formula. The trick is to realise that you will get a drastic difference between absolute and relative error for the two cases (addition, difference).

Philipp

kommenterade 20 mars 2014

A more general question regarding consistency:

So we derive an expression for the truncation error and get the accuracy order from the exponents of Delta x respective Delta t. In most examples we had p=q. What happens if p isn't equal to q? Is the scheme then inconsistent? Or is it just the accuracy that is different for time and space discretisation?

Thanks, Randi

Lärare kommenterade 20 mars 2014

p does not need to be the same as q, but it needs to be such that the error really goes down by refining in time or in space. A typical example of a scheme that is NOT consistent is the Dufort Frankel method.

Philipp

kommenterade 20 mars 2014

So what was the deal with the Q37? I agree with Markus on that!

(Markus Christian Geisenhofer tisdag 17:26)

kommenterade 11 mars 2015

For Q39, are we taking the 2D case for the Navier Stokes Equations?

Lärare kommenterade 11 mars 2015

Yes.

kommenterade 11 mars 2015

Q39: I'm not quite sure then how to do the staggered grid because unlike the project, I'm guessing we're dealing with compressible flow. So would we also need to stagger density?

Cheers

Lärare kommenterade 11 mars 2015

We are considering the incompressible flow only.

kommenterade 13 mars 2015

Question 11 c is regarding the selection of an appropriate time integration scheme for a certain value of %lambda in the Dahlqvist equation. I would like to know the various considerations one would make.

I currently understand the considerations as stability, accuracy and computational memory, but what are their relative order of importance?

Lärare kommenterade 13 mars 2015

for part c) your points are correct. There is no general way of really saying which aspect is most important, it all depends on the specific circumstances you have for the problem at hand, e.g. how difficult is it to invert the matrix for the implicit scheme, how small is the time step really for the explicit one etc. The main answer comes from the consideration of the "time to solution", i.e. how long does the run really take to get a result with a certain accuracy.

for part d) it is important to understand the order of the two schemes, and maybe also look at the "intermediate" scheme, i.e. the Crank-Nicolson scheme. Also, for stiff problems one might need to look at the asymptotic behaviour, e.g. to avoid oscillating solutions.

Hth,

Philipp

kommenterade 13 mars 2015

Q19: Looking through the lecture notes for determining the Euler equations in conservative form, I understand why the viscous stress is removed, but I'm not quite sure why we also ignore heat dispersion, heat sources and gravity.

Assistent kommenterade 13 mars 2015

The most general form of the compressible Euler equations comprises heat transmission and generation and gravity (and in general body forces).
They are included even in the lecture notes (I am now looking at the first page of lecture8.pdf).
In flow cases where these contributions are absent or negligible, or if you want to simplify the treatment to show certain properties, they can be omitted from the equations, but in general they are present.
May I ask you what lecture notes you are referring to so that I may give a more specific answer?

Kind regards,
Jacopo

kommenterade 14 mars 2015

Same lecture, a bit further down on the 3rd page. Also searching around on the internet, these terms are generally omitted.

So just to confirm, we would usually be looking at cases where these components are negligible? Would there be any general case when they aren't then or is this a fair assumption?

Lärare kommenterade 14 mars 2015

It always depends on the flow situation which terms need to be taken into account, and which ones can be neglected; see for instance the discussion we had on that in my first lecture (physical modelling etc.). For instance, in aeronautics, gravity (and buoyancy) can usually be neglected, but if you consider problems with natural convection (like the Rayleigh-Bénard problem) these terms are the actual driving force. Similarly, when treating a flow to be inviscid, one would do the same approximation also for the heat diffusion.

Philipp

kommenterade 14 mars 2015

This is a general question. Do we need to memorise the open forms of the NS equations (continuity, momentum and energy) if, for instance, a question asks for a derivation of the nondimensional NS equations or the boundary layer equations or are they going to be available for us?

Best,

Emirhan

Lärare kommenterade 14 mars 2015

you would need to know the basic governing equations, like the continuity equation, momentum and energy equations, in their respective simplest form (compressible and incompressible). The exam is not about knowing a lot of equations by heart, but rather on testing some of the concepts, which however does require some basic equations.

Philipp

kommenterade 14 mars 2015

Would it be assume from the expressions for amplification factor for very stiff problems, the implicit scheme works better than crank nicolson?

kommenterade 14 mars 2015

*safe to

Lärare kommenterade 14 mars 2015

Crank-Nicolson is an implicit scheme as well. What you need to look at is the amplification factor for \(\lambda \Delta t \rightarrow -\infty\)  and determine, which of the schemes is closest to the amplification factor of the exact solution during time \(\Delta t\).

kommenterade 17 mars 2015

Hej! For question 8, we did it in the lesson but we don't really understant why lambda = infinity. Lambda just seemed undefined. For question 16, there is an indication to neglect terms of order 4 but where do those terms come from? Thank you, Ambre

Lärare kommenterade 17 mars 2015

For question 8, you could also switch the denominator and numerator and your slope would then become zero, which is well defined.

In question 16, you get terms of order 4 when considering \xi \delta x = 0 because the approximation of the cosine already contains a square.

kommenterade 17 mars 2015

In question 16, I cannot get rid of the multiplier \(\xi \Delta x\). I neglect the 4th order term as instructed, but then I get \((\xi\Delta x)^2*f_1(\beta,\sigma) + f_2(\beta)\). Is the final condition supposed to be a function of \(\beta\) and \(\sigma\) only or is it okay to leave the condition in the form I described above?

Lärare kommenterade 18 mars 2015

well, one should get a condition relating sigma and beta, both mulitplied by (\xi \Deltax)^2. Therefore, the latter can be divided by (because it is positive).

Philipp

kommenterade 18 mars 2015

I realized I was doing some miscalculations, that's why I didn't get a condition of \(f(\sigma, \beta)\). Thanks.

kommenterade 18 mars 2015

As I read in the previous comments we should know the compressible/incompressible Navier-Stokes, Euler etc. Regarding the formulas for the truncation/ propagation or the varius other equations that we dealt during the lectures should we know these as well or will they be given to us in case they are needed?

Thanks,
Nikos

Lärare kommenterade 18 mars 2015

In case you need truncation errors etc. you would be asked to derive it as part of an exam question. However, you might want to know the Burgers equation, advection equation, diffusion equation etc. and their respective characteristics.

Philipp

kommenterade 9 mars 2017

Hi! 

Question 25. Is a general wave not expressed by u = u_hat*exp(i*(kx-wt)) ? In the study questions the imaginary unit i seems to be missing? According to the lecture notes it sure looks like the i should be there.

Regards

Assistent kommenterade 9 mars 2017

Hello,

if k and omega are complex numbers there is no reason to pre-multiply by i, it is just a matter of how you define k and omega and their real and imaginary parts.

Kind regards,
Jacopo

kommenterade 13 mars 2017

In questions 29 and 34 the so-called "Characteristic variables" and characteristic formulation are mentioned. What are they? I can't find them in my notes nor on the lecture notes here.

Regards,

Francesco

Lärare kommenterade 13 mars 2017

The characteristic variables are calculated by diagonalising the matrix, so that the new system essentially has the characteristic speed on the diagonal, and can be solved very easily as an ODE. One uses this formulation also to derive proper characteristic boundary conditions, as briefly mentioned in the context of the shock tube. However, we have not discussed this aspect during this year in more detail.

kommenterade 16 mars 2017

Question 48b: 

in the lecture notes it is stated that Vc = h^2. However if we compute Vc with the formula:\(V_c = \frac{1}{2 n_{dim}} \sum_{k=1}^{mc} S_{ck} (x_k - x_c)\)

we will get \(V_c = \frac{1+\sqrt{5}}{3} h^2\). Which is the correct one?

Thanks.

kommenterade 16 mars 2017

Question 7b and 7c:

I used equation (4) for calculating the relative error for both cases. Regarding the machine accuracy eps_aj, is it correct to use the machine epsilon or do we need to use 1/2 of the machine epsilon?

About the absolute error, is it sufficient to calculate it multiplying the relative error for (x+y) in the first case and (x-y) in the second one or do we need to proceed in another way?

Regards,

Francesco

Lärare kommenterade 16 mars 2017

for b), the epsilon given is directly the relative error.

for c) yes.

Lärare kommenterade 16 mars 2017

Regarding question 48b:

The correct volume is \(h^2\), which you will get if you use the relation 

$$V_c = \frac{1}{2 n_{dim}} \sum_{k=1}^{mc} \bar{S}_{ck}\cdot (\bar{x}_k - \bar{x}_c)$$

Note that \(\bar{S}_{ck}\)\(\bar{x}_k\) and \(\bar{x}_c\) are vectors. So you need to account for the the direction of surface normals.

The normal vectors on the faces of dual grid cutting line \(c2\) is \((2/\sqrt{5}, 1/\sqrt{5})\) and  on the face cutting line \(c3\) is \((1/\sqrt{5}, 2/\sqrt{5})\).

fig.png