PFC Mineral Heterogeneity
Use this skill to design, explain, or implement PFC workflows for heterogeneous multi-mineral rock such as granite. The core route is: digital image or mineral fraction input -> mineral cluster generation -> ball/contact grouping -> per-mineral LPBM parameter assignment -> Weibull damage distribution -> standard mechanical validation.
Parent Skill Relationship
pfc-mineral-heterogeneity is a child skill of pfc-workflow. It does not own the full PFC lifecycle. Use it for mineral-aware specimen construction and parameter assignment, then return to pfc-workflow for full case planning, calibration campaign control, solve management, post-processing, V&V, and delivery.
Parent/child split:
- Parent
pfc-workflow: owns the full project lifecycle and decides when mineral heterogeneity is needed.
- Child
pfc-mineral-heterogeneity: owns mineral fractions, image-derived phase maps, mineral clusters, per-mineral groups, per-mineral contact parameters, and damage heterogeneity.
- Sibling
pfc-basics: owns clean foundation model, balls, walls, groups, and ranges.
- Sibling
pfc-cad-import: owns CAD/DXF/STL/geometry import and geometry-derived ranges.
- Sibling
pfc-contact-models: owns detailed contact-law selection, CMAT strategy, bond methods, and contact validation.
- Sibling
pfc-standard-tests: owns UCS, Brazilian, biaxial, triaxial, shear, and bending test templates.
- Sibling
pfc-servo-calibration: owns stress/force servo loading and calibration sequencing.
- Sibling
pfc-fish: owns reusable FISH helper design and callback/history details.
- Sibling
pfc-postprocessing: owns standard non-AE plots and field exports.
- Sibling
pfc-ae-energy: owns AE, energy, and source-mechanism outputs.
When To Use
Use through pfc-workflow when the task asks to:
- model granite or other multi-mineral heterogeneous rock
- convert digital image segmentation into PFC mineral phases
- assign quartz, feldspar, mica, matrix, inclusion, or interface groups
- build random clustered mineral domains with target area fractions
- calibrate separate LPBM parameters for each mineral or interface
- reduce unrealistic compression/tension strength ratio from homogeneous BPM models
- study mineral fraction, mineral distribution, or Weibull damage effects
- compare heterogeneous and homogeneous rock models
Required Inputs
Ask for these if missing:
- PFC2D or PFC3D target and PFC version.
- Mineral phases and target fractions, or the segmented image / phase map.
- Specimen dimensions, particle radius distribution, and units.
- Contact model route: usually LPBM /
linearpbond for bonded rock.
- Macro calibration targets: elastic modulus, Poisson's ratio, UCS, BTS/UTS, and failure pattern when available.
- Per-mineral starting values or relative ratios for stiffness and strength.
- Interface rule: matrix-dominant, weaker-boundary, mica-priority, area-ratio random assignment, or explicit phase-pair table.
- Weibull damage parameters if damage heterogeneity is required.
Documentation-Backed Rules
PFC 6.0 documentation points checked through pfc-mcp are summarized in references/heterogeneous-contact-doc-notes.md.
Relevant command families:
model random, model clean, model save, model restore: reproducible staged construction.
ball group, contact group: mineral and interface phase assignment.
contact cmat, contact model, contact method, contact property: LPBM assignment and per-group parameter changes.
ball list, contact list: FISH traversal and auditing.
fish define, fish history: cluster construction, Weibull random variables, and diagnostics.
measure history: stress/strain/porosity/coordination checks.
geometry import, geometry assign-groups: optional image/geometry-assisted phase assignment.
program call: modular construction, assignment, loading, and export stages.
Default Workflow
When the request is about formulas, exact theory, complete code, or source-command migration, load these first:
references/formulas.md for Otsu, mineral fractions, LPBM, calibration-fit, strength-ratio, and Weibull formulas.
references/source-code-complete-pfc6.md for the full A-G command-flow route and PFC 6.0-oriented skeleton.
1. Mineral Fraction Source
Choose one source route:
- segmented image or phase map
- Otsu multi-threshold grayscale segmentation
- user-provided mineral fractions
- synthetic phase fractions for sensitivity studies
For the source example, granite phases are mica, quartz, and feldspar with approximate fractions:
mica: 4.81%
quartz: 35.86%
feldspar: 59.32%
2. Mineral Cluster Construction
For PFC2D, start with all balls assigned to the matrix phase, then seed filling phases and grow them across contact-connected neighbor balls until target area fractions are reached.
Recommended rules:
- use ball area
pi * radius^2 for 2D phase fractions
- use ball volume for 3D phase fractions
- fix
model random before clustering
- write phase fraction diagnostics after grouping
- save a staged model after mineral groups are assigned
3. Contact Group Assignment
Assign contact groups from endpoint ball groups:
- same phase -> same mineral contact group
- different phases -> interface group or phase-pair group
- weak minerals or mica-rich contacts can be assigned preferentially to the weaker phase when following the source workflow
Example group names:
mineral_quartz
mineral_feldspar
mineral_mica
pbond_quartz
pbond_feldspar
pbond_mica
pbond_boundary
4. Per-Mineral LPBM Parameters
Use linearpbond for ball-ball contacts unless the user requests another contact model. Assign stiffness and strength by contact group after contacts and groups exist.
Source example final values:
| Mineral |
Linear emod (GPa) |
PB emod (GPa) |
kratio |
pb_ten (MPa) |
pb_coh (MPa) |
| mica |
1.9 |
6.8 |
2.7 |
49.6 |
49.6 |
| quartz |
7.5 |
28 |
2.7 |
66.2 |
66.2 |
| feldspar |
9.6 |
32 |
2.7 |
332.5 |
332.5 |
Treat these as starting values, not universal parameters.
5. Weibull Damage
Apply damage as random multipliers on bond strength and optionally bond stiffness:
x = alpha * (-ln(1 - R))^(1 / beta)
where R is uniform random in [0, 1), alpha controls scale, and beta controls dispersion. Larger beta gives a more concentrated distribution.
6. Validation
Validate against macro targets before production studies:
- elastic modulus
- Poisson's ratio
- UCS
- BTS or UTS
- compression/tension strength ratio
- crack pattern and mineral-localization behavior
- phase fraction and contact-group diagnostics
Working Rules
- Prefer transparent PFC 6.0 commands and FISH templates over black-box preprocessing.
- Keep image segmentation, cluster generation, contact assignment, parameter assignment, and mechanical loading as separate stages.
- Treat source values as calibration seeds, not final rock constants.
- Fix random seeds and save staged states after phase assignment, bonding, damage, and loading.
- Do not claim pixel-perfect digital-rock reconstruction when using random cellular clusters.
- Route detailed contact-law design to
pfc-contact-models and standard test execution to pfc-standard-tests / pfc-workflow.
Output Contract
A complete child-skill handoff back to pfc-workflow should include:
- mineral phases and target fractions
- image segmentation or synthetic fraction route
- cluster construction rule and random seed
- ball group names and contact group names
- phase/contact parameter table
- interface assignment rule
- Weibull damage parameters and affected properties
- staged save points
- validation targets and required plots/tables
- routing notes for contact models, standard tests, servo calibration, post-processing, and AE if needed
Local Contents
references/formulas.md: Otsu, LPBM, calibration-fit, strength-ratio, and Weibull formulas.
references/source-code-complete-pfc6.md: full A-G command-flow route and PFC 6.0-oriented code skeleton.
references/overview.md: boundary, workflow, and inclusion rules.
references/mineral-image-workflow.md: Otsu segmentation and cellular-automata cluster route.
references/parameter-assignment.md: per-mineral calibration, interface rules, and Weibull damage.
references/heterogeneous-contact-doc-notes.md: PFC 6.0 command notes checked through pfc-mcp.
examples/README.md: validation examples and materialization guidance.
scripts/canonical/: reusable PFC/FISH and Python template snippets.
scripts/README.md: script policy and future helper guidance.
1---2name: pfc-mineral-heterogeneity3description: PFC Mineral Heterogeneity4---56# PFC Mineral Heterogeneity78Use this skill to design, explain, or implement PFC workflows for heterogeneous multi-mineral rock such as granite. The core route is: digital image or mineral fraction input -> mineral cluster generation -> ball/contact grouping -> per-mineral LPBM parameter assignment -> Weibull damage distribution -> standard mechanical validation.910## Parent Skill Relationship1112`pfc-mineral-heterogeneity` is a child skill of `pfc-workflow`. It does not own the full PFC lifecycle. Use it for mineral-aware specimen construction and parameter assignment, then return to `pfc-workflow` for full case planning, calibration campaign control, solve management, post-processing, V&V, and delivery.1314Parent/child split:1516- Parent `pfc-workflow`: owns the full project lifecycle and decides when mineral heterogeneity is needed.17- Child `pfc-mineral-heterogeneity`: owns mineral fractions, image-derived phase maps, mineral clusters, per-mineral groups, per-mineral contact parameters, and damage heterogeneity.18- Sibling `pfc-basics`: owns clean foundation model, balls, walls, groups, and ranges.19- Sibling `pfc-cad-import`: owns CAD/DXF/STL/geometry import and geometry-derived ranges.20- Sibling `pfc-contact-models`: owns detailed contact-law selection, CMAT strategy, bond methods, and contact validation.21- Sibling `pfc-standard-tests`: owns UCS, Brazilian, biaxial, triaxial, shear, and bending test templates.22- Sibling `pfc-servo-calibration`: owns stress/force servo loading and calibration sequencing.23- Sibling `pfc-fish`: owns reusable FISH helper design and callback/history details.24- Sibling `pfc-postprocessing`: owns standard non-AE plots and field exports.25- Sibling `pfc-ae-energy`: owns AE, energy, and source-mechanism outputs.2627## When To Use2829Use through `pfc-workflow` when the task asks to:3031- model granite or other multi-mineral heterogeneous rock32- convert digital image segmentation into PFC mineral phases33- assign quartz, feldspar, mica, matrix, inclusion, or interface groups34- build random clustered mineral domains with target area fractions35- calibrate separate LPBM parameters for each mineral or interface36- reduce unrealistic compression/tension strength ratio from homogeneous BPM models37- study mineral fraction, mineral distribution, or Weibull damage effects38- compare heterogeneous and homogeneous rock models3940## Required Inputs4142Ask for these if missing:4344- PFC2D or PFC3D target and PFC version.45- Mineral phases and target fractions, or the segmented image / phase map.46- Specimen dimensions, particle radius distribution, and units.47- Contact model route: usually LPBM / `linearpbond` for bonded rock.48- Macro calibration targets: elastic modulus, Poisson's ratio, UCS, BTS/UTS, and failure pattern when available.49- Per-mineral starting values or relative ratios for stiffness and strength.50- Interface rule: matrix-dominant, weaker-boundary, mica-priority, area-ratio random assignment, or explicit phase-pair table.51- Weibull damage parameters if damage heterogeneity is required.5253## Documentation-Backed Rules5455PFC 6.0 documentation points checked through `pfc-mcp` are summarized in `references/heterogeneous-contact-doc-notes.md`.5657Relevant command families:5859- `model random`, `model clean`, `model save`, `model restore`: reproducible staged construction.60- `ball group`, `contact group`: mineral and interface phase assignment.61- `contact cmat`, `contact model`, `contact method`, `contact property`: LPBM assignment and per-group parameter changes.62- `ball list`, `contact list`: FISH traversal and auditing.63- `fish define`, `fish history`: cluster construction, Weibull random variables, and diagnostics.64- `measure history`: stress/strain/porosity/coordination checks.65- `geometry import`, `geometry assign-groups`: optional image/geometry-assisted phase assignment.66- `program call`: modular construction, assignment, loading, and export stages.6768## Default Workflow6970When the request is about formulas, exact theory, complete code, or source-command migration, load these first:7172- `references/formulas.md` for Otsu, mineral fractions, LPBM, calibration-fit, strength-ratio, and Weibull formulas.73- `references/source-code-complete-pfc6.md` for the full A-G command-flow route and PFC 6.0-oriented skeleton.7475### 1. Mineral Fraction Source7677Choose one source route:7879- segmented image or phase map80- Otsu multi-threshold grayscale segmentation81- user-provided mineral fractions82- synthetic phase fractions for sensitivity studies8384For the source example, granite phases are mica, quartz, and feldspar with approximate fractions:8586```text87mica: 4.81%88quartz: 35.86%89feldspar: 59.32%90```9192### 2. Mineral Cluster Construction9394For PFC2D, start with all balls assigned to the matrix phase, then seed filling phases and grow them across contact-connected neighbor balls until target area fractions are reached.9596Recommended rules:9798- use ball area `pi * radius^2` for 2D phase fractions99- use ball volume for 3D phase fractions100- fix `model random` before clustering101- write phase fraction diagnostics after grouping102- save a staged model after mineral groups are assigned103104### 3. Contact Group Assignment105106Assign contact groups from endpoint ball groups:107108- same phase -> same mineral contact group109- different phases -> interface group or phase-pair group110- weak minerals or mica-rich contacts can be assigned preferentially to the weaker phase when following the source workflow111112Example group names:113114```text115mineral_quartz116mineral_feldspar117mineral_mica118pbond_quartz119pbond_feldspar120pbond_mica121pbond_boundary122```123124### 4. Per-Mineral LPBM Parameters125126Use `linearpbond` for ball-ball contacts unless the user requests another contact model. Assign stiffness and strength by contact group after contacts and groups exist.127128Source example final values:129130| Mineral | Linear emod (GPa) | PB emod (GPa) | kratio | pb_ten (MPa) | pb_coh (MPa) |131| --- | ---: | ---: | ---: | ---: | ---: |132| mica | 1.9 | 6.8 | 2.7 | 49.6 | 49.6 |133| quartz | 7.5 | 28 | 2.7 | 66.2 | 66.2 |134| feldspar | 9.6 | 32 | 2.7 | 332.5 | 332.5 |135136Treat these as starting values, not universal parameters.137138### 5. Weibull Damage139140Apply damage as random multipliers on bond strength and optionally bond stiffness:141142```text143x = alpha * (-ln(1 - R))^(1 / beta)144```145146where `R` is uniform random in `[0, 1)`, `alpha` controls scale, and `beta` controls dispersion. Larger `beta` gives a more concentrated distribution.147148### 6. Validation149150Validate against macro targets before production studies:151152- elastic modulus153- Poisson's ratio154- UCS155- BTS or UTS156- compression/tension strength ratio157- crack pattern and mineral-localization behavior158- phase fraction and contact-group diagnostics159160## Working Rules161162- Prefer transparent PFC 6.0 commands and FISH templates over black-box preprocessing.163- Keep image segmentation, cluster generation, contact assignment, parameter assignment, and mechanical loading as separate stages.164- Treat source values as calibration seeds, not final rock constants.165- Fix random seeds and save staged states after phase assignment, bonding, damage, and loading.166- Do not claim pixel-perfect digital-rock reconstruction when using random cellular clusters.167- Route detailed contact-law design to `pfc-contact-models` and standard test execution to `pfc-standard-tests` / `pfc-workflow`.168169## Output Contract170171A complete child-skill handoff back to `pfc-workflow` should include:172173- mineral phases and target fractions174- image segmentation or synthetic fraction route175- cluster construction rule and random seed176- ball group names and contact group names177- phase/contact parameter table178- interface assignment rule179- Weibull damage parameters and affected properties180- staged save points181- validation targets and required plots/tables182- routing notes for contact models, standard tests, servo calibration, post-processing, and AE if needed183184## Local Contents185186- `references/formulas.md`: Otsu, LPBM, calibration-fit, strength-ratio, and Weibull formulas.187- `references/source-code-complete-pfc6.md`: full A-G command-flow route and PFC 6.0-oriented code skeleton.188- `references/overview.md`: boundary, workflow, and inclusion rules.189- `references/mineral-image-workflow.md`: Otsu segmentation and cellular-automata cluster route.190- `references/parameter-assignment.md`: per-mineral calibration, interface rules, and Weibull damage.191- `references/heterogeneous-contact-doc-notes.md`: PFC 6.0 command notes checked through `pfc-mcp`.192- `examples/README.md`: validation examples and materialization guidance.193- `scripts/canonical/`: reusable PFC/FISH and Python template snippets.194- `scripts/README.md`: script policy and future helper guidance.