Rocky’s API reinvents solver customization

Rocky DEM’s development group expends significant effort to ensure that users can fully explore their design space and garner the insight needed to solve real-life industrial engineering problems. We understand that the right product details can make a huge difference in producing a rich and easy-to-use simulation tool, so we invest in both creating new, major game-changing features as well as enriching already existing ones.

Rocky DEM 4.4 is, to date, the richest version we’ve ever released, mostly because of its unique application programming interface (API) that is founded on the latest advances in usability, portability and solver performance. This feature enables users to extend existing modules, create new modules, and deploy company-specific modules that can access all solver-level data. Rocky’s API has three key differentiators: exceptional user experience, single-code deployment and performance that won’t degrade.

User experience

Rocky’s API is very easy to use and customize to your unique needs, which makes it seamless to deploy. End users do not need to know how to write code, or to even understand it. When a new module is developed and deployed, Rocky automatically creates a UX box listing relevant variable inputs that users can readily understand, making it an intuitive partner in simulation set-up.

Rocky's API offers automatic UX creation that makes it user friendly.
Rocky’s API offers automatic UX creation that makes it user friendly.

To develop a customized solver API, a “super user” writes C++ code, compiles it into a DLL file, and places it in the module folder. As a result, from the end-user perspective, the custom module becomes no different than an embedded-solver module.

DEM calibration interdependency; red color indicates solver API customization.
DEM calibration interdependency; red color indicates solver API customization.

Customization extends to contact and body forces as well as joint forces that involve fibrous and shell elements. You can customize heat and mass transfer as well as add customs scalars and a point cloud. The modules all communicate with each other, which is especially beneficial in post-processing. In addition, the models are interdependent and not mutually exclusive. For example, you can create a model in which the contact force communicates with the mass transfer model.

The point cloud capability loads external field data to locate vector and scaler properties of a point's position. Rocky uses the data to interpolate properties that are closest to that location point's center.
The point cloud capability loads external field data to locate vector and scaler properties of a point’s position. Rocky uses the data to interpolate properties that are closest to that location point’s center.

Rocky is fully parametric. Because it is exposed in Ansys Workbench, it enables Ansys CFD coupling. Easy-to-perform DoE and optimization loops add additional data to your knowledge base. No Rocky benefits that are already available are lost when adding the solver API feature.

Custom analysis is automatically available in Rocky 4.4. As with set-up data, all custom-user Rocky results are stored in the project file, which facilitates archiving and transferring among project users. This applies to global data as well as information on a particle-level scale, per particle group, per contact, per boundary, per boundary triangles, and per joint. Custom user results can be used to create parametric outputs, enabling DoE and/or multi-objective optimizations using custom models.

Single code

Rocky users do not need to create multiple codes specifically for the CPU or GPU solver. A single C++ code is compatible with CPU and GPU, and there is no need to learn CUDA programming.

This substantially reduces the cost involved in maintaining custom routines or learning complex GPU programming techniques. Multi-GPU support also can be achieved with custom modules. For certain models (such as contact), Rocky automatically handles this. However, for models with particle mass/heat transfer or advanced boundary statistics, user needs to implement “how” such models are domain decomposed and re-assembled between the multiple GPUs.

No performance degradation

Customized user models run as fast as embedded Rocky models! As a result, performance degradation is eliminated. Both embedded and customized API models use the same data structures and computing flow, resulting in no lost simulation time and the same memory consumption. Rocky’s solver API is much more than just a feature — It transforms Rocky from a mere product to a platform.

Putting Rocky solver API to work for your application

Our development team has created a number of custom Rocky solver API examples that show how the capability can be applied in a number of industries.

Contact model using custom adhesive force (collision-velocity dependent) to predict snow accumulation patterns on a moving car:

Contact model for snow particle accumulation.
Contact model using transient adhesion force that increases over time with an exponential profile for pharmaceutical tablets:

Contact model for pharmaceutical tablet.
Joint model with custom flexible fibers for analyzing a number of products, from home goods (carpet) to agricultural:

Joint model for hard and soft carpet fibers.
Electromagnetic coupling with magnetic field force point cloud added to particles as a custom body force for a magnetic separator:

Charged particles coupled with Ansys Maxwell simulation for 2 magnets in an on/off scenario.
Contact data gathering with an erosion model to predict wear patterns/rates:

Implement erosion models taking into account particle shape, impact angles and predict wear patterns and wear rates.

Particle custom center of mass & moments of inertia:

Custom center-of-mass feature can accurately represent different physical conditions using the same particle shape.

As you can see, the flexibility to add custom models is a great benefit for Rocky DEM users. We also believe that it is important for users — experienced or new — to understand how they can apply the concepts to solve real-life problems.

Rocky documentation includes code examples so you don’t have to start from scratch each time you need a new custom model. Example codes range from simple contact and body force models to more elaborate electrostatics and electromagnetic coupling. In fact, some of these example codes are engineering models that can be compiled and used out-of-the-box for simulation studies.

Rahul Bharadwaj

VP Engineering and Business Development, ESSS

Dr. Rahul Bharadwaj has over a decade of experience in the development, validation, and application of computational tools such as Discrete Element Modeling (DEM), CFD, and FEA. After completing his Ph.D. in Mechanical Engineering at Purdue University, he was a senior scientist at Pfizer R&D and senior engineer at Jenike and Johanson Inc, where he has several years of consulting experience in the field of bulk material handling. Dr. Bharadwaj currently serves as the VP of Engineering and Business Development at ESSS, where he leads a global team of engineers in pre-sales, support and engineering for a suite of simulation products that predict bulk material behavior. He is an active member of the American Institute of Chemical Engineers (AIChE), and is the founder and past-chair of the American Association of Pharmaceutical Scientists (AAPS), Process Modeling and Simulation Focus Group.

Post a comment

Get Fresh Updates on Email

We'll never share your email address, and you can opt out at any time, we promise.