Re: Why am I getting this error?
- To: mathgroup at smc.vnet.net
- Subject: [mg60352] Re: Why am I getting this error?
- From: Paul Abbott <paul at physics.uwa.edu.au>
- Date: Wed, 14 Sep 2005 03:27:19 -0400 (EDT)
- Organization: The University of Western Australia
- References: <dg69s7$a9j$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
In article <dg69s7$a9j$1 at smc.vnet.net>, ksmath <kdsimon at uiuc.edu> wrote: > I am attempting to solve a system with 3 pde's and I keep getting this error > even though I think all of my equations have independent variables: > > NDSolve::dvnoarg: The function v appears with no arguments. > > If anyone could find the mistake in my code I would really appreciate it. > C,V, and R are the dependent variables, and t (time) and x(distance-does not > depend on time) are the independent variables. All other variables are > constants. Some comments: [1] Although your equations are impossible to read due to some mysterious symbols, the equation involving r appears to be completely decoupled from the equations involving c and v -- so solve this one first. [2] You are using the symbols r and v as subscripts as well as using them as the names of functions in the pde's. This could cause problems (unless you "symbolize" such subscripted symbols using the Notation package). [3] To use NDSolve, all parameters must resolve to numerical values. There are a number of parameters in your equations for which no numerical values are defined or implied. [4] In the NDSolve command, you are solving for functions q1 and q2 -- these are not defined. Since you are at UIUC, I suggest that you attend the upcoming Wolfram Research TechConf <http://www.wolfram.com/news/events/techconf2005/>. There will be a number of helpful sessions on solving differential equations using Mathematica. In addition, at the Training tab, you will see there are several Wolfram Education Group sessions that are likely to be of interest. Cheers, Paul > Thank you for any assistance you can provide me. > > \!\(\(rRHS\ = \ \(d\_r\) D[r[t, > x], {x, 2}] + β \((1 - \((r[t, x] - r\_base)\)/\((k\_r - > r\_base)\))\) \((r[t, x] - r\_base)\);\)\[IndentingNewLine] > \(vRHS\ = \ \(d\_v\) D[v[t, x], {x, 2}] - Ï?\ v[t, x]\ - > η\ v[t, x]\ c[t, x]/\((γ\_1 + v[t, x])\) + If[ > q\_large < q\_min, λ \((q\_large - q\_min)\), 0];\)\[IndentingNewLine] > \(\(cRHS\ = \ D[c[t, x]\ v[t, x]\ D[v[t, x], x], x] + If[v[ > t, x] â?¥ v\_g, Ï?\ v[t, x]\ c[t, > x]\ /\((γ\_2 + > v[t, x])\), Ï? \((v[t, x] - > v\_d)\) c[t, x]];\)\(\[IndentingNewLine]\) > \)\[IndentingNewLine] > \(reqn\ = D[r[t, x], t]\ == \ rRHS;\)\[IndentingNewLine] > \(veqn\ = \ D[v[t, x], t]\ == \ vRHS;\)\[IndentingNewLine] > \(ceqn\ = \ D[c[t, x], t]\ == \ cRHS;\)\) > > BC1 = Derivative[0, 1][r][t, 0] == 0; > BC2 = Derivative[0, 1][r][t, 1] == 0; > BC3 = Derivative[0, 1][v][t, 0] == 0; > BC4 = Derivative[0, 1][v][t, 1] == 0; > BC5 = c[t, 0] == 1; > BC6 = c[t, 1] v[t, 1] Derivative[0, 1][v][t, 1] == 0; > > \!\(\(c\_init = \(c\_o\) Exp \((\(-150\) x\^2)\) == c[0, > x];\)\[IndentingNewLine] > \(r\_init = \((K\_r - > r\_base)\) Exp \((\(-100\) x\^2)\) + r\_base == r[0, x];\)\ > \[IndentingNewLine] > \(v\_init = \((v\_g - v\_d)\)/\((2 v\_o)\) == v[0, x];\)\) > > \!\(\(solution\ = \ NDSolve[{reqn, \ veqn, \ ceqn, q1\_i, > q2\_i, \ c\_init, \ v\_init, \ > r\_init, \ BC1, \ BC2, \ BC3, \ BC4, \ BC5, \ BC6}, {r[t, x], v[t, > x], c[t, x], q1[t, x], q2[t, x]}, {t, 0, 1}, {x, 0, 1}];\)\) > > Any help is much appreciated. > > Katie _______________________________________________________________________ Paul Abbott Phone: 61 8 6488 2734 School of Physics, M013 Fax: +61 8 6488 1014 The University of Western Australia (CRICOS Provider No 00126G) AUSTRALIA http://physics.uwa.edu.au/~paul