Copyright 2021 United Kingdom Atomic Energy Agency (UKAEA) license: MIT
This repository contains a set of tools designed the increase the efficiency of the preparation of CAD models for neutronics analysis. The tools automate many of the tasks typically undertaken to simply a detailed CAD model to a level suitable for particle transport. Install instructions for inclusion of the tools as an additional tab in the SpaceClaim GUI is provided below. The tools are designed to aid the user produce a CAD model suitable for conversion in software such as SuperMC or McCAD.
It is expected that user of these tools has some level of competency using SpaceClaim. The tools do not fix broken CAD models nor is that their intended purpose. In any case, the tools will likely not work with poorly defined geometry.
More extensive documentation including installation instructions can be found here
The tools have been produced using a combination of the C# API and python scripting available in ANSYS SpaceClaim. All tools exist in a single ribbon which is added when the tools are compiled.
Feedback on existing tools or proposals for new tools welcome.
Tool | Purpose |
---|---|
Body Select | Highlights cones or tori, identifies small volumes (user input) and small rounds (user input) |
Export | Saves bodies of different colour in geometry as separate .sat files |
Lost particles | Plots MCNP lost particles on geometry |
Max surfaces | Highlights all bodies with a number of surfaces exceeding user input |
Pipe tools | Automates simplification of pipe networks |
Tori tools | Simplifies complex tori to cylindrical bodies |
Cylinder-plane locator | Identifies a shared edge between and plane and cylinder in a single body |
Cylinder-plane splitter | Splits a body along cylinder-plane edge |
Geometry assessor | Selects tori, cones, bodies with shared edges between higher order surfaces |
Mesh tally writer | Writes the MCNP definition for a mesh tally based on geometry |
Mesh tally checker | Plots simple mesh tallies from MCNP |
Cylinder Cylinder splitter | Splits along edge between two different cylinders |
Void generator | Creates void cells for geometry to define reciprocal space |
Volume assessor | Calculates volume of all solids in structure tree |
To compile and install the CCFE SpaceClaim tools it is recommended that Visual Studios Community edition (which is free to use on opensource projects) is installed. This provides a relatively quick and easy way to compile and install the tools into SpaceClaim.
These instructions use Visual Studios 2019, but should be relatively similar for all versions of Visual Studios. It should be noted that .NET Framework version 4 or later is required.
First you will need to clone the github repository by clicking on clone repository in the File menu:
Enter the github address of the repository in the first box and the local location of the folder you want to store the repository in the second box:
Once cloned you will need to re-point the project to the SpaceClaim API Library. This can be done by deleting SpaceClaim.Api.V16 and SpaceClaim.Api.V16.Scripting from the ‘References’ in the ‘Solution Explorer’.
And then re-adding them by right-clicking on References and selecting ‘Add Reference’:
Click browse and navigate to C:\Program Files\ANSYS Inc\v192\scdm\SpaceClaim.Api.V16 (or the location SpaceClaim is installed if it is not installed as part of ANSYS):
Add SpaceClaim.Api.V16.dll:
Add SpaceClaim.Api.V16.Scripting.dll (found in C:Program Files\ANSYS Inc\v192\scdm).
Repeat the above steps to also add SpaceClaim.Api.V18.dll and SpaceClaim.Api.V18.Scripting.dll.
The next step is to make sure the output is placed into the correct folder, which can then be loaded by SpaceClaim when it opens. To do this the projects ‘Properties’ should be opened in the Solution Explorer.
Check that the Output path is set to:
C:\ProgramData\SpaceClaim\AddIns\Samples\V18\CCFE\Toolkit
(Or the location of your ProgramData directory if this is not on your C drive).
You can now build the tools in Visual Studio. Please ensure that the SpaceClaim application is closed when you do this.