Class ODE_RLC_circuit
- java.lang.Object
-
- ODE_RLC_circuit
-
- All Implemented Interfaces:
FirstOrderDifferentialEquations
public class ODE_RLC_circuit extends 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 Also:
- CommonsMath_ODE_RLC_circuit~Demo.jxn.
-
-
Constructor Summary
Constructors Constructor Description 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
computeDerivatives(double t, double[] y, double[] ydot)
ComputesduC/dt
anddiL/dt
.int
getDimension()
Returns the number of states(=2).
-
-
-
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
- resistanceL
- inductanceC
- capacitancelgf
- log10 of the frequency
-
-
Method Detail
-
getDimension
public int getDimension()
Returns the number of states(=2).- Specified by:
getDimension
in interfaceFirstOrderDifferentialEquations
-
computeDerivatives
public void computeDerivatives(double t, double[] y, double[] ydot)
ComputesduC/dt
anddiL/dt
.- Specified by:
computeDerivatives
in interfaceFirstOrderDifferentialEquations
-
-