State Space Stirred Reactor

The exercise involves creating a dynamic model based on balance equations, linearizing, and putting the equations into state space form. A reactor is used to convert a hazardous chemical A to an acceptable chemical B in waste stream before entering a nearby lake. This particular reactor is dynamically modeled as a Continuously Stirred Tank Reactor (CSTR) with a simplified kinetic mechanism that describes the conversion of reactant A to product B with an irreversible and exothermic reaction.

Linearize species and energy balances that describe the dynamic response in concentration and temperature of a well-mixed vessel with constant volume V = 10 m3, volumetric flow q = 5 m3/min, feed temperature Tf = 300 K, initial concentration Ca0 = 0.5 mol/L, and initial temperature T0 = 305 K. The chemical A is converted to chemical B with first order reaction kinetics rA = 0.5 Ca. The reaction is exothermic with a heat of reaction of 10 J/mol. The following species and energy balances represent the reactor concentration and temperature.

dCadt=qV(CafCa)rA

dTdt=qV(TfT)+ΔHrrA

See model simulation help for information on simulating transfer function, state space, and general nonlinear models. Put the resulting model into state space form by filling in following numbers of the starting script.

# Linearized equation non-zero elements
A[0,0] = ### fill-in value ###
B[0,0] = ### fill-in value ###
A[1,0] = ### fill-in value ###
A[1,1] = ### fill-in value ###

Compare the state space model response to the numerical integration shown below with a step changes Caf from 1.0 mol/L to 0.9 mol/L. Fill in the A and B state space matrices in the Python script.

Streaming Chatbot
💬