Skills

Simscape Write Ssc

Use when writing or editing Simscape Language (.ssc) source files, components...

Install

npx skills add matlab/simulink-agentic-toolkit --skill simscape-write-ssc -g -a claude-code -y
Category
Writing
Updated
6d ago
License
See repository
Context cost
Mediumabout 1,934 tokens
Runs scripts
No, instructions only

What it does

Use when writing or editing Simscape Language (.ssc) source files, components, domains, or functions. Triggers include: model a physical component in .ssc; write physical equations for a Simscape block; add or modify physics or parameterization options in a Simscape component; build a composite component. Also use for validating .ssc syntax, fixing Simscape Language errors, or converting governing equations into working Simscape component code. Do NOT use for configuring or connecting existing Simscape blocks in a Simulink model, that is model building, not language authoring.

Simscape Language Authoring

Write .ssc files (components, domains, functions) that pass validation and are physically correct.

When to Use

  • Writing a new .ssc component, domain, or function from scratch
  • Adding or modifying physics, equations, or parameterization in an existing .ssc file
  • Converting governing equations into a working Simscape component
  • Adding mode charts, events, or switching logic to a component
  • Building a composite component that connects subcomponents together
  • Fixing Simscape Language syntax or validation errors

When NOT to Use

  • Configuring or connecting existing Simscape blocks in a Simulink model, use building-simulink-models instead
  • Simulating a model or inspecting results, use simulating-simulink-models
  • Setting block parameters from MATLAB or a script without editing .ssc source

Workflow

Designing a component

Below are the sections that make up a Simscape component. Include only what is needed.

nodes, inputs, outputs

  • nodes, quantity participates in bilateral energy exchange (the network enforces Across equalization + Through summation).
  • inputs, physical signal imposed from outside (control signal, environment).
  • outputs, physical signal for a measurement or computed result.

Node ports have a domain. Reuse an existing one, especially foundation; author a custom domain only when none covers the physics.

PhysicsDomain path
Electrical (single-phase)foundation.electrical.electrical
Rotational mechanicalfoundation.mechanical.rotational.rotational
Translational mechanicalfoundation.mechanical.translational.translational
Thermal (heat transfer)foundation.thermal.thermal

For fluid domains, polyphase electrical, position/angle-based mechanical variants, or any domain not in the table, you must read: references/foundation/domain-selection.md.

parameters, variables

Read the whole SKILL.md on GitHub

More in Writing