Wavefront_Storage module
- class Wavefront_Storage.Data_Input_Storage(**provided_input_values)
Bases:
objectThe storage object for the input varibles of a interface simulation. Calculates all the associated variables required for the simulaitons. Can be used to investigate network calcualted parameters based off input vairbles. It also stores and calculates all the interaction functions of the interface.
Is initialised using key-word arguments. All values with the provided keys are of type string. This each input variable is converterted to a Decimal value to be used for precision calculations. The possible parameters to change and their defualt values are as follows,
- Parameters:
L_impedance (String) – Characteristic impedance of the inductor, assigned to self.Inductor_Impedance (default:’100’)
L_time (String) – The time delay of the inductor in seconds, assigned to self.Inductor_Time (default:’1’)
L_length (String) – The length of the inductor in meters, assigned to self.Inductor_Length (default:’1’)
C_impedance (String) – Characteristic impedance of the capacitor, assigned to self.Capacitor_Impedance (default:’1’)
C_time (String) – The time delay of the capacitor in seconds, assigned to self.Capacitor_Time (default:’1’)
C_length (String) – The length of the capacitor in meters, assigned to self.Capacitor_Length (default:’1’)
V_source (String) – The magnitude of the initial voltage excitation in volts, assigned to self.Voltage_Souce_Magnitude (default:’1’)
number_periods (String) – The number of periods as according to Lumped-Element LC-Osscilator solution. Used to calculate the simulation stop time if provided. Overidden if ‘Simulation_stop_time’ is provided (default:’1’)
Load_impedance (String) – The magnitude of the load resistance, if left inf the load is ignored and the interface takes form of an LC-Osscilator. If a value is provided the load is considered and the self.Is_Buck flag is set to True (default:’inf’)
Simulation_stop_time (String) – The time to which the interface will be simulated. If provided it will overwrite the ‘number_periods’ simulation stop time calculation (default:’0’)
show_about (Boolean) – Indicates information about the calcualted variabels must be printed (default:True)
- Stored and Calculated Parameters:
self.Number_Periods (Decimal) - given or calcualted number of periods
self.Simulation_Stop_Time (Decimal) - given or calculated simulation stop time (s)
self.Is_Buck (bool) - if the load across the capacitor is considered or not
self.GCD (Decimal) - The greatest common denomenator of the capacitor and inductor time delays.
self.LCM (Decimal) - The lowest common multiple of the capacitor and inductor time delays.
self.Capacitor_LCM_Factor (int) - The co-factor of the capacitor time delay required to make the LCM
self.Inductor_LCM_Factor (int) - The co-factor of the inductor time delay required to make the LCM
self.is_Higher_Merging (bool) - Indicates if multiplicative merging will occur for the given simulaiton stop time
self.Number_of_Wavefronts (int) - The total number of sending and returning wavefronts calculated
self.Number_of_Layers (int) - The total number of fanout-layers simulated
self.Voltage_Souce_Magnitude (Decimal) - the magnitude of the voltage excitation (V)
self.Load_Resistance (Decimal) - the magnitude of the load resistor (Ohm)
- Stored Inductor Parameters:
self.Inductor_Inductance_Per_Length (Decimal) - the per length inductance of the inductor (H/m)
self.Inductor_Capacitance_Per_Length (Decimal) - the per length capacitance of the inductor (F/m)
self.Inductor_Length (Decimal) - the total length of the inductor (m)
self.Inductor_Total_Inductance (Decimal) - the total inductance of the inductor (H)
self.Inductor_Total_Capacitance (Decimal) - the total capacitance of the inductor (F)
self.Inductor_Velocity (Decimal) - the propagation velocity of the inductor (m/s)
self.Inductor_Time (Decimal) - the one way transit time of the inductor (s)
self.Inductor_Impedance (Decimal) - the characteristic impedance of the inductor (Ohm)
- Stored Capacitor Parameters:
self.Capacitor_Inductance_Per_Length (Decimal) - the per length inductance of the capacitor (H/m)
self.Capacitor_Capacitance_Per_Length (Decimal) - the per length capacitance of the capacitor (F/m)
self.Capacitor_Length (Decimal) - the total length of the capacitor (m)
self.Capacitor_Total_Inductance (Decimal) - the total inductance of the capacitor (H)
self.Capacitor_Total_Capacitance (Decimal) - the total capacitance of the capacitor (F)
self.Capacitor_Velocity (Decimal) - the propagation velocity of the capacitor (m/s)
self.Capacitor_Time (Decimal) - the one way transit time of the capacitor (s)
self.Capacitor_Impedance (Decimal) - the characteristic impedance of the capacitor (Ohm)
- Dictionary for Spice simulation:
SPICE_input_values (dict) - a list of altered input parameters compatible with
LTSpice_Simulator.get_Spice_Arrays().
Example use of Data_Input_Storagedata_input = Data_Input_Storage(Simulation_stop_time = '100',L_impedance = '225') print(data_input.Simulation_Stop_Time) # prints '100' print(data_input.Capacitor_Impedance) # prints '1', assigned by default. # generate the output wavefronts from the created Data_Input_Storage object: data_output = Generate_Wavefronts_Commutatively(data_input)
Advanced - change the termination function to make the circuit a RC chargerfrom Wavefront_Storage import Data_Input_Storage from Wavefront_Generation import Full_Cycle from Wavefront_Plotting import make_time_interconnect_all from copy import copy from decimal import Decimal import builtins import matplotlib.pyplot as plt # generate a data input array data_input_1 = Data_Input_Storage(L_time = '1',C_time='7') # generate interface data storage object interface_1 = Full_Cycle(data_input_1) # create a copy of data_1 data_input_2 = copy(data_input_1) # setup a new termination function R = Decimal('10') ZL = data_input_2.Inductor_Impedance def new_inductor_termination_func(V_arrive,I_arrive): V_out = I_arrive * (1/(1/R + 1/ZL)) - V_arrive*ZL/(R +ZL ) I_out = -(V_out/ZL) return V_out, I_out # replace the old termination funciton builtins.setattr(data_input_2, 'Termination_Event_Solver_Inductor',new_inductor_termination_func) # generate interface data storage object unsing the altered data_input interface_2 = Full_Cycle(data_input_2) # plot data fig_1, axes_1 = make_time_interconnect_all(interface_1) fig_2, axes_2 = make_time_interconnect_all(interface_2) fig_1.suptitle("LC - Osscilator") fig_2.suptitle("RC - Charger") axes_2['VL'].set_title("Resistor Votlage at Interconnect") axes_2['IL'].set_title("Resistor Current at Interconnect") plt.show()
- Circuit_Solver_Capacitor_Current(VL: Decimal, IL: Decimal, VC: Decimal, IC: Decimal)
Generates the current response of the capacitor to wavefront distrubances. Solves by means of the wavefront equivalent circuit.
- Parameters:
VL (Decimal) – the magnitude of the voltage disturbance from the inductor
IL (Decimal) – the magnitude of the current disturbance from the inductor
VC (Decimal) – the magnitude of the voltage disturbance from the capacitor
IC (Decimal) – the magnitude of the current disturbance from the capacitor
- Returns:
the the magnitude of the current response of the capacitor to the disturbance
- Return type:
Decimal
- Circuit_Solver_Capacitor_Source_Current(VS: Decimal)
The magnitude of the current response of the capacitor to a voltage source excitation.
- Parameters:
VS (Decimal) – magnitude of soure voltage excitation.
- Returns:
the the magnitude of the current response of the capacitor to the disturbance
- Return type:
Decimal
- Circuit_Solver_Capacitor_Source_Voltage(VS: Decimal)
The magnitude of the voltage response of the capacitor to a voltage source excitation.
- Parameters:
VS (Decimal) – magnitude of soure voltage excitation.
- Returns:
the the magnitude of the voltage response of the capacitor to the disturbance
- Return type:
Decimal
- Circuit_Solver_Capacitor_Voltage(VL: Decimal, IL: Decimal, VC: Decimal, IC: Decimal)
Generates the voltage response of the capacitor to wavefront distrubances. Solves by means of the wavefront equivalent circuit.
- Parameters:
VL (Decimal) – the magnitude of the voltage disturbance from the inductor
IL (Decimal) – the magnitude of the current disturbance from the inductor
VC (Decimal) – the magnitude of the voltage disturbance from the capacitor
IC (Decimal) – the magnitude of the current disturbance from the capacitor
- Returns:
the the magnitude of the voltage response of the capacitor to the disturbance
- Return type:
Decimal
- Circuit_Solver_Inductor_Current(VL: Decimal, IL: Decimal, VC: Decimal, IC: Decimal)
Generates the current response of the inductor to wavefront distrubances. Solves by means of the wavefront equivalent circuit.
- Parameters:
VL (Decimal) – the magnitude of the voltage disturbance from the inductor
IL (Decimal) – the magnitude of the current disturbance from the inductor
VC (Decimal) – the magnitude of the voltage disturbance from the capacitor
IC (Decimal) – the magnitude of the current disturbance from the capacitor
- Returns:
the the magnitude of the current response of the inductor to the disturbance
- Return type:
Decimal
- Circuit_Solver_Inductor_Source_Current(VS: Decimal)
The magnitude of the current response of the inductor to a voltage source excitation.
- Parameters:
VS (Decimal) – magnitude of soure voltage excitation.
- Returns:
the the magnitude of the current response of the inductor to the disturbance
- Return type:
Decimal
- Circuit_Solver_Inductor_Source_Voltage(VS: Decimal)
The magnitude of the voltage response of the inductor to a voltage source excitation.
- Parameters:
VS (Decimal) – magnitude of soure voltage excitation.
- Returns:
the the magnitude of the voltage response of the inductor to the disturbance
- Return type:
Decimal
- Circuit_Solver_Inductor_Voltage(VL: Decimal, IL: Decimal, VC: Decimal, IC: Decimal)
Generates the voltage response of the inductor to wavefront distrubances. Solves by means of the wavefront equivalent circuit.
- Parameters:
VL (Decimal) – the magnitude of the voltage disturbance from the inductor
IL (Decimal) – the magnitude of the current disturbance from the inductor
VC (Decimal) – the magnitude of the voltage disturbance from the capacitor
IC (Decimal) – the magnitude of the current disturbance from the capacitor
- Returns:
the the magnitude of the voltage response of the inductor to the disturbance
- Return type:
Decimal
- Exitation_Event_Solver_Capacitor(Wavefront_Parent_voltage: Decimal, Wavefront_Parent_current: Decimal)
The voltage and current calcualtion of the capacitive wavefront produced due to a source excitation event.
- Parameters:
Wavefront_Parent_voltage (Decimal) – voltage of the source excitation wavefront
Wavefront_Parent_current (Decimal) – current of the source excitation wavefront
- Returns:
(voltage, current) of the produced capacitive wavefront
- Return type:
Tuple (Decimal, Decimal)
- Exitation_Event_Solver_Inductor(Wavefront_Parent_voltage: Decimal, Wavefront_Parent_current: Decimal)
The voltage and current calcualtion of the inducitve wavefront produced due to a source excitation event.
- Parameters:
Wavefront_Parent_voltage (Decimal) – voltage of the source excitation wavefront
Wavefront_Parent_current (Decimal) – current of the source excitation wavefront
- Returns:
(voltage, current) of the produced inductive wavefront
- Return type:
Tuple (Decimal, Decimal)
- Self_Reflection_Event_Solver_Capacitor(Wavefront_Parent_voltage: Decimal, Wavefront_Parent_current: Decimal)
Calculates the voltage and current magnitude of a produced capcaitve wavefront due to a capacitve self-reflection event. A self-reflection event is when a wavefront form a transmission line arrives at the interface and is reflected back into itself. The Parent wavefront’s parameters are passed to this function, the self reflected child wavefront magnitudes are calculated.
- Parameters:
Wavefront_Parent_voltage (Decimal) – voltage of the parent wavefront arriving at the interface
Wavefront_Parent_current (Decimal) – current of the parent wavefront arriving at the interface
- Returns:
(voltage, current ) of child wavefront
- Return type:
Tuple
- Self_Reflection_Event_Solver_Inductor(Wavefront_Parent_voltage: Decimal, Wavefront_Parent_current: Decimal)
Calculates the voltage and current magnitude of a produced inductive wavefront due to an inductive self-reflection event. A self-reflection event is when a wavefron form a transmission line arrives at the interface and is reflected back into itself. The Parent wavefront’s parameters are passed to this function, the self reflected child wavefront magnitudes are calculated.
- Parameters:
Wavefront_Parent_voltage (Decimal) – voltage of the parent wavefront arriving at the interface
Wavefront_Parent_current (Decimal) – current of the parent wavefront arriving at the interface
- Returns:
(voltage, current ) of child wavefront
- Return type:
Tuple
- Termination_Event_Solver_Capacitor(Arriving_Voltage: Decimal, Arriving_Current: Decimal)
The voltage and current calcutation of the re-reflected wavefront produced when a capacitve wavefront reaches its termination.
- Parameters:
Arriving_Voltage (Decimal) – voltage of the wavefront arriving at the capcitor termination
Arriving_Current (Decimal) – current of the wavefront arriving at the capcitor termination
- Returns:
(voltage, current) of the re-reflected capacitve wavefront
- Return type:
Tuple (Decimal, Decimal)
- Termination_Event_Solver_Inductor(Arriving_Voltage: Decimal, Arriving_Current: Decimal)
The voltage and current calcutation of the re-reflected wavefront produced when an inductive wavefront reaches its termination.
- Parameters:
Arriving_Voltage (Decimal) – voltage of the wavefront arriving at the inductor termination
Arriving_Current (Decimal) – current of the wavefront arriving at the inductor termination
- Returns:
(voltage, current) of the re-reflected inductive wavefront
- Return type:
Tuple (Decimal, Decimal)
- Transmission_Event_Solver_Capacitor(Wavefront_Parent_voltage: Decimal, Wavefront_Parent_current: Decimal)
The voltage and current calculation of the capacitve wavefront produced due to a inductive wavefront arriving at the interface.
- Parameters:
Wavefront_Parent_voltage (Decimal) – voltage of the incident inductive wavefront
Wavefront_Parent_current (Decimal) – current of the incident inductive wavefront
- Returns:
(voltage, current) of the produced capacitve wavefront
- Return type:
Tuple (Decimal, Decimal)
- Transmission_Event_Solver_Inductor(Wavefront_Parent_voltage: Decimal, Wavefront_Parent_current: Decimal)
The voltage and current calculation of the inductive wavefront produced due to a capacitve wavefront arriving at the interface.
- Parameters:
Wavefront_Parent_voltage (Decimal) – voltage of the incident capacitve wavefront
Wavefront_Parent_current (Decimal) – current of the incident capacitve wavefront
- Returns:
(voltage, current) of the produced inductive wavefront
- Return type:
Tuple (Decimal, Decimal)
- about()
Prints out information input varibles and associated calculated variables.
- class Wavefront_Storage.Data_Interface_Storage(data_input: Data_Input_Storage, data_output_commutative: Data_Output_Storage, data_output_multiplicative: Data_Output_Storage, data_output_ordered: Data_Output_Storage_Ordered)
Bases:
objectA Dataclass that holds all simulation data for a praticular interface. Contains four data storage components that are also the initialization parameters. The best way to create this Data storage object is through
Wavefront_Generation.Full_Cycle()- Parameters:
data_input (Data_Input_Storage) – input data and calcualted parameters of the interface
data_output_commutative (Data_Output_Storage) – Data_Output_Storage object for commutative fanouts
data_output_multiplicative (Data_Output_Storage) – Data_Output_Storage object for multiplicatively merged fanouts
data_output_ordered (Data_Output_Storage_Ordered) – Chronologically ordered merged data in a linear format
make a Data_Interface_Storage object and plot it’s refelction diagrmfrom Wavefront_Generation import Full_Cycle from Wavefront_Plotting import plot_refelction_diagram import matplotlib.pyplot as plt # simulate an interface by providing key-values altered from the defaults interface_data = Full_Cycle(L_time = '3.6',C_time = '3.2',L_impedance = '300') # The interface object created stores all level of data from the simulation data_input = interface_data.data_input data_output_commutative = interface_data.data_output_commutative data_output_multiplicative = interface_data.data_output_multiplicative data_output_ordered = interface_data.data_output_ordered # plot the current reflection diagram of the interface fig, ax = plt.subplots() plot_refelction_diagram(interface_data,ax,False,stop_time='40') plt.show()
- data_input: Data_Input_Storage
- data_output_commutative: Data_Output_Storage
- data_output_multiplicative: Data_Output_Storage
- data_output_ordered: Data_Output_Storage_Ordered
- class Wavefront_Storage.Data_Output_Storage(Time: ndarray, Voltage_Interconnect_Inductor: ndarray, Current_Interconnect_Inductor: ndarray, Voltage_Interconnect_Capacitor: ndarray, Current_Interconnect_Capacitor: ndarray, Wavefronts_Sending_Inductor: ndarray, Wavefronts_Sending_Capacitor: ndarray, Wavefronts_Returning_Inductor: ndarray, Wavefronts_Returning_Capacitor: ndarray, has_merged: bool)
Bases:
objectStores data of various types of fanout diagrams after simulation. Stores information for commutatively merged fanouts, as well as, multipicatively merged fanouts.
Fanout diagrams take form of 2D numpy arrays of format Array[L,C] where L is the inductive event number and C the capacitve event number. There are a total of 9 arrays stored, one for the arrival time of each grid node, four for the current and voltage at the interconncet for the capacitor and inductor, and another four for the sending and returning wavefronts of the capacitor and inductor.
- Parameters:
Time (np.ndarray[Decimal]) – 2D numpy array of the return times of grid nodes
Voltage_Interconnect_Inductor (np.ndarray[Decimal]) – 2D numpy array of the interconnect voltage change of the inductor at a grid node
Current_Interconnect_Inductor (np.ndarray[Decimal]) – 2D numpy array of the interconnect current change of the inductor at a grid node
Voltage_Interconnect_Capacitor (np.ndarray[Decimal]) – 2D numpy array of the interconnect voltage change of the capacitor at a grid node
Current_Interconnect_Capacitor (np.ndarray[Decimal]) – 2D numpy array of the interconnect current change of the capacitor at a grid node
Wavefronts_Sending_Inductor (np.ndarray[Wavefront_Inductive]) – 2D numpy array of the wavefronts sent into the inductor at grid nodes
Wavefronts_Sending_Capacitor (np.ndarray[Wavefront_Capacitive]) – 2D numpy array of the wavefronts sent into the capacitor at grid nodes
Wavefronts_Returning_Inductor (np.ndarray[Wavefront_Inductive]) – 2D numpy array of the wavefronts returning from the inductor at grid nodes
Wavefronts_Returning_Capacitor (np.ndarray[Wavefront_Capacitive]) – 2D numpy array of the wavefronts returning from the capacitor at grid nodes
has_merged (bool) – indicates if the data stored has been multiplicatively merged or not.
Example use of Data_Output_Storage# Generate input data object from input paramters data_input = Data_Input_Storage(Simulation_stop_time = '100',L_impedance = '225') # Generate the commutative merging output data from the created Data_Input_Storage object: data_output_commutative : Data_Output_Storage = Generate_Wavefronts_Commutatively(data_input) # Get sending wavefronts of the capacitor after only commutative merging: data_output_commutative.Wavefronts_Sending_Capacitor # Generate the merged data after multiplicative merging: data_output_merged : Data_Output_Storage = Higher_Order_Merging(data_input,data_output_commutative) # Get sending wavefronts of the capacitor after multiplicative merging: data_output_merged.Wavefronts_Sending_Capacitor
- Current_Interconnect_Capacitor: ndarray
- Current_Interconnect_Inductor: ndarray
- Time: ndarray
- Voltage_Interconnect_Capacitor: ndarray
- Voltage_Interconnect_Inductor: ndarray
- Wavefronts_Returning_Capacitor: ndarray
- Wavefronts_Returning_Inductor: ndarray
- Wavefronts_Sending_Capacitor: ndarray
- Wavefronts_Sending_Inductor: ndarray
- get_interconnect_array(which_string)
A method for getting interconnect arrays with a sting enquirey.
- Parameters:
which_string (str) – possible options: [“voltage inductor”, “current inductor”, “voltage capacitor”, “current capacitor”]
- Raises:
ValueError – errors if incorrect string is given.
- Returns:
the matching interconnect array
- Return type:
np.ndarray[Decimal]
- get_returning_wavefronts_magnitudes(which_string)
A method for extracting voltage or current from returning wavefronts.
- Parameters:
which_string (str) – possible options: [“voltage inductor”, “current inductor”, “voltage capacitor”, “current capacitor”]
- Raises:
ValueError – errors if incorrect string is given.
- Returns:
Returning wavefront’s Current or Voltage magnitudes
- Return type:
np.ndarray[Decimal]
- get_sending_wavefronts_magnitudes(which_string)
A method for extracting voltage or current from sending wavefronts.
- Parameters:
which_string (str) – possible options: [“voltage inductor”, “current inductor”, “voltage capacitor”, “current capacitor”]
- Raises:
ValueError – errors if incorrect string is given.
- Returns:
Sending wavefront’s Current or Voltage magnitudes
- Return type:
np.ndarray[Decimal]
- has_merged: bool
- class Wavefront_Storage.Data_Output_Storage_Ordered(Time: ndarray, Voltage_Interconnect_Inductor: ndarray, Current_Interconnect_Inductor: ndarray, Voltage_Interconnect_Capacitor: ndarray, Current_Interconnect_Capacitor: ndarray, Wavefronts_Sending_Inductor: ndarray, Wavefronts_Sending_Capacitor: ndarray, Wavefronts_Returning_Inductor: ndarray, Wavefronts_Returning_Capacitor: ndarray, has_merged: bool, Indexes: ndarray)
Bases:
Data_Output_StorageA dataclass that stores ordered inteface output data in form of single dimenstional arrays. All the core arrays that are present in the Data_Output_Storage class are present here but in a one-dimensional chronological form.
- Parameters:
Indexes (List[Lists]) – An additonal array, indicating the grid co-ordiantes on the merged fanout structure in the order events occured. Is a single dimesional list of (L,C) coordiante lists. The inner lists take form of [L,C].
- Indexes: ndarray
- get_returning_wavefronts_magnitudes(which_string)
A method for extracting voltage or current from returning wavefronts.
- Parameters:
which_string (str) – possible options: [“voltage inductor”, “current inductor”, “voltage capacitor”, “current capacitor”]
- Raises:
ValueError – errors if incorrect string is given.
- Returns:
Returning wavefront’s Current or Voltage magnitudes
- Return type:
np.ndarray[Decimal]
- get_sending_wavefronts_magnitudes(which_string)
A method for extracting voltage or current from sending wavefronts.
- Parameters:
which_string (str) – possible options: [“voltage inductor”, “current inductor”, “voltage capacitor”, “current capacitor”]
- Raises:
ValueError – errors if incorrect string is given.
- Returns:
Sending wavefront’s Current or Voltage magnitudes
- Return type:
np.ndarray[Decimal]
- class Wavefront_Storage.Wavefront
Bases:
objectBase wavefront class. Assings basic wavefront parameters, all of Decimal type initialised to zero.
- Position_at_time(time)
Generates the position of wavefront at time-equirey. Returns False if no intercept.
- Parameters:
time (Decimal or str) – time enquirey
- Returns:
position attime enquiret
- Return type:
Decimal
- about()
Displays information anout the wavefront
- class Wavefront_Storage.Wavefront_Capacitive(Data_Input: Data_Input_Storage, Wavefront_Parent: Wavefront, is_self_reflection: bool)
Bases:
Wavefront_KinteticA wavefront travelling in the capacitor. Follows the “wavefronts create wavefronts” paradigm.
- generate_and_return()
Generates the children wavefront/s of this wavefront without directly storing them.
- Returns:
children wavefront/s
- Return type:
Tuple (Wavefront_Inductive, Wavefront_Capacitive) or Wavefront_Capacitive
- generate_and_store(Wavefront_Storage: deque)
Generates and stores wavefronts the childern wavefront in a que to be processed
- Parameters:
Wavefront_Storage (deque) – The deque of wavefronts that are actively being processed
- class Wavefront_Storage.Wavefront_Inductive(Data_Input: Data_Input_Storage, Wavefront_Parent: Wavefront, is_self_reflection: bool)
Bases:
Wavefront_KinteticA wavefront travelling in the inductor. Follows the “wavefronts create wavefronts” paradigm.
- generate_and_return()
Generates the children wavefront/s of this wavefront without directly storing them.
- Returns:
children wavefront/s
- Return type:
Tuple (Wavefront_Inductive, Wavefront_Capacitive) or Wavefront_Inductive
- generate_and_store(Wavefront_Storage)
Generates and stores wavefronts the childern wavefront in a que to be processed
- Parameters:
Wavefront_Storage (deque) – The deque of wavefronts that are actively being processed
- class Wavefront_Storage.Wavefront_Kintetic
Bases:
WavefrontAn parent class for Inductive and Capacitve wavefronts. Contains the logic for determining how wavefronts respond to particualr events.
- Exitation_Event_Solver(Wavefront_Parent_voltage, Wavefront_Parent_current)
- Merge(Wavefront_Other: Wavefront)
superimposes two wavefronts by altering the voltage and current magnitudes of this wavefront.
- Parameters:
Wavefront_Other (Wavefront) – Partner Wavefront to be merging
- Self_Reflection_Event_Solver(Wavefront_Parent_voltage, Wavefront_Parent_current)
- Termination_Event_Solver(Wavefront_Parent_voltage, Wavefront_Parent_current)
- Transmission_Event_Solver(Wavefront_Parent_voltage, Wavefront_Parent_current)
- setup_Wavefront(Wavefront_Parent: Wavefront, is_self_reflection: bool)
handles how the voltage and current of a newly produced wavefront must be assigned.
- Parameters:
Wavefront_Parent (Wavefront) – The Parent wavefront that is producing this wavefronts
is_self_reflection (bool) – if the parent wavefront is in the same wavefront as the child. Limits the need for an isinstance check.
- class Wavefront_Storage.Wavefront_Source(Data_input: Data_Input_Storage, time_start, magnitude=1)
Bases:
WavefrontClass representing switiching wavefronts of the voltage source. In this release wavefonts switching is not supported, this class used to initiated wavefronts at t=0 only.
- generate_and_store(Wavefront_Storage_Away: deque)
triggers the creation of the inital wavefronts in the inductor and capacitor. Stores them in the Wavefront_Storage. Order is important, inductive first followed by capacitive.
- Parameters:
Wavefront_Storage (deque) – Storage array for away waves