\section{Magnetic Modelling of the MICE Hall}

\subsection{Purpose of the Model}

In order to further understand the issues with the stray field of the MICE magnets it was deemed prudent to build a magnetic model of the MICE hall to give us further insight into the likely effect of the stray field throughout and beyond the volume of the MICE hall.  This model should be capable of producing field maps for the various operating modes of the MICE magnets; and in the first instance with emphasis on Step IV of the experiment. More succinctly the aims were to:

1)	Produce field maps that would permit a better understanding of potential issues arising within the hall from not having a return yoke on the cooling channel magnets. This in turn would guide the necessary mitigation work for the baseline design.

2)	To use these field maps as input into other models.

3)	To allow members of the collaboration to have access to estimates of the likely field levels in the vicinity of their equipment.

The following section details a description of the magnetic model of the MICE hall.  How the model interfaces with the Baseline plan is discussed later.

\subsection{Introduction}

The MICE hall represents a significant volume of approximately 40~m ${\times}$ 12~m ${\times}$ 12~m and contains a significant amount of ferrous material. There is no symmetry to exploit. There is also much interest in how the fields penetrate beyond the confines of the MICE hall, particularly on the South Side, and given that a significant additional volume is required to ensure that the boundary does not influence the solution it is clear that the extent of the model is substantial. The total volume of the model has turned out to be approximately 120~m ${\times}$ 80~m ${\times}$ 80~m. 

Building an FEA model on this scale requires a careful balance between detail and mesh size. This means that certain ferrous objects have not been modelled and in some cases some detail in the objects has been omitted to make the problem tractable. Nonetheless the model is still large and takes significant computing resources to solve.

The software package used to generate the magnetic FEA model is called OPERA, which is a commercially available software package.  The geometry and model setup is defined in a module called the {\lq}modeller'. This module also meshes the complete model after the geometry of the model has been built. For complex geometry the entire model, setup and meshing is invariably defined in a user defined file called .comi code, this is a scripting language that allows you to drive OPERA.  After meshing the model is passed to the solver module which iteratively finds a solution to the problem. The solved problem can then analysed in a further module called the {\lq}post-processor'. 

Vector Fields were consulted to look at the model and give their opinion on the accuracy of the model, details of this will be discussed in the later section \ref{consultancy}. However it is worth pointing out that the general consensus was that the model was well put together and that any errors due to modelling technicalities should be minimal. Of course this result is independent and separate to the issue of accurate geometric representation of ferrous components and whether we have an accurate representation of all ferrous mass in the model, the latter being quite difficult to judge and remains an uncertainty. More will be stated on this in section \ref{Objects_in_Model}.

Finally, before looking at specifics, it is worth noting that there is a significant database of additional information on the web. All the models that have been built, code, drawings that have been used, personal notes, images generated from the model, and other details have been placed at the following website:

http://www.hep.shef.ac.uk/research/mice/opera{\textunderscore}models/

\subsection{Magnets}

The magnets for the hall model were taken from a set of conductor files that had been used in previous models. These files define the geometry for the step IV and step VI magnets and the currents through them for flip and solenoid mode for 240~MeV/c operation. The hall model has only ever been run with 240~MeV/c settings as this gives the highest magnet currents and therefore the highest stray fields.

The magnet files define the magnet geometries and currents to be those as defined in the MICE technical reference document (TRD)\cite{MICEtrd:2004}. These values may differ from the {\lq}as-built' magnets slightly, as construction of the magnets has in certain cases lead to small discrepancies in the geometry and current densities. However as the final fields will in either case be identical, this should be of no real consequence to the modelling.

%The differences between the TRD values and the as-built values has not been evaluated for the Hall magnetic model.

%*** KL 4 Need to comment on likely size of the deviation.  I.e. small? ***

%Notes: 

%The centre of the magnetic model (0,0,0) is defined to be the centre of the Step VI cooling channel. 

%The step IV conductor file places the Step IV centre at z=-2750~mm. However the centre of the Step IV cooling channel according to TD-1189 -167 should be at z=-2790~mm. This conflict has not been resolved and so the step IV cooling channel sits non-centrally between the Virostek plates in all of the models. 

%Centre of Upstream Magnet to Face of Virostek Plate ? 410~mm 
%Centre of Downstream Magnet to Face of Virostek Plate ? 490~mm.

%The step VI magnets are centred centrally between the Virostek Plates

%*** KL 5 - Not sure what this means? Is the drawing wrong, a mistake in the design?  Or model?  Also, probably need to comment on the size of the effect.  Can we not get this right? ***

\subsection{Objects in the Model}\label{Objects_in_Model}

Both ferrous and non-ferrous items exist in the model. Technically there is no need to add the non-ferrous items, however on a model of this size and complexity, those items provide useful reference structures.  Consequently the geometry of the non-ferrous items may be less critical, although their proximity to the MICE magnets is still important if they are being used as such. A more thorough description is given to the included ferrous items, although more detail can be found by consulting the technical drawings and the .comi code.

Throughout this document the various walls and components of the MICE hall are referenced via their geographic location, i.e. north, south, east and west. These directions were shown on figure \ref{fig:Schematic_Step_I}. To help aid the reader to reference themselves figure \ref{fig:Orientation} also shows the these directions with respect to an illustration of a MICE hall model~91.

\begin{figure}[!htb]
\begin{center}
\includegraphics[width=13cm,keepaspectratio]{Model_91_3D_001.png}
\end{center}
\caption{Relative orientation of the MICE Hall superimposed onto Model~91. Note that some structures from this model have been removed in this figure.}\label{fig:Orientation}
\end{figure}

\subsubsection{Ferrous Objects}

Here are listed the main ferrous objects that have been included in the hall model and some relevant notes as to their description and function for reference.

\subsubsection*{North and South Shield Walls (NSW and SSW)}

The North and South Shield Walls are modelled as a continuous double skinned wall, each skin composed of 35~mm AISI~1010 steel. The floor plates on the SSW are flat whereas in reality they are inclined.  This means there is a small amount of missing steel in model of the SSW model, this is the steel that would fill in the gap where the floor actually slopes. 

The I beams that support the shield wall are not modelled, this is a significant amount of steelwork but this level of detail could not be supported in the hall model.  

\subsubsection*{Floor Web and Floor Web Plates}

This is an estimate of the lattice steelwork that sits underneath the beamline between the NSW and SSW. There is also some lattice steel work on the North side of the NSW and the steel floorplates that sit on top of this.

\subsubsection*{Dipole D2}

The dipole is modelled as a solid block of steel. The dipole functionality, i.e. its coils, have not been included in the model.

\subsubsection*{Quadrupoles, Bases and Baseplates}

Q4-Q9 have been included in the model, including an estimation of the steelwork in their bases and the baseplates, which was considered significant. Like the dipole, the quad functionality, i.e. coils, has not been included in the model. As the quadrupoles have been modelled as a lumped mass of ferrous material there is a slight concern that their ferrous mass may have been overestimated.

\subsubsection*{Virostek Plates and Upstream TOF plates}

The purpose of the Virostek plates is to sheild the photomultiplier tubes in the TOF detectors from the stray magnetic field. The upstream TOF plate sandwiches the TOF1 detector between the TOF plate and the Virostek plate improving the the shielding for the TOF1 photomultipliers.

*** (Why is there no TOF plate for TOF 2? - I don't know) ***

\subsubsection*{The Electron Muon Ranger - EMR}

A simple frame has been included to represent the EMR steelwork. The framework for the EMR is complex and would have been difficult to model in detail.

\subsubsection*{Decay Solenoid Area - DSA}

The DSA is wall composed of  steel and concrete blocks that seperates the decay solenoid, D2, Q4-Q6 from the rest of the MICE hall. The DSA comes under the province of ISIS and is considered to be part of the synchrotron space, access to this area is limited during ISIS operation. The steelwork that forms the DSA area constitutes a signficant mass of steel and therefore this has been included in the MICE hall model.

\subsubsection*{Beam Dump}

The beamdump is a steel and concrete assembly that marks the end of the MICE beamline. The model was based upon the technical drawings, although some of the outer steel framing was missed off due to resolution limitations in the model.

\subsubsection*{South West Distribution Board}

Although this only a small amount of steel this was included in the hall model as there is some electrical installation attached to the wall.

\subsubsection*{Linac Shield Wall}

The linac wall is a steel loaded concrete wall and provides shielding from the ISIS linac room which runs parallel to the MICE experimental hall. This wall was modelled with a reduced BH curve to approximate its reduced gross magnetisation. The reduced BH curve was calculated from comparing the attractive force of a magnet to the linac wall, and scaling this to the force measured for the shield wall (AISI~1010 steel). This is a crude technique but gives a reasonable first approximation to the magnetisation. In the hall model the linac wall has been assigned a reduced mild steel BH curve. The magnetisation of this curve has been reduced to 15\% of its nominal value. 

\subsubsection*{Trench Plates}

The plates covering the Trench are currently steel; as they constitute a significant amount of steel and run in the z direction they were included in the model. There is also a considerable amount of structural steelwork beneath these plates that has not been included in the model.

\subsubsection*{Cellar}

There was some concern over the effect of eight magnet bases that had been buried in the MICE hall. For this reason these bases were included in the model. These bases are steel shells that are concrete filled.

\subsubsection*{North Mezzanine}

The north Mezzanine floor runs behind the north shield wall and is currently constructed from steel plate, so these plates were added to the model. The structural steelwork supporting this floor was not added to the model.

\subsubsection*{Cranes}

The two cranes were crudely approximated by two steel beams that run North to South in the West end of the MICE hall. This should give a reasonable approximation to their ferrous mass, but their geometry, which is complex, is not approximated. 

\subsubsection*{Return Yoke}

An option was added to the model to run it with a return yoke that looks very similar to some of Holger Witte's early designs. The return yoke in the hall model has 12~cm thick walls. The .comi code can be configured to both attach the yoke to the Virostek Plates and to include an extended flange.  

\subsubsection{Missing Ferrous}

As pointed out previously in a model of this size some compromises have had to be made and consequently there is missing ferrous content in the model. There will be a significant number of small ferrous objects that would have been impractical to document and model. In terms of known missing ferrous that may be of significance this includes:

I Beams - Structural steels for Walls and Floors.\\
Any Cabinets/Compressors/Racks and Contents\\
Substation\\
Fridge Equipment\\

Unknown Ferrous - Iron objects below a critical size that have not been examined.
Additional Iron in the DSA area? (Although this shouldn't be too relevant as the field in this area is not of concern.)

\subsubsection{Non-Ferrous Structures}

Due to the size of the model many non-ferrous structures were added as reference points in the model. These structures make it much easier to determine the field level in a particular volume of the MICE hall without having to refer to a coordinate system, which can be prone to error if entered manually. The main objects of note are:

Floors Walls and Roof of MICE Hall
  
Trench - This sits in the floor at the east end of the MICE Hall. As there is equipment in the trench it seemed prudent to add this space to the model.

South Side Buildings  - This is the name given to the collection of rooms/buildings that are on the south-side of the MICE hall. These rooms are of particular interest as they will contain equipment that could be sensitive to stray field. The rooms include, The MICE local control room, hydrogen room, proposed Rack Room~2, the ISIS plant room and the three ISIS control rooms.

\subsection{Code Structure and Meshing}

The code structure for building the MICE hall model modular, each component in the MICE hall has its own set of .comi scripts.   A master file controls which of the above components are built or not. Primarily this feature was added to aid debugging but in principle it also allows simpler models to be run. Geometry and mesh information are stored in separate files, which allows for this information to be easily edited.

\subsection{Solution Files}

All the solution files are stored on the web and so the solutions can be downloaded and viewed by anyone who has access to OPERA. The source code is also available if anyone has queries about any particular model.

To help those who don't have access to OPERA but would like to see results from the model, and to make it easier to get access to those results, an autogen script was written that took the model solution and generated many images of BMod, Vector Field Plots and Error Plots over the x, y and z planes of the model at 1~m and 2~m spacing (axis dependent). These plots are then posted onto the modelling website and can be accessed directly.

\subsection{Vector Fields Consultancy}\label{consultancy}

To give us some confidence in the Hall model we approached Vector Fields and asked them to validate the hall model; we also asked for some advice on specific issues relating to using the hall model as a basis for sub-modelling.

These reports have now been published and are available on the modelling website at

http://www.hep.shef.ac.uk/research/mice/opera{\textunderscore}models/

Vector field produced two reports, the first deals with the hall model itself whilst the second deals with issues surrounding sub-modelling and how that would integrate with the hall model. In this section the conclusions from the reports will be outlined but for further details the reader is refered to the reports themselves.

\subsubsection{Report1: Validation and Improvement Suggestions for MICE Experimental Hall Modelling}

For this report VF used model~91 which was step IV 240 MeV/c solenoid mode. Enough information was given in the reports on the process that they undertook that it would be possible to independently repeat the validation for the other models if this was deemed necessary. However as we are primarily concerned with Step IV this step has not been taken and will not be pursued further here.

In this report Vector Fields looked at five items which will be briefly overviewed.

\subsubsection*{Item 1 - Comparison of fields in free space}

By comparing of a couple of line integrals and a patch on a model with all the elements set to air with Biot Savart Calculations it was determined that the error on those compared areas was less than or equal to 0.21\%. This is indicative of the error introduced by the finite mesh.

As the lines/patch do not represent the entire model the error in any given region may be more or less than this but it is understood that this is indicative that the meshing of the model is adequate.

\subsubsection*{Item 2 - Adding ferromagnetic components to the model}

In this study the ferromagnetic components were grouped into six groups that were spatially/functionally related. A model was run with all components set to air and then successive models were run with each group of components having its native BH curve switched on. For each model the effect on the three patches defined in item 1 was looked at.

Once again the location of the patches has an influence on the results of the study and so care must be taken in interpreting the results for other areas, particularly if the area of interest is likely to be near a ferromagnetic object.

There were two results from this study which are copied verbatim from the report:

\emph{{\lq}This investigation shows that the most significant components are those which substantially affect the return path of the flux. While the results presented have been necessarily reduced, they are representative of important areas in the model where sensitive equipment is potentially to be mounted. The models produced for these studies can be used for field recovery in any other area of the meshed space.'}

\emph{{\lq}It is probable that the MICE Hall model already contains enough of the significant components for the fields in free space to be accurate within 1 or 2\% - remembering of course that all fields may be at least 0.2\% of the {\lq}all free space' value in error anyway. From Cobham's knowledge of the MICE Experimental Hall, there do not appear to be any major components that have been omitted that will further significantly affect results'}

\subsubsection*{Item 3 - Investigation of material property variations}

In this item the magnetisation values of BH curves of the steel was reduced by 10\% and the effect on the three patches defined in Item 2 was calculated. The observed changes were usually well below 5\%.  The reduction in the magnetisation of the shielding walls means that they are not performing quite as well but as they are generally far from saturation in model 91 the effect is quite small.

The conclusion was that the uncertainty about material properties in the structures should only be of a minor concern. Note however that this result only applies to the step IV models.

\subsubsection*{Item 4 - Investigation of mesh quality}

The hall model has been run using quadratic elements throughout as this is the safest and most accurate method of calculating the fields. Unfortunately quadratic elements impose a heavy cost in terms of the number of equations that need to be solved, hence increasing both the size and solve time of the model. To investigate whether the use of quadratic elements was necessary two models were run, one with mixed elements and one with all linear elements. The integrated fields on the patches were compared with the results from the quadratic model.

The results showed that on the patches examined the benefit of using quadratic elements was marginal yet the solve time improvement was significant.

Care needs to be taken in switching to running models with linear elements. The quadratic elements are of use where the field gradient is high or where high accuracy is sought. So for the general solution where the solution file could be taken by anyone to ascertain the field anywhere in the model a quadratic solution is the safest although a mixed solution may be ok.

This result could be of much use for speeding up the process for finding fields for sub-models though - see report 2

\subsubsection*{Item 5 - Substructure modelling in model 91}

This final item considered using field values from the MICE Hall as a source field for a more detailed sub-structure model. 

A comparison was made between running the hall model with a model of a rack in situ and using the hall model without a rack in situ but extracting a source field from the hall model and using these fields as a source for a sub model that contained the rack.

The integral of the field over a patch was examined. The results from this showed that there was a significant difference between the integral on the patch from these two approaches and this leads to the conclusion that:

{\lq}The field from an overall model not containing that substructure should not be used as a driving field for a detailed sub-model of the substructure.'

This has significant implications for any sub modelling effort.

\subsubsection{Report 2: A Further Investigation of Sub-Structure and Simplification Modelling for the RAL MICE Hall}

The following has been copied verbatim from the introduction of the report:

\emph{{\lq}As shown in the report on Validation and Improvement Suggestions for MICE Experimental Hall Modelling, omitting substructure from the model altogether is not valid when the source fields are obtained. However, a simplified model of the substructure can be included. In this report, different options for simplified substructure models are investigated and some indications of probable error associated with the simplification are obtained.'}

A lot of this report goes into details about how to implement substructure models and will not be repeated here. However there are a number of recommendations in the report that are worth repeating. These too have been copied verbatim from the reports.

\subsubsection*{Recommendation 1 for MICE Hall model:} The effect of solving the magnetic fields in free space using a truncated finite element mesh appears to give about an average 5\% error in the {\lq}far field' in the test model. The error will be smaller closer to the solenoid coils and larger near the boundary of the model. This inherent error from using finite elements should be considered when making judgements about maximum flux density levels in critical areas of the MICE Hall by repeating this type of calculation for the complete MICE Hall model and investigating the error in the volume where a substructure model is required.

\subsubsection*{Our comment:}
This follows on from the comments made in report~1 that the errors had only been calculated on specific patches and so each individual situation needs consideration.

\subsubsection*{Recommendation 2 for MICE Hall model:} Structure inside the MICE Hall that consists of a steel outer {\lq}cabinet' with internal ferromagnetic structure can be adequately simplified to either a hollow structure of approximately the same dimensions as the outer cabinet, or an approximate cabinet with a single, appropriately dimensioned, ferromagnetic block placed at its centre. If the existing model includes structure where the block is already in place, don't bother to remove it. But, if future cabinets are added, the outer cabinet should be sufficient to get source fields for a detailed substructure model.

\textbf{Recommendation 3 for MICE Hall model:} Element size in the free space surrounding a substructure should not need to be reduced to the level that may be needed for a detailed substructure model in order to adequately capture the source field from the complete MICE Hall model.

\subsubsection*{Recommendation 4 for MICE Hall model:} When trying to examine the shielding effect supplied by magnetic walls, the outer boundary of the model should be made as large as practically possible to avoid image sources.

\subsubsection*{Recommendation 5 for MICE Hall model:} If substructure modelling of shielding walls is undertaken, the discretization of the wall and supports only needs to be at a reasonable level to capture the geometry. A fine mesh is not needed to capture variations in flux density as these will be small.

\subsubsection*{Recommendation 6 for MICE Hall model:} A quick way to assess how effective shielding will be whether it is real shielding constructed for the purpose of reducing field or the outside cabinet of some equipment is to determine where the steel is operating on the magnetic characteristic of the shielding material. Tangential components of magnetic field strength and the normal component of magnetic flux density will be continuous at the material surface, so this will also give an indication of the flux density just behind (or inside) the shielding wall.

\subsubsection*{Recommendation 7 for MICE Hall model:} Simplified models of the shielding walls in the model should be adequate to determine if the flux density is low enough for equipment to be mounted behind them, unless the sensitive equipment is very close to discontinuities in the wall occurring because it is constructed from a finite number of plates. Substructure modelling will not be beneficial.
An assessment of the error in the source field associated with the finite element representation should be made in the same vicinity to determine whether the reduction of the field due to the shielding can be considered accurate.

\subsubsection*{Conclusions from the 2nd report}

1. The effect of the meshing and truncation of infinite space should be assessed in any area where it is important to determine if sensitive equipment can be mounted. This should be achieved by comparing Biot-Savart calculated fields with fields recovered from the mesh assuming all materials have free-space permeability

2. Detailed substructure models can use the overall MICE Hall model to derive a source field providing:
a. There is a simplified representation of the steel container and its contents included in the MICE Hall model
b. The differences in the source field from the solenoids caused by using finite elements compared with Biot-Savart is not larger than the source field values for the sub-structure

3. Hollow tanks, or tanks with an equivalent centralized volume of magnetic material offer a better approximation than tanks completely filled with a dilute magnetic material.

4. It is not accurate to extract the source field for a substructure model from a model of the MICE Hall that does not include a simple representation of the structure - see the earlier results obtained in the other MICE Hall report for including the rack in Model 91.

5. Substructure modelling behind shielding walls should not be necessary unless the sensitive equipment is placed very close to discontinuities in the wall. The differences in source field associated with truncation of the mesh will probably be larger than the error introduced by simplification.

\clearpage