| title |
|---|
Functional Specification |
Document Version: 1.0 | Date: October 30, 2025
This page provides an overview. View the full Functional Specification on GitHub.
The Functional Specification describes how the CDM system implements the user requirements defined in the URS. It provides detailed specifications of the system's behavior, interfaces, and algorithms.
The CDM system consists of the following major components:
| Component | Description |
|---|---|
| Input Parser | Reads and validates JSON configuration |
| Atmospheric Module | Calculates derived atmospheric properties |
| Wind Profile Module | Characterizes the wind velocity profile |
| Droplet Size Module | Processes droplet size distributions |
| Transport Module | Integrates droplet transport ODEs using CVODE |
| Deposition Module | Calculates ground deposition profiles |
| Output Module | Generates JSON output and console reports |
The model accepts JSON-formatted input containing:
- Droplet Size Distribution — Tabular diameter/cumulative volume data
- Atmospheric Properties — Temperature, pressure, humidity
- Wind Velocity Profile — Elevation/velocity measurement pairs
- Application Parameters — Nozzle configuration and application rate
- Field Geometry — Field dimensions and nozzle spacing
- Solution Properties — Spray solution physical properties
Derived properties calculated from input conditions:
- Wet air density (ρ_A)
- Dynamic viscosity of wet air (μ_A)
- Dew point temperature
- Wet bulb temperature (iterative calculation)
The model solves a 6-component ODE system for each droplet size class:
| Component | Symbol | Description |
|---|---|---|
| Vertical position | Z | Height above ground (m) |
| Horizontal position | X | Downwind distance (m) |
| Vertical velocity | V_z | Vertical speed (m/s) |
| Horizontal velocity | V_x | Horizontal speed (m/s) |
| Water mass | M_w | Droplet water mass (kg) |
| Wind velocity | V_vwx | Local wind speed (m/s) |
Integration uses CVODE (BDF method) with specified error tolerances.
Deposition is computed by:
- Integrating transport for each size class and streamline
- Tracking ground-level crossings
- Accumulating mass at downwind distance intervals
- Expressing results as percentage of intended application rate (%IAR)
Structured JSON containing:
- Input echo (all configuration parameters)
- Derived properties (atmospheric, wind profile)
- Deposition results (distance–%IAR pairs)
- Summary statistics (mass balance, on/off-field totals)
Human-readable summary including:
- Atmospheric properties
- Wind profile characteristics
- Integration statistics
- Deposition summary
See the API Reference for the complete C API documentation.
cdmcli <input.json> [-o output.json] [-q]
| Option | Description |
|---|---|
<input.json> |
Path to JSON configuration file |
-o output.json |
Write JSON results to file |
-q |
Quiet mode (suppress console output) |
The R package provides a wrapper around the C API. See Getting Started for installation instructions.