Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #13930 > unrolled thread
| Started by | Alexei Boulbitch <Alexei.Boulbitch@iee.lu> |
|---|---|
| First post | 2013-03-26 08:05 +0000 |
| Last post | 2013-04-02 07:25 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
Re: Overdetermined NDSolve Alexei Boulbitch <Alexei.Boulbitch@iee.lu> - 2013-03-26 08:05 +0000
Re: Overdetermined NDSolve debguy <johnandsara2@cox.net> - 2013-04-02 07:25 +0000
| From | Alexei Boulbitch <Alexei.Boulbitch@iee.lu> |
|---|---|
| Date | 2013-03-26 08:05 +0000 |
| Subject | Re: Overdetermined NDSolve |
| Message-ID | <kirkri$ass$1@smc.vnet.net> |
Hello,
I am trying to model an adsorption system which depends on length, radius and time (z,r,t). I am doing total of 5 equations (mass & energy) and I have 5 variables. However, mathematica tells that my system is overdetermined.
I hope you can help me finding where I am doing wrong.
I cut the NDSolve into two to make it easier to see.
Thank you so much.
NDSolve::overdet: There are fewer dependent variables, {cg[z,r,t],cp[z,r,t],q[z,r,t],Tg[z,r,t],Tw[z,r,t]}, than equations, so the system is overdetermined. >>
NumericalSolution=NDSolve[{(1-ep)*rs*D[q[z,r,t],t]=ka*(3/rp)*(cp[z,r,t]-cpe), ec*Dz*D[cg[z,r,t],{z,2}]-vg*D[cg[z,r,t],z]=ec*D[cg[z,r,t],t]+ka*(3*(1-ec)/rp)*(cg[z,r,t]-cp[z,rp,t]), ep*D[cp[z,r,t],t]==ep*Deff*(2/r)*D[cp[z,r,t],{r,2}]-(1-ep)*rs*D[q[z,r,t],t],k*D[Tg[z,r,t],{z,2}]-ec*vg*rg*Cpg*D[Tg[z,r,t],z]-(2*hfd/rc)*(Tg[z,r,t]-Tw[z,r,t])-n*D[Tg[z,r,t],t]-Hads*rp*D[q[z,r,t],t]=0, ((ro^2)-(rc^2))*rw*Cpw*D[Tw[z,r,t],t]=2*rc*hfd*(Tg[z,r,t]-Tw[z,r,t])-2*ro*ho*(Tw[z,r,t]-T0),
My boundary conditions:
cg[z,r,0]=0, cg[0,r,t]=cginlet*(1-Exp[-(t/tao)]), Derivative[1,0,0][cg][h,r,t]=0, q[z,r,0]=0, cp[z,r,0]=0, Derivative[0,1,0][cp][z,0,t]=0,-Deff*Derivative[0,1,0][cp][z,rp,t]=ka*(3/rp)*(cg[z,r,t]-cp[z,rp,t]), Tg[z,r,0]=T0, Tg[0,r,t]=T0, Derivative[1,0,0][Tg][h,r,t]=0, Tw[z,r,0]=T0}, {cg,cp,q,Tg,Tw}, {z,0,h}, {r,0,rp}, {t,0,8000}, Method=EF=82=AE{"MethodOfLines", "SpatialDiscretization"=EF=82=AE{"TensorProductGrid", "MinPoints"=EF=82=AE150,PrecisionGoal=EF=82=AE3}}]
Hi,
One thing that should be improved in this code is the sign "==" instead of "=" in equations. I propose
in addition to write it down in a bit different form that will do them more visible:
eq1 = (1 - ep)*rs*D[q[z, r, t], t] == ka*(3/rp)*(cp[z, r, t] - cpe);
eq2 = ec*Dz*D[cg[z, r, t], {z, 2}] - vg*D[cg[z, r, t], z] ==
ec*D[cg[z, r, t], t] +
ka*(3*(1 - ec)/rp)*(cg[z, r, t] - cp[z, rp, t]);
eq3 = ep*D[cp[z, r, t], t] ==
ep*Deff*(2/r)*D[cp[z, r, t], {r, 2}] - (1 - ep)*rs*D[q[z, r, t], t];
eq4 = k*D[Tg[z, r, t], {z, 2}] -
ec*vg*rg*Cpg*
D[Tg[z, r, t], z] - (2*hfd/rc)*(Tg[z, r, t] - Tw[z, r, t]) -
n*D[Tg[z, r, t], t] - Hads*rp*D[q[z, r, t], t] == 0;
eq5 = ((ro^2) - (rc^2))*rw*Cpw*D[Tw[z, r, t], t] ==
2*rc*hfd*(Tg[z, r, t] - Tw[z, r, t]) - 2*ro*ho*(Tw[z, r, t] - T0);
cond1 = cg[z, r, 0] == 0;
cond2 = cg[0, r, t] == cginlet*(1 - Exp[-(t/tao)]);
cond3 = Derivative[1, 0, 0][cg][h, r, t] == 0;
cond4 = q[z, r, 0] == 0;
cond5 = cp[z, r, 0] == 0;
cond6 = Derivative[0, 1, 0][cp][z, 0, t] == 0;
cond7 = -Deff*Derivative[0, 1, 0][cp][z, rp, t] ==
ka*(3/rp)*(cg[z, r, t] - cp[z, rp, t]);
cond8 = Tg[z, r, 0] == T0;
cond9 = Tg[0, r, t] == T0;
cond10 = Tw[z, r, 0] == T0;
cond11 = Derivative[1, 0, 0][Tg][h, r, t] == 0;
nS = NDSolve[{eq1, eq2, eq3, eq4, cond1, cond2, cond5, cond7,
cond11}, {cg, cp, q, Tg, Tw}, {z, 0, h}, {r, 0, rp}, {t, 0, 80},
Method -> {"MethodOfLines",
"SpatialDiscretization" -> {"TensorProductGrid",
"MinPoints" -> 150, PrecisionGoal -> 3}}]
Mathematica interpreted several conditions (cond3, cond4, cond6, cond8, cond9 and cond10) as identities. Since I have no idea of the physics behind, I cannot decide, if these are necessary, or excessive, and what to do with them, if they are needed. I, therefore, simply omitted them.
It seems that in the present form Mathematica may start solving the system, provided you feed it with the numerical data, such as h, T0, tao etc.
Have fun and success,
Alexei
Alexei BOULBITCH, Dr., habil.
IEE S.A.
ZAE Weiergewan,
11, rue Edmond Reuter,
L-5326 Contern, LUXEMBOURG
Office phone : +352-2454-2566
Office fax: +352-2454-3566
mobile phone: +49 151 52 40 66 44
e-mail: alexei.boulbitch@iee.lu
[toc] | [next] | [standalone]
| From | debguy <johnandsara2@cox.net> |
|---|---|
| Date | 2013-04-02 07:25 +0000 |
| Message-ID | <kje15p$gvo$1@smc.vnet.net> |
| In reply to | #13930 |
it tells me "options expected beyond position 4 instead of {t,0,80}"
even with no options. I can't Part it out why it. Unless cut & paste
put in something I don't see.
oh well. maybe i need constants defined other than rp and h.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web