Lemonergy · Studio block

Resistor

An ideal linear resistance in a conserving electrical circuit.

Implementation ID
resistor
Reviewed
2026-10-27

Behavior

Terminal voltage drives branch current through the configured resistance. Voltage is p minus n; positive current enters p.

Interface

Resistor interfaceInputs or arguments on the left, observed outputs on the right. Conserving terminals appear below the component. The tables give units and behavior.ResistorStudio blockvoltagecurrentpowerpn
Original Lemonergy interface view. Lines identify ports; they are not a completed simulation circuit.
Ports and observed outputs
NameDirectionUnitMeaning
pconservingV, AElectrical terminal: potential and charge-conserving current.
nconservingV, AElectrical terminal: potential and charge-conserving current.
voltageoutputVObserved result from the solved component or sampled controller.
currentoutputAObserved result from the solved component or sampled controller.
poweroutputWObserved result from the solved component or sampled controller.

Parameters

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

Configuration fields
ParameterUnitDefaultMeaning and limits
Resistance Ohm
resistanceOhm
ohm1Configured model parameter; the default is an initial editor value, not an operating recommendation.
Minimum 1e-09; Maximum 1000000000000

Equations and rules

  • I = (V_p - V_n) / R

Worked example

Relate current and voltage

A 1 V drop across 2 Ω implies 0.5 A.

Open the electrical circuit →

Use in a workflow

Relate current and voltage

Conserving components solve constitutive relations and node balance.

  1. Resistor: Relates current and voltage
    • resistanceOhm
Open the electrical circuit

Observe an RC time constant

An RC circuit uses source, resistor, capacitor and reference blocks.

  1. Resistor: Sets resistance
    • resistanceOhm
Open the RC example

Connected concepts

Limits and interpretation

  • The RC example includes a capacitor: transient current varies and source voltage is not always resistor voltage.
  • This generic circuit does not identify cell parameters from measurements.

Implementation sources

This reference follows Lemonergy implementation sources. Scientific articles support the linked concepts separately.

Repository: battery-design · Revision: ef9802329b75bc15bb96885f8ed5d49425106696

  • js/physical-network.js
  • js/studio-examples.js

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