Skip to content

Instantly share code, notes, and snippets.

@ra3xdh
Created June 30, 2017 13:28
Show Gist options
  • Save ra3xdh/e0aa16146f1e03b17d9b5f5de9c75d83 to your computer and use it in GitHub Desktop.
Save ra3xdh/e0aa16146f1e03b17d9b5f5de9c75d83 to your computer and use it in GitHub Desktop.
Netlist for sample RC schematic
* Qucs 0.0.19 /home/vvk/.qucs/RC.sch
* Start of parameters section
* Parameters and directives such as .INCLUDE are placed here
.PARAM Rs=1k
.PARAM Cp=1000p
* End of paprameters section
* Components
C1 0 out {CP}
V1 in 0 DC 0 SIN(0 1 1000K 0 0) AC 1
R1 in out {RS}
* End of components
* Simulations represented as Nutmeg scripts
.control
* Initial commands. Clear some simultion outputs
echo "" > spice4qucs.cir.noise
echo "" > spice4qucs.cir.pz
*End of initial commands
*Duplicate parameters here (taken from Eqn1 component)
let Rs=1k
let Cp=1000p
*Transient simulation
tran 2.997e-09 3e-06 0
*Postrporcessor equations from Eqn1
let Vr=V(in)-V(out)
*Write output file. Unique file for each simulation.
write RC_tran.txt v(in) v(out) Vr
*Closing
destroy all
reset
*Repeat previous sections for each simulation
*The next is AC
let Rs=1k
let Cp=1000p
ac lin 1000 1 1000k
let K=V(out)/V(in)
write RC_ac.txt v(in) v(out) K
destroy all
reset
*End of netlist
exit
.endc
.END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment