Class ODE_RLC_circuit

java.lang.Object
  extended by ODE_RLC_circuit
All Implemented Interfaces:
FirstOrderDifferentialEquations

public class ODE_RLC_circuit
extends java.lang.Object
implements FirstOrderDifferentialEquations

Example of a system of first order differential equations (ODEs): Transient response of a series RLC circuit.

i = iR = iL = iC ;   duC/dt = iC/C ;   diL/dt = uL/L ;   uR = R·iR ;   uL = cos 2 π f t - uC - uR ;

See CommonsMath_ODE_RLC_circuit~Demo.jxn.


Constructor Summary
ODE_RLC_circuit(double R, double L, double C, double lgf)
          Stores the parameters of the RLC circuit and the frequency of the sinusodial voltage source.
 
Method Summary
 void computeDerivatives(double t, double[] y, double[] ydot)
          Computes duC/dt and diL/dt.
 int getDimension()
          Returns the number of states(=2).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ODE_RLC_circuit

public ODE_RLC_circuit(double R,
                       double L,
                       double C,
                       double lgf)
Stores the parameters of the RLC circuit and the frequency of the sinusodial voltage source.

Parameters:
R - resistance
L - inductance
C - capacitance
lgf - log10 of the frequency
Method Detail

getDimension

public int getDimension()
Returns the number of states(=2).

Specified by:
getDimension in interface FirstOrderDifferentialEquations

computeDerivatives

public void computeDerivatives(double t,
                               double[] y,
                               double[] ydot)
Computes duC/dt and diL/dt.

Specified by:
computeDerivatives in interface FirstOrderDifferentialEquations