[Samples] Modify surf_pfr to keep pressure constant

The structure of this calculation previously led to an apparent increase in
pressure along the length of the reactor.  This is a good example of when to use
a PressureController.
This commit is contained in:
Ray Speth 2014-07-25 18:32:34 +00:00
parent 1cd82d40af
commit 8f4ab714ac

View file

@ -94,15 +94,15 @@ for n in range(NReactors):
# are included only on the side facing the reactor.
w = ct.Wall(upstream, r, A=cat_area, kinetics=[None, surf])
# We need a valve between the reactor and the downstream reservoir. This
# will determine the pressure in the reactor. Set K large enough that the
# pressure difference is very small.
v = ct.Valve(r, downstream, K=1e-4)
# The mass flow rate into the reactor will be fixed by using a
# MassFlowController object.
m = ct.MassFlowController(upstream, r, mdot=mass_flow_rate)
# We need an outlet to the downstream reservoir. This will determine the
# pressure in the reactor. The value of K will only affect the transient
# pressure difference.
v = ct.PressureController(r, downstream, master=m, K=1e-5)
sim = ct.ReactorNet([r])
sim.max_err_test_fails = 12