A new pandemic is breaking out, local governments start enacting export controls, and your API supplier is cut off overnight. An alternative is needed. What changes in the material properties when you switch suppliers?
This article shows how an LLM-driven workflow answers that question, using API attrition in agitated drying as an example.
The Challenge: API Attrition
In pharmaceutical particulate processing, agitated drying is a critical late-stage step. Predicting crystal attrition during this step is essential to maintaining target particle-size distributions (PSDs) and bioavailability; see Figure 1.
There are two main challenges: On the engineering side, shearing and compressive forces grow on scale-up, so attrition becomes relevant as you move from lab to production. On the modeling side, 3D Discrete Element Method (DEM) models are accurate and can produce large amounts of data to predict the process, but they are time-consuming and have stayed separate from fast reduced-order models.

Figure 1: SEM image of high-aspect-ratio L-Threonine crystals (500 µm). Attrition and fragmentation become important as you scale from lab to production.
Driving Simulations with LLMs
We address these challenges by combining large language models (LLMs) for scenario planning with physics-informed low-order and 3D models. Modular units for evaluating equations or calling ML models and APIs can be combined to orchestrate the optimization loop end-to-end. A 3D DEM model provides validation and physics-based ground truth.
In practice, the loop runs in five steps (Figure 2):
1. Ask: a plain-language supply-chain question.
2. Screen: engicloud.ai, once per candidate.
3. Narrow: compare to the incumbent's behavior.
4. Verify: Aspherix® DEM, shortlist only.
5. Answer: a grounded recommendation.
The expensive 3D simulation runs only in step 4, on the shortlisted candidates.

Figure 2: The five-step workflow.
Before running anything expensive, the model context agent in engicloud.ai evaluates whether the higher-fidelity 3D DEM simulation is warranted at all. In the example shown in Figure 3, the agent reviewed the supplier change and found that the existing 1D model was sufficient. No upgrade to a higher-fidelity approach was needed for this change in particle size and bulk density.

Figure 3: Response from engicloud.ai's model context agent.
Integrating Domain Knowledge
The screening step relies on a fast, physics-informed model. Here, that is an attrition model from a multi-year research project, carried out in collaboration with the Enabling Technologies Consortium (ETC) and published in Powder Technology 464 (2025) 121198.
A population balance model describes the 2D number density n(x, y, t) through birth and death. Attrition is fragmentation by compression and shearing, and agglomeration is negligible. The breakage rate is modulated by three physical terms: impeller torque, residual solvent, and aspect ratio; see Figure 4.

Figure 4: Population balance model and breakage-rate equation.
Six parameters were calibrated for L-Threonine/ethanol from experiments and simulation:
The attrition model was validated for up to 1.9 h. Average crystal length drops sharply, then reaches a steady, fully attrited state, and the calibrated model captures this behavior; see Figure 5.
The link to DEM is the impeller torque. Steady-state torque from DEM feeds the reduced-order attrition model, decoupling attrition dynamics from drying.

Figure 5: Validation against shear-cell and agitated-drying experiments with L-Threonine. Togni et al. (2025).
Two Layers: engicloud.ai and Aspherix®
engicloud.ai is the orchestration layer: fast and interoperable. It offers 20,000 ready-to-run equations, model and workflow assistants, deployment, collaborative model building, and connections to ML models, databases, and APIs. The low-order dissolution model in Figure 6 was generated from a publication PDF and executed in the graphical project builder.

Figure 6: Low-order dissolution model in the engicloud.ai project builder.
Aspherix® is the detailed physics layer: exact but expensive. Full 3D simulation with DEM provides ground-truth data for chemical and pharmaceutical production processes. Figure 7 shows examples: agitated filter drying, fluidized bed granulation, pan coating, spray drying, a ribbon mixer, and a rotary tablet press.

Figure 7: Aspherix® DEM across pharmaceutical unit operations.
Key Findings
In the supply-chain scenario, three candidates were screened against the incumbent:
Candidate C comes closest to the incumbent and is the front-runner. Candidate B is the most resistant and is kept as the fallback.
Expert judgment is still required at several points: shortlisting candidates, interpreting the screening results, bridging the two models, getting the DEM to run cleanly, and deciding what a surprising result means.
Conclusions
The "driver" of the loop can be a proprietary LLM interface (e.g., Claude) or engicloud.ai, which can orchestrate agentic tooling: it provides persistent model context, runs Python models, calls APIs, and integrates with ML models and LLMs.
For the crystal attrition challenge, a physics-based population balance model informed by 3D data ran in an LLM-driven optimization loop that dynamically adjusted process conditions. The LLM can even simulate supply-chain disruption, such as war or a pandemic, by feeding the properties of available materials into the model. This accelerates the path to validated, optimized production.
About the Authors
Christoph Kloss, Christoph Goniva, Riccardo Togni, Daniel Louw, DCS Computing.
FOPAM 2026 Poster Session.
Have a Python modeling task or idea?
We're glad to discuss and help you build it.
Dr. Christoph Kloss
Co-founder and director of DCS Computing.