Exemple #1
0
 def dP_dz(P, L, acc=False):
     s.flash(P=float(P), Hm=s.Hm)
     dPf = one_phase_dP(m=s.m, rho=s.rhog, mu=s.rhog, D=D, roughness=0, L=1)
 
     if acc:
         G = 4.0*s.m/(np.pi*D*D)
         der = s.VolumeGasMixture.property_derivative_P(P=s.P, T=s.T, zs=s.zs, ws=s.ws)
         der = 1/Vm_to_rho(der, s.MW)
         factor = G*G*der
         dP = dPf/(1.0 + factor)
         return -dP
     return -dPf
Exemple #2
0
def test_one_phase_dP():
    dP = one_phase_dP(10.0, 1000, 1E-5, .1, L=1)
    assert_allclose(dP, 63.43447321097365)