ch 3: 20,14
computed ("numerical") solutions to Laplace
#1: Use spreadsheet to solve Laplace inside a 2d box with 10V on right side
and the other three sides grounded.
Find in this folder the file: relax.gnumeric. Download it and open
it with the linux spreadsheet "gnumeric". If you really must use excel, you
can probably use relax.xlsx on a windoze box (I don't know
much about windoze, but feel free to ask me for help; I have tested
it in gnumeric). The file should be a 27x27 box with 0s on three sides
and a column of 10s to the right. The cell AE10 contains the function
that calculates the average of the 4 next-door cells; you will want to
copy that into all of the currently blank cells inside the box, but
first you must fill the box with some initial guess as to voltage value.
One option would be a sort of average weighted according to how far
a box-side is from the current cell (start with cell B2):
=10*column()/27*(1-abs(row()-14)/13)
worse (but OK) options would be fill with all 0s or all 5s (do not change
the values on the box sides). No matter what initial guess you select,
in the end you should get the same stable pattern.
Once you've filled the cells, copy and paste the average formula from cell AE10
to each cell within the box walls (start with B2).
Every time you hit function key F9, the array will update. Repeat until
you have a stable pattern.
select, copy, and paste special (as value) the contents in cell N14 somewhere
Hit F9 50 more times, and, without overwriting the previously saved value,
select, copy, and paste special (as value) the contents in cell N14 newwhere
Hit F9 50 more times, and, without overwriting the previously saved value
select, copy, and paste special (as value) the contents in cell N14 newwhere
Hit F9 50 more times, and, without overwriting the previously saved value
select, copy, and paste special (as value) the contents in cell N14 newwhere
Print out your spreadsheet showing the array values and the 4 saved
values of N14. Copy and paste special (as value) the array values
into the same spot on Sheet2 (just array not saved N14, etc);
Save as file out.csv:
Data->Export Data->Export as CSV File
In Mathematica run the commands:
v=Import["out.csv"]
ListContourPlot[v,ContourShading->False,AspectRatio->Automatic,Contours->30]
NOTE: you must make sure the file out.csv is in the same folder that Mathematica
will seek it...in the GUI version it looks like Insert->File Path will help with
this.
Print out a copy of the plot (but don't waste paper on the list-of-values
Mathematica may generate).