Axial Dispersion open-open — rtdpy 0.6.0 documentation

# Axial Dispersion open-open

class `rtdpy.ad_oo.` `AD_oo`(tau, peclet, dt, time_end)

  Bases: `rtdpy.rtd.RTD`

  Create Axial Dispersion with open-open boundary conditions Residence Time Distribution (RTD) model. [1]

  \[\begin{split}E(t) = \frac{\sqrt{Pe}}{\tau\sqrt{4\pi\theta}} \text{exp}\left[\frac{-Pe \left(1-\theta\right)^2} {4\theta}\right]\\ \theta = t/\tau\end{split}\]
  Parameters
    tauscalar

      L/U, not the mean residence time, see tau_oo. `tau>0`

    pecletscalar

      Reactor Peclet number (L*U/D). `peclet>0`

    dtscalar

      Time step for RTD. `dt>0`

    time_endscalar

      End time for RTD. `time_end>0`

  Notes

  The mean residence time for an open-open system is not tau. Mean residence time is \(\tau_{oo} = (1+2/Pe)*\tau\).

  References

  1

    Levenspiel O., Smith W.K. (1957) Notes on the diffusion-type model for the longitudinal mixing of fluids in flow. “Chemical Engineering Science”, 6, 227-233

  Examples

      >>> import matplotlib.pyplot as plt
      >>> import rtdpy
      >>> for pe in [10, 100]:
      ...     a = rtdpy.AD_oo(tau=1, peclet=pe, dt=.01, time_end=3)
      ...     plt.plot(a.time, a.exitage, label=f"peclet={pe}")
      >>> plt.xlabel('Time')
      >>> plt.ylabel('Exit Age Function')
      >>> plt.legend()
      >>> plt.show()

  property `dt`

    Time step for RTD

  property `exitage`

    Exit age distribution for RTD

  property `exitage_norm`

    Normalized Exit Age Distribtion for RTD

  `frequencyresponse`(omegas)
    Parameters
      omegasndarray

        frequencies at which to evaluate magnitude response

    Returns
      magnitudendarray

        frequency magnitude response at omegas

  `funnelplot`(times, disturbances)

    Return maximum output signal due to square disturbances.

    Uses method from [Garcia] . Also returns meshgrid for times and disturbance inputs for ease of plotting.

    Parameters
      timesarray_like, size m

        Times to determine funnelplot

      disturbancesarray_like, size n

        Disturbance magnitudes

    Returns
      x2D meshgrid size (mxn)

        times

      y2D meshgrid size (mxn)

        disturbances

      response2D meshgrid size (mxn)

        maximum response at (x,y)

    References

    Garcia

      Garcia-Munoz S., Butterbaugh A., Leavesley I., Manley L.F., Slade D., Bermingham S. (2018) A flowhseet model for the development of a continuous process for pharmaceutical tablets: An industrial perspective. “AIChE Journal”, 64(2), 511-525.

  `integral`()

    Integral of RTD.

  `mrt`()

    Mean residence time of RTD.

  `output`(inputtime, inputsignal)

    Convolves input signal with RTD

    Parameters
      inputtimendarray

        Times of input signal, which must have same dt as RTD. Size m

      inputsignalndarray

        Input signal. Size n

    Returns
      outputsignalndarrary

        Output signal at same dt. Size m + n -1

  property `peclet`

    Peclet number.

  `sigma`()

    Variance of RTD.

  property `stepresponse`

    Step respose of RTD

  property `stepresponse_norm`

    Normalized step respose of RTD

  property `tau`

    Tau.

  property `tau_oo`

    Mean Residence Time for open-open system. Not tau for open-open.

  property `theta`

    Dimensionless time.

  property `time`

    Time points for exitage function.

  property `time_end`

    Last time point for RTD