A square plate on a side is sampled at evenly spaced positions in each direction

PHYSICS · Multi-part · Fermi University Physics · Computational Physics · Scientific programming for physicists · Scientific programming for physicists

Computational Physics, Ch Arrays: a field is a rectangle of numbers

Problem

A square plate 1.0 m1.0\,\mathrm{m} on a side is sampled at 1111 evenly spaced positions in each direction, x = np.linspace(0.0, 1.0, 11)\texttt{x = np.linspace(0.0, 1.0, 11)} and y = np.linspace(0.0, 1.0, 11)\texttt{y = np.linspace(0.0, 1.0, 11)}, each of shape (11,)(11,). A steady temperature across the plate is modelled as T(x,y)=300+40(x+y)T(x, y) = 300 + 40(x + y), with TT in K and xx and yy in m. ((a)) Write one expression that builds the grid from x\texttt{x} and y\texttt{y} and evaluates TT at every node, and state how many numbers the result holds. ((b)) T.mean(axis=1)\texttt{T.mean(axis=1)} is then evaluated. State the shape of what is left and the value of its largest entry. ((c)) The part of the plate hotter than 350 K350\,\mathrm{K} is selected with a mask. State how many nodes the mask holds and the mean temperature over them.

Browse the problem library