After our Parasolid is built, we can move on to Attila4MC to import the solid body and generate the mesh. Mesh generation is one of the most important steps to getting good results that accurately represent the problem in a timely manner. The Attila4MC interface is a familiar window-based GUI with intuitive menus and help options. Silver Fir has several example cases on their website with the geometry, source, cross section, and response functions needed for calculations. Additionally, in the “Downloads” section, Silver Fir has a variety of source and cross section libraries for download and use.

After loading the solid model into Attila4MC, we will need to determine if we are going to have a contiguous or dis-contiguous mesh. A contiguous mesh, shown in Figure 9.5, is where elements on adjacent part boundaries share the same nodes. A dis-contiguous mesh, shown in Figure 9.6, is a mesh where no nodal connectivity exists between adjacent parts and background space (e.g. air, void) only meshed where solution is desired. For the Attila solver, particles (flux) can only travel through the mesh. For MCNP, the solver can track particles through the dis-contiguous mesh. (SilverFir; 2023)


In Example 9.2, we will demonstrate creating a new Attila4MC project, loading the Parasolid from Example 9.1 and completing the dis-contiguous mesh operation on that model.
Example 9.2
Create a new Attila4MC project, load the Parasolid created in Example 9.1, and generate a mesh using the MCNP load option for a dis-contiguous mesh.
Solution: Create a folder on the computer that has both Attila4MC and MCNP6 installed. This will be the working folder for the problem. Open the Silver Fir website and navigate to the “Downloads” and “Cross Section and Source Database” page.

Select and download the XSmc (MCNP) cross section files for this problem. Go back to the main Silver Fir website, navigate to the “Tutorials” and “Getting Started” page.

Download the “Getting Started Exercise Project Files” and unzip the file folder. Within that folder, there is a file named, “ICRU57.resp.inp”. This is the response function we will use for our Attila4MC models. It will convert gamma and neutron tally flux to dose response. There is another file named "GammaSpectra.spec.inp" which is a Cobalt-60 spectra. For this example, we will use this spectra file. We could also select Cobalt-60 from the Source Spectra file from the large "Source Spectra" file available from the same downloads where we retrieved the cross section file.
Copy the Parasolid, cross-section definitions, response function, and gamma spectra files to the same folder. Start Atilla4MC and select and double-click "Empty Project" and provide it a name and some information (optional).


Whenever you start using Attila4MC it is important to verify that the code is setup with the preferences that allow it to start and run MCNP. On top menu select “Edit” and “Preferences”. Check the preferences to ensure the path for the executable and data are correct and the version of MCNP is correct.

Next import files into the project tree. To load files, right-click on the filename for the project and use the menu to load cross-section, response function, solid body and source definition files.

Begin the mesh generation process. Right-click on the solid geometry to open the mesh generator. Select MCNP for the load method along with region name of “part”. This is important because the Parasolid was made from parts not from sub-assemblies

The mesh generator will load with a preview of the part in the lower window. We have options to view in 3D rotation (click-and-drag the left mouse button), pan (click-and-drag the middle mouse wheel), and zoom (rotate the middle mouse wheel or select ctrl-left and click the mouse button). In the preview we will inspect the part. We can move rotate it and then select a part with the left mouse and then right-click and hide the part to see layers. Note the overall dimensions and global coordinates in the Solid Bounding Box in upper right. Double check with geometry length units. We can change region names by double-clicking names and changing them. Set the Max Allowable Edge Length. This is applied to the mesh edges in the model, restricting edge lengths at or below this value. Setting a Max Allowable Edge Length between 1/10th and 1/20th of the max model extents is generally recommended. For our model 2 meters is good. Set the Max Edge Length for regions. We are not going to change the max edge length because there are better ways to refine the mesh using the Advanced options.

We will select the down-arrow on the Generate Mesh Button and then select Generate Surface Mesh Only to preview how the mesh will look without any options Note the roughness of the mesh for small curvatures around items like the source sphere, the barrel of the tank and the people’s heads.
Select Advanced to open the Advanced Mesh Generation Attributes window Advanced Mesh Generation Attributes allow the user to control transitions between mesh sizes, curvatures in the mesh, and provide the user with the ability to refine the mesh anisotropically. The features in this window are typically applied to aid in resolution or reduce element count to decrease calculation times.
Select Curvature Refinement and keep the default values for Size Transition Factor, Maximum d/h, and Minimum edge length of 1.00, 0.02, and 0.05 The Size Transition Factor controls the rate of transition from fine to coarse elements and can be used to further reduce the element count in the mesh. Curvature Refinement allows the mesh to appropriately mesh curved solid bodies. Maximum d/h is a dimensionless value, and 0.02 is sufficient for most applications. The Minimum Edge Length is model specific, and, generally, can be to set to 1/3 of the smallest diameter curvature desiring resolution. The Refine Anisotropically feature will reduce the cell count by refining the edge lengths only in the direction of curvature.
Once again select the down-arrow on the Generate Mesh Button and then select Generate Surface Mesh Only to preview and note how much more detailed the mesh is on curved areas. Also note how many more cells are created and how we have added refinement in areas on the earth and other associated areas that we may not want refined.
Once again select Advanced to open the Advanced Mesh Generation Attributes window and select Refine Anisotropically to force the mesh to refine curvature along curved regions, but leave the flat areas at a rougher mesh. Once again select the down-arrow on the Generate Mesh Button and then select Generate Surface Mesh Only to preview and note how the mesh is detailed on the curved areas, but rougher on the flats which is a better balance for our problem. Select the down-arrow on the Generate Mesh Button and then select Continue Volume Mesh Generation.
The number of cells in a mesh heavily influence calculation time. However, the goal of mesh generation is not to obtain the smallest number of cells possible; it is to optimize the efficacy of the unstructured mesh by balancing the application needs of the user with the specifications of the radiation transport problem. The final window will look like the following:

The mesh is now ready to be loaded into the Project tree. We will select Import Mesh located in the upper right of the Mesh Generator window and import it. Once the mesh is created, it can be imported into other projects as well without having to generate it again.
References
Full bibliography- SilverFir (2023). Introduction to attila4mc. URL: https://silverfirsoftware.com/
