Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
184_notes:comp_super [2017/07/11 05:06] – [Superposition and the Computer] pwirving | 184_notes:comp_super [2018/01/18 22:18] – dmcpadden | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | Section 15.9 in Matter and Interactions (4th edition) | ||
+ | |||
===== Superposition and the Computer ===== | ===== Superposition and the Computer ===== | ||
- | The principle of superposition is an overarching and powerful tool in much of physics. It is useful well beyond the electric field as you will see with the magnetic field (and as you might see in future physics courses in quantum mechanics). The fact that the electric field obeys the principle of superposition | + | The principle of superposition is an overarching and powerful tool in much of physics. It is useful well beyond the electric field as you will see with the magnetic field (and as you might see in future physics courses in quantum mechanics). The fact that the electric field obeys the principle of superposition |
==== The Superposition Principle ==== | ==== The Superposition Principle ==== | ||
Line 8: | Line 10: | ||
$$\vec{E}_{net} = \sum \vec{E}_i = \vec{E}_1 + \vec{E}_2 + \vec{E}_3 + \dots$$ | $$\vec{E}_{net} = \sum \vec{E}_i = \vec{E}_1 + \vec{E}_2 + \vec{E}_3 + \dots$$ | ||
+ | |||
+ | where $\vec{E}_1$ would be the electric field from one point charge, $\vec{E}_2$ would be the electric field from a second point charge, and so on. For this week, we will focus on superposition of point charges, but | ||
You have seen how this principle can be used to find the electric field due to point charges and how it has been used for " | You have seen how this principle can be used to find the electric field due to point charges and how it has been used for " | ||
Line 13: | Line 17: | ||
$$\vec{E}_{net} = \int d\vec{E}$$ | $$\vec{E}_{net} = \int d\vec{E}$$ | ||
- | //There are more details to this calculation in the notes on computing field due to a line charge.// | + | [[184_notes: |
==== How can we use a computer for this? ==== | ==== How can we use a computer for this? ==== | ||
Line 30: | Line 34: | ||
- Repeat steps 5-7 for another chunk; and continue repeating until you've done this for all chunks | - Repeat steps 5-7 for another chunk; and continue repeating until you've done this for all chunks | ||
- | These somewhat monotonous steps will give us an approximate value for the electric field at the point of interest. The smaller the chunks, the better the approximation. You can probably see why setting up a computer to do this makes a lot of sense. Computers | + | These somewhat monotonous steps will give us an approximate value for the electric field at the point of interest. The smaller the chunks, the better the approximation. You can probably see why setting up a computer to do this makes a lot of sense. Computers are really good at doing the same calculation over and over again! |
- | So if we want to compute the electric field at a given location due to a distribution of charges, the algorithm is just cutting the distribution into chunks, computing the electric field of each chunk as a point charge, and adding all the contributions together. This is a form of "numerical integration", which is a powerful technique in computational science. The pseudocode for this algorithm is the following: | + | So if we want to compute the electric field at a given location due to a distribution of charges, the algorithm is just cutting the distribution into chunks, computing the electric field of each chunk as a point charge, and adding all the contributions together. This is a form of [[https:// |
< | < | ||
Line 49: | Line 53: | ||
</ | </ | ||
+ | You can also use pseudocode (and may have already) to help you plan and understand the code you are writing. |