← All Use Cases
🧪
Latin Hypercube Sampling

Composite Material Formulation

Explore a continuous parameter space with 20 space-filling samples for polymer composite development.

Summary

This experiment investigates composite material formulation. Latin Hypercube sampling to explore a 4-factor material design space.

The design varies 4 factors: polymer ratio, ranging from 0.3 to 0.8, filler pct (%), ranging from 5 to 30, cure temp (C), ranging from 120 to 200, and particle size, ranging from fine to coarse. The goal is to optimize 2 responses: tensile strength (MPa) (maximize) and flexibility (mm) (maximize). Fixed conditions held constant across all runs include cure time min = 45, ambient humidity = 50.

Latin Hypercube Sampling was used to space 20 runs across the 4-dimensional factor space with good coverage and minimal gaps, making it ideal for computer experiments where the response surface may be complex.

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 tensile strength, the most influential factors were polymer ratio (31.9%), filler pct (31.9%), cure temp (31.9%). The best observed value was 65.8 (at polymer ratio = 0.407722, filler pct = 16.2091, cure temp = 190.393).

For flexibility, the most influential factors were polymer ratio (30.7%), filler pct (30.7%), cure temp (30.7%). The best observed value was 15.14 (at polymer ratio = 0.332938, filler pct = 21.6368, cure temp = 182.028).

Recommended Next Steps

The Scenario

You are developing a new composite material and need to explore a large, continuous design space. With 4 factors (3 continuous + 1 ordinal), you want good coverage without testing every combination. Latin Hypercube Sampling gives you space-filling coverage that captures the full range of each factor.

Why Latin Hypercube?

Continuous factors need interpolation, not just high/low. LHS divides each factor's range into N equal intervals and places exactly one sample in each interval — like placing non-attacking rooks on a chessboard. The maximin criterion ensures no clustering. With lhs_samples: 20, you get double the default coverage.

Experimental Setup

Factors

FactorRange / LevelsTypeUnit
polymer_ratio0.3 – 0.8continuous
filler_pct5 – 30continuous%
cure_temp120 – 200continuous°C
particle_sizefine, medium, coarseordinal

Fixed: cure_time = 45 min, ambient_humidity = 50%

Responses

ResponseDirectionUnit
tensile_strength↑ maximizeMPa
flexibility↑ maximizemm

Experimental Matrix

The Latin Hypercube Design produces 20 runs. Each row is one experiment with specific factor settings.

Runpolymer_ratiofiller_pctcure_tempparticle_size
10.56605421.6859134.959medium
20.3677835.37721182.616coarse
30.49652929.9263145.802medium
40.77807727.4259159.904fine
50.4579499.69109129.737fine
60.521256.33153164.164fine
70.65816818.7417177.008medium
80.6370711.5863154.58coarse
90.43556413.7306148.935coarse
100.73976119.9688126.452fine
110.53488823.1088168.658coarse
120.3315998.23897141.403fine
130.59377817.2912195.577fine
140.31030510.5245172.294medium
150.69186513.7707199.302medium
160.71811324.6354186.151medium
170.38569125.3553121.335medium
180.6231728.6331161.748fine
190.7719420.4604190.753coarse
200.41742116.1789138.561coarse

Step-by-Step Workflow

Complete workflow
# Preview: 20 LHS samples (custom, not default 10) $ doe info --config use_cases/05_material_formulation/config.json # Generate with seed for reproducible LHS sampling $ doe generate --config use_cases/05_material_formulation/config.json \ --output results/run.sh --seed 99 # Execute $ bash results/run.sh # Analyze with --results-dir override $ doe analyze --config use_cases/05_material_formulation/config.json \ --results-dir use_cases/05_material_formulation/results # Optimize and report $ doe optimize --config use_cases/05_material_formulation/config.json $ doe report --config use_cases/05_material_formulation/config.json \ --output results/report.html

Real-World Lab Workflow

Physical Material Testing? Use the Manual Workflow

Composite material formulation is inherently physical — you mix resins, prepare specimens, cure them, and run tensile tests on a universal testing machine. The simulation script above is for demonstration. In practice, use record, status, and export-worksheet for your real experiments.

Material testing typically spans days (due to curing times) and involves expensive specimens. Here's the practical workflow:

Manual workflow for material testing
# 1. Print a worksheet for the lab $ doe export-worksheet --config use_cases/05_material_formulation/config.json \ --format csv --output formulation_worksheet.csv # 2. Check which specimens to prepare next $ doe status --config use_cases/05_material_formulation/config.json # 3. After testing each specimen, record the results $ doe record --config use_cases/05_material_formulation/config.json --run 1 # Enter tensile_strength, elongation, etc. when prompted # 4. Peek at results after half the specimens are tested $ doe analyze --config use_cases/05_material_formulation/config.json --partial # 5. Full analysis when all specimens are done $ doe analyze --config use_cases/05_material_formulation/config.json $ doe optimize --config use_cases/05_material_formulation/config.json $ doe report --config use_cases/05_material_formulation/config.json \ --output formulation_report.html

Ideal for Expensive Experiments

Material specimens can be costly and slow to prepare. The --partial flag lets you analyze intermediate results — if one factor clearly dominates after half the specimens, you can make informed decisions about whether to continue, adjust, or pivot the study before committing more materials.

Interpreting the Results

Continuous Factor Coverage

Unlike 2-level designs where each factor takes only "low" or "high," LHS produces unique values across the entire range. This enables:

Ordinal Factor Handling

The ordinal factor particle_size is binned into its 3 levels (fine, medium, coarse). About 1/3 of the 20 runs use each level, spread across the LHS sample.

Next Steps

  1. Identify the most promising region from LHS results
  2. Narrow the factor ranges around that region
  3. Run a Box-Behnken or CCD for precise optimization

Features Exercised

FeatureValue
Design typelatin_hypercube
Factor typescontinuous (3) + ordinal (1, 3 levels)
lhs_samples20 (custom, overrides default of 10)
--results-dirOverride at analysis time
--seed99 (controls numpy RNG for LHS)
Multi-responsetensile_strength ↑, flexibility ↑

Analysis Results

Generated from actual experiment runs using the DOE Helper Tool.

Response: tensile_strength

The Pareto chart reveals which formulation components most strongly affect tensile strength.

Pareto Chart

Pareto chart for tensile strength

Main Effects Plot

Main effects plot for tensile strength

Response: flexibility

Flexibility is driven by a different balance of formulation factors, requiring trade-off analysis with tensile strength.

Pareto Chart

Pareto chart for flexibility

Main Effects Plot

Main effects plot for flexibility

Response Surface Plots

3D surfaces fitted with quadratic RSM. Red dots are observed data points.

📊

How to Read These Surfaces

Each plot shows predicted response (vertical axis) across two factors while other factors are held at center. Red dots are actual experimental observations.

  • Flat surface — these two factors have little effect on the response.
  • Tilted plane — strong linear effect; moving along one axis consistently changes the response.
  • Curved/domed surface — quadratic curvature; there is an optimum somewhere in the middle.
  • Saddle shape — significant interaction; the best setting of one factor depends on the other.
  • Red dots far from surface — poor model fit in that region; be cautious about predictions there.

tensile_strength (MPa) — R² = 0.905, Adj R² = 0.639
The model fits well — the surface shape is reliable.
Curvature detected in cure_temp, filler_pct — look for a peak or valley in the surface.
Strongest linear driver: filler_pct (increases tensile_strength).
Notable interaction: filler_pct × particle_size — the effect of one depends on the level of the other. Look for a twisted surface.

flexibility (mm) — R² = 0.626, Adj R² = -0.419
Moderate fit — surface shows general trends but some noise remains.
Curvature detected in polymer_ratio, cure_temp — look for a peak or valley in the surface.
Strongest linear driver: polymer_ratio (decreases flexibility).
Notable interaction: filler_pct × cure_temp — the effect of one depends on the level of the other. Look for a twisted surface.

flexibility: filler pct vs cure temp

RSM surface: flexibility — filler pct vs cure temp

flexibility: polymer ratio vs cure temp

RSM surface: flexibility — polymer ratio vs cure temp

flexibility: polymer ratio vs filler pct

RSM surface: flexibility — polymer ratio vs filler pct

tensile: strength filler pct vs cure temp

RSM surface: tensile — strength filler pct vs cure temp

tensile: strength polymer ratio vs cure temp

RSM surface: tensile — strength polymer ratio vs cure temp

tensile: strength polymer ratio vs filler pct

RSM surface: tensile — strength polymer ratio vs filler pct

Full Analysis Output

doe analyze
=== Main Effects: tensile_strength === Factor Effect Std Error % Contribution -------------------------------------------------------------- polymer_ratio 60.8000 3.9357 29.9% filler_pct 60.8000 3.9357 29.9% cure_temp 60.8000 3.9357 29.9% particle_size 20.7429 3.9357 10.2% === Summary Statistics: tensile_strength === polymer_ratio: Level N Mean Std Min Max ------------------------------------------------------------ 0.30645 1 60.2000 0.0000 60.2000 60.2000 0.345057 1 57.9000 0.0000 57.9000 57.9000 0.364969 1 49.4000 0.0000 49.4000 49.4000 0.398627 1 30.2000 0.0000 30.2000 30.2000 0.412433 1 51.1000 0.0000 51.1000 51.1000 0.435932 1 20.7000 0.0000 20.7000 20.7000 0.457029 1 6.5000 0.0000 6.5000 6.5000 0.477081 1 5.0000 0.0000 5.0000 5.0000 0.500259 1 30.9000 0.0000 30.9000 30.9000 0.549414 1 21.2000 0.0000 21.2000 21.2000 0.565524 1 19.9000 0.0000 19.9000 19.9000 0.59909 1 65.8000 0.0000 65.8000 65.8000 0.608945 1 34.1000 0.0000 34.1000 34.1000 0.627461 1 24.6000 0.0000 24.6000 24.6000 0.661973 1 47.8000 0.0000 47.8000 47.8000 0.696713 1 47.1000 0.0000 47.1000 47.1000 0.716097 1 21.6000 0.0000 21.6000 21.6000 0.741222 1 50.2000 0.0000 50.2000 50.2000 0.758732 1 45.2000 0.0000 45.2000 45.2000 0.793704 1 30.3000 0.0000 30.3000 30.3000 filler_pct: Level N Mean Std Min Max ------------------------------------------------------------ 11.0774 1 47.1000 0.0000 47.1000 47.1000 11.7086 1 30.3000 0.0000 30.3000 30.3000 12.6117 1 21.2000 0.0000 21.2000 21.2000 14.4259 1 60.2000 0.0000 60.2000 60.2000 16.1864 1 21.6000 0.0000 21.6000 21.6000 17.1696 1 20.7000 0.0000 20.7000 20.7000 17.9415 1 24.6000 0.0000 24.6000 24.6000 19.0991 1 50.2000 0.0000 50.2000 50.2000 20.7811 1 65.8000 0.0000 65.8000 65.8000 21.4972 1 34.1000 0.0000 34.1000 34.1000 22.7419 1 47.8000 0.0000 47.8000 47.8000 23.9832 1 45.2000 0.0000 45.2000 45.2000 25.2071 1 30.9000 0.0000 30.9000 30.9000 27.4195 1 57.9000 0.0000 57.9000 57.9000 28.1025 1 6.5000 0.0000 6.5000 6.5000 29.6222 1 51.1000 0.0000 51.1000 51.1000 5.48476 1 30.2000 0.0000 30.2000 30.2000 6.96658 1 5.0000 0.0000 5.0000 5.0000 7.55985 1 19.9000 0.0000 19.9000 19.9000 9.99025 1 49.4000 0.0000 49.4000 49.4000 cure_temp: Level N Mean Std Min Max ------------------------------------------------------------ 121.363 1 20.7000 0.0000 20.7000 20.7000 125.967 1 47.1000 0.0000 47.1000 47.1000 128.352 1 30.9000 0.0000 30.9000 30.9000 134.74 1 6.5000 0.0000 6.5000 6.5000 138.442 1 47.8000 0.0000 47.8000 47.8000 140.466 1 49.4000 0.0000 49.4000 49.4000 145.706 1 24.6000 0.0000 24.6000 24.6000 148.101 1 5.0000 0.0000 5.0000 5.0000 154.254 1 34.1000 0.0000 34.1000 34.1000 157.829 1 21.2000 0.0000 21.2000 21.2000 163.748 1 30.2000 0.0000 30.2000 30.2000 167.685 1 60.2000 0.0000 60.2000 60.2000 170.313 1 65.8000 0.0000 65.8000 65.8000 172.847 1 45.2000 0.0000 45.2000 45.2000 177.763 1 57.9000 0.0000 57.9000 57.9000 181.397 1 51.1000 0.0000 51.1000 51.1000 185.257 1 21.6000 0.0000 21.6000 21.6000 189.124 1 19.9000 0.0000 19.9000 19.9000 192.231 1 50.2000 0.0000 50.2000 50.2000 199.953 1 30.3000 0.0000 30.3000 30.3000 particle_size: Level N Mean Std Min Max ------------------------------------------------------------ coarse 7 43.4429 7.9227 30.3000 50.2000 fine 6 42.7833 20.7670 20.7000 65.8000 medium 7 22.7000 15.5521 5.0000 51.1000 === Main Effects: flexibility === Factor Effect Std Error % Contribution -------------------------------------------------------------- polymer_ratio 12.6500 0.6906 32.4% filler_pct 12.6500 0.6906 32.4% cure_temp 12.6500 0.6906 32.4% particle_size 1.0757 0.6906 2.8% === Summary Statistics: flexibility === polymer_ratio: Level N Mean Std Min Max ------------------------------------------------------------ 0.30645 1 2.4900 0.0000 2.4900 2.4900 0.345057 1 6.9800 0.0000 6.9800 6.9800 0.364969 1 9.6400 0.0000 9.6400 9.6400 0.398627 1 6.0200 0.0000 6.0200 6.0200 0.412433 1 7.2000 0.0000 7.2000 7.2000 0.435932 1 15.1400 0.0000 15.1400 15.1400 0.457029 1 9.1500 0.0000 9.1500 9.1500 0.477081 1 10.5500 0.0000 10.5500 10.5500 0.500259 1 8.9900 0.0000 8.9900 8.9900 0.549414 1 10.6900 0.0000 10.6900 10.6900 0.565524 1 7.9600 0.0000 7.9600 7.9600 0.59909 1 3.0800 0.0000 3.0800 3.0800 0.608945 1 3.3100 0.0000 3.3100 3.3100 0.627461 1 10.3000 0.0000 10.3000 10.3000 0.661973 1 8.7800 0.0000 8.7800 8.7800 0.696713 1 4.2900 0.0000 4.2900 4.2900 0.716097 1 9.8900 0.0000 9.8900 9.8900 0.741222 1 9.8400 0.0000 9.8400 9.8400 0.758732 1 7.9700 0.0000 7.9700 7.9700 0.793704 1 9.7100 0.0000 9.7100 9.7100 filler_pct: Level N Mean Std Min Max ------------------------------------------------------------ 11.0774 1 4.2900 0.0000 4.2900 4.2900 11.7086 1 9.7100 0.0000 9.7100 9.7100 12.6117 1 10.6900 0.0000 10.6900 10.6900 14.4259 1 2.4900 0.0000 2.4900 2.4900 16.1864 1 9.8900 0.0000 9.8900 9.8900 17.1696 1 15.1400 0.0000 15.1400 15.1400 17.9415 1 10.3000 0.0000 10.3000 10.3000 19.0991 1 9.8400 0.0000 9.8400 9.8400 20.7811 1 3.0800 0.0000 3.0800 3.0800 21.4972 1 3.3100 0.0000 3.3100 3.3100 22.7419 1 8.7800 0.0000 8.7800 8.7800 23.9832 1 7.9700 0.0000 7.9700 7.9700 25.2071 1 8.9900 0.0000 8.9900 8.9900 27.4195 1 6.9800 0.0000 6.9800 6.9800 28.1025 1 9.1500 0.0000 9.1500 9.1500 29.6222 1 7.2000 0.0000 7.2000 7.2000 5.48476 1 6.0200 0.0000 6.0200 6.0200 6.96658 1 10.5500 0.0000 10.5500 10.5500 7.55985 1 7.9600 0.0000 7.9600 7.9600 9.99025 1 9.6400 0.0000 9.6400 9.6400 cure_temp: Level N Mean Std Min Max ------------------------------------------------------------ 121.363 1 15.1400 0.0000 15.1400 15.1400 125.967 1 4.2900 0.0000 4.2900 4.2900 128.352 1 8.9900 0.0000 8.9900 8.9900 134.74 1 9.1500 0.0000 9.1500 9.1500 138.442 1 8.7800 0.0000 8.7800 8.7800 140.466 1 9.6400 0.0000 9.6400 9.6400 145.706 1 10.3000 0.0000 10.3000 10.3000 148.101 1 10.5500 0.0000 10.5500 10.5500 154.254 1 3.3100 0.0000 3.3100 3.3100 157.829 1 10.6900 0.0000 10.6900 10.6900 163.748 1 6.0200 0.0000 6.0200 6.0200 167.685 1 2.4900 0.0000 2.4900 2.4900 170.313 1 3.0800 0.0000 3.0800 3.0800 172.847 1 7.9700 0.0000 7.9700 7.9700 177.763 1 6.9800 0.0000 6.9800 6.9800 181.397 1 7.2000 0.0000 7.2000 7.2000 185.257 1 9.8900 0.0000 9.8900 9.8900 189.124 1 7.9600 0.0000 7.9600 7.9600 192.231 1 9.8400 0.0000 9.8400 9.8400 199.953 1 9.7100 0.0000 9.7100 9.7100 particle_size: Level N Mean Std Min Max ------------------------------------------------------------ coarse 7 7.6486 2.7235 3.3100 9.8400 fine 6 7.8950 4.7903 2.4900 15.1400 medium 7 8.7243 1.7116 6.0200 10.5500

Optimization Recommendations

doe optimize
=== Optimization: tensile_strength === Direction: maximize Best observed run: #12 polymer_ratio = 0.734037 filler_pct = 12.1712 cure_temp = 135.352 particle_size = coarse Value: 65.8 RSM Model (linear, R² = 0.14): Coefficients: intercept: +36.0046 polymer_ratio: +5.2791 filler_pct: -8.0744 cure_temp: -1.3667 particle_size: +1.6144 Predicted optimum: polymer_ratio = 0.799682 filler_pct = 6.98001 cure_temp = 193.433 particle_size = medium Predicted value: 48.5444 Factor importance: 1. polymer_ratio (effect: 60.8, contribution: 32.4%) 2. filler_pct (effect: 60.8, contribution: 32.4%) 3. cure_temp (effect: 60.8, contribution: 32.4%) 4. particle_size (effect: 5.5, contribution: 2.9%) === Optimization: flexibility === Direction: maximize Best observed run: #7 polymer_ratio = 0.595795 filler_pct = 17.5526 cure_temp = 198.806 particle_size = medium Value: 15.14 RSM Model (linear, R² = 0.24): Coefficients: intercept: +8.0600 polymer_ratio: -0.7442 filler_pct: +0.9248 cure_temp: +1.9985 particle_size: -0.6976 Predicted optimum: polymer_ratio = 0.483128 filler_pct = 21.5583 cure_temp = 186.217 particle_size = coarse Predicted value: 10.5668 Factor importance: 1. polymer_ratio (effect: 12.7, contribution: 32.1%) 2. filler_pct (effect: 12.7, contribution: 32.1%) 3. cure_temp (effect: 12.7, contribution: 32.1%) 4. particle_size (effect: 1.5, contribution: 3.8%)

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.6433

Per-Response Desirability

ResponseWeightDesirabilityPredictedDir
tensile_strength 1.5
0.7213
50.20 0.7213 50.20 MPa
flexibility 1.5
0.5737
9.84 0.5737 9.84 mm

Recommended Settings

FactorValue
polymer_ratio0.450642
filler_pct21.1846 %
cure_temp168.139 C
particle_sizefine

Source: from observed run #2

Trade-off Summary

Sacrifice = how much worse than single-objective best.

ResponsePredictedBest ObservedSacrifice
flexibility9.8415.14+5.30

Top 3 Runs by Desirability

RunDFactor Settings
#30.6299polymer_ratio=0.727739, filler_pct=27.6875, cure_temp=164.744, particle_size=medium
#170.5839polymer_ratio=0.378219, filler_pct=29.8691, cure_temp=127.804, particle_size=medium

Model Quality

ResponseType
flexibility0.3726linear

Full Multi-Objective Output

doe optimize --multi
============================================================ MULTI-OBJECTIVE OPTIMIZATION Method: Derringer-Suich Desirability Function ============================================================ Overall desirability: D = 0.6433 Response Weight Desirability Predicted Direction --------------------------------------------------------------------- tensile_strength 1.5 0.7213 50.20 MPa ↑ flexibility 1.5 0.5737 9.84 mm ↑ Recommended settings: polymer_ratio = 0.450642 filler_pct = 21.1846 % cure_temp = 168.139 C particle_size = fine (from observed run #2) Trade-off summary: tensile_strength: 50.20 (best observed: 65.80, sacrifice: +15.60) flexibility: 9.84 (best observed: 15.14, sacrifice: +5.30) Model quality: tensile_strength: R² = 0.2491 (linear) flexibility: R² = 0.3726 (linear) Top 3 observed runs by overall desirability: 1. Run #2 (D=0.6433): polymer_ratio=0.450642, filler_pct=21.1846, cure_temp=168.139, particle_size=fine 2. Run #3 (D=0.6299): polymer_ratio=0.727739, filler_pct=27.6875, cure_temp=164.744, particle_size=medium 3. Run #17 (D=0.5839): polymer_ratio=0.378219, filler_pct=29.8691, cure_temp=127.804, particle_size=medium
← Database Tuning Next: Distillation Column →