0
$\begingroup$

I am trying to solve a system of 3 equations and 3 unknown variables that change in time (Tw(t), Tcor(t), Texit(t)).

Clear[Tw];
Clear[Tcor];
Clear[Texit];
hb = 159.96;
hl = 45.90;
tf = 1400;
hfg = 2257.1*1000;
cpw = 4.2*1000;
ab = 0.0022765;
al = 0.030615;
Tf = 1450;
qm = 0.4474;
T0 = 298;
cpm = 4.01005*1000;

eq1 = Derivative[1][Tw][
    t] == (hb*ab*(((Tf - Tcor[t])/2) - Tw[t]) + 
      hl*al*(((Tcor[t] - Texit[t])/2) - Tw[t]) + 0.08*hfg - 
      cpw*Tw[t]*0.08)/(cpw*0.08*t);
eq2 = Derivative[1][Tcor][t] == 
   2*(-hb*ab*(((Tf - Tcor[t])/2) - Tw[t]) + qm*cpm*(Tf - T0) - 
       qm*cpm*(Tcor[t] - T0))/(cpm*qm);
eq3 = Derivative[1][Texit][t] == 
   2*(-hl*al*(((Tcor[t] - Texit[t])/2) - Tw[t]) + 
       qm*cpm*(Tcor[t] - T0) - qm*cpm*(Texit[t] - T0))/(cpm*qm);

sol = NDSolve[{eq1, eq2, eq3, Tw[0.000001] == 300, 
    Tcor[0.000001] == 750, Texit[0.000001] == 300}, 
   Tw, {t, 0.000001, 6000}, Tcor, {t, 0.000001, 6000}, 
   Texit, {t, 0.000001, 6000}];
Plot[Evaluate[Tw[t] /. sol], {t, 0.000001, 6000}] 

It is not working because 2 messages appear... a) Duplicate variable t found in the expression b) The expression is neither a list of replacement rules nor a valid dispatch table, and so cannot be used for replacing.

Although there are already a few answers about similar questions, I have no idea to solve this whatsoever.

Plus, it should also be imposed the condition of maximum Tw < 375 kelvin. As it simulates water boiling.

Thanks in advanced!

$\endgroup$
1
  • $\begingroup$ Welcome to Mathematica.SE! I hope you will become a regular contributor. To get started, 1) take the introductory tour now, 2) when you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge, 3) remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign, and 4) give help too, by answering questions in your areas of expertise. $\endgroup$
    – bbgodfrey
    Oct 11, 2021 at 17:26

1 Answer 1

0
$\begingroup$

Change the two last commands by

sol = NDSolve[{eq1, eq2, eq3, Tw[0.000001] == 300, Tcor[0.000001] == 750, Texit[0.000001] == 300}, {Tw, Tcor, Texit}, {t, 0.000001, 6000}]
Plot[Evaluate[Tw[t] /. sol], {t, 0.000001, 6000}]
$\endgroup$
2
  • $\begingroup$ I was not expecting that it was a syntax problem, thanks a lot! $\endgroup$
    – Eduardo
    Oct 12, 2021 at 9:24
  • $\begingroup$ By any chance, do you have any idea how to impose a horizontal asymptode at Tw = 375? $\endgroup$
    – Eduardo
    Oct 12, 2021 at 9:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.