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 [2017/06/21 09:25] – caballero | 184_notes:comp_super [2021/02/09 19:08] (current) – [How can we use a computer for this?] bartonmo | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Superposition | + | Section 15.9 in Matter |
- | The principle of superposition is an overarching | + | / |
- | ===== The Superposition | + | [[184_notes: |
- | As a reminder, | + | ===== Superposition and the Computer ===== |
- | →Enet=∑→Ei=→E1+→E2+→E3+… | + | The principle of [[184_notes: |
- | 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 " | + | ==== The Superposition Principle ==== |
- | →Enet=∫d→E | + | 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. |
- | //There are more details to this calculation in the notes on computing field due to a line charge.// | + | →Enet=∑→Ei=→E1+→E2+→E3+… |
- | ===== How do we use a computer for this? ===== | + | 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 this week, we will focus on superposition of point charges and how we can model a line of charge using points. (Next week we will use the idea of superposition to model a continuous line of charge and other distribution of charges.) |
+ | |||
+ | ==== How can we use a computer for this? ==== | ||
For most real-world situations, the electric field integral cannot be solved analytically. That is, you could most likely write down the integral, but it cannot be computed because there' | For most real-world situations, the electric field integral cannot be solved analytically. That is, you could most likely write down the integral, but it cannot be computed because there' | ||
+ | |||
+ | Let's think through the process for computing the electric field due to a distribution of charges: | ||
+ | |||
+ | - Identify the " | ||
+ | - Compute the electric field due to that chunk at the specified location | ||
+ | - Write down or otherwise keep track of that value | ||
+ | - Move to the another chunk, which you treat as a point charge | ||
+ | - Compute the electric field due to the new chunk at the specified location | ||
+ | - Add that new value to the old value from steps 3 and 4 | ||
+ | - 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 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 [[https:// | ||
+ | |||
+ | < | ||
+ | |||
+ | Choose location of interest | ||
+ | Choose size of chunks | ||
+ | Choose starting chunk | ||
+ | Set net electric field to zero | ||
+ | |||
+ | For all the chunks in the distribution: | ||
+ | |||
+ | | ||
+ | | ||
+ | Add contribution of chunk to net electric field | ||
+ | |||
+ | </ | ||
+ | |||
+ | //You can also use pseudocode (and may have already) to help you plan and understand the code you are writing.// |