@6:32, if the 'xa' is mole fraction, then you should have an extra total concentration 'C' term with the reaction term in the equation, since your reaction is second order. You may have left it out since it is equal to 1, but maybe it should be included in the code if someone wanted to change the total concentration value.
@apm3 жыл бұрын
Yes, you are correct. It is cancelled out from the right and left hand side of the equations. As long as the total concentration is constant (not necessarily 1) then it can cancel out of the equation.
@umaRFTW3 жыл бұрын
@@apm Sorry, I think I am misunderstanding. The left hand side has 1 C term (derived nA with the formulas you have given), whereas the right hand side has C^2. C is constant, but only 1 of the C are eliminated. This would mean that there is 1 C remaining on the RHS, and if the total concentration =/= 1, then this would have an impact on the mole fraction profiles. Is this true?
@umaRFTW3 жыл бұрын
C_A = C * x_A, this is the equation I am using. Since the RHS reaction equations both are second order, then C_A and C_B would both yield a 'C' term each.
@apm3 жыл бұрын
Thanks, you are right with the two concentrations in the reaction. If it is a first order reaction then they cancel.
@donharrold1375 Жыл бұрын
Didn’t see the point in the linearised function? What advantage do you get from that?
@apm Жыл бұрын
Much of control system theory is built upon linear analysis such as stability analysis, model predictive control, etc. Here is are a few of the representations of the CSTR in linearized state space and transfer function form: apmonitor.com/che436/index.php/Main/CaseStudyCSTR
@cesurc79778 жыл бұрын
very benefical course. thanks for your sharing and precious expression.
@apm8 жыл бұрын
+berna berna you are welcome. Thanks for the positive feedback!
@apm8 жыл бұрын
+APMonitor.com And great cover photo of Delicate Arch in Utah - it is just a short drive away from me.
@angiemar882 жыл бұрын
What if the density changes and the outlet flowarte is unknown, how do you calculate it ?
@apm2 жыл бұрын
Try starting with the original balance equations and simplicity from there. apmonitor.com/pdc/index.php/Main/PhysicsBasedModels
@angiemar882 жыл бұрын
@@apm thank you very much for your reply! however in this example the outlet volumetric flow rate is fixed, what if it is unknown? I have a specific example in mind, an isothermal, isobaric dynamic cstr where gas phase reactions take place (density is not constant but can be calculated from the ideal gas assumption). To find the outlet volumetric flow rate we'd need an extra equation and I don't know what it would be
@apm2 жыл бұрын
@@angiemar88 the outlet is either dependent on the height of the liquid or a valve position. If it is dependent on the height of the liquid then use Bernoulli's equation to define the equation for the outlet flow. If it is a valve then use the valve equations: apmonitor.com/pdc/index.php/Main/FlowValves
@shraiygupta79674 жыл бұрын
Hello, great video. I had one question. When you solve for all of your mole fractions, how would you revert them back into concentrations? Do u just divide by the total volume of the CSTR reactor?
@apm4 жыл бұрын
You can convert back to concentration with ci = n * yi / V where n is the total number of mole, yi is the mole fraction, V is the Volume, and ci is the concentration of species i.
@maanvimaheshwari31544 жыл бұрын
Showing error in line 6 column 19 related to parenthesis, not able to figure out, help.
@apm4 жыл бұрын
You can download the CSTR source from here: apmonitor.com/che436/index.php/Main/CaseStudyCSTR
@tubisbendotato9 жыл бұрын
Great video Professor, I need an help: how i manage a discrete variation in time of xa_in ? I'm working on a model with n CSTR in series and a PID controlled concentration at the inlet. So, I have an array of xa_in controlled values in time (every 30 seconds), is it possible to feed the ODE with xa_in changing in time? I tried to fit xa_in(t) with a continuous function (declared as a nested function) but in this way I lose accuracy and automation, cause every time I change PID gains I have to fit xa_in(t) with a new function. Thank you.
@apm9 жыл бұрын
+Andrea Canali At 15:55 you'll see the ode call to solve the differential equation. If ca_in needs to change in time then I'd recommend setting up a loop with the ode integrator call inside. Every loop could be 30 seconds of simulation with different values of ca_in. Additional CSTR resources are here: apmonitor.com/che436/index.php/Main/CaseStudyCSTR
@marsearth50603 жыл бұрын
Is the cstr in steady state or insteady state?
@apm3 жыл бұрын
It starts at steady state and then changes to unsteady state when there is a change to the cooling jacket temperature.
@morakaeugene6 жыл бұрын
How do i model this one the dynamics of adiabatic flash tank process the main objective is to analyze the time it takes the temperature of the drum to reach steady state
@apm6 жыл бұрын
You should start with balance equations and VLE equations. Here is a tutorial on simulating these systems. apmonitor.com/pdc/index.php/Main/Physics
@halilozen74 Жыл бұрын
i've wrote the exact same thing as you but i get "it requires more input arguments to run" error. Can it give an error because of the matlab version or something or what am i doing wrong i really need to make this work
@halilozen74 Жыл бұрын
and at the ode part i get "unrecognized function or variable 'cstr' " error
@apm Жыл бұрын
Here is additional information that may help: apmonitor.com/che436/index.php/Main/CaseStudyCSTR
@apm Жыл бұрын
Try this models: apmonitor.com/che436/uploads/Main/sp5_files.zip Close MATLAB and double click to open the Simulink Model file. It is likely a problem with your run directory path.
@halilozen74 Жыл бұрын
@@apm thank you so much I will try that.
@juliasim169110 жыл бұрын
Hi, first of all, excellent videos that you upload to your channel. A simple question. What's the benefits of using the linear equations instead nonlinear?
@apm10 жыл бұрын
I mostly like to work with nonlinear models directly. However, if the linear model is a sufficiently accurate representation of the process over a limited range, it may be useful for linear systems techniques for stability analysis, PID controller tuning correlations, controllability and observability analysis, and for Linear Model Predictive Control (most industrial implementations). There are other reasons to linearize to analyze a system but I would certainly recommend working with the nonlinear model directly if possible.
@juliasim169110 жыл бұрын
Thanks Professor
@emmanuelda58229 жыл бұрын
Prof., Please i need your help, how do i model a cooling problem in matlab using an Model Reference Adaptive Control (MRAC) or model reference adaptive system (MRAS). Mathematically, i am applying control to the Newton's Law of Cooling. Thank you.
@apm9 жыл бұрын
Emmanuel, check out the dynamic optimization course at apmonitor.com/do You'll see methods to do adaptive Moving Horizon Estimation and Model Predictive Control.
@emmanuelda58229 жыл бұрын
+APMonitor.com Thanks Prof. Am currently studying it.
@kanagaraja10935 жыл бұрын
If I run it, It shows error in 7th line.
@apm5 жыл бұрын
Could you include the error message? Make sure you unzip the archive and change your run directory to that folder so that it can find the required files.
@kanagaraja10935 жыл бұрын
How can I do this? Any video for this problem?
@kanagaraja10935 жыл бұрын
Error in ode15s (line148) (neq, tspan, ntspan, next, t0, etc....) Error in main (line 7) [t1,xa1] = ode15s(@(t,x)cstr(t,x,xa_in),[0 5],xa);
@kanagaraja10935 жыл бұрын
Sorry.. We are new to Matlab. We change the directory... Anyway thanks for the instructions
@kanagaraja10935 жыл бұрын
Not enough input arguments. cstr_linear(t, xa, xa_in)
@opetal97768 жыл бұрын
kindly share the matlab code you use
@apm8 жыл бұрын
+opetal Sure, here is the code and some additional examples: apmonitor.com/che436/index.php/Main/CaseStudyCSTR and apmonitor.com/do/index.php/Main/NonlinearControl (Python, MATLAB, and Simulink).
@joaovitorpaiva66257 жыл бұрын
You could be a little more didatic, man
@apm7 жыл бұрын
Here is additional content on the CSTR solution: apmonitor.com/che436/index.php/Main/CaseStudyCSTR