\chapter{Creating a Cable Bundle Model} \label{creating_a_cable_bundle_model}

\section{Introduction} 

This chapter describes the creation of a cable bundle model from previously defined cables. A cable bundle model is only concerned with the development of a multi-conductor propagation model for the bundle cross section and the calculation of the associated model parameters. 

\subsection{Cable bundle specification}

A cable bundle is described as a combination of previously defined cables along with their position and orientation within
the cross section of the bundle (x-y plane). A ground plane may also be included in the bundle specification. The ground plane is assumed to lie along the x axis.

The overshield cable type may enclose other cables within the bundle. 

The cable position and orientation are defined using two or three real numbers. The first two are the x and y coordinates of the cable centre.
The third number is a rotation angle for the cable, the angle is defined in an anticlockwise direction from the x axis. 

\subsection{Conductor numbering within the bundle}

The numbering of conductors within the bundle is very important for the correct use of the spice cable bundle models as the conductor numbering within the bundle defines the connection nodes of the spice subcircuit.

The numbering of conductors within a cable are shown in the figures for each cable type in section \ref{creating_a_cable_model}.

The conductors in the bundle are numbered in the order of their specification i.e. conductor number 1 is the first conductor of cable 1, conductor number 2 is the second conductor of cable 1 etc until all the conductors of cable 1 are counted, the the next conductor is the first conductor of cable 2 and so on.

The final part of the bundle specification concerns the specification of a ground plane (if required). 

\subsection{Cable bundle reference conductor}

The reference conductor for the bundle is always the last conductor in the cable bundle specification. Note that for shielded cables the last conductor will always be the cable shield. If a ground plane is included in the bundle then this is always the last conductor to be specified and hence it automatically becomes the reference conductor for the bundle.

The order of the cable specifications in the bundle and choice of the reference conductor to be the last conductor in the bundle has no impact on the results from the model.

\section{Cable Bundle Specification File Formats} \label{Cable_bundle_spec_file_formats}

This section describes the cable bundle specification file formats used as the input to the cable bundle model building process.
Cable bundle specification files have the extension \textbf{name.bundle\_spec}. The inputs required are the cables which constitute the bundle and their configuration in the bundle cross section, an indication of the presence or absence of a ground plane and if a ground plane is present, its configuration in the bundle cross section.

In addition to the data required to specify a cable bundle, additional flags may be specified to influence the operation of the software. These flags are as follows:

\begin{enumerate}
\item 'verbose'    output detailed summary of the software operation and calculation results.\\
\item 'use\_laplace'    use the numerical Laplace solver to calculate inductance and capacitance matrices for the external domain and any overshielded domains. By default, approximate analytic formulae are used. \\
\item 'plot\_mesh'    output a vtk file which shows the mesh used in Finite Element Laplace calculations.\\
\end{enumerate}

If the Laplace solver is used then the mesh generation is be controlled by the paramters

\begin{enumerate}

\item 'Laplace\_boundary\_constant'  This parameter determines the distance to the outer boundary in open boundary domains.
                                   The distance to the outer boundary is calculated by first determining the largest dimension 
                                   of the conductor system (including the ground plane point), bundle\_size. The outer boundary is 
                                   defined as a circle of radius  $bundle_size*Laplace_boundary_constant$. The default value is 3. \\
                                   
\item 'Laplace\_surface\_mesh\_constant'  This parameter determines the number of finite element edges on a conductor surface.
                                       The edge length of elements on a cylindrical conductor of radius r is
                                       $\frac{r}{Laplace_surface_mesh_constant}$. The default value is 3. \\
                                   
\end{enumerate}

The default parameters are a compromise between accuracy and computation time for the Laplace solution. 
The default values may be overridden by the user by appending the following to the end of the \textbf{.bundle\_spec file}:

\begin{verbatim}
Laplace_boundary_constant
4
Laplace_surface_mesh_constant
5
\end{verbatim}

A ground plane may be included in the bundle as shown in figure \ref{fig_ground_plane_specification}

\begin{figure}[h]
\centering
\includegraphics[scale=0.75]{./Imgs/ground_plane_specification.eps}
\caption{Specification of the ground plane position in the bundle cross section}
\label{fig_ground_plane_specification}
\end{figure}

The \textbf{.bundle\_spec} file format is shown below, along with an example.

\begin{center}
    \begin{tabular}{ | p{1.5cm} | p{4.5cm} | p{2.5cm} | p{5cm} |}
    \hline
    Line number & Typical value & Unit  & Description \\ \hline
1       & \#MOD\_cable\_lib\_dir & -    & Comment line \\ \hline
2       & .             & -             & Directory to read the cable model file to \\ \hline
3       & \#MOD\_bundle\_lib\_dir & -    & Comment line \\ \hline
4       & .             & -             & Directory to write the cable bundle model file to \\ \hline
5       & 2             & integer 	& Number of cables in the cable bundle \\ \hline
\\ \hline
For each cable: & & & \\ \hline
-       & cable name           & - 	& Name of cable in the cable model directory \\ \hline
-       & 0.02 0.045  0.0     & metres metres degrees & x and y coordinates of the centre of the cable in the bundle cross section and rotation angle of cable\\ \hline
\\ \hline
-       & ground\_plane  & - 	& ground\_plane or no\_ground\_plane as required for the bundlle\\ \hline
    \end{tabular}
\end{center}

\vspace{5mm}
\textbf{\underline{Example}}

Bundle model name: two\_wires\_over\_ground 

\begin{verbatim}
#MOD_cable_lib_dir
LIBRARY_OF_CABLE_MODELS
#MOD_bundle_lib_dir
LIBRARY_OF_BUNDLE_MODELS
2    # Number of cables in bundle, cable list follows
single_wire
6.35e-4     -0.001  0.0
single_wire
6.35e-4     0.001  0.0
ground_plane
use_laplace
plot_mesh
Laplace_boundary_constant
4
Laplace_surface_mesh_constant
5
\end{verbatim}

\cleardoublepage
