User:GyroMagician/Transmission Line Matrix Method

The Transmission Line Matrix (TLM) method is a time-domain, differential numerical technique for modelling electromagnetic and other field problems. It was developed by Peter B. Johns while working at the University of Nottingham.

It's main application has been in electromagnetics, but it can also be used for thermal, acoustic and diffusion problems.

The Transmission Line Matrix (TLM) method is a numerical realisation of Huygens principle. It was introduced by Johns in 1974 [cite johns74]. TLM describes the modelled space using a regular grid of nodes connected by transmission line sections called link-lines. The propagation of electromagnetic waves through the system is described by the scattering and reflection of electrical impulses travelling through the transmission lines. The capacitance and inductance of link-lines affect how electric pulses travel through the mesh, mirroring the way permittivity and permeability of a medium affect electromagnetic wave propagation. Thus, voltage and current in the TLM mesh are used to represent electric and magnetic fields in space.

While their paradigms are quite different, TLM is numerically very similar to FDTD, largely having the same benefits and disadvantages in terms of modelling capability and computational requirements. However, TLM has some advantage over FDTD. Firstly, electric and magnetic fields are calculated on exactly the same mesh, without the half cell offset characteristic of FDTD. Also, TLM is unconditionally stable, the timestep being determined by the mesh resolution. But the main advantage of TLM is that it uses a conceptual framework that will already be familiar to any electronic engineer [cite johns87a].

Derivation
At each timestep $$n$$, voltage pulses incident upon a node $$_n\mathbf{V}^i$$ are considered. The impulses are scattered by the node and the reflected voltages $$_n\mathbf{V}^r$$ computed (fig.~\ref{fig:scatter}). Reflected voltage pulses then become incident on adjacent nodes at the next timestep. This cycle of scatter and connect is used to propagate waves through the mesh. It can be written as


 * $$_n\mathbf{V}^r = \mathbf{S} _n\mathbf{V}^i$$
 * $$_{n+1}\mathbf{V}^i = \mathbf{C} _n\mathbf{V}^r$$

where $$\mathbf{S}$$ is the scattering and $$\mathbf{C}$$ the connection matrix.

A twelve port node, the basic unit of the SCN mesh, is shown in fig.~\ref{fig:tlm_node}. Voltage pulses can enter a node from any of six directions. Along each axis there are two possible wave polarisations, represented as a pair of non-coupling transmission lines, giving a total of twelve transmission lines meeting at a node. The scattering matrix is derived in the next section. The connect stage consists simply of transferring the voltage pulses reflected from a node to incident pulses entering the surrounding nodes. The scatter-connect cycle is then repeated until the system reaches a stable state.

[figure] node.pdf "(a) 12-port symmetric condensed node and (b) notation used to identify voltage impulses"

The Scattering Matrix
The scattering matrix for the SCN is now derived from first principles, following the method used by Herring. The port labelling scheme (fig.~\ref{fig:tlm_node}(b)) also follows that of Herring. The first subscript gives the port axis, the second indicates the negative or positive side of the node and the third subscript gives the polarisation of the voltage pulse. Thus $$V_{xnz}$$ would be a $$z$$-polarised pulse on the negative $$x$$ branch of the node.

Four conditions are applied to derive the scattering matrix:
 * conservation of electric charge
 * conservation of magnetic flux
 * continuity of electric field
 * continuity of magnetic field

For charge conservation, charge leaving the node must equal charge entering it
 * $$\tfrac{1}{2} C \left( V_{ynx}^i + V_{ypx}^i + V_{znx}^i + V_{zpx}^i \right) = \tfrac{1}{2} C \left( V_{ynx}^r + V_{ypx}^r + V_{znx}^r + V_{zpx}^r \right)

$$ where $$\tfrac{1}{2}C$$ is the capacitance of the half link-lines. Writing similar equations for the other axes, we obtain


 * $$V_{ynx}^i + V_{ypx}^i + V_{znx}^i + V_{zpx}^i = V_{ynx}^r + V_{ypx}^r + V_{znx}^r + V_{zpx}^r$$
 * $$V_{zny}^i + V_{zpy}^i + V_{xny}^i + V_{xpy}^i = V_{zny}^r + V_{zpy}^r + V_{xny}^r + V_{xpy}^r$$
 * $$V_{xnz}^i + V_{xpz}^i + V_{ynz}^i + V_{ypz}^i = V_{xnz}^r + V_{xpz}^r + V_{ynz}^r + V_{ypz}^r$$

Similarly, for conservation of magnetic flux we can write
 * $$\tfrac{1}{2}L \left( I_{ynz}^i + I_{zpy}^i - I_{ypz}^i - I_{zny}^i \right) = \tfrac{1}{2}L \left( I_{ynz}^r + I_{zpy}^r - I_{ypz}^r - I_{zny}^r \right)$$

where $$\tfrac{1}{2}L$$ is the inductance of the half link-lines. Using Ohm's law the current is calculated as $$I^i = V^i/Z_0$$ and $$I^r = -V^r/Z_0$$. Writing similar equations for the other components we obtain
 * $$V_{ynz}^i + V_{zpy}^i - V_{ypz}^i - V_{zny}^i = -\left( V_{ynz}^r + V_{zpy}^r - V_{ypz}^r - V_{zny}^r \right)$$
 * $$V_{znx}^i + V_{xpz}^i - V_{zpx}^i - V_{xnz}^i = -\left( V_{znx}^r + V_{xpz}^r - V_{zpx}^r - V_{xnz}^r\right)$$
 * $$V_{xny}^i + V_{ypx}^i - V_{xpy}^i - V_{ynx}^i = -\left( V_{xny}^r + V_{ypx}^r - V_{xpy}^r - V_{ynx}^r\right)$$

For continuity of the electric field, the field due to link-lines parallel to the $$y$$-axis must equal the field due to link lines parallel to the $$z$$-axis
 * $$V_{ynx} + V_{ypx} = V_{znx} + V_{zpx}$$

The total voltage on each port is the sum of the incident and reflected pulse $$V = V^i + V^r$$. The full equations along all three axes are then
 * $$\left( V_{ynx}^i + V_{ypx}^i \right) - \left( V_{znx}^i + V_{zpx}^i \right) = \left( V_{znx}^r + V_{zpx}^r \right) - \left( V_{ynx}^r + V_{ypx}^r \right)$$
 * $$\left( V_{zny}^i + V_{zpy}^i \right) - \left( V_{xny}^i + V_{xpy}^i \right) = \left( V_{xny}^r + V_{xpy}^r \right) - \left( V_{zny}^r + V_{zpy}^r \right)$$
 * $$\left( V_{xnz}^i + V_{xpz}^i \right) - \left( V_{ynz}^i + V_{ypz}^i \right) = \left( V_{ynz}^r + V_{ypz}^r \right) - \left( V_{xnz}^r + V_{xpz}^r \right)$$

Applying the same continuity argument for the magnetic field we can write
 * $$I_{ynz} - I_{ypz} = I_{zpy} - I_{zny}$$

The total current on a port is given by $$I = (V^i - V^r)/Z_0$$. The full equations for all three axes are then
 * $$\left( V_{ynz}^i - V_{ypz}^i \right) - \left( V_{zpy}^i - V_{zny}^i \right) = \left( V_{ynz}^r - V_{ypz}^r \right) - \left( V_{zpy}^r - V_{zny}^r \right)$$
 * $$\left( V_{znx}^i - V_{zpx}^i \right) - \left( V_{xpz}^i - V_{xnz}^i \right) = \left( V_{znx}^r - V_{zpx}^r \right) - \left( V_{xpz}^r - V_{xnz}^r \right)$$
 * $$\left( V_{xny}^i - V_{xpy}^i \right) - \left( V_{ypx}^i - V_{ynx}^i \right) = \left( V_{xny}^r - V_{xpy}^r \right) - \left( V_{ypx}^r - V_{ynx}^r \right)$$

Equations~\ref{eqn:tlm_cons_charge},~\ref{eqn:tlm_cons_flux},~\ref{eqn:tlm_cont_e} and~\ref{eqn:tlm_cont_h} form a set of linear equations that can be solved to give the scattering matrix. Matrix notation provides a compact description of the TLM process. However, the scattering matrix is sparse making it is more efficient to evaluate each reflected pulse directly. For efficiency and clarity, the method of Naylor and Ait-Sadi has been used [cite naylor92]
 * $$V_{ynx}^r = V_{x} - Z_0 I_{z} - V_{ypx}^i$$
 * $$V_{ypx}^r = V_{x} + Z_0 I_{z} - V_{ynx}^i$$
 * $$V_{znx}^r = V_{x} + Z_0 I_{y} - V_{zpx}^i$$
 * $$V_{zpx}^r = V_{x} - Z_0 I_{y} - V_{znx}^i$$
 * $$V_{zny}^r = V_{y} - Z_0 I_{x} - V_{zpy}^i$$
 * $$V_{zpy}^r = V_{y} + Z_0 I_{x} - V_{zny}^i$$
 * $$V_{xny}^r = V_{y} + Z_0 I_{z} - V_{xpy}^i$$
 * $$V_{xpy}^r = V_{y} - Z_0 I_{z} - V_{xny}^i$$
 * $$V_{xnz}^r = V_{z} - Z_0 I_{y} - V_{xpz}^i$$
 * $$V_{xpz}^r = V_{z} + Z_0 I_{y} - V_{xnz}^i$$
 * $$V_{ynz}^r = V_{z} + Z_0 I_{x} - V_{ypz}^i$$
 * $$V_{ypz}^r = V_{z} - Z_0 I_{x} - V_{ynz}^i$$

where $$V_k$$ are the node voltages


 * $$V_x = \tfrac{1}{2} \left( V_{ypx}^i + V_{zpx}^i + V_{ynx}^i + V_{znx}^i \right)$$
 * $$V_y = \tfrac{1}{2} \left( V_{zpy}^i + V_{xpy}^i + V_{zny}^i + V_{xny}^i \right)$$
 * $$V_z = \tfrac{1}{2} \left( V_{xpz}^i + V_{ypz}^i + V_{xnz}^i + V_{ynz}^i \right)$$

and $$I_k$$ are the loop currents


 * $$I_x = \tfrac{1}{2Z_0} \left( V_{ypz}^i - V_{zpy}^i - V_{ynz}^i + V_{zny}^i \right)$$
 * $$I_y = \tfrac{1}{2Z_0} \left( V_{zpx}^i - V_{xpz}^i - V_{znx}^i + V_{xnz}^i \right)$$
 * $$I_z = \tfrac{1}{2Z_0} \left( V_{xpy}^i - V_{ypx}^i - V_{xny}^i + V_{ynx}^i \right)$$

Modelling different materials with stubs
[figure] stubs.pdf "A 2D node showing (a) capacitive, (b) inductive and (c) lossy stubs" The TLM mesh described above can only model homogeneous media. Initially, extending the model to include different media appears to be as simple as changing the capacitance and inductance of the link lines to account for local changes in permittivity $$\epsilon$$ or permeability $$\mu$$. However, these changes alter the wave propagation velocity $$u$$


 * $$u = \frac{1}{\sqrt{\epsilon \mu}}$$

which will desynchronise the scatter-connect cycle, as voltage pulses will now arrive at nodes at different times according to the local media.

A different approach is to model changes in permittivity or permeability by adding extra capacitance or inductance to a node in the form of stubs (short lengths of transmission line). Capacitance is added by including an open-circuit stub (fig.NNa). Any signal entering the stub will, on reaching the open-circuit termination, be reflected back into the node. By setting the stub length to $$\Delta \ell/2$$, the round-trip time for a pulse to enter the stub and arrive back at the node is set to one timestep $$\Delta t$$. When a pulse enters a node, it will now be scattered into the link-lines and into the stub. On the next iteration the pulse from the stub will re-enter the node, thus adding a time delay to the node and reducing the wave velocity, without reducing the mesh velocity.

Similarly, inductance can be added to a node by including a short-circuit stub (fig.NNb), which will invert the reflected pulse. The stub length is again chosen such that the reflected pulse arrive back in the node exactly one iteration after entering it.

Finally, real materials dissipate energy due to their conductivity through Ohmic losses. This can be modelled by adding an infinitely long resistive transmission line to the node (fig.NNc). Pulses entering the line will never be reflected back into the mesh, removing energy from the system.

The only disadvantage in introducing stubs is the increased size of the scattering matrix, increasing the complexity of the scattering calculation. As all three axes operate independently in the mesh, three of each type of stub have to be added to every node for full modelling, increasing the scattering matrix from 12×12 to 21×21 elements.

Mesh Parameters
Having discussed the principles behind TLM modelling, it is now shown how to calculate the mesh parameters. Parameters are derived using an isotropic mesh ($$\Delta x = \Delta y = \Delta z = \Delta \ell$$). This is not a requirement of TLM, but simplifies the following derivation. The impedance and velocity of the underlying mesh are first discussed. Calculation of stub parameters is then demonstrated and the required modifications to the scattering matrix are shown.

The characteristic impedance of the transmission lines is
 * $$Z_{tl} = \sqrt{\frac{L_d}{C_d}} = \sqrt{\frac{L}{C}}$$

where $$L_d$$ and $$C_d$$ are the inductance and capacitance per unit length and $$L$$ and $$C$$ are the total link-line inductance and capacitance.

The velocity of a pulse travelling along the transmission line is


 * $$u_{tl} = \frac{\Delta \ell}{\Delta t}$$

where $$\Delta t$$ is the time taken for a voltage pulse to travel from the one node to the next, which is the fundamental timestep of the TLM simulation. The propagation velocity can also be calculated using the electrical properties of the transmission line


 * $$u_{tl} = \frac{1}{\sqrt{ L_d C_d}} = \frac{\Delta \ell}{\sqrt{LC}}$$

Combining eqn.s~\ref{eqn:tlm_velocity} and~\ref{eqn:tlm_velocity_alt} the timestep is


 * $$\Delta t = \sqrt{LC}$$

The link-line capacitance and inductance can then be written


 * $$C = Y_{tl}\Delta t$$
 * $$L = Z_{tl} \Delta t$$

where $$Y_{tl}$$ is the transmission line admittance and the subscript $$tl$$ indicates a parameter of the underlying transmission line rather than the modelled medium.

The $$x$$-directed node capacitance is defined as


 * $$C_x = \epsilon \frac{\Delta y \Delta z}{\Delta x} = \epsilon \Delta \ell$$

The link-lines $$V_{ynx}$$, $$V_{ypx}$$, $$V_{znx}$$ and $$V_{zpx}$$ contribute to the $$x$$-directed capacitance, each of length $$\tfrac{1}{2} \Delta \ell$$. Using eqn.~\ref{eqn:tlm_ll_cap}, the capacitance can then be written in terms of the link-line admittance


 * $$C_x = 4 \left( \tfrac{1}{2} Y_{tl} \right) \Delta t = 2 Y_{tl} \Delta t$$

Similarly, link-lines $$V_{ypz}$$, $$V_{zpy}$$, $$V_{ynx}$$ and $$V_{zny}$$ contribute to the $$x$$-directed inductance


 * $$L_x = \mu \frac{\Delta y \Delta z}{\Delta x} = \mu \Delta \ell$$

which can be written in terms of link-line impedance using eqn.~\ref{eqn:tlm_ll_ind}


 * $$L_x = 4 \left( \tfrac{1}{2} Z_{tl} \right) \Delta t = 2 Z_{tl} \Delta t$$

The addition of stubs can only decrease the wave propagation speed, so the underlying transmission line properties are determined by the fastest wave velocity to be modelled. In most cases this is free space, requiring the mesh to model permittivity $$\epsilon_0$$ and permeability $$\mu_0$$.

The velocity of a wave travelling through the modelled medium can be defined as


 * $$c_0 = \frac{1}{\sqrt{\epsilon_0 \mu_0}}$$

Using eqn.s~\ref{eqn:tlm_epsilon} and~\ref{eqn:tlm_mu} we can substitute the node capacitance and inductance for $$\epsilon_0$$ and $$\mu_0$$


 * $$c_0 = \frac{\Delta \ell}{\sqrt{C_x L_x}}$$

If we then substitute eqn.s~\ref{eqn:tlm_ll_cap} and~\ref{eqn:tlm_ll_ind} the wave velocity can be written in terms of the simulation timestep and node size


 * $$c_0 = \frac{\Delta \ell}{\sqrt{2 Y_0 \Delta t \cdot 2 Z_0 \Delta t}} = \frac{\Delta \ell}{2 \Delta t}$$

This is a slightly surprising result. The wave propagation velocity $$c_0$$ is half the velocity of a voltage pulse travelling on the underlying transmission line $$u_{tl}$$, defined in eqn.~\ref{eqn:tlm_velocity}. The practical effect of this result is that the simulator timestep should be set to


 * $$\Delta t = \frac{\Delta \ell}{2 c_0}$$

In the case of a non-isotropic mesh $$\Delta \ell$$ is the smallest of $$\Delta x$$, $$\Delta y$$ and $$\Delta z$$.

The impedance of the underlying transmission lines can be calculated using modelled medium properties by substituting eqn.s~\ref{eqn:tlm_ll_cap} and~\ref{eqn:tlm_ll_ind} into eqn.~\ref{eqn:tlm_impedance}.


 * $$Z_{tl} = \sqrt{\frac{\mu_0 \Delta \ell}{\epsilon_0 \Delta \ell}} = Z_0$$

Therefore the underlying transmission lines have the same impedance as the modelled medium.

The use of stubs to model heterogeneous media is now considered. The base permittivity of the mesh is modelled by link-lines as described above. Any increase in permittivity is modelled by a stub of capacitance


 * $$C_x^s = \epsilon \Delta \ell - 4C$$

where $$4C$$ is the capacitance already modelled by the link-lines. Using eqn.~\ref{eqn:tlm_ll_cap} and the relation $$\epsilon_0 = Y_0 / c_0$$ this can be rewritten as


 * $$C_x^s = Y_0 \left( \frac{\epsilon_r}{c_0} \Delta \ell - 2 \Delta t \right)$$

To maintain mesh synchronism, a pulse entering the stub should reflect back at time $$\Delta t / 2$$ to re-enter the node at the next time step. The required stub admittance (normalised to the mesh admittance) is then


 * $$\hat{Y}_x^s = \frac{2 C_x^s}{Y_0 \Delta t} = 2 \left( \frac{\epsilon_r}{c_0} \frac{\Delta \ell}{\Delta t} - 2 \right)$$

which can be simplified using eqn.~\ref{eqn:tlm_timestep} to


 * $$\hat{Y}_x^s = 4 \left( \epsilon_r - 1 \right)$$

To guarantee mesh stability a stub must represent a positive capacitance, requiring that $$\epsilon_r \ge 1$$ as expected.

Calculations involving the resistive stubs are much simpler. The transmission line conductances are calculated as


 * $$\hat{G}_x = \frac{\sigma_x \Delta \ell}{Y_0}$$
 * $$\hat{G}_y = \frac{\sigma_y \Delta \ell}{Y_0}$$
 * $$\hat{G}_z = \frac{\sigma_z \Delta \ell}{Y_0}$$

where $$\sigma$$ is the node conductivity and the values are again normalised to the mesh admittance.

The scattering procedure is modified to take account of the lossy and dielectric stubs. Firstly, three extra equations are added to eqn.~\ref{eqn:tlm_scatter} to account for voltage pulses scattered into the open circuit stubs


 * $$V_{esx}^r = V_x - V_{esx}^i$$
 * $$V_{esy}^r = V_y - V_{esy}^i$$
 * $$V_{esz}^r = V_z - V_{esz}^i$$

Voltage pulses scattered into the resistive stubs are not explicitly calculated as the pulses never re-enter the mesh. They are accounted for in the modified calculation of the nodal electric fields, along with the dielectric stubs. Eqns.~\ref{eqn:tlm_voltage} are replaced by


 * $$V_x = \frac{2}{4 + \hat{Y}_x^s + \hat{G}_x^s} \left( V_{ypx}^i + V_{zpx}^i + V_{ynx}^i + V_{znx}^i + \hat{Y}_x^s V_{esx}^i \right)$$
 * $$V_y = \frac{2}{4 + \hat{Y}_y^s + \hat{G}_y^s} \left( V_{zpy}^i + V_{xpy}^i + V_{zny}^i + V_{xny}^i + \hat{Y}_y^s V_{esy}^i \right)$$
 * $$V_z = \frac{2}{4 + \hat{Y}_z^s + \hat{G}_z^s} \left( V_{xpz}^i + V_{ypz}^i + V_{xnz}^i + V_{ynz}^i + \hat{Y}_z^s V_{esz}^i \right)$$

where $$\hat{Y}^s$$ and $$\hat{G}^s$$ are the normalised admittance and conductivity of the dielelectric and lossy stubs. Scattered pulses are then calculated as before using eqn.~\ref{eqn:tlm_scatter}.

Cell Size, Timestep and Stability
Cell size (the spacing between nodes) is determined by the highest frequency of interest, simulation speed, and the required field resolution. The frequency mesh size limit in TLM is recommended as


 * $$\Delta \ell \le \frac{\lambda}{10}$$

This limits dispersion errors due to mesh discretisation to less than 1%.

The simulation timestep $$\Delta t$$ is determined by transmission line velocity $$u$$ and the node spacing $$\Delta \ell$$


 * $$\Delta t = \frac{\Delta \ell}{2 u}$$

As the mesh resolution is increased the timestep $$\Delta t$$ decreases, so that more iterations are required to simulate the same period of time.

The transmission line velocity is chosen as the fastest wave velocity to be represented in the model, usually $$c_0$$ for models containing free space, giving a transmission line impedance of 377Ω. All stubs in the mesh then increase permittivity or permeability. This is important as it means the stubs represent passive components with real values, making the network unconditionally stable.

Calculating Electric and Magnetic Fields


The TLM simulation process produces information about the incident and scattered voltage pulses in the mesh. Determining the electric and magnetic fields in the model requires a further calculation. Both fields can be calculated either at nodes (as shown here) or on link lines [cite herring93].

The electric field is proportional to the voltage across the node (fig.~\ref{fig:calc_efield}), calculated as


 * $$E_x = -\frac{V_x}{\Delta x} = -\frac{V^i_{ynx} + V^i_{ypx} + V^i_{znx} + V^i_{zpx}}{2 \Delta x}$$
 * $$E_y = -\frac{V_y}{\Delta y} = -\frac{V^i_{zny} + V^i_{zpy} + V^i_{xny} + V^i_{xpy}}{2 \Delta y}$$
 * $$E_z = -\frac{V_z}{\Delta z} = -\frac{V^i_{xnz} + V^i_{xpz} + V^i_{ynz} + V^i_{ypz}}{2 \Delta z}$$

The magnetic field is proportional to the current circulating around the node (fig.~\ref{fig:calc_bfield}). The three components of the magnetic field are given by


 * $$B_x = \frac{\mu_0 I_x}{\Delta x} = \frac{\mu_0}{2 Z_0\Delta x} \left( V^i_{ypz} - V^i_{zpy} - V^i_{ynz} + V^i_{zny} \right)$$
 * $$B_y = \frac{\mu_0 I_y}{\Delta y} = \frac{\mu_0}{2 Z_0\Delta y} \left( V^i_{zpx} - V^i_{xpz} - V^i_{znx} + V^i_{xnz} \right)$$
 * $$B_z = \frac{\mu_0 I_z}{\Delta z} = \frac{\mu_0}{2 Z_0\Delta z} \left( V^i_{xpy} - V^i_{ypx} - V^i_{xny} + V^i_{ynx} \right)$$

[figure] bfield.pdf [figure] efield.pdf "Calculating the magnetic and electric field at a node, from the incident voltage pulses."

Excitation
To produce a field, the simulated model must first be excited. This can be done by applying an ideal voltage or current source across a node. A voltage source is applied as an electric field across a node, while a current source is applied as a magnetic field. A voltage or current source has a position, amplitude, frequency, phase and direction.

For a voltage source, the field applied across a node is calculated by reversing eqn.~\ref{eqn:Ex} to give


 * $$V_{ynx} = V_{ypx} = V_{znx} = V_{zpx} = -\tfrac{1}{2} E_x \cos(2 \pi f n \Delta t + \phi) \Delta x$$
 * $$V_{zpy} = V_{zny} = V_{xpy} = V_{xny} = -\tfrac{1}{2} E_y \cos(2 \pi f n \Delta t + \phi) \Delta y$$
 * $$V_{xpz} = V_{xnz} = V_{ypz} = V_{ynz} = -\tfrac{1}{2} E_z \cos(2 \pi f n \Delta t + \phi) \Delta z$$

where $$n$$ is the iteration number and $$E_k$$ is the amplitude of the electric field along axis $$k$$ (fig.~\ref{fig:calc_efield}). A voltage source $$V$$ is applied across opposite node faces. The electric field it produces across the node is then


 * $$E_k = \frac{V}{\Delta k}$$

where $$k$$ is either the $$x$$, $$y$$ or $$z$$ axis.

Similarly, a current source is modelled as a magnetic field element (fig.~\ref{fig:calc_bfield}). By reversing eqn.~\ref{eqn:Bx}, current can be applied to a node using


 * $$V_{ypz} = -V_{zpy} = -V_{ynz} = V_{zny} = \frac{1}{2 Z_0} I_x \cos(2 \pi f n \Delta t + \phi)$$
 * $$V_{zpx} = -V_{xpz} = -V_{znx} = V_{xnz} = \frac{1}{2 Z_0} I_y \cos(2 \pi f n \Delta t + \phi)$$
 * $$V_{xpy} = -V_{ypx} = -V_{xny} = V_{ynx} = \frac{1}{2 Z_0} I_z \cos(2 \pi f n \Delta t + \phi)$$

Boundary Conditions
The space modelled by TLM is finite, and the behaviour at boundaries must be defined. Electric and magnetic walls can easily be modelled by leaving link lines at a boundary short or open circuited respectively. These can be used to exploit symmetry in the modelled system, and so reduce the size of the required mesh speeding up the simulation. A simple absorbing boundary can be made by terminating link lines with a matched impedance. Any pulse scattering into the wall will be absorbed and its energy taken out of the TLM mesh. In practice a matched termination will only act as a perfect absorber for incident waves perpendicular to the wall. A better formulation is to use Berenger's Perfectly Matched Layer (PML) which absorbs waves incident at all angles.

Frequency Response and Convergence
The frequency response of a system can be determined by recording its impulse response and Fourier transforming the result [cite davies93].

Alternative Mesh Geometries
TLM is usually formulated on a regular Cartesian mesh but other geometries are also possible, such as a cylindrical mesh [cite cacoveanu95] or generalised curvilinear mesh [cite meliani88]. A difficulty when using these alternative meshes is that the voxel size varies throughout the model. In the case of a cylindrical mesh, for example, the centre of the mesh is covered in more detail than the perimeter. A related problem is that small voxels require a small timestep, slowing down the whole simulation.

Several methods also exist for modelling some parts of the system in more detail than others, allowing fine features to be modelled without increasing the size of the whole mesh. The simplest is to use a variable or graded mesh shown in fig.NN, in which the mesh spacing is varied along each axis. When using this method the velocity in each cell has to be adjusted to maintain synchronicity over the whole mesh.

A more flexible method is to use a multigrid mesh [cite desai92] shown in fig.NN, in which some cells in the mesh are further subdivided into smaller cells, allowing much finer detail to be represented without affecting the whole mesh. Synchronicity is maintained by using a smaller timestep inside the fine mesh than in the main model, chosen such that the larger timestep is an integer multiple of the finer one. The finer mesh is then iterated several times for each single step on the main mesh.

As a final possibility, a TLM formulation using an arbitrary tetrahedral mesh has recently been proposed [cite sewell05], analogous to that used for finite element modelling.