Skip to content

Collection of tools for efficiency improvements in developing a CAD model for neutronics analysis

License

Notifications You must be signed in to change notification settings

ukaea/SpaceClaim_API_NeutronicsTools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SpaceClaim API Neutronics Tools

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

Development

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.

Included Tools and Purpose

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

Installation

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:

install_1

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:

install_2

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’.

install_3

And then re-adding them by right-clicking on References and selecting ‘Add Reference’:

install_4

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):

install_5

Add SpaceClaim.Api.V16.dll:

install_6

Add SpaceClaim.Api.V16.Scripting.dll (found in C:Program Files\ANSYS Inc\v192\scdm).

install_7

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.

install_8

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).

install_9

You can now build the tools in Visual Studio. Please ensure that the SpaceClaim application is closed when you do this.

About

Collection of tools for efficiency improvements in developing a CAD model for neutronics analysis

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages