Developing Casting Simulations in CMB
There is no question that numerical simulation tools have produced a wide range of benefits in the area of modeling and analysis, especially when coupled with high performance computational (HPC) systems. However, the complicated workflow involved in defining a numerical simulation requires a broad understanding of simulation codes and how to use them. Between defining the geometric domain, assigning simulation information to that domain, and generating meshes best suited to the simulation, an engineer may need to use several different tools, each with their own interfaces. In addition, the engineer has to create the various sets of input files needed to run the simulation.
The significant learning curve needed to create a useful model poses a daunting challenge to a scientist without a background in Computer Science. To address this problem and make computational modeling more accessible to everyone, Kitware created Computational Model Builder (CMB). This application simplifies the process, creating a single GUI that addresses each part of the workflow. CMB captures workflows in XML format template files, and creates input files needed to run the simulation using Python scripts. This allows CMB to be easily adapted to a large range of workflows without recompilation.
In this article we will demonstrate how CMB has been used to improve a casting workflow based on the Truchas simulation tool, developed over the past ten years at Los Alamos National Laboratory. The core capabilities of this open-source, highly parallel, continuum scale, coupled multiphysics tool primarily target metal casting, with capabilities for metal additive manufacturing (3D printing) under development. Truchas simulations significantly decrease the time required for engineers to develop casting parameters, and allow for casting quality to be evaluated with fewer physical trials.
The Truchas simulator relies on a number of linear and non-linear solvers to calculate the many different physics models including cooling rate, solidification time, heat transfer, molten alloy flow, and temperature and volumetric stresses caused by phase changes.
When the TRUCHAS template is loaded into CMB, the user is presented with an intuitive view of the TRUCHAS workflow, with required and optional information clearly indicated, guiding users through the nuances and pitfalls that each solver presents. Default values are also included in the CMB-TRUCHAS template, in order to help guide new users. As users gain confidence in the system, they can progress from basic options to more advanced features that are easily accessed on demand.
For example when dealing with discrete choices such as which solver methods, preconditioner types, and convergence criteria to use, each of these inputs is presented as a dropdown list. The scientist can see the available choices and make the appropriate selection. Depending on the solver selected, additional information may be presented to the user.
A more advanced example, specific to TRUCHAS, is the use of “enclosure radiation” to model a furnace or other active heat sources affecting the casting/solidification process. Many different settings are needed to specify even a minimal/baseline capability for this, including:
- Symmetry and Periodicity: In many cases, the input geometry is a representative section of the overall model, so that symmetry planes and periodic axes must be identified. The CMB-TRUCHAS template enables the user to include the appropriate attributes for each simulation.
- Geometry to ignore: It is often desirable to remove certain geometric bodies from the radiation-transfer calculations, in order to reduce computational load. To use this feature, the specific entities can be selected in the 3D model view, and added to the list of entities to ignore.
- Motion: In typical applications, a workpiece is moving relative to the heat source during solidification. To include this in a simulation, the user can specify a displacement sequence, presented as an extensible list of displacement vectors versus time.
Further, CMB provides immediate feedback to let a scientist explore their models in real time and intuitively manipulate each solver. Meshes are displayed side by side with the solver, and updated in real time as plugins are turned on or off and inputs are tweaked. This gives the scientist immediate understanding of how the change impacts the model.
The last phase of a TRUCHAS Simulation workflow involves post-processing the simulation results. To address these needs, TRUCHAS results are loaded into ParaView, as shown below.
More information on CMB as well as access to CMB releases can be found at http://www.computationalmodelbuilder.org To learn more about how CMB and ParaView can improve your engineering process, comment below or contact us at firstname.lastname@example.org.