![fdtd 시뮬레이션 fdtd 시뮬레이션](https://images.booksense.com/images/037/502/9780470502037.jpg)
Once again physics has turned out unexpectedly pretty and distracted me away from my goal, and this post becomes a microcosm of the entire concept of the blog… As the animation proceeds starts high and gradually gets lower, corresponding to fast plate oscillations gradually getting slower. Visualised below are a selected few pretty pictures where I’ve taken a logarithmic colour scale to highlight the positions of zero electric field – the ‘nodes’. the positions which stay stationary in the oscillation. The rice/sand/etc settles at the nodes of the plate, i.e. It turns out that the Helmholtz equation can also be applied to the modelling of the forced vibrations of the square plate, where the choice of conditions above equates to applying a force at the centre of the plate and clamping the edges. In this calculation I’ve set boundary conditions that on the edges of the square, and set. Moving on to the physics then, what does a solution of the Helmholtz equation look like? On the unit square for large, the quickest way is actually to use a packet of rice – see e.g.
Fdtd 시뮬레이션 code#
In this case the code is literally a hundred times faster and uses a fraction of the memory. There is a special data structure in Matlab for sparse matricies, and using it speeds up calculation of inverses by orders of magnitude. However only 64 of those are nonzero, just 8% of the matrix is actually useful in computation! This drops to 4% if the resolution of our grid jumps by a factor of 10, and stays around 5% for another factor of 10. Here, so there are 784 elements in the matrix. We can visualise the structure of our matrix using the handy Matlab function spy – as plotted below it shows which elements of the matrix are nonzero. We will require or so then, which means the number of elements is around ! Storing each as a single precision number would require around 60 GB of RAM, and my poor battered laptop wouldn’t have a chance inverting that matrix even if it would fit in memory.įortunately this problem has crept up on people cleverer than I, and they invented the concept of the sparse matrix, or a matrix filled mostly with zeros. For this problem a room is approximately 5 m across, and the wavelength to resolve is around 5 cm. In fact, it is clear that the vast majority of the matrix is zero, which can help when considering the sheer size of the matrix. Where there are blank cells between the and cells. The row in the matrix equation corresponding to the th cell looks like I use the translation that so thatĪ pair of cells and are then separated by in this new labelling system, and a pair of cells and separated by 1. This is slightly tricky due to the fact that a 2D labelling system needs to be converted to a 1D labelling system, as the 2D simulation domain needs to be converted to a 1D vector. In particular we’ll have for some matrix, and we can compute. This motivates a linear algebraic approach to the problem – if all equations can be represented as one giant matrix equation, that matrix can be inverted and an exact solution for recovered.
![fdtd 시뮬레이션 fdtd 시뮬레이션](https://media.springernature.com/lw685/springer-static/image/art%3A10.1186%2Fs11671-021-03603-1/MediaObjects/11671_2021_3603_Figa_HTML.png)
Each cell has an equation describing the relationship with its neighbours, so there are equations in unknowns. This is a linear equation in the ‘current’ cell as a function of its 4 neighbours. Given this discretisation, the equation above becomes Here I chose to model a situation in 2D, and set up a computational grid of size with grid cells labelled for. Given a source of radiation and a geometry to propagate in, in principle the Helmholtz equation can be solved for the entire radiation field.
![fdtd 시뮬레이션 fdtd 시뮬레이션](https://docs.lucedaphotonics.com/_images/fdtd_inspect.png)
More precisely, if the time-dependence of an electromagnetic wave can be assumed to be of the form and the dispersion relation given by for some refractive index distribution, then the electric field solves The Helmholtz equation is used in the modelling of the propagation of electromagnetic waves. UPDATE: Android app now available, see this post for details. Well, spurred on by a shocking amount of spare time, I’ve given it a go here. I casually mentioned that I really should be doing things more rigorously by solving the Helmholtz equation, but then didn’t. A few posts back I was concerned with optimising the WiFi reception in my flat, and I chose a simple method for calculating the distribution of electromagnetic intensity.