Summary
This experiment investigates crystal growth optimization. Central composite design to maximize crystal size and purity by tuning cooling rate, supersaturation, and seed crystal size.
The design varies 3 factors: cool rate c hr (C/hr), ranging from 0.5 to 5.0, supersaturation (ratio), ranging from 1.1 to 1.5, and seed mm (mm), ranging from 0.1 to 2.0. The goal is to optimize 2 responses: crystal size mm (mm) (maximize) and purity pct (%) (maximize). Fixed conditions held constant across all runs include solvent = water, compound = copper_sulfate.
A Central Composite Design (CCD) was selected to fit a full quadratic response surface model, including curvature and interaction effects. With 3 factors this produces 22 runs including center points and axial (star) points that extend beyond the factorial range.
Quadratic response surface models were fitted to capture potential curvature and factor interactions. The RSM contour plots below visualize how pairs of factors jointly affect each response.
Key Findings
For crystal size mm, the most influential factors were cool rate c hr (40.7%), supersaturation (35.6%), seed mm (23.8%). The best observed value was 10.3 (at cool rate c hr = -1.35792, supersaturation = 1.3, seed mm = 1.05).
For purity pct, the most influential factors were cool rate c hr (40.3%), supersaturation (31.1%), seed mm (28.6%). The best observed value was 99.9 (at cool rate c hr = 2.75, supersaturation = 1.3, seed mm = 1.05).
Recommended Next Steps
- Run confirmation experiments at the predicted optimal settings to validate the model.
- Consider whether any fixed factors should be varied in a future study.
Experimental Setup
Factors
| Factor | Low | High | Unit |
cool_rate_c_hr | 0.5 | 5.0 | C/hr |
supersaturation | 1.1 | 1.5 | ratio |
seed_mm | 0.1 | 2.0 | mm |
Fixed: solvent = water, compound = copper_sulfate
Responses
| Response | Direction | Unit |
crystal_size_mm | ↑ maximize | mm |
purity_pct | ↑ maximize | % |
Configuration
{
"metadata": {
"name": "Crystal Growth Optimization",
"description": "Central composite design to maximize crystal size and purity by tuning cooling rate, supersaturation, and seed crystal size"
},
"factors": [
{
"name": "cool_rate_c_hr",
"levels": [
"0.5",
"5.0"
],
"type": "continuous",
"unit": "C/hr"
},
{
"name": "supersaturation",
"levels": [
"1.1",
"1.5"
],
"type": "continuous",
"unit": "ratio"
},
{
"name": "seed_mm",
"levels": [
"0.1",
"2.0"
],
"type": "continuous",
"unit": "mm"
}
],
"fixed_factors": {
"solvent": "water",
"compound": "copper_sulfate"
},
"responses": [
{
"name": "crystal_size_mm",
"optimize": "maximize",
"unit": "mm"
},
{
"name": "purity_pct",
"optimize": "maximize",
"unit": "%"
}
],
"settings": {
"operation": "central_composite",
"test_script": "use_cases/188_crystallization/sim.sh"
}
}
Experimental Matrix
The Central Composite Design produces 22 runs. Each row is one experiment with specific factor settings.
| Run | cool_rate_c_hr | supersaturation | seed_mm |
| 1 | 2.75 | 1.3 | 1.05 |
| 2 | 5 | 1.1 | 2 |
| 3 | 0.5 | 1.5 | 0.1 |
| 4 | 2.75 | 1.66515 | 1.05 |
| 5 | 2.75 | 1.3 | 1.05 |
| 6 | -1.35792 | 1.3 | 1.05 |
| 7 | 2.75 | 1.3 | -0.684455 |
| 8 | 2.75 | 1.3 | 1.05 |
| 9 | 5 | 1.5 | 0.1 |
| 10 | 6.85792 | 1.3 | 1.05 |
| 11 | 2.75 | 1.3 | 1.05 |
| 12 | 2.75 | 0.934852 | 1.05 |
| 13 | 2.75 | 1.3 | 1.05 |
| 14 | 0.5 | 1.1 | 2 |
| 15 | 2.75 | 1.3 | 1.05 |
| 16 | 5 | 1.1 | 0.1 |
| 17 | 2.75 | 1.3 | 2.78445 |
| 18 | 5 | 1.5 | 2 |
| 19 | 2.75 | 1.3 | 1.05 |
| 20 | 0.5 | 1.1 | 0.1 |
| 21 | 0.5 | 1.5 | 2 |
| 22 | 2.75 | 1.3 | 1.05 |
Step-by-Step Workflow
1
Preview the design
$ doe info --config use_cases/188_crystallization/config.json
2
Generate the runner script
$ doe generate --config use_cases/188_crystallization/config.json \
--output use_cases/188_crystallization/results/run.sh --seed 42
3
Execute the experiments
$ bash use_cases/188_crystallization/results/run.sh
4
Analyze results
$ doe analyze --config use_cases/188_crystallization/config.json
5
Get optimization recommendations
$ doe optimize --config use_cases/188_crystallization/config.json
6
Multi-objective optimization
With 2 competing responses, use --multi to find the best compromise via Derringer–Suich desirability.
$ doe optimize --config use_cases/188_crystallization/config.json --multi
7
Generate the HTML report
$ doe report --config use_cases/188_crystallization/config.json \
--output use_cases/188_crystallization/results/report.html
Features Exercised
| Feature | Value |
| Design type | central_composite |
| Factor types | continuous (all 3) |
| Arg style | double-dash |
| Responses | 2 (crystal_size_mm ↑, purity_pct ↑) |
| Total runs | 22 |
Analysis Results
Generated from actual experiment runs using the DOE Helper Tool.
Response: crystal_size_mm
Top factors: cool_rate_c_hr (40.7%), supersaturation (35.6%), seed_mm (23.8%).
ANOVA
| Source | DF | SS | MS | F | p-value |
| Source | DF | SS | MS | F | p-value |
| cool_rate_c_hr | 4 | 32.7079 | 8.1770 | 1.544 | 0.2696 |
| supersaturation | 4 | 23.3845 | 5.8461 | 1.104 | 0.4115 |
| seed_mm | 4 | 10.5970 | 2.6493 | 0.500 | 0.7367 |
| Lack | of | Fit | 2 | 6.9051 | 3.4525 |
| Pure | Error | 7 | 37.0600 | | |
| Error | 9 | 43.9651 | 5.2943 | | |
| Total | 21 | 110.6545 | 5.2693 | | |
Pareto Chart
Main Effects Plot
Normal Probability Plot of Effects
Half-Normal Plot of Effects
Model Diagnostics
Response: purity_pct
Top factors: cool_rate_c_hr (40.3%), supersaturation (31.1%), seed_mm (28.6%).
ANOVA
| Source | DF | SS | MS | F | p-value |
| Source | DF | SS | MS | F | p-value |
| cool_rate_c_hr | 4 | 50.1665 | 12.5416 | 1.198 | 0.3754 |
| supersaturation | 4 | 33.8215 | 8.4554 | 0.808 | 0.5504 |
| seed_mm | 4 | 34.8007 | 8.7002 | 0.831 | 0.5380 |
| Lack | of | Fit | 2 | 0.0000 | 0.0000 |
| Pure | Error | 7 | 73.2688 | | |
| Error | 9 | 60.9295 | 10.4670 | | |
| Total | 21 | 179.7182 | 8.5580 | | |
Pareto Chart
Main Effects Plot
Normal Probability Plot of Effects
Half-Normal Plot of Effects
Model Diagnostics
Response Surface Plots
3D surfaces fitted with quadratic RSM. Red dots are observed data points.
crystal size mm cool rate c hr vs seed mm
crystal size mm cool rate c hr vs supersaturation
crystal size mm supersaturation vs seed mm
purity pct cool rate c hr vs seed mm
purity pct cool rate c hr vs supersaturation
purity pct supersaturation vs seed mm
Multi-Objective Optimization
When responses compete, Derringer–Suich desirability finds the best compromise.
Each response is scaled to a 0–1 desirability, then combined via a weighted geometric mean.
Overall Desirability
D = 0.7350
Per-Response Desirability
| Response | Weight | Desirability | Predicted | Dir |
crystal_size_mm |
1.0 |
|
6.70 0.6136 6.70 mm |
↑ |
purity_pct |
2.0 |
|
98.00 0.8043 98.00 % |
↑ |
Recommended Settings
| Factor | Value |
cool_rate_c_hr | 2.75 C/hr |
supersaturation | 1.3 ratio |
seed_mm | 1.05 mm |
Source: from observed run #14
Trade-off Summary
Sacrifice = how much worse than single-objective best.
| Response | Predicted | Best Observed | Sacrifice |
purity_pct | 98.00 | 99.90 | +1.90 |
Top 3 Runs by Desirability
| Run | D | Factor Settings |
| #17 | 0.6501 | cool_rate_c_hr=2.75, supersaturation=1.66515, seed_mm=1.05 |
| #18 | 0.5944 | cool_rate_c_hr=0.5, supersaturation=1.1, seed_mm=2 |
Model Quality
| Response | R² | Type |
purity_pct | 0.6417 | quadratic |
Full Multi-Objective Output
============================================================
MULTI-OBJECTIVE OPTIMIZATION
Method: Derringer-Suich Desirability Function
============================================================
Overall desirability: D = 0.7350
Response Weight Desirability Predicted Direction
---------------------------------------------------------------------
crystal_size_mm 1.0 0.6136 6.70 mm ↑
purity_pct 2.0 0.8043 98.00 % ↑
Recommended settings:
cool_rate_c_hr = 2.75 C/hr
supersaturation = 1.3 ratio
seed_mm = 1.05 mm
(from observed run #14)
Trade-off summary:
crystal_size_mm: 6.70 (best observed: 10.30, sacrifice: +3.60)
purity_pct: 98.00 (best observed: 99.90, sacrifice: +1.90)
Model quality:
crystal_size_mm: R² = 0.6151 (quadratic)
purity_pct: R² = 0.6417 (quadratic)
Top 3 observed runs by overall desirability:
1. Run #14 (D=0.7350): cool_rate_c_hr=2.75, supersaturation=1.3, seed_mm=1.05
2. Run #17 (D=0.6501): cool_rate_c_hr=2.75, supersaturation=1.66515, seed_mm=1.05
3. Run #18 (D=0.5944): cool_rate_c_hr=0.5, supersaturation=1.1, seed_mm=2
Full Analysis Output
=== Main Effects: crystal_size_mm ===
Factor Effect Std Error % Contribution
--------------------------------------------------------------
cool_rate_c_hr 5.8583 0.4894 40.7%
supersaturation 5.1250 0.4894 35.6%
seed_mm 3.4250 0.4894 23.8%
=== ANOVA Table: crystal_size_mm ===
Source DF SS MS F p-value
-----------------------------------------------------------------------------
cool_rate_c_hr 4 32.7079 8.1770 1.544 0.2696
supersaturation 4 23.3845 5.8461 1.104 0.4115
seed_mm 4 10.5970 2.6493 0.500 0.7367
Lack of Fit 2 6.9051 3.4525 0.652 0.5499
Pure Error 7 37.0600 5.2943
Error 9 43.9651 5.2943
Total 21 110.6545 5.2693
=== Summary Statistics: crystal_size_mm ===
cool_rate_c_hr:
Level N Mean Std Min Max
------------------------------------------------------------
-1.35792 1 5.1000 0.0000 5.1000 5.1000
0.5 4 5.1750 1.4500 3.3000 6.7000
2.75 12 4.4417 2.3846 0.7000 8.9000
5 4 5.4500 1.7407 3.8000 7.9000
6.85792 1 10.3000 0.0000 10.3000 10.3000
supersaturation:
Level N Mean Std Min Max
------------------------------------------------------------
0.934852 1 0.7000 0.0000 0.7000 0.7000
1.1 4 4.8000 1.0677 3.3000 5.8000
1.3 12 5.3250 2.5906 0.8000 10.3000
1.5 4 5.8250 1.8283 3.8000 7.9000
1.66515 1 4.1000 0.0000 4.1000 4.1000
seed_mm:
Level N Mean Std Min Max
------------------------------------------------------------
-0.684455 1 5.0000 0.0000 5.0000 5.0000
0.1 4 5.3250 1.9085 3.3000 7.9000
1.05 12 5.1500 2.7718 0.7000 10.3000
2 4 5.3000 1.2410 3.8000 6.7000
2.78445 1 1.9000 0.0000 1.9000 1.9000
=== Main Effects: purity_pct ===
Factor Effect Std Error % Contribution
--------------------------------------------------------------
cool_rate_c_hr 7.7750 0.6237 40.3%
supersaturation 6.0000 0.6237 31.1%
seed_mm 5.5250 0.6237 28.6%
=== ANOVA Table: purity_pct ===
Source DF SS MS F p-value
-----------------------------------------------------------------------------
cool_rate_c_hr 4 50.1665 12.5416 1.198 0.3754
supersaturation 4 33.8215 8.4554 0.808 0.5504
seed_mm 4 34.8007 8.7002 0.831 0.5380
Lack of Fit 2 0.0000 0.0000 0.000 1.0000
Pure Error 7 73.2688 10.4670
Error 9 60.9295 10.4670
Total 21 179.7182 8.5580
=== Summary Statistics: purity_pct ===
cool_rate_c_hr:
Level N Mean Std Min Max
------------------------------------------------------------
-1.35792 1 95.2000 0.0000 95.2000 95.2000
0.5 4 96.1750 1.2606 95.1000 98.0000
2.75 12 95.1833 3.3553 89.3000 99.9000
5 4 95.4750 0.5620 94.9000 96.2000
6.85792 1 88.4000 0.0000 88.4000 88.4000
supersaturation:
Level N Mean Std Min Max
------------------------------------------------------------
0.934852 1 99.7000 0.0000 99.7000 99.7000
1.1 4 95.7500 0.4123 95.2000 96.2000
1.3 12 94.3667 3.5579 88.4000 99.9000
1.5 4 95.9000 1.4306 94.9000 98.0000
1.66515 1 93.7000 0.0000 93.7000 93.7000
seed_mm:
Level N Mean Std Min Max
------------------------------------------------------------
-0.684455 1 94.7000 0.0000 94.7000 94.7000
0.1 4 95.6750 0.4573 95.1000 96.2000
1.05 12 94.2750 3.5471 88.4000 99.9000
2 4 95.9750 1.4009 94.9000 98.0000
2.78445 1 99.8000 0.0000 99.8000 99.8000
Optimization Recommendations
=== Optimization: crystal_size_mm ===
Direction: maximize
Best observed run: #6
cool_rate_c_hr = -1.35792
supersaturation = 1.3
seed_mm = 1.05
Value: 10.3
RSM Model (linear, R² = 0.1617, Adj R² = 0.0219):
Coefficients:
intercept +5.0545
cool_rate_c_hr -0.8306
supersaturation -0.5934
seed_mm +0.4215
RSM Model (quadratic, R² = 0.5671, Adj R² = 0.2424):
Coefficients:
intercept +4.0203
cool_rate_c_hr -0.8306
supersaturation -0.5934
seed_mm +0.4215
cool_rate_c_hr*supersaturation +0.1000
cool_rate_c_hr*seed_mm +0.6500
supersaturation*seed_mm -0.0750
cool_rate_c_hr^2 +1.4171
supersaturation^2 -0.0679
seed_mm^2 +0.2021
Curvature analysis:
cool_rate_c_hr coef=+1.4171 convex (has a minimum)
seed_mm coef=+0.2021 convex (has a minimum)
supersaturation coef=-0.0679 negligible curvature
Notable interactions:
cool_rate_c_hr*seed_mm coef=+0.6500 (synergistic)
Predicted optimum (from quadratic model, at observed points):
cool_rate_c_hr = -1.35792
supersaturation = 1.3
seed_mm = 1.05
Predicted value: 10.2604
Surface optimum (via L-BFGS-B, quadratic model):
cool_rate_c_hr = 0.5
supersaturation = 1.1
seed_mm = 0.1
Predicted value: 7.2491
Model quality: Moderate fit — use predictions directionally, not precisely.
Factor importance:
1. cool_rate_c_hr (effect: 6.1, contribution: 59.2%)
2. supersaturation (effect: 2.7, contribution: 26.1%)
3. seed_mm (effect: 1.5, contribution: 14.6%)
=== Optimization: purity_pct ===
Direction: maximize
Best observed run: #16
cool_rate_c_hr = 2.75
supersaturation = 1.3
seed_mm = 1.05
Value: 99.9
RSM Model (linear, R² = 0.3627, Adj R² = 0.2565):
Coefficients:
intercept +95.1091
cool_rate_c_hr +2.0417
supersaturation +0.5164
seed_mm -0.0955
RSM Model (quadratic, R² = 0.6584, Adj R² = 0.4022):
Coefficients:
intercept +96.2933
cool_rate_c_hr +2.0417
supersaturation +0.5164
seed_mm -0.0955
cool_rate_c_hr*supersaturation +1.2750
cool_rate_c_hr*seed_mm -0.1500
supersaturation*seed_mm +1.1500
cool_rate_c_hr^2 -1.1771
supersaturation^2 -0.2321
seed_mm^2 -0.3671
Curvature analysis:
cool_rate_c_hr coef=-1.1771 concave (has a maximum)
seed_mm coef=-0.3671 concave (has a maximum)
supersaturation coef=-0.2321 concave (has a maximum)
Notable interactions:
cool_rate_c_hr*supersaturation coef=+1.2750 (synergistic)
supersaturation*seed_mm coef=+1.1500 (synergistic)
Predicted optimum (from quadratic model, at observed points):
cool_rate_c_hr = 5
supersaturation = 1.5
seed_mm = 2
Predicted value: 99.2546
Surface optimum (via L-BFGS-B, quadratic model):
cool_rate_c_hr = 5
supersaturation = 1.5
seed_mm = 2
Predicted value: 99.2546
Model quality: Moderate fit — use predictions directionally, not precisely.
Factor importance:
1. cool_rate_c_hr (effect: 8.5, contribution: 78.5%)
2. supersaturation (effect: 1.6, contribution: 15.0%)
3. seed_mm (effect: 0.7, contribution: 6.6%)