PFC Servo And Calibration
Use this skill to explain, adapt, or generate PFC 6.0 servo-control snippets and calibration sequencing plans. The skill is self-contained: canonical servo demonstration .dat files are stored under scripts/canonical/.
Parent Skill Relationship
pfc-servo-calibration is a child skill of pfc-workflow. It does not own the full PFC lifecycle. Use it for servo logic, stress-control snippets, and calibration sequence design; return to pfc-workflow for full case planning, solve orchestration, post-processing routing, verification, and delivery.
Parent/child split:
- Parent
pfc-workflow: owns complete PFC project lifecycle and decides when servo/calibration support is needed.
- Child
pfc-servo-calibration: owns wall/ball servo concepts, stress-control checklists, tuning order, and bundled servo demonstration templates.
- Sibling child
pfc-standard-tests: owns standard test templates and stage normalization.
- Sibling child
pfc-postprocessing: owns standard figures and field exports after solve.
- Sibling child
pfc-ae-energy: owns AE, energy, and source-mechanism outputs after solve.
When To Use
Use through pfc-workflow when the task reaches stress control or parameter tuning:
- Explain wall servo logic, target stress/force control, or stiffness-based velocity updates.
- Add or review servo-control FISH code for walls, platens, biaxial cells, or triaxial confinement.
- Plan manual micro-to-macro calibration order for bonded or granular specimens.
- Convert a simple target-force example into a reusable PFC 6.0 snippet.
- Diagnose unstable servo gains, overshoot, timestep issues, or oscillating boundary forces.
Required Inputs
Ask for these if missing:
- PFC version and dimensionality: PFC2D or PFC3D, preferably PFC 6.0 unless stated otherwise.
- Control target: force, stress, strain, displacement, confining pressure, or mixed control.
- Controlled boundary: wall ID/name, ball group, platen pair, membrane, or cell boundary.
- Macro targets: elastic modulus, UCS/peak strength, Poisson ratio, friction angle, cohesion, residual strength, or peak strain.
- Test family used for calibration: UCS, biaxial, triaxial, Brazilian, direct shear, or custom.
- Current snippet or case files if the user is debugging an existing servo.
Canonical Template Map
| Topic |
Folder |
Files |
Purpose |
| Servo principles |
scripts/canonical/servo-principles/ |
1sifu_1.dat, 2sifu_2.dat, 3sifu_3.dat, 3sifu_4.dat, 4sifu_4_jixu.dat |
Minimal PFC 6.0 target-force and stiffness-based wall/ball servo demonstrations. |
Servo Control Checklist
Use this checklist before writing or changing servo logic:
- Identify the controlled object and target component, e.g.
wall.force.contact.y(wp).
- Compute or estimate current contact stiffness in the controlled direction.
- Convert target force/stress error to displacement increment using stiffness.
- Convert displacement increment to velocity using timestep or update interval.
- Limit maximum velocity to avoid overshoot.
- Update stiffness periodically because contact maps change during compaction and failure.
- Save a state before enabling servo and another after reaching target stress.
- Track histories for target, actual force/stress, error, and boundary velocity.
Calibration Order
Default manual calibration sequence:
- Geometry and PSD: specimen size, particle radius range, porosity, seed.
- Elastic response: tune particle/contact modulus and stiffness ratio first.
- Poisson/lateral response: adjust stiffness ratio and boundary condition assumptions.
- Peak strength: tune bond tensile/cohesive/shear strength after elastic slope is acceptable.
- Post-peak and residual: tune friction, damping, softening logic, or contact model choice.
- Failure mode: inspect cracks, shear bands, force chains, and boundary effects.
- Robustness: repeat with at least one different seed or resolution if results are sensitive.
Working Rules
- Prefer PFC 6.0-compatible syntax unless the user explicitly targets another version.
- Keep servo snippets small and test them in isolation before embedding them in a full model.
- Treat files in
scripts/canonical/ as reference templates, not final calibrated models.
- Do not hide calibration logic in GUI-only steps or binary save states.
- Preserve milestone saves around stress-control stages.
- If automated calibration is requested, hand control back to
pfc-workflow after defining parameter bounds, macro targets, and servo-safe run constraints.
Output Contract
A complete child-skill handoff back to pfc-workflow should include:
- The selected servo/calibration pattern and why it fits.
- Required files or snippets from
scripts/canonical/<case>/.
- Controlled boundary, target variable, measured variable, and update rule.
- Histories to record for servo validation.
- Calibration parameter order and stop criteria.
- Stability warnings: timestep, damping, gain/velocity cap, stiffness refresh, and overshoot risk.
- A clear note that full case execution, post-processing routing, V&V, and delivery continue in
pfc-workflow.
Local Contents
references/overview.md: detailed self-contained servo/calibration boundaries and source map.
examples/README.md: how to validate bundled servo demonstrations.
scripts/canonical/: servo demonstration code.
scripts/canonical/manifest.json: file inventory with sizes and SHA-256 hashes.
scripts/README.md: helper-script policy and future maintenance guidance.
1---2name: pfc-servo-calibration3description: Child skill of pfc-workflow for PFC 6.0 servo-control patterns and micro-to-macro calibration sequencing.4---56# PFC Servo And Calibration78Use this skill to explain, adapt, or generate PFC 6.0 servo-control snippets and calibration sequencing plans. The skill is self-contained: canonical servo demonstration `.dat` files are stored under `scripts/canonical/`.910## Parent Skill Relationship1112`pfc-servo-calibration` is a child skill of `pfc-workflow`. It does not own the full PFC lifecycle. Use it for servo logic, stress-control snippets, and calibration sequence design; return to `pfc-workflow` for full case planning, solve orchestration, post-processing routing, verification, and delivery.1314Parent/child split:1516- Parent `pfc-workflow`: owns complete PFC project lifecycle and decides when servo/calibration support is needed.17- Child `pfc-servo-calibration`: owns wall/ball servo concepts, stress-control checklists, tuning order, and bundled servo demonstration templates.18- Sibling child `pfc-standard-tests`: owns standard test templates and stage normalization.19- Sibling child `pfc-postprocessing`: owns standard figures and field exports after solve.20- Sibling child `pfc-ae-energy`: owns AE, energy, and source-mechanism outputs after solve.2122## When To Use2324Use through `pfc-workflow` when the task reaches stress control or parameter tuning:2526- Explain wall servo logic, target stress/force control, or stiffness-based velocity updates.27- Add or review servo-control FISH code for walls, platens, biaxial cells, or triaxial confinement.28- Plan manual micro-to-macro calibration order for bonded or granular specimens.29- Convert a simple target-force example into a reusable PFC 6.0 snippet.30- Diagnose unstable servo gains, overshoot, timestep issues, or oscillating boundary forces.3132## Required Inputs3334Ask for these if missing:3536- PFC version and dimensionality: PFC2D or PFC3D, preferably PFC 6.0 unless stated otherwise.37- Control target: force, stress, strain, displacement, confining pressure, or mixed control.38- Controlled boundary: wall ID/name, ball group, platen pair, membrane, or cell boundary.39- Macro targets: elastic modulus, UCS/peak strength, Poisson ratio, friction angle, cohesion, residual strength, or peak strain.40- Test family used for calibration: UCS, biaxial, triaxial, Brazilian, direct shear, or custom.41- Current snippet or case files if the user is debugging an existing servo.4243## Canonical Template Map4445| Topic | Folder | Files | Purpose |46| --- | --- | --- | --- |47| Servo principles | `scripts/canonical/servo-principles/` | `1sifu_1.dat`, `2sifu_2.dat`, `3sifu_3.dat`, `3sifu_4.dat`, `4sifu_4_jixu.dat` | Minimal PFC 6.0 target-force and stiffness-based wall/ball servo demonstrations. |4849## Servo Control Checklist5051Use this checklist before writing or changing servo logic:52531. Identify the controlled object and target component, e.g. `wall.force.contact.y(wp)`.542. Compute or estimate current contact stiffness in the controlled direction.553. Convert target force/stress error to displacement increment using stiffness.564. Convert displacement increment to velocity using timestep or update interval.575. Limit maximum velocity to avoid overshoot.586. Update stiffness periodically because contact maps change during compaction and failure.597. Save a state before enabling servo and another after reaching target stress.608. Track histories for target, actual force/stress, error, and boundary velocity.6162## Calibration Order6364Default manual calibration sequence:65661. Geometry and PSD: specimen size, particle radius range, porosity, seed.672. Elastic response: tune particle/contact modulus and stiffness ratio first.683. Poisson/lateral response: adjust stiffness ratio and boundary condition assumptions.694. Peak strength: tune bond tensile/cohesive/shear strength after elastic slope is acceptable.705. Post-peak and residual: tune friction, damping, softening logic, or contact model choice.716. Failure mode: inspect cracks, shear bands, force chains, and boundary effects.727. Robustness: repeat with at least one different seed or resolution if results are sensitive.7374## Working Rules7576- Prefer PFC 6.0-compatible syntax unless the user explicitly targets another version.77- Keep servo snippets small and test them in isolation before embedding them in a full model.78- Treat files in `scripts/canonical/` as reference templates, not final calibrated models.79- Do not hide calibration logic in GUI-only steps or binary save states.80- Preserve milestone saves around stress-control stages.81- If automated calibration is requested, hand control back to `pfc-workflow` after defining parameter bounds, macro targets, and servo-safe run constraints.8283## Output Contract8485A complete child-skill handoff back to `pfc-workflow` should include:8687- The selected servo/calibration pattern and why it fits.88- Required files or snippets from `scripts/canonical/<case>/`.89- Controlled boundary, target variable, measured variable, and update rule.90- Histories to record for servo validation.91- Calibration parameter order and stop criteria.92- Stability warnings: timestep, damping, gain/velocity cap, stiffness refresh, and overshoot risk.93- A clear note that full case execution, post-processing routing, V&V, and delivery continue in `pfc-workflow`.9495## Local Contents9697- `references/overview.md`: detailed self-contained servo/calibration boundaries and source map.98- `examples/README.md`: how to validate bundled servo demonstrations.99- `scripts/canonical/`: servo demonstration code.100- `scripts/canonical/manifest.json`: file inventory with sizes and SHA-256 hashes.101- `scripts/README.md`: helper-script policy and future maintenance guidance.