Group Abstract Group Abstract

Message Boards Message Boards

0
|
8.3K Views
|
9 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Solve a system of 7 nonlinear equations with 7 variables?

Hello, everyone. I am a learner of Mathematica. I want to solve a CSTR system of 7 nonlinear equations consists of 6 mass balance equations and one energy balance with 7 variables. But NSolve can't solve and findroot doesn't give me realistic solutions. Can someone help me out? thank you.

Attachments:
POSTED BY: Jake Chen
9 Replies
Posted 6 years ago
POSTED BY: Bill Nelson

Exothermic reactions in Continuously Stir Tank Reactors exhibit multiple steady-states. One way of dealing with these types of problems is to eliminate the steady-state assumption and solve the transient Ordinary Differential Equation out to many residence times using NDSolve. The steady-state that NDSolve will find will depend on your initial and boundary conditions. You could try recasting your equations into a system of ODEs similar to what is on the last page of this PDF.

Prof. Brian Higgins has a website with many downloadable Mathematica notebooks related to chemical engineering. You may want to take a look at the nonisothermalCSTR.nb for additional ideas.

POSTED BY: Tim Laska

Thank you for your help. And I will try to use the transient equation to solve that.

POSTED BY: Jake Chen

Hi Jake,

I took another look at your problem and I think it is fundamentally ill-posed. Your reaction equations need to be linearly independent. You have 5 reactions, but only 3 are independent. You can check my reasoning below.

I am assuming that I can extract a stoichiometric matrix, $\nu$, from you combustion energy equations or

(*combustion energy*)
DELCP1[T_] := CPB[T] + CPD[T] - CPA[T] - 0.5*CPC[T]
DELCP2[T_] := 2*CPE[T] + 3*CPD[T] - CPA[T] - 3.5*CPC[T]
DELCP3[T_] := 2*CPF[T] + 3*CPD[T] - CPA[T] - 2.5*CPC[T]
DELCP4[T_] := 2*CPE[T] + 2*CPD[T] - CPB[T] - 3*CPC[T]
DELCP5[T_] := 2*CPF[T] + 2*CPD[T] - CPB[T] - 2*CPC[T]

This should lead to the following $\nu$ matrix

nu = {
  {-1, 1 , -1/2, 1, 0, 0},
  {-1, 0, -7/2, 3, 2, 0},
  {-1, 0, -5/2, 3, 0, 2},
  {0, -1, -3, 2, 2, 0},
  {0, -1, -2, 2, 0, 2}
  };

The function MatrixRank[] returns the number of linearly independent rows or columns. When applied to $\nu$, we obtain

In[7]:= MatrixRank[nu]

Out[7]= 3

Therefore, only three of you reactions are independent and you have over specified your system with 5 reactions and over constrained systems are not solvable.

POSTED BY: Tim Laska

That’s a really big problem. I have rewrite to 3 equations. You are lifesaver.

POSTED BY: Jake Chen

hey. I found 7 equations won't change even these 5 reaction are not all linearly independent since there are 6 species corresponding to 6 mass balances and 1 energy balance. But I still can reduce my 5 reactions to 3 reactions, simplifying my 7 equations.

POSTED BY: Jake Chen

Can someone help me for this problem? I will really appreciate your help.

POSTED BY: Jake Chen

Did you give FindRoot realistic starting values?

POSTED BY: Frank Kampas

I don’t know what’s the realistic starting values because it is too broad for this system. I only know the range maybe 1000-2000 for T

POSTED BY: Jake Chen
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard