Reusing a subsystem across models with component files

November 29, 2026

Some parts of a model are worth building only once: a battery with the air around it, a pump with its controller, a room with its heater. A subsystem already collects such a part into one box. Saving it as a component file lets other models use it, and a change made to the file reaches every model that is linked to it.

This page builds one from the bundled Thermal Management example, places it twice in an empty model and then changes it. If subsystems are new to you, start with "Subsystems and relationship groups".

Make the subsystem

Open Thermal Management from Examples. Shift-click Battery module and Enclosed air, press Create subsystem in the toolbar and name it Battery pack. Electrical losses stays outside.

The Battery pack subsystem as one box, connected to Electrical losses
The two nodes are now one box. The heat from Electrical losses still reaches the battery inside it.

Say what it offers

Click the box's label to open its card. Two lists under Component decide what another model can see and change.

  • Ports are states the component offers outside. The battery's temperature is connected to something outside, so it is listed already. Press Keep as a port to make it part of the component.
  • Parameters that you expose can differ from one placement to another. Under Expose a parameter, choose Battery thermal capacitance.
The subsystem card with one port kept and the battery thermal capacitance exposed
One port and one exposed parameter, with a default of 1000 J/K.

Do this before saving. Once the subsystem is linked to its file, ports and exposed parameters are changed in the file.

Save it as a component file

Press Save as component file… on the card, or choose it from the box's right-click menu, and pick a name. The file is an ordinary .kjt project that also records what the component offers.

Saving does more than write a copy: the subsystem you saved from is now linked to the file. The file is where the component is changed from here on, and this model follows it.

The saved subsystem with a Linked tag on its box and a bar offering Open in new window and Detach
The Linked tag stays on the box. The bar offers the two things you can do about the link.

Inside a linked subsystem the cards of its nodes and of the relationships among them are read only. They say where the component is changed and offer Open in new window.

A node card inside the linked subsystem, marked as read only
Changes belong to the file. A relationship that crosses the boundary belongs to the model and stays editable.

If you wanted a separate copy that you can edit here, choose Detach on the subsystem's card.

Place it in another model

Start a new project, open the Add menu and choose Component from file….

The Add menu with the Component from file entry
Component from file places a saved component, or a subsystem from any project.

Choose the file. Konjugate shows what it offers before placing anything.

The review of the component, listing its port and its exposed parameter
Ports, parameters and their defaults. Tick Place as a copy if this model should not follow the file.

Press Place. To use the same component again, open its card and press Place another instance. The second box is called Battery pack 2.

Give each its own value

In the card of Battery pack 2, the exposed capacitance has a field of its own. Change it from 1000 to 4000 J/K. The first pack keeps the default.

Two linked battery packs, with the second one's card open on its exposed parameter
Each instance holds its own value for an exposed parameter. Default puts the component's value back.

Run the model for 600 seconds. Nothing is connected to either port here, so each battery simply exchanges heat with its own enclosed air.

The first pack's battery temperature over 600 seconds
At 600 s the first battery is at 303.126 K.
The second pack's battery temperature over 600 seconds
With four times the capacitance the second battery cools more slowly and is at 321.084 K.

Change the component once

Close the results. On either pack's card press Open in new window. The component file opens as a project, and a bar says what it offers.

The component file open in its own window, with a bar describing it as a component
A component file opens and runs on its own. Its ports are drawn at the sides.

Change the starting temperature of Enclosed air to 283.15 K and save. The model with the two packs takes the change in and says so.

The model with two packs reporting that Battery pack was updated from its file
Both packs now start with the cooler air. The second keeps its own 4000 J/K.

What to remember

  • Saving a component file links the subsystem you saved from to that file.
  • Keep your ports and expose your parameters before saving.
  • A linked instance is changed in the file. Detach turns it into a copy kept in your model.
  • Exposed parameters are what can differ between instances.

Some changes to a component affect what is connected to it, and a file can be moved. "Keeping linked components in step" covers both. To keep parts inside the app instead of in files of your own, see "The component library".

Follow Konjugate on LinkedIn for updates, or subscribe via RSS.

Comments