How Can Variational Principles Help in Discretizing Elliptical PDEs?

  • Thread starter Thread starter ognik
  • Start date Start date
  • Tags Tags
    Pdes
Click For Summary

Homework Help Overview

The discussion revolves around the topic of discretizing elliptical partial differential equations (PDEs) using variational principles. The original poster expresses confusion regarding the derivation of energy functionals and their implications in computational physics, particularly in the context of boundary conditions and the transition from continuous to discrete formulations.

Discussion Character

  • Exploratory, Conceptual clarification, Mathematical reasoning, Problem interpretation

Approaches and Questions Raised

  • The original poster attempts to understand the variational principle and its application in deriving energy functionals for elliptical PDEs. They seek clarification on the meaning of the starting equations and the steps involved in the derivation. Some participants question the concept of discretization and its implications, while others suggest exploring the differences between various lattice formulations.

Discussion Status

Participants are actively engaging with the original poster's queries, providing insights into the discretization process and the variational approach. There is an ongoing exploration of the differences between different lattice setups, and some guidance has been offered regarding the interpretation of the equations presented.

Contextual Notes

The original poster notes a lack of background knowledge in computational physics, which may be affecting their understanding of the variational principles and discretization techniques discussed. They also mention an impending deadline for their assignment, adding urgency to their requests for assistance.

ognik
Messages
626
Reaction score
2

Homework Statement


Hi - looking at 'discretizing elliptical PDEs'.
I understand the normal lattice approach, but this approach uses the variational principle. I have a couple of questions please. The text says:
$$ \: Given\: E=\int_{0}^{1} \,dx\int_{0}^{1} \,dy\left[\frac{1}{2}\left(\nabla \phi\right)^{2} - S\phi \right] $$
"It is easy to show that E is stationary under all variations $\delta \phi$ that respect the Dirichlet boundary conditions imposed. Indeed the variation is $$ \delta E=\int_{0}^{1} \,dx\int_{0}^{1} \,dy\left[\nabla \phi .\nabla \delta \phi - S \delta \phi \right] $$
..which upon integrating the the second derivative by parts becomes...
$$ \delta E=\int_{C} \,dl\: \delta \phi \vec{n} . \nabla \phi + \int_{0}^{1} \,dx \: \int_{0}^{1} \,dy\: \delta \phi \: \left[-\nabla^2 \phi - S \right] $$
... where the line integral is over the boundary of the region of interest (C) and n is the unit vector to the boundary."

Sadly, while I recognize all the words and symbols, I cannot follow it at all; I also have no idea where they get the starting equation or what it means. (The sometimes problem with computational physics is that it assumes certain background knowledge). I am hoping someone can expand enough (or provide links) so that I can follow all the above steps in detail?

The second question follows a short bit later in the text, apparently the above 'easily' leads to the following equation:
$$ E= \frac{1}{2} \sum_{i=1}^{n}\sum_{j=1}^{n}\left[\left({\phi}_{ij} - {\phi}_{i-1,j}\right)^2 + \left({\phi}_{ij} - {\phi}_{i,j-1}\right)^2 -{h}^{2}\sum_{i=1}^{n}\sum_{j=1}^{n}{S}_{ij}{\phi}_{ij}\right] $$

I probably don't need to understand how they get to the above equation - I'd just prefer to understand as much as I can, so again please help me to follow it.

What I really MUST do is now take a differential of the above w.r.t. $$ {\phi}_{ij} ,\: IE\: \frac{\partial{E}}{{\partial{\phi}_{ij}}} $$

Homework Equations


$$ E= \frac{1}{2} \sum_{i=1}^{n}\sum_{j=1}^{n}\left[\left({\phi}_{ij} - {\phi}_{i-1,j}\right)^2 + \left({\phi}_{ij} - {\phi}_{i,j-1}\right)^2 -{h}^{2}\sum_{i=1}^{n}\sum_{j=1}^{n}{S}_{ij}{\phi}_{ij}\right] $$

The Attempt at a Solution


I don't even know where to start in terms of the text above, but I should be able to do the partial derivative of the relevant eqn - with a little help help on the following 2 queries first please:
I think that I can just differentiate inside the summations, is that right?
What do I do with the i-1 and j-1 terms when differentiating w.r.t. ∅ij?
------------------
Thanks for reading.
 
Physics news on Phys.org
Do you understand the concept of discretisation? Can you briefly describe what you think it means?
 
  • Like
Likes   Reactions: ognik
Orodruin said:
Do you understand the concept of discretisation? Can you briefly describe what you think it means?

Sorry Orodruin, for some reason I didn't get a notification that you'd replied. In the meantime I have made progress with the 2nd part on the actual discretisation (using a regular lattice with spacing h to approximate the derivatives, in this case using the 2-point difference formula).

But I am stuck again at a later stage in the book. We are given an energy functional using cylindrical coords:
$$ E=\int_{0}^{\infty} r.dr\left[\frac{1}{2}\left(\frac{d{\phi}}{{dr}}\right)^2 - S.\phi\right] $$
First we are asked to discretize using an ri = (i - 1/2)h lattice. I correctly get:
$$ E=\frac{1}{2h}\sum_{i=1}^{n}{r}_{i-\frac{1}{2}}\left({\phi}_{i} - {\phi}_{i-1}\right)^2 - h\sum_{i=1}^{n}{r}_{i}{S}_{i}{\phi}_{i} $$
$$ Then \: setting\: \frac{\partial{E}}{{\partial{\phi}_{i}}}=0 \:I \: get: $$
$$ 2{r}_{i}{\phi}_{i} - {r}_{i-\frac{1}{2}}{\phi}_{i-1} - {r}_{i+\frac{1}{2}}{\phi}_{i+1} = {h}^{2}{r}_{i}{S}_{i} $$
Which is all good - just the background for where I get stuck.
-------------
Now I am asked to do the same as above, but for a ri=ih lattice, and I should end with the same equation as the last above, but I don't and can't quite figure out what to do differently. My workings follow, discretising for the ri=ih lattice:
$$ E=\frac{1}{2h}\sum_{i=1}^{n}{r}_{i}\left({\phi}_{i} - {\phi}_{i-1}\right)^2 - h\sum_{i=1}^{n}{r}_{i}{S}_{i}{\phi}_{i} $$
$$ \frac{\partial E}{\partial{\phi}}=\frac{1}{2h} \frac{\partial }{\partial{\phi}}[\sum_{i=1}^{n}{r}_{i}\left({\phi}_{i} - {\phi}_{i-1}\right)^2 - h\sum_{i=1}^{n}{r}_{i}{S}_{i}{\phi}_{i}] =0$$
$$ \therefore \frac{1}{2h} \frac{\partial }{\partial{\phi}}[{r}_{1}\left({\phi}_{1} - {\phi}_{0}\right)^2...+{r}_{i}\left({\phi}_{i} - {\phi}_{i-1}\right)^2 + {r}_{i+1}\left({\phi}_{i+1} - {\phi}_{i}\right)^2 ...+{r}_{n}\left({\phi}_{n} - {\phi}_{n-1}\right)^2] = h {r}_{i}{S}_{i} $$
$$ \therefore \frac{1}{2h} [2{r}_{i}\left({\phi}_{i} - {\phi}_{i-1}\right) + 2{r}_{i+1}\left({\phi}_{i+1} - {\phi}_{i}\right)(-1) ] = h {r}_{i}{S}_{i} $$
$$ \therefore \left({r}_{i}+{r}_{i+1}\right){\phi}_{i}-{r}_{i}{\phi}_{i-1}-{r}_{i+1}{\phi}_{i+1}={h}^{2}{r}_{i}{S}_{i} $$
$$ Now \: \frac{1}{2}\left({r}_{i}+{r}_{i+1}\right)={r}_{i+\frac{1}{2}} $$
$$ \therefore 2{r}_{i+\frac{1}{2}}.{\phi}_{i}-{r}_{i}{\phi}_{i-1}-{r}_{i+1}{\phi}_{i+1}={h}^{2}{r}_{i}{S}_{i} $$
As you can see I've ended up shifted half a lattice. I think I haven't understood the difference between the (i - 1/2)h and ih lattices?
 
Final, desperate call - assignment is due tomorrow, so will appreciate anyone who can help me quickly ...I think I have the method right, there is probably just some piece of the puzzle I don't know ...if you need more info. please just ask.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
Replies
1
Views
2K
Replies
7
Views
3K
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 19 ·
Replies
19
Views
4K
Replies
0
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
10
Views
2K
  • · Replies 5 ·
Replies
5
Views
5K