docs: #865 - Write coagulation strategy system feature documentation v3#868
Conversation
Document coagulation strategies with unified API overview, runnable entry, and builder/factory workflow mirroring the wall loss template. Cover Brownian, charged, turbulent shear/DNS, sedimentation, combined kernels, and particle-resolved paths with quick start, workflows, configuration table, best practices, limitations, FAQ, and related links. Closes uncscode#865 ADW-ID: 94760bb9
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive documentation for the coagulation strategy system in particula. The documentation follows the established template from the wall loss feature guide and covers all major coagulation mechanisms including Brownian, charged, turbulent (shear and DNS), sedimentation, and combined strategies. It explains the builder/factory patterns, runnable integration, and particle-resolved collision handling.
Changes:
- Added complete feature documentation for the coagulation strategy system
- Documented all strategy types, builders, factory usage, and runnable patterns
- Included code examples, configuration tables, use cases, best practices, and FAQ
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| brownian = ( | ||
| par.dynamics.BrownianCoagulationBuilder() | ||
| .set_distribution_type("discrete") | ||
| .build() | ||
| ) | ||
|
|
||
| # Charged via builder with kernel strategy | ||
| charged = ( | ||
| par.dynamics.ChargedCoagulationBuilder() | ||
| .set_distribution_type("continuous_pdf") | ||
| .set_charged_kernel_strategy(par.dynamics.HardSphereKernelStrategy()) | ||
| .build() | ||
| ) | ||
|
|
||
| # Factory selection (combine) | ||
| factory = par.dynamics.CoagulationFactory() | ||
| combined = factory.get_strategy( | ||
| strategy_type="combine", | ||
| parameters={ | ||
| "strategies": [brownian, charged], | ||
| "distribution_type": "continuous_pdf", | ||
| }, | ||
| ) |
There was a problem hiding this comment.
The example combines strategies with mismatched distribution types. The brownian strategy is built with "discrete" (line 245) while the charged strategy is built with "continuous_pdf" (line 252). When these are combined (lines 259-265), the CombineCoagulationStrategy will raise a ValueError because all strategies must share the same distribution type. Both strategies should use the same distribution_type, such as "continuous_pdf".
|
@copilot open a new pull request to apply changes based on the comments in this thread |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Target Branch:
mainFixes #865 | Workflow:
94760bb9Summary
Adds the full
docs/Features/coagulation_strategy_system.mdfeature guide that mirrors the wall-loss template while documenting every coagulation strategy, builder, factory option, runnable pattern, and distribution mode required by the issue. The new doc also captures the quick-start flows, workstreams, configuration table, FAQ, and related links so the coagulation system has the same user-facing treatment as the existing dynamics docs.What Changed
New Components
docs/Features/coagulation_strategy_system.md- Detailed narrative, examples, tables, and references for Brownian, charged, turbulent-shear, turbulent-DNS, sedimentation, combine strategies, builder/factory workflows, runnable pipelines, and particle-resolved scenarios.Tests Added/Updated
How It Works
The document follows the wall-loss feature doc structure, covering overview, benefits, audience, capabilities, quick starts, workflows, use cases, best practices, limitations, FAQ, related docs, and see-also links. It explains how
particula.dynamicsexposes the coagulation strategy API, how builders/factory select parameterized strategies, howCoagulationintegrates with other runnables, and how particle-resolved modes behave. Code examples demonstrate Brownian, charged, turbulent, combined, builder/factory, runnable/pipeline, and particle-resolved usage patterns so the ops flow is clear to new contributors.Implementation Notes
wall_loss_strategy_system.mdwhile substituting coagulation-specific physics and API details.Testing