Added extra args to transmission line electric and magnetic updates. These are not required but makes the update functions match other sources.

这个提交包含在:
Craig Warren
2016-08-04 15:54:14 +01:00
父节点 aa6f6fdecd
当前提交 98b51d6c2e

查看文件

@@ -294,11 +294,13 @@ class TransmissionLine(Source):
waveform = next(x for x in G.waveforms if x.ID == self.waveformID) waveform = next(x for x in G.waveforms if x.ID == self.waveformID)
self.current[self.srcpos - 1] += (c * G.dt / self.dl) * waveform.amp * waveform.calculate_value(time - 0.5 * G.dt, G.dt) * (1 / self.resistance) self.current[self.srcpos - 1] += (c * G.dt / self.dl) * waveform.amp * waveform.calculate_value(time - 0.5 * G.dt, G.dt) * (1 / self.resistance)
def update_electric(self, abstime, Ex, Ey, Ez, G): def update_electric(self, abstime, updatecoeffsE, ID, Ex, Ey, Ez, G):
"""Updates electric field value in the main grid from voltage value in the transmission line. """Updates electric field value in the main grid from voltage value in the transmission line.
Args: Args:
abstime (float): Absolute time. abstime (float): Absolute time.
updatecoeffsE (memory view): numpy array of electric field update coefficients.
ID (memory view): numpy array of numeric IDs corresponding to materials in the model.
Ex, Ey, Ez (memory view): numpy array of electric field values. Ex, Ey, Ez (memory view): numpy array of electric field values.
G (class): Grid class instance - holds essential parameters describing the model. G (class): Grid class instance - holds essential parameters describing the model.
""" """
@@ -321,11 +323,13 @@ class TransmissionLine(Source):
elif self.polarisation is 'z': elif self.polarisation is 'z':
Ez[i, j, k] = - self.voltage[self.antpos] / G.dz Ez[i, j, k] = - self.voltage[self.antpos] / G.dz
def update_magnetic(self, abstime, Hx, Hy, Hz, G): def update_magnetic(self, abstime, updatecoeffsH, ID, Hx, Hy, Hz, G):
"""Updates current value in transmission line from magnetic field values in the main grid. """Updates current value in transmission line from magnetic field values in the main grid.
Args: Args:
abstime (float): Absolute time. abstime (float): Absolute time.
updatecoeffsH (memory view): numpy array of magnetic field update coefficients.
ID (memory view): numpy array of numeric IDs corresponding to materials in the model.
Hx, Hy, Hz (memory view): numpy array of magnetic field values. Hx, Hy, Hz (memory view): numpy array of magnetic field values.
G (class): Grid class instance - holds essential parameters describing the model. G (class): Grid class instance - holds essential parameters describing the model.
""" """