DC current

An ideal constant current source.

  • electrical
  • Modelica Standard Library
  • 2 ports
  • 1 parameter
BlockDC currentKinddcCurrentLibraryElectrical

Description

An ideal constant current source.

Example

Electrical sources Every voltage and current source driving a resistor, each with a voltmeter across it.

DC 12 VLoad A 12 Ωv AGround ADC 1 ALoad B 10 Ωv BGround BSine 10 VLoad C 10 Ωv CGround CSine 1 ALoad D 10 Ωv DGround DRamp 10 VLoad E 10 Ωv EGround EPulse 5 VLoad F 10 Ωv FGround F3 sin(2π·50t)Signal voltageLoad G 10 Ωv GGround G0.5Signal currentLoad H 10 Ωv HGround H
In Gradara, select a DC current block and press F1, then choose Open example. It opens as a new model in My models, ready to run.

Also in this example:DC voltageVoltage sensorConstantGroundSine waveResistorAC voltageAC currentRamp voltagePulse voltageControlled voltageControlled current

Ports

Conserving terminals 2

  • +p

    Positive pin. The source current I flows into p, through the source, and out of n.

  • −n

    Negative pin. The current I leaves the source here into the external circuit.

Parameters

  • CurrentI1 A

    Current, in amperes. Any real number.

Equations

Modelica
p.i = I
p.i + n.i = 0

Implementation

Modelica Standard Library 4.1.0Modelica.Electrical.Analog.Sources.ConstantCurrent
MSL documentation

Assumptions and limitations

  • No voltage limit: the source produces whatever voltage the load requires.

Tips

  • The direction follows the Modelica convention: a positive I pushes current out of n. Flip the pins, or the sign of I, if it runs the wrong way.
  • Never leave it open or in series with an ideal switch that can open; its voltage is then undefined.

See also

Select a block in Gradara and press F1 to open its page offline.