MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

I have put "==" in every equation I have in NDSolve, why it keeps telling me they are not equations

  • To: mathgroup at smc.vnet.net
  • Subject: [mg44570] I have put "==" in every equation I have in NDSolve, why it keeps telling me they are not equations
  • From: Xiaochao Xu <xiaochao at physics.ucsb.edu>
  • Date: Fri, 14 Nov 2003 04:43:17 -0500 (EST)
  • Organization: University of California, Santa Barbara
  • References: <bmqplo$rhb$1@smc.vnet.net> <bmt8eg$87l$1@smc.vnet.net> <3FB43093.4000104@physics.ucsb.edu>
  • Sender: owner-wri-mathgroup at wolfram.com

NDSolve::deqn: "Equation or list of equations expected instead of 0 in the \
first argument

------------------------------------------------------------------------

(************** Content-type: application/mathematica **************
                     CreatedBy='Mathematica 5.0'

                    Mathematica-Compatible Notebook

This notebook can be used with any Mathematica-compatible
application, such as Mathematica, MathReader or Publicon. The data
for the notebook starts with the line containing stars above.

To get the notebook into a Mathematica-compatible application, do
one of the following:

* Save the data starting with the line of stars above into a file
  with a name ending in .nb, then open the file inside the
  application;

* Copy the data starting with the line of stars above to the
  clipboard, then use the Paste menu command inside the application.

Data for notebooks contains only printable 7-bit ASCII and can be
sent directly in email or through ftp in text mode.  Newlines can be
CR, LF or CRLF (Unix, Macintosh or MS-DOS style).

NOTE: If you modify the data for this notebook not in a Mathematica-
compatible application, you must delete the line below containing
the word CacheID, otherwise Mathematica-compatible applications may
try to use invalid cache data.

For more information on notebooks and Mathematica-compatible 
applications, contact Wolfram Research:
  web: http://www.wolfram.com
  email: info at wolfram.com
  phone: +1-217-398-0700 (U.S.)

Notebook reader applications are available free of charge from 
Wolfram Research.
*******************************************************************)

(*CacheID: 232*)


(*NotebookFileLineBreakTest
NotebookFileLineBreakTest*)
(*NotebookOptionsPosition[      8798,        217]*)
(*NotebookOutlinePosition[      9438,        239]*)
(*  CellTagsIndexPosition[      9394,        235]*)
(*WindowFrame->Normal*)



Notebook[{

Cell[CellGroupData[{
Cell[BoxData[
    \(c = 100.0; \[Omega] = 100.0\)], "Input"],

Cell[BoxData[
    \(100.`\)], "Output"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
    \(NDSolve[{\[PartialD]\_t u[t, x, y] + 
            Cos[x]*Sin[y]*\[PartialD]\_x u[t, x, y] - 
            Sin[x]*Cos[y]*\[PartialD]\_y u[t, x, y] - 
            Sin[x]*Sin[y]*u[t, x, y] + Cos[x]*Cos[y]*v[t, x, y] - 
            Sin[x]*Cos[x]/c2*
              p[t, x, y] == \(-\[PartialD]\_x p[t, x, 
                y]\), \ \[IndentingNewLine]\[IndentingNewLine]\[PartialD]\_t 
                v[t, x, y] + Cos[x]*Sin[y]*\[PartialD]\_x v[t, x, y] - 
            Sin[x]*Cos[y]*\[PartialD]\_y v[t, x, y] - 
            Cos[x]*Cos[y]*u[t, x, y] + Sin[x]*Sin[y]*v[t, x, y] - 
            Sin[y]*Cos[y]/c2*
              p[t, x, y] == \(-\[PartialD]\_y p[t, x, 
                y]\), \[IndentingNewLine]\[IndentingNewLine]\[PartialD]\_t p[
                t, x, y] + 
            c2*\((\[PartialD]\_x u[t, x, y] + \[PartialD]\_y v[t, x, y])\) + 
            Cos[x]*Sin[y]*\[PartialD]\_x p[t, x, y] == 
          Sin[x]*Cos[
              y]*\[PartialD]\_y p[t, x, 
                y], \[IndentingNewLine]\[IndentingNewLine]u[0, x, y] \[Equal] 
          0, v[0, x, y] == 0, p[0, x, y] == 0, 
        u[t, 0, y] == 
          Cos[\[Omega]*t]*\((1 - Exp[\(-t\)/0.1])\)*DiracDelta[y]\ , 
        v[t, 0, y] == 0, 
        p[t, 0, y] == 
          Sin[\[Omega]*t]*\((1 - Exp[\(-t\)/0.1])\)*DiracDelta[y], \ 
        u[t, x, 1000] == 0, v[t, x, 1000] == 0, p[t, x, 1000] == 0, 
        u[t, x, \(-1000\)] == 0, v[t, x, \(-1000\)] == 0, 
        p[t, x, \(-1000\)] == 0}, {u, v, p}, {x, 0, 100}, {y, \(-1\), 1}, {t, 
        0, 1000}]\)], "Input"],

Cell[BoxData[
    RowBox[{\(NDSolve::"deqn"\), \(\(:\)\(\ \)\), "\<\"Equation or list of \
equations expected instead of \\!\\(0\\) in the first argument \\!\\({\\(\
\[LeftSkeleton] 1 \[RightSkeleton]\\)}\\). \\!\\(\\*ButtonBox[\\\"More\
\[Ellipsis]\\\", ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, \
ButtonData:>\\\"NDSolve::deqn\\\"]\\)\"\>"}]], "Message"],

Cell[BoxData[
    RowBox[{"NDSolve", "[", 
      RowBox[{
        RowBox[{"{", 
          RowBox[{
            RowBox[{
              
              RowBox[{\(\(-0.0001`\)\ Cos[x]\ p[t, x, y]\ Sin[x]\), 
                "-", \(Sin[x]\ Sin[y]\ u[t, x, y]\), 
                "+", \(Cos[x]\ Cos[y]\ v[t, x, y]\), "-", 
                RowBox[{\(Cos[y]\), " ", \(Sin[x]\), " ", 
                  RowBox[{
                    SuperscriptBox["u", 
                      TagBox[\((0, 0, 1)\),
                        Derivative],
                      MultilineFunction->None], "[", \(t, x, y\), "]"}]}], 
                "+", 
                RowBox[{\(Cos[x]\), " ", \(Sin[y]\), " ", 
                  RowBox[{
                    SuperscriptBox["u", 
                      TagBox[\((0, 1, 0)\),
                        Derivative],
                      MultilineFunction->None], "[", \(t, x, y\), "]"}]}], 
                "+", 
                RowBox[{
                  SuperscriptBox["u", 
                    TagBox[\((1, 0, 0)\),
                      Derivative],
                    MultilineFunction->None], "[", \(t, x, y\), "]"}]}], 
              "\[Equal]", 
              RowBox[{"-", 
                RowBox[{
                  SuperscriptBox["p", 
                    TagBox[\((0, 1, 0)\),
                      Derivative],
                    MultilineFunction->None], "[", \(t, x, y\), "]"}]}]}], 
            ",", 
            RowBox[{
              
              RowBox[{\(\(-0.0001`\)\ Cos[y]\ p[t, x, y]\ Sin[y]\), 
                "-", \(Cos[x]\ Cos[y]\ u[t, x, y]\), 
                "+", \(Sin[x]\ Sin[y]\ v[t, x, y]\), "-", 
                RowBox[{\(Cos[y]\), " ", \(Sin[x]\), " ", 
                  RowBox[{
                    SuperscriptBox["v", 
                      TagBox[\((0, 0, 1)\),
                        Derivative],
                      MultilineFunction->None], "[", \(t, x, y\), "]"}]}], 
                "+", 
                RowBox[{\(Cos[x]\), " ", \(Sin[y]\), " ", 
                  RowBox[{
                    SuperscriptBox["v", 
                      TagBox[\((0, 1, 0)\),
                        Derivative],
                      MultilineFunction->None], "[", \(t, x, y\), "]"}]}], 
                "+", 
                RowBox[{
                  SuperscriptBox["v", 
                    TagBox[\((1, 0, 0)\),
                      Derivative],
                    MultilineFunction->None], "[", \(t, x, y\), "]"}]}], 
              "\[Equal]", 
              RowBox[{"-", 
                RowBox[{
                  SuperscriptBox["p", 
                    TagBox[\((0, 0, 1)\),
                      Derivative],
                    MultilineFunction->None], "[", \(t, x, y\), "]"}]}]}], 
            ",", 
            RowBox[{
              RowBox[{
                RowBox[{\(Cos[x]\), " ", \(Sin[y]\), " ", 
                  RowBox[{
                    SuperscriptBox["p", 
                      TagBox[\((0, 1, 0)\),
                        Derivative],
                      MultilineFunction->None], "[", \(t, x, y\), "]"}]}], 
                "+", 
                RowBox[{"10000.`", " ", 
                  RowBox[{"(", 
                    RowBox[{
                      RowBox[{
                        SuperscriptBox["v", 
                          TagBox[\((0, 0, 1)\),
                            Derivative],
                          MultilineFunction->None], "[", \(t, x, y\), "]"}], 
                      "+", 
                      RowBox[{
                        SuperscriptBox["u", 
                          TagBox[\((0, 1, 0)\),
                            Derivative],
                          MultilineFunction->None], "[", \(t, x, y\), "]"}]}],
                     ")"}]}], "+", 
                RowBox[{
                  SuperscriptBox["p", 
                    TagBox[\((1, 0, 0)\),
                      Derivative],
                    MultilineFunction->None], "[", \(t, x, y\), "]"}]}], 
              "\[Equal]", 
              RowBox[{\(Cos[y]\), " ", \(Sin[x]\), " ", 
                RowBox[{
                  SuperscriptBox["p", 
                    TagBox[\((0, 0, 1)\),
                      Derivative],
                    MultilineFunction->None], "[", \(t, x, y\), "]"}]}]}], 
            ",", \(u[0, x, y] \[Equal] 0\), ",", \(v[0, x, y] \[Equal] 0\), 
            ",", \(p[0, x, y] \[Equal] 0\), 
            ",", \(u[t, 0, 
                y] \[Equal] \((1 - \[ExponentialE]\^\(\(-10.`\)\ t\))\)\ Cos[
                  100.`\ t]\ DiracDelta[y]\), ",", \(v[t, 0, y] \[Equal] 0\), 
            ",", \(p[t, 0, 
                y] \[Equal] \((1 - \[ExponentialE]\^\(\(-10.`\)\ t\))\)\ \
DiracDelta[y]\ Sin[100.`\ t]\), ",", "0", ",", "0", ",", "0", ",", "0", ",", 
            "0", ",", "0"}], "}"}], ",", \({u, v, p}\), ",", \({x, 0, 100}\), 
        ",", \({y, \(-1\), 1}\), ",", \({t, 0, 1000}\)}], "]"}]], "Output"]
}, Open  ]]
},
FrontEndVersion->"5.0 for Macintosh",
ScreenRectangle->{{38, 1280}, {0, 1002}},
WindowSize->{1086, 806},
WindowMargins->{{35, Automatic}, {Automatic, 64}}
]

(*******************************************************************
Cached data follows.  If you edit this Notebook file directly, not
using Mathematica, you must remove the line containing CacheID at
the top of  the file.  The cache data will then be recreated when
you save this file from within Mathematica.
*******************************************************************)

(*CellTagsOutline
CellTagsIndex->{}
*)

(*CellTagsIndex
CellTagsIndex->{}
*)

(*NotebookFileOutline
Notebook[{

Cell[CellGroupData[{
Cell[1776, 53, 60, 1, 27, "Input"],
Cell[1839, 56, 39, 1, 27, "Output"]
}, Open  ]],

Cell[CellGroupData[{
Cell[1915, 62, 1559, 29, 224, "Input"],
Cell[3477, 93, 372, 5, 21, "Message"],
Cell[3852, 100, 4930, 114, 135, "Output"]
}, Open  ]]
}
]
*)



(*******************************************************************
End of Mathematica Notebook file.
*******************************************************************)




  • Prev by Date: Re: Readability confuses mathematica?
  • Next by Date: Re: Defining function
  • Previous by thread: Re: I have put "==" in every equation I have in NDSolve, why it keeps telling me they are not equations
  • Next by thread: Re: I have put "==" in every equation I have in NDSolve, why it keeps telling me they are not equations