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/08/31 14:55] – dmcpadden | 184_notes:comp_super [2017/08/31 15:04] – dmcpadden | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | Section 15.9 in Matter and Interactions (4th edition) | ||
+ | |||
===== Superposition and the Computer ===== | ===== Superposition and the Computer ===== | ||
Line 32: | Line 34: | ||
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! | 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:// | + | 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 51: | ||
</ | </ | ||
+ | You can also use pseudocode (and may have already) to help you plan and understand the code you are writing. |