Lemonergy · Studio block

Reusable submodel

Groups a model behind named typed inputs and outputs so it can be used as an independent instance inside another model.

Implementation ID
subsystem
Reviewed
2026-10-27

Behavior

An instance names a versioned internal definition. Compilation resolves its public ports, applies validated parameter overrides and creates separate runtime states for its internal blocks. Only declared outputs may cross the boundary; port names remain stable through export and import.

Interface

Reusable submodel interfaceInputs or arguments on the left, observed outputs on the right. Conserving terminals appear below the component. The tables give units and behavior.Reusable submodelStudio blockuy
Original Lemonergy interface view. Lines identify ports; they are not a completed simulation circuit.
Ports and observed outputs
NameDirectionUnitMeaning
uinput1Parent input connected to the child input boundary.
youtput1Child result exposed through the named output boundary.

Parameters

Defaults are initial model values. Select values for your own model and operating conditions.

Configuration fields
ParameterUnitDefaultMeaning and limits
Definition identifier
definition
1doubleIdentifier of the internal reusable model definition.
Definition version
version
11Exact required definition version; a mismatch is rejected.
Instance parameter overrides
parameters
1{}Validated overrides for declared blocks in this instance; other instances retain their own values and states.

Equations and rules

  • child input u = parent input
  • example child output y = 2u
  • parent Result = child output y

Worked example

Typed input and output of a reusable submodel

The example selects the doubling submodel. The parent supplies a constant 3 through the named input u. Inside the child, gain 2 produces 6 and the named output y returns it to the parent. The parent Result signal is 6 at 0.2 seconds. Selecting the alternate tripling definition for another run produces 9.

Open Studio example after release →
Numerical checks for the bundled synthetic example
OutputTime (s)Expected valueUnitAbsolute tolerance
Parent result after the child output boundary
Result
0.2611e-09

Use in a workflow

Typed input and output of a reusable submodel

Groups a model behind named typed inputs and outputs so it can be used as an independent instance inside another model.

  1. Reusable submodel: An instance names a versioned internal definition. Compilation resolves its public ports, applies validated parameter overrides and creates separate runtime states for its internal blocks. Only declared outputs may cross the boundary; port names remain stable through export and import.
    • Use the block reference for settings and connections.
    • Implementation tested locally; public release pending.
Open Studio example after release

Connected concepts

Limits and interpretation

  • Internal versioned definitions share the parent simulation and solver. Separately loaded external models with independent solver settings or lifecycle are not supported.
  • Containment must be acyclic and at most 16 levels deep. Interfaces, node counts and expanded graphs have explicit finite budgets.
  • The linked example uses a compile-time selector to choose an ordinary typed submodel; the basic submodel itself does not select variants or provide conditional execution.

Reference basis

Model hierarchy, named interfaces and instance isolation are software contracts verified by the executable example. No external research result or external API parity is claimed.

Implementation sources

This reference follows the public interface and locally verified numerical checks for an upcoming release.

Contract: Lemonergy Studio public contract · Verification record: verification-2026-10-27

  • docs/glossary/native-block-verification.json

This implementation and its workflow uses (JSON) · Knowledge graph (JSON-LD)