Lemonergy · Studio block

AC current source

Analytic sinusoidal current, positive from p to n

Implementation ID
ac-current-source
Reviewed
2026-10-27

Behavior

Conserving component solved simultaneously with the connected network. Analytic sinusoidal current, positive from p to n

Interface

AC current source interfaceInputs or arguments on the left, observed outputs on the right. Conserving terminals appear below the component. The tables give units and behavior.AC current sourceStudio blockcurrentvoltagepowerpn
Original Lemonergy interface view. Lines identify ports; they are not a completed simulation circuit.
Ports and observed outputs
NameDirectionUnitMeaning
pterminalV; Aelectrical conserving connection; voltage across and current through the connected branch.
nterminalV; Aelectrical conserving connection; voltage across and current through the connected branch.
currentoutputARecorded current measurement from the conserving simulation.
voltageoutputVRecorded voltage measurement from the conserving simulation.
poweroutputWRecorded power measurement from the conserving simulation.

Parameters

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

Configuration fields
ParameterUnitDefaultMeaning and limits
Peak current
amplitudeA
A peak1Peak sinusoidal current before the current bias is added.
Minimum 0; Maximum 1000000
Frequency
frequencyHz
Hz1Number of sinusoidal cycles per second.
Minimum 0; Maximum 1000000
Initial phase
phaseRad
rad0Angular phase added to the sinusoid at time zero.
Minimum -1000000; Maximum 1000000
Current bias
biasA
A0Constant current added to the sinusoid.
Minimum -1000000; Maximum 1000000

Equations and rules

  • I(t) = Ibias + Ipeak sin(2π f t + phase)

Worked example

AC current source worked example

Editable first-party network. load: resistanceOhm=4. Checks below were verified in the native execution engine.

Open Studio example after release →
Numerical checks for the bundled synthetic example
OutputTime (s)Expected valueUnitAbsolute tolerance
current
target/current
0.250000000000000061A9.999999999999997e-07
voltage
target/voltage
0.25000000000000006-4V4.0000000000000345e-06
power
target/power
0.25000000000000006-4W4.000000000000008e-06

Use in a workflow

AC current source worked example

Analytic sinusoidal current, positive from p to n

  1. AC current source: Conserving component solved simultaneously with the connected network. Analytic sinusoidal current, positive from p to n
    • Use the block reference for settings and connections.
    • Implementation tested locally; public release pending.
Open Studio example after release

Connected concepts

Limits and interpretation

  • Analytic sinusoidal current, positive from p to n
  • Demonstration parameters are not calibrated hardware data. Singular or incompatible ideal constraints and unsupported state ranges stop the run.

Scientific and mathematical references

These sources explain the scientific and mathematical background. The behavior, interface and limits above define the Lemonergy implementation; a citation does not imply every model option in the source is implemented.

  1. Kirchhoff's Rules

    OpenStax, Rice University

    Technical reference · Underlying physical law or reduced-model basis; Lemonergy implementation choices and limits are documented separately.

  2. Electrical Energy and Power

    OpenStax, Rice University

    Technical reference · Underlying physical law or reduced-model basis; Lemonergy implementation choices and limits are documented separately.

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)