# Tag Info

1

I would add that Kirchhoff's laws are conservation laws for charge and energy. Thus, the constraints are already built into your equations. You are still lacking constitutive equations for each component (resistor, capacitor, ...). I would say that in general these two elements leads one to the equations for a physical system. Regarding the numerical ...

2

The supplementary documentation of the Xyce circuit simulator contains a report titled Mathematical Formulation that details how the simulator works.

4

This is not surprising. For one, Broyden is not very stable for highly ill-conditioned nonlinear systems, and having a stiff ODE means that the nonlinear system will be ill-conditioned. This is why stiff ODE solvers don't use Broyden but use Newton iterations (well, a special form of Quasi-Newton which is Newton iteration but sometimes reusing the Jacobian a ...

1

Since performance is not a primary concern, just use the backward Euler finite difference approximation in time, full Newton method with a direct solver at each time step, and a central difference approximation to the Jacobian. Since the Jacobian is only a 2x2 matrix, a quasi-Newton solution approach is not useful.

2

From your description, exponential integrators seem to be a good fit. They are based on variation of parameters and "bake in" an exact solution for the linear part of the ODE. There are many flavors of exponential methods that are determined by the discretization of the integral term in variation of parameters. Exponential Runge--Kutta methods ...

0

CVODE is part of the SUNDIALS package, which is open source. It comes with a manual that has several hundred pages and many example codes. It is excellent software, you should use it!

3

This is a huge open ended question, but I'll copy the recommendation section from the current release of DifferentialEquations.jl: Stiff Problems For stiff problems at high tolerances (>1e-2?) it is recommended that you use Rosenbrock23 or TRBDF2. These are robust to oscillations and massive stiffness, though are only efficient when low accuracy is ...

Top 50 recent answers are included