Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
184_notes:comp_super [2018/01/18 22:18] – dmcpadden | 184_notes:comp_super [2021/02/09 19:08] (current) – [How can we use a computer for this?] bartonmo | ||
---|---|---|---|
Line 1: | Line 1: | ||
Section 15.9 in Matter and Interactions (4th edition) | Section 15.9 in Matter and Interactions (4th edition) | ||
+ | |||
+ | / | ||
+ | |||
+ | [[184_notes: | ||
===== 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 means we can define a powerful algorithm for computing the electric field at any given location from any distribution of charge. In these notes, you will read about how you can structure code to calculate the electric field from many sources charge (though you could apply this procedure to electric potential as well). | + | The principle of [[184_notes: |
==== The Superposition Principle ==== | ==== The Superposition Principle ==== | ||
- | As a reminder, the principle of superposition states that the electric field at any given location in space is determined by vector sum of the electric field due to each charge that contributes. | + | The principle of superposition states that the electric field at any given location in space is determined by vector sum of the electric field due to each charge that contributes. |
→Enet=∑→Ei=→E1+→E2+→E3+… | →Enet=∑→Ei=→E1+→E2+→E3+… | ||
- | where →E1 would be the electric field from one point charge, →E2 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 | + | where →E1 would be the electric field from one point charge, →E2 would be the electric field from a second point charge, and so on. During |
- | + | ||
- | You have seen how this principle | + | |
- | + | ||
- | →Enet=∫d→E | + | |
- | + | ||
- | [[184_notes: | + | |
==== How can we use a computer for this? ==== | ==== How can we use a computer for this? ==== | ||
Line 25: | Line 23: | ||
Let's think through the process for computing the electric field due to a distribution of charges: | Let's think through the process for computing the electric field due to a distribution of charges: | ||
- | - Cut the distribution up into small chunks | + | - Identify |
- | - Pick a chunk to treat as a point charge | + | |
- Compute the electric field due to that chunk at the specified location | - Compute the electric field due to that chunk at the specified location | ||
- Write down or otherwise keep track of that value | - Write down or otherwise keep track of that value | ||
Line 53: | Line 50: | ||
</ | </ | ||
- | You can also use pseudocode (and may have already) to help you plan and understand the code you are writing. | + | //You can also use pseudocode (and may have already) to help you plan and understand the code you are writing.// |