Skip to content

Latest commit

 

History

History
156 lines (124 loc) · 18.2 KB

ErrorBlocks.md

File metadata and controls

156 lines (124 loc) · 18.2 KB

Assembly of Blocks with Errors

Procedure Overview

  1. Save ErrorBlocks.SLDASM and convert to ACIS format or directly save and open ErrorBlocks.SAT.
  2. Fix mistakes within the model using ANSYS SpaceClaim.
  3. Import file into Trelis/Cubit and inspect model for any import issues.
  4. Create the graveyard volume (void optional for understanding).
  5. Finish part in Cubit/Trelis.
    • Imprint and Merge volumes
    • Assign materials
    • Export file to .h5m

Goals of Example

  • Execute the workflow with a model that has geometric issues to be resolved in SpaceClaim.
  • Work through important processes on an example that is easy to visualize and understand.
  • Provide a general understanding of what issues could arise on more complex models.

Procedure

In Initial CAD program

Any CAD engine should work for this process as long as it can export to a format importable by SpaceClaim or Cubit/Trelis.

  1. Download the part titled "ErrorBlocks.sw" from this page and open in Solidworks.
  2. Export the assembly/part to ACIS format (.sat file extension)
    • ACIS format 22 is preferred (default for Solidworks)
    • Use save or export feature and select ACIS (.sat) format

ErrorBlocksOverviewWide

Notes

- The preferred format is ACIS (.sat). Note that multiple file types could be used, but there is anecdotal evidence that suggests .sat files work the best for this process. Otherwise formats such as STEP and STL are also able to be imported to Trelis/Cubit.
- This step is unnecessary unless you want to explore the model in Solidworks or learn how to save file as .sat.
- To skip this step download the ACIS file titled "ErrorBlocks.sat" and move onto ANSYS SpaceClaim section.

In ANSYS SpaceClaim

SpaceClaim is useful for cleaning models that have basic issues such as small gaps, overlaps, edge contacts, and unnecessary geometric detail. More general SpaceClaim tutorials/support can be found here.

  1. Open ErrorBlocks.sat by clicking file, open, and then sorting by .sat type files.

  2. Identify all basic issues which exist within the model

    • Visually:
      • Find one example of each basic issue as described below. All four are relatively conspicuous and easy to find visually.
    • With SpaceClaim tools:
      • To identify gaps navigate from Prepare -> Clearance -> Detect. In this case to find the gap enter a maximum distance of 1cm in the Find Options box. The gap will be highlighted in red.
      • To identify interference navigate from Prepare -> Interference -> Remove. There are technically two volumes of interference and both will be highlighted in red.
      • The Imprint tool highlights any coincident edges or faces within the part and can make it easier to find edge contacts as well as overlaps. This tool can be found by going Prepare -> Analysis -> Imprint.
      • There are no built-in tools in SpaceClaim to generally identify unnecessary details.

Descriptions of Basic Issues Gaps: when particles encounter gaps they may lose track of which volume they are in and be lost. In this model there is one obvious gap, but for real models gaps are only an issue when the gap is around 10^-6 units (cm). In many cases small gaps can also be fixed by the imprint/merge step in Trelis/Cubit This gap is made larger in this example so that it can be found visually as well as with the SpaceClaim tool.

Overlaps: when particles encounter overlaps between two volumes they may not be able to determine which volume they are in and be lost. There is one volume that is obviously overlapping with other volumes.

Edge contacts: there is a possibility that when two volumes are only in contact on a single edge it can cause an issue with surface definitions. There is one example of an edge contact in this model.

Unnecessary Detail: all details in the CAD model are included in the meshing process and in the final analysis and small details can greatly increase the amount of computation necessary. The physical threads included in this model are one example. This issue is a problem of optimization and depends on the computing power available as well as the level of detail necessary.


  1. Fix the basic issues with the tools available in SpaceClaim.
Type of Issue Description Procedure to fix Picture Example
Gaps: To fix gaps oftentimes the best option is to use the "Pull" tool and fix any possible overlaps using the "Interference" tool. - First select one of the two faces on either side of the gap using the "Select" tool. To make it easier to see the face you can hide one of the two components by unchecking the box under the "Structure" toolbar.

- Next click the "Pull" tool and then select the "Up To" option and click any face of the other component that borders the gap. This will extend one of the two components to fill the gap.
ClearanceTool
Overlaps: The "Interference" tool gives the option to subtract an interfering/overlapping region from one of the two bodies. - The choice of which to volume to subtract from may be important based on the materials of each volume so be sure to note which component it subtracts from.

- SpaceClaim automatically selects the larger component as the one to subtract from. To switch to the other volume simply check the box labeled "Subtract from smaller body" located in Fix Options.
InterferenceTool
Edge contacts: There are two main ways to resolve edge contacts, the first is to create a wider edge so that there is a common surface, the second is to cut out the edge so that there is are no shared features between the two components. This is dependent on the nature of the model and the analysis. - Go to the design tab, sketch section, and select the line option. Create a rectangle that is perpendicular to the edge contact and shares an edge with the top edge of the face that contains the edge contact.

- Select the rectangle using the "Select" tool and then click "Pull".

1. To create a gap select "Cut" from the "Options-Pull" toolbar and then either drag the cut to the bottom of the component, use the "Up To" option and select the bottom face, or use the "Ruler" option and make the pull 100cm.

2. To create a wider edge select "Add" and -similarly to cutting- either drag the cut to the bottom of the component, use the "Up To" option and select the bottom face, or use the "Ruler" option and make the pull 100cm. This method will create interference between the new volume and old which can be resolved using the "Interference" tool.
RectangleEdgeContact
Unnecessary details: In this particular case the physical threads are an unnecessary detail as they will cause a significant amount of computational load, but have very little effect on the final results. Which details are important to keep and which to delete is dependent on the nature of the model and the analysis. - This step can be completed in any CAD program and is more of a general suggestion to be considered continuously during the design phase.

- In SpaceClaim one can use a circular pull to flatten the threads off in a similar way to fixing an edge contact.
ScrewedUpDetails

Notes - Most often in real models unnecessary details must be determined intuitively and visually while overlaps, edge contacts, and small gaps cannot be found visually.

- For all of these edits one must work closely with the creator of the model/experiment to determine which complications are important to the end result and which are able to be changed.

In Cubit/Trelis

Cubit is a simulation software with CAD capabilities and Trelis is the commercially available version. It is used in this workflow to assign materials to volumes and export the model to the DAGMC .h5m format. Cubit has both a GUI and a command line interface. Nearly all commands can be run through either one.

Steps Graphic User Interface In Command Line
Import the .sat file into Trelis/Cubit - Can be imported using the GUI with File -> Import.

- Select the file through file explorer and open.

- One important qualifier to include is [attributes_on].
- In the command line the simple form of the command is import acis [filepath]

- This command can be appended with further commands that can be found by typing help import acis.

- These qualifiers correspond with the options given when importing files through the GUI.

- One important qualifier to include is [attributes_on].
How to save progress for the file as ACIS - Click on file, export, and select the file destination and name.

- Make sure that it is being exported as ACIS (.sat) and press ok to save.
- In command line type export acis [filepath] overwrite.
Make sure units/distances are correct and if not, fix them - A distance within the model of "X units" should have a metric distance of "X centimeters".

- To check this click on a surface/line with a known metric value and then navigate to the properties page and check the surface area or curve length.

- On the Command Panel click on Geometry (leftmost option) -> Volume -> Transform -> Scale (from dropdown menu) -> Enter Scale Factor -> Apply
- A distance within the model of "X units" should have a metric distance of "X centimeters".

- To check this in the command line the general form is list [entity name and number] geom. For example to check the geometry of volume 1 enter list Volume 1 geom.

- In command line enter vol all scale [Scale Factor]. For example parts from solidworks would require vol all scale 0.1 to convert the units to centimeters.
Inspect models and resolve overlapping volumes - On the Command Panel click on Geometry (leftmost option) -> Volume -> Modify -> Heal (from dropdown menu) -> check Autoheal -> Apply

- There are many options within the modify dropdown menu, but none are as robust as SpaceClaim
- In command line one can fix overlaps by typing validate vol all and then healer autoheal [problem vols].

- This should work to detect overlaps, but is not as robust as SpaceClaim.

Notes - A more general DAGMC based tutorial for Cubit/Trelis basics can be found at https://svalinn.github.io/DAGMC/usersguide/trelis_basics.html.

- "Command Panel" and "Command Line" are necessary for GUI and command line methods respectively. To enable these select View and switch "Command Line" and/or "Command Panel" to visible.

- Scale will most likely be off by a factor of 10. For example models from Solidworks will most likely be increased by 10x or 100cm to 1000 units, but this scaling changes based on the initial CAD program. You must scale every entity down or up by that factor to match units to cm.

Creation of Void/Vacuum Volume and Graveyard

A method (implicit compliment) is implemented automatically during a DAG-MCNP5 run that creates a void volume in all spaces without geometry. This means that while one could explicitly create void volumes, it is often not necessary.

The vacuum and graveyard volumes are not part of the model being analyzed, but play a role in the final analysis. When particles move freely through the vacuum volume and stop once they reach the graveyard volume.

Steps In Graphic User Interface In Command Line
Create a cube large enough to envelop all other volumes. - Select Geometry -> Volume -> Create and select Brick from the drop down menu.

- Type 500 in each dimension box (width, height, depth) and press Apply to create the block.
- The general form is create [shape] [dimensions based on shape].
- For a simple cube 500x500x500 you can enter create brick x 500.
Create another slightly larger cube to be used for graveyard. - In command panel create another brick in the same way as part 1, using 750 as the new dimension in each dimension box. - Enter create brick x 750
Center volumes within the larger cubes. To move the blocks in command panel select Geometry -> Volume -> Transform and select Move from the drop down menu.

- Type "5 6" into the Volume ID(s) box. Then Select Method -> Distance and type 100 into the X Distance box. This distance/direction may vary.
- General form is move vol [volume ids] [axis] [distance along axis]

- Enter move vol 5 6 x 100.
Hollow out large cubes to match functionality. - Select Geometry -> Volume -> Boolean and select Subtract from the dropdown menu.

- Select volume 6 as volume A and volume 5 as volume B. Check Keep Originals and click Apply.

- You can then delete volume 6 by selecting Geometry -> Volume -> Delete and typing 6 into the Volume ID(s) box and clicking apply.

- Select Geometry -> Volume -> Boolean and select Subtract from the dropdown menu. Select volume 5 as volume A and volumes 1,2,3, and 4 as volume B. Again make sure to check Keep Originals and click Apply.

- Then use the delete action to delete volume 5.
- Enter subtract vol 5 from 6 keep

- Enter delete vol 6 to get rid of the original large box.

- Enter subtract vol 1 2 3 4 from 5 keep or subtract vol 1 to 4 from 5 keep.

- Enter delete vol 5.

Notes - These volumes could also be created in another CAD program and then assigned a material in the exact same way, but this is an example of how to create these volumes in Trelis and Cubit.

- Most likely the volumes will be slightly off centered in the x direction, but the larger bricks will be centered with one another. This may vary based on the initial CAD program.

- To see the blocks better you can select the wireframe option in the top toolbar. It is directly to the right of the undo arrow on the toolbar. Also you can click on the axis on the bottom left of the volume viewing area to get a straight on (x,y) view.

Imprinting and Merging Volumes in Cubit/Trelis

Imprinting and Merging surfaces accelerates the DAGMC process by combining surfaces.

  1. Imprint and Merge all shared surfaces in the model.
    • In command panel select Geometry -> Volume -> Imprint Merge and select Imprint and Merge from the dropdown menu. Then type "all" into the Volume ID(s) box and click Apply.
    • In command line type imprint volume all and then enter. Then type merge volume all.
    • Now all surfaces that previously overlapped have been merged into one surface shared by both volumes.

Notes - The default tolerated distance for imprinting/merging surfaces is 5.0e-4 units.
- Combining surfaces cuts two surfaces and two sets of tetrahedron mesh areas down to one, decreasing computational power required as well as eliminating possible errors where particles exist simultaneously in two surfaces.

Assigning Materials in Cubit/Trelis

Most commands for this section are best implemented through the command line. More general instructions can be found here.

  1. The general command for assigning Materials/Densities in Cubit/Trelis group "mat:[assigned material number]/rho:[assigned density]" add vol [volume numbers] where the density is in [atoms/barn-cm] for positive values and [g/cc] for negative values.
  2. The blocks will be given two different materials and then the void and the graveyard volumes will be assigned. These material assignments will depend on the material library you create/use for the project.
    • To assign one block to the first material use group "mat:1/rho:0.0223" add vol 1
    • To assign the rest of the blocks to the second material use group "mat:2/rho:0.03" add vol 2 to 4
    • To assign the void volume to vacuum use group "mat:Vacuum" add vol 5
    • Finally to assign the graveyard volume use group "mat:Graveyard" add vol 6

Exporting file to .h5m format

This plugin translates the CAD file to something that can be used by DAGMC. Instructions as to how to install this plugin can be found here.

  1. Once the plugin is correctly installed you should receive the message Loaded Svalinn plugin, line break, DAGMC export command available in the command line.
  2. Once all issues are resolved in the model, export the file as .h5m, this command must be executed through the command line.
    • The general form of the export command is export dagmc "<filename>" [options]. To see the options available enter help export dagmc into the command line.
    • The filename should include the filepath after the working directory so that it designates where the file ought to be saved after export.
    • For this part export dagmc "Desktop/ErrorBlocks.h5m" will create the part as a .h5m with default settings in the Desktop.