- #1
jamie.j1989
- 79
- 0
Moved from a technical forum, so homework template missing
Hi, I would like to try and calculate the average distance traveled through a box of length ##w## by any straight path possible. As shown in the attached figure. Where the path through the box to an adjacent face is given by
$$r_{adj}^2=\left(\frac{w}{2}-x\right)^2+y^2+z^2.$$
The average distance traveled through the intersection can be found by integrating over the three spatial dimensions ##x,y,## and ##z##, in the following way,$$\left<r_{adj}\right>=\frac{1}{N_xN_yN_z}\sum^{N_x,N_y,N_z}_{i,j,k}\sqrt{\left(\frac{w}{2}-x_i\right)^2+y_j^2+z_k^2}$$Where ##N_x=\frac{w}{\delta x},N_y=\frac{w}{\delta y},N_z=\frac{w}{\delta z}##, the small change in displacement along ##x## is ##\delta x=x_{i}-x_{i-1}##, and likewise for ##\delta y## and ##\delta z##. And as ##N_x,N_y,N_z\rightarrow \infty##, the summation turns into the integration,
$$\left<r_{adj}\right>=\frac{1}{w^3}\int^{\frac{w}{2}}_{-\frac{w}{2}}dx\int^{w}_{0}dy\int^{\frac{w}{2}}_{-\frac{w}{2}}dz\sqrt{\left(\frac{w}{2}-x\right)^2+y^2+z^2}.$$
So this then gives us the average distance through the box traveled between one adjacent face and the other. All other similar paths with adjacent faces will add and average to the same value.
Then we need to consider paths to opposite faces through the box, where the second figure attached shows the path taken, and where the distance traveled is,
$$r_{opp} =\sqrt{\left(\frac{w}{2}-x\right)^2+w^2+\left(\frac{w}{2}-z\right)^2}$$
And so we can average like before to get,
$$\left<r_{opp}\right> = \frac{1}{w^2}\int^{\frac{w}{2}}_{-\frac{w}{2}}dx\int^{\frac{w}{2}}_{-\frac{w}{2}}dz\sqrt{\left(\frac{w}{2}-x\right)^2+w^2+\left(\frac{w}{2}-z\right)^2}$$
Where all other paths originating from all other faces and going to their respective opposite faces will just average to the same again. And now the total average is just
$$\left<r\right>=\frac{\left<r_{opp}\right>+\left<r_{adj}\right>}{2}$$
I'm not really sure if this is right, and apart from writing a simulation to compute and average over many possible path lengths I'm not sure how to check it either?
Thanks
$$r_{adj}^2=\left(\frac{w}{2}-x\right)^2+y^2+z^2.$$
The average distance traveled through the intersection can be found by integrating over the three spatial dimensions ##x,y,## and ##z##, in the following way,$$\left<r_{adj}\right>=\frac{1}{N_xN_yN_z}\sum^{N_x,N_y,N_z}_{i,j,k}\sqrt{\left(\frac{w}{2}-x_i\right)^2+y_j^2+z_k^2}$$Where ##N_x=\frac{w}{\delta x},N_y=\frac{w}{\delta y},N_z=\frac{w}{\delta z}##, the small change in displacement along ##x## is ##\delta x=x_{i}-x_{i-1}##, and likewise for ##\delta y## and ##\delta z##. And as ##N_x,N_y,N_z\rightarrow \infty##, the summation turns into the integration,
$$\left<r_{adj}\right>=\frac{1}{w^3}\int^{\frac{w}{2}}_{-\frac{w}{2}}dx\int^{w}_{0}dy\int^{\frac{w}{2}}_{-\frac{w}{2}}dz\sqrt{\left(\frac{w}{2}-x\right)^2+y^2+z^2}.$$
So this then gives us the average distance through the box traveled between one adjacent face and the other. All other similar paths with adjacent faces will add and average to the same value.
Then we need to consider paths to opposite faces through the box, where the second figure attached shows the path taken, and where the distance traveled is,
$$r_{opp} =\sqrt{\left(\frac{w}{2}-x\right)^2+w^2+\left(\frac{w}{2}-z\right)^2}$$
And so we can average like before to get,
$$\left<r_{opp}\right> = \frac{1}{w^2}\int^{\frac{w}{2}}_{-\frac{w}{2}}dx\int^{\frac{w}{2}}_{-\frac{w}{2}}dz\sqrt{\left(\frac{w}{2}-x\right)^2+w^2+\left(\frac{w}{2}-z\right)^2}$$
Where all other paths originating from all other faces and going to their respective opposite faces will just average to the same again. And now the total average is just
$$\left<r\right>=\frac{\left<r_{opp}\right>+\left<r_{adj}\right>}{2}$$
I'm not really sure if this is right, and apart from writing a simulation to compute and average over many possible path lengths I'm not sure how to check it either?
Thanks