def __init__(self, timer, t_start=1.0*units.seconds, t_end=2.0*units.seconds, rho_init=0.0*units.delta_k, rho_rise=1.0*units.delta_k, rho_final=1.0*units.delta_k): self.t_end = validation.validate_g('t_end', t_end, t_start) self.t_start = t_start self.rho_init = rho_init self.rho_rise = rho_rise self.rho_final = rho_final ReactivityInsertion.__init__(self, timer=timer)
def __init__(self, t0=0.0*units.seconds, tf=1.0*units.seconds, dt=1.0*units.seconds, t_feedback=0.0*units.seconds): """Initialize the timer object. There should be only one. :param t0: first times in the simulation :type t0: float, units of seconds :param tf: last time in the simulation :type tf: float, units of seconds :param dt: size of the timestep :type dt: float, units of seconds """ self.t0 = validation.validate_ge("t0", t0, 0.0*units.seconds) self.t_feedback = validation.validate_ge("t_feedback", t_feedback, t0) self.tf = validation.validate_ge("tf", tf, t_feedback) self.dt = validation.validate_g("dt", dt, 0.0*units.seconds) self.series = units.Quantity(np.linspace(start=t0.magnitude, stop=tf.magnitude, num=self.timesteps()), 'seconds') self.ts = 0 self.t_idx_feedback = self.t_idx(t_feedback)
def __init__(self, t0=0.0 * units.seconds, tf=1.0 * units.seconds, dt=1.0 * units.seconds, t_feedback=0.0 * units.seconds): """Initialize the timer object. There should be only one. :param t0: first times in the simulation :type t0: float, units of seconds :param tf: last time in the simulation :type tf: float, units of seconds :param dt: size of the timestep :type dt: float, units of seconds """ self.t0 = validation.validate_ge("t0", t0, 0.0 * units.seconds) self.t_feedback = validation.validate_ge("t_feedback", t_feedback, t0) self.tf = validation.validate_ge("tf", tf, t_feedback) self.dt = validation.validate_g("dt", dt, 0.0 * units.seconds) self.series = units.Quantity( np.linspace(start=t0.magnitude, stop=tf.magnitude, num=self.timesteps()), 'seconds') self.ts = 0 self.t_idx_feedback = self.t_idx(t_feedback)