You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am unable to install libngspice.so on my LinuxMX due to some dependency problems. I installed libngspice0, but that does not work with pyspice. libngspice0-dev rises some dependency errors.
But I have installed ngspice on my system from sources and it works as expected.
So I would want to use the ngspice I compiled with pyspice but I am unable to get it to work.
I want to read external netlist and simulate it in ngspice. I have the following python script, netslist, .spiceinit in one folder:
import PySpice
from PySpice.Unit import *
from PySpice.Spice.Netlist import Circuit
from PySpice.Spice.Parser import SpiceParser
from PySpice.Spice import Simulation
Simulation.CircuitSimulator.DEFAULT_SIMULATOR = 'ngspice-subprocess'
# Load the netlist from a file
file_path = 'filtlc.cir' # replace with your file path
parser = SpiceParser(path=file_path)
# Create a circuit from the netlist
circuit = parser.build_circuit()
# Create a simulator for the circuit
simulator = circuit.simulator(temperature=25, nominal_temperature=25)
# Run the simulation
analysis = simulator.ac(start_frequency=1@u_Hz, stop_frequency=1@u_MHz, number_of_points=10, variation='dec')
# Now you can access the simulation results in the 'analysis' object
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am unable to install libngspice.so on my LinuxMX due to some dependency problems. I installed libngspice0, but that does not work with pyspice. libngspice0-dev rises some dependency errors.
But I have installed ngspice on my system from sources and it works as expected.
So I would want to use the ngspice I compiled with pyspice but I am unable to get it to work.
I want to read external netlist and simulate it in ngspice. I have the following python script, netslist, .spiceinit in one folder:
set ngbehavior=mc
I get an error:
Beta Was this translation helpful? Give feedback.
All reactions