Beispiel #1
0
    def __init__(
            self,
            M=10,
            Nstar=4.16,  # [rps] impeller revolutions
            phi=0.15,  # [1] holdup
            v0=0.05):
        self.D = 10  # [cm] impeller diameter
        self.Nstar = Nstar
        self.phi = phi

        # Water
        self.muc = 0.89e-2  # [P = g * cm^-1 s^-1]
        self.rhoc = 0.1  # [g/cm3]
        # Kerosene-dicholorebenzene
        self.rhod = 0.972  # [g/cm3]
        self.sigma = 42.82

        time = arange(0.0, 3600, 1)

        mm3_to_cm3 = 0.1**3
        vmax = 0.06 * mm3_to_cm3

        # Feed distribution
        self.v0 = v0 * mm3_to_cm3
        self.sigma0 = 0.005 * mm3_to_cm3

        # Feed
        theta = 600
        self.Vt = 12 * 10**3
        self.n0 = self.Vt / theta
        Ninit = zeros(M)
        MOCSolution.__init__(
            self, Ninit, time, vmax / M,
            beta=beta, gamma=self.g, Q=self.Q,
            theta=theta, n0=self.n0, A0=self.A0)
Beispiel #2
0
def test_simultaneous_breakup_and_coalescence():
    """
    Breakup + coalescence test
    """
    time = arange(0.0, 10, 0.005)
    N0 = 10000
    # Grid convergence is not applicable in this scenario
    grid = 80
    kc = 1.0
    kb = 0.25

    Ninit = zeros(grid)
    Ninit[0] = N0
    pbe_solution = MOCSolution(
        Ninit, time, 1.0,
        # Dividing coalescence coefficient by the number of monomers to make
        # formulations equivalent
        Q=lambda x, y: kc / N0,
        # Guard has to be imlemented in order to avoid division by zero
        beta=lambda x, y: 2.0 / max([y - 1.0, 1e-6]),
        gamma=lambda x: kb * (x - 1.0)
    )
    error = L2_relative_error(
        pbe_solution.xi,
        pbe_solution.number_density()[-1],
        N0 * blatz_and_tobolsky_pbe_solution(pbe_solution.xi, time[-1], kc, kb)
    )
    assert_almost_equal(error, 0.0, decimal=1)
Beispiel #3
0
    def __init__(
            self,
            dispProperties,
            contProperties,
            domainProperties,
            modelParameters=None):
        self.dispProperties = dispProperties
        self.contProperties = contProperties
        self.phi = dispProperties['phi']

        self.muc = contProperties['mu']
        self.rhoc = contProperties['rho']
        self.epsilon = contProperties['epsilon']
        self.rhod = dispProperties['rho']
        self.sigma = dispProperties['sigma']

        time = arange(0.0, 3600, 1)

        vmax = dispProperties['vMax']

        # Feed distribution
        self.v0 = dispProperties['v0']
        self.sigma0 = dispProperties['sigma0']

        # Feed
        theta = domainProperties['theta']
        M = domainProperties['M']
        self.Vt = domainProperties['V']
        if theta is None:
            self.n0 = None
        else:
            self.n0 = self.Vt / theta

        Ninit = zeros(M)

        if modelParameters is None:
            self.C1 = 0.4
            self.C2 = 0.08
            self.C3 = 2.8e-6
            self.C4 = 1.83e9
        else:
            self.C1 = modelParameters['C1']
            self.C2 = modelParameters['C2']
            self.C3 = modelParameters['C3']
            self.C4 = modelParameters['C4']

        MOCSolution.__init__(
            self, Ninit, time, vmax / M,
            beta=beta, gamma=self.g, Q=self.Q,
            theta=theta, n0=self.n0, A0=self.A0)
Beispiel #4
0
    def __init__(
            self,
            M=10,
            Nstar=4.16,  # [rps] impeller revolutions
            phi=0.15,  # [1] holdup
            vmax=0.08):
        self.D = 10  # [cm] impeller diameter
        self.Nstar = Nstar
        self.phi = phi

        # Water
        self.muc = 0.89e-2  # [P = g * cm^-1 s^-1]
        self.rhoc = 1.0  # [g/cm3]
        # Kerosene-dicholorebenzene
        self.rhod = 0.972  # [g/cm3]
        self.sigma = 42.82

        time = arange(0.0, 3600, 0.5)

        mm3_to_cm3 = 0.1**3
        vmax = vmax * mm3_to_cm3
        # vmax = 0.06 * mm3_to_cm3

        # Feed distribution
        self.v0 = vmax / 2
        self.sigma0 = (vmax - self.v0) / 3.3
        vmin = None  # 5.23e-7

        # Feed
        theta = 600
        self.Vt = 12 * 10**3
        self.n0 = self.Vt / theta
        MOCSolution.__init__(
            self, M, time, vmax / M, N0=self.N0, xi0=vmin,
            beta=beta, gamma=self.g, Q=self.Qf,
            theta=theta, n0=self.n0, A0=self.A0)
#grids = [20]
kc = 1.0
kb = 0.25
vmax = 100

pbe_solutions = dict()

start = time()
for g in grids:
    Ninit = zeros(g)
    Ninit[0] = N0
    pbe_solutions[g] = MOCSolution(
        Ninit, t, 1.0,
        # Dividing coalescence coefficient by the number of monomers to make
        # formulations equivalent
        Q=lambda x, y: kc / N0,
        # Guard has to be imlemented in order to avoid division by zero
        beta=lambda x, y: 2.0 / max([y - 1.0, 1e-6]),
        gamma=lambda x: kb * (x - 1.0)
    )
print "Time elepsed for full PBE solution: ", time() - start

Ss = dict()
start = time()
for g in grids:
    Ninit = zeros(g)
    Ninit[0] = N0
    Ss[g] = SteadyStateSolution(
        Ninit, t, 1.0,
        Q=lambda x, y: kc / N0,
        # Guard has to be imlemented in order to avoid division by zero