diff options
Diffstat (limited to 'nl_examples/vs.c')
-rw-r--r-- | nl_examples/vs.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/nl_examples/vs.c b/nl_examples/vs.c new file mode 100644 index 00000000000..7d72398e297 --- /dev/null +++ b/nl_examples/vs.c @@ -0,0 +1,32 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud +/* + * vs_cs.c + * + * Voltage and current source test + * + */ + +#include "netlist/devices/net_lib.h" + +NETLIST_START(vs) + + /* Standard stuff */ + + SOLVER(Solver, 480) + PARAM(Solver.ACCURACY, 1e-6) + PARAM(Solver.METHOD, "MAT_CR") + PARAM(Solver.DYNAMIC_TS, 1) + + RES(R1, 1000) + VS(VS1, 1) + PARAM(VS1.R, 1) + PARAM(VS1.FUNC, "T 10000.0 * sin 1.0 +") + NET_C(R1.1, VS1.P) + NET_C(R1.2, VS1.N) + NET_C(GND, VS1.N) + + //LOG(tt, VS1.P) + //LOG(tt1, R1.1) + +NETLIST_END() |