Errors in solving coupled pdes Announcing the arrival of Valued Associate #679: Cesar Manara ...

What is a good proxy for government quality?

Errors in solving coupled pdes

Was Objective-C really a hindrance to Apple software development?

How long can a nation maintain a technological edge over the rest of the world?

All ASCII characters with a given bit count

Was there ever a LEGO store in Miami International Airport?

Is it appropriate to mention a relatable company blog post when you're asked about the company?

Processing ADC conversion result: DMA vs Processor Registers

What's parked in Mil Moscow helicopter plant?

Israeli soda type drink

In search of the origins of term censor, I hit a dead end stuck with the greek term, to censor, λογοκρίνω

Marquee sign letters

What is a 'Key' in computer science?

When does Bran Stark remember Jamie pushing him?

Does every subgroup of an abelian group have to be abelian?

Does Prince Arnaud cause someone holding the Princess to lose?

Why does the Cisco show run command not show the full version, while the show version command does?

Is it OK if I do not take the receipt in Germany?

What is the ongoing value of the Kanban board to the developers as opposed to management

How would it unbalance gameplay to rule that Weapon Master allows for picking a fighting style?

What is the term for extremely loose Latin word order?

Stretch a Tikz tree

What was Apollo 13's "Little Jolt" after MECO?

Married in secret, can marital status in passport be changed at a later date?



Errors in solving coupled pdes



Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Errors Solving Elliptic PDES with FEMCoupled elliptic pdes, FEM solverSolving a system of partial differential and algebraic equations? setting the step-size to get reasonable resultsSolving a coupled PDEs using FEM with Robin conditionsSolving coupled ODEsNDSolve for Coupled Second Order PDEsSolving non-linear PDEsSolving coupled pdeNumerically solving two coupled nonlinear PDEsSolving 3 nonlinear, transient, coupled PDEs












1












$begingroup$


I am trying to solve following coupled PDEs:
enter image description here
I am not sure about suitable BCs.



 ClearAll[V, Rho, T]
gamma = 5/3; ep = 0.05; d = 0.01; L = 1; H = 1.1; gpara = 0.38;
System = {D[V[x, t],t] == -1/gamma/exp[-x/H]*{D[Rho[x, t], x] + D[T[x,
t],x]} + Rho[x, t]/exp[-x/H]*gpara + 1.3*ep*D[V[x, t], {x, 2}],
D[Rho[x, t], t] == - D[{exp[-x/H]*V[x, t]}, x],
D[T[x, t], t] == D[{exp[-x/H]*V[x, t]}, x] - V[x, t]*Rho[x, t]*gpara -
gamma*exp[-x/H]*D[V[x, t], x] + gamma*d*D[T[x, t], {x, 2}],
V[x, t] == 0 /. x -> 0,
V[x, t] == 0 /. x -> 1,
Rho[x, t] == 0 /. x -> 0,
Rho[x, t] == 0 /. x -> 1,
T[x, t] == 0 /. x -> 0,
T[x, t] == 0 /. x -> 1,
D[T[x, t], x] == 0 /. x -> 1,
V[x, 0] == Sin[Pi*x/L],
Rho[x, 0] == 0,
T[x, 0] == 0};
{V, Rho, T} = NDSolveValue[System, {V, Rho, T}, {x, 0, 1}, {t, 0, 5}]
Plot3D[{V[x, t], Rho[x, t], T[x, t]}, {x, 0, 1}, {t, 0, 5}]


General::ivar: 3 is not a valid variable.
........
Also, how i can import variable gpara in .txt format to this code?










share|improve this question









New contributor




Danial is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$

















    1












    $begingroup$


    I am trying to solve following coupled PDEs:
    enter image description here
    I am not sure about suitable BCs.



     ClearAll[V, Rho, T]
    gamma = 5/3; ep = 0.05; d = 0.01; L = 1; H = 1.1; gpara = 0.38;
    System = {D[V[x, t],t] == -1/gamma/exp[-x/H]*{D[Rho[x, t], x] + D[T[x,
    t],x]} + Rho[x, t]/exp[-x/H]*gpara + 1.3*ep*D[V[x, t], {x, 2}],
    D[Rho[x, t], t] == - D[{exp[-x/H]*V[x, t]}, x],
    D[T[x, t], t] == D[{exp[-x/H]*V[x, t]}, x] - V[x, t]*Rho[x, t]*gpara -
    gamma*exp[-x/H]*D[V[x, t], x] + gamma*d*D[T[x, t], {x, 2}],
    V[x, t] == 0 /. x -> 0,
    V[x, t] == 0 /. x -> 1,
    Rho[x, t] == 0 /. x -> 0,
    Rho[x, t] == 0 /. x -> 1,
    T[x, t] == 0 /. x -> 0,
    T[x, t] == 0 /. x -> 1,
    D[T[x, t], x] == 0 /. x -> 1,
    V[x, 0] == Sin[Pi*x/L],
    Rho[x, 0] == 0,
    T[x, 0] == 0};
    {V, Rho, T} = NDSolveValue[System, {V, Rho, T}, {x, 0, 1}, {t, 0, 5}]
    Plot3D[{V[x, t], Rho[x, t], T[x, t]}, {x, 0, 1}, {t, 0, 5}]


    General::ivar: 3 is not a valid variable.
    ........
    Also, how i can import variable gpara in .txt format to this code?










    share|improve this question









    New contributor




    Danial is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.







    $endgroup$















      1












      1








      1





      $begingroup$


      I am trying to solve following coupled PDEs:
      enter image description here
      I am not sure about suitable BCs.



       ClearAll[V, Rho, T]
      gamma = 5/3; ep = 0.05; d = 0.01; L = 1; H = 1.1; gpara = 0.38;
      System = {D[V[x, t],t] == -1/gamma/exp[-x/H]*{D[Rho[x, t], x] + D[T[x,
      t],x]} + Rho[x, t]/exp[-x/H]*gpara + 1.3*ep*D[V[x, t], {x, 2}],
      D[Rho[x, t], t] == - D[{exp[-x/H]*V[x, t]}, x],
      D[T[x, t], t] == D[{exp[-x/H]*V[x, t]}, x] - V[x, t]*Rho[x, t]*gpara -
      gamma*exp[-x/H]*D[V[x, t], x] + gamma*d*D[T[x, t], {x, 2}],
      V[x, t] == 0 /. x -> 0,
      V[x, t] == 0 /. x -> 1,
      Rho[x, t] == 0 /. x -> 0,
      Rho[x, t] == 0 /. x -> 1,
      T[x, t] == 0 /. x -> 0,
      T[x, t] == 0 /. x -> 1,
      D[T[x, t], x] == 0 /. x -> 1,
      V[x, 0] == Sin[Pi*x/L],
      Rho[x, 0] == 0,
      T[x, 0] == 0};
      {V, Rho, T} = NDSolveValue[System, {V, Rho, T}, {x, 0, 1}, {t, 0, 5}]
      Plot3D[{V[x, t], Rho[x, t], T[x, t]}, {x, 0, 1}, {t, 0, 5}]


      General::ivar: 3 is not a valid variable.
      ........
      Also, how i can import variable gpara in .txt format to this code?










      share|improve this question









      New contributor




      Danial is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.







      $endgroup$




      I am trying to solve following coupled PDEs:
      enter image description here
      I am not sure about suitable BCs.



       ClearAll[V, Rho, T]
      gamma = 5/3; ep = 0.05; d = 0.01; L = 1; H = 1.1; gpara = 0.38;
      System = {D[V[x, t],t] == -1/gamma/exp[-x/H]*{D[Rho[x, t], x] + D[T[x,
      t],x]} + Rho[x, t]/exp[-x/H]*gpara + 1.3*ep*D[V[x, t], {x, 2}],
      D[Rho[x, t], t] == - D[{exp[-x/H]*V[x, t]}, x],
      D[T[x, t], t] == D[{exp[-x/H]*V[x, t]}, x] - V[x, t]*Rho[x, t]*gpara -
      gamma*exp[-x/H]*D[V[x, t], x] + gamma*d*D[T[x, t], {x, 2}],
      V[x, t] == 0 /. x -> 0,
      V[x, t] == 0 /. x -> 1,
      Rho[x, t] == 0 /. x -> 0,
      Rho[x, t] == 0 /. x -> 1,
      T[x, t] == 0 /. x -> 0,
      T[x, t] == 0 /. x -> 1,
      D[T[x, t], x] == 0 /. x -> 1,
      V[x, 0] == Sin[Pi*x/L],
      Rho[x, 0] == 0,
      T[x, 0] == 0};
      {V, Rho, T} = NDSolveValue[System, {V, Rho, T}, {x, 0, 1}, {t, 0, 5}]
      Plot3D[{V[x, t], Rho[x, t], T[x, t]}, {x, 0, 1}, {t, 0, 5}]


      General::ivar: 3 is not a valid variable.
      ........
      Also, how i can import variable gpara in .txt format to this code?







      differential-equations






      share|improve this question









      New contributor




      Danial is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      Danial is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited 2 hours ago







      Danial













      New contributor




      Danial is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 2 hours ago









      Danial Danial

      62




      62




      New contributor




      Danial is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Danial is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Danial is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          1 Answer
          1






          active

          oldest

          votes


















          4












          $begingroup$

          Here is a version that fixes the syntax errors but there is a warning message indicating instability you should look into:



          ClearAll[V, Rho, T]
          gamma = 5/3; ep = 0.05; d = 0.01; L = 1; H = 1.1; gpara = 0.38;
          System = {
          D[V[x, t],
          t] == -1/gamma/Exp[-x/H]*(D[Rho[x, t], x] + D[T[x, t], x]) +
          Rho[x, t]/Exp[-x/H]*gpara + 1.3*ep*D[V[x, t], {x, 2}],
          D[Rho[x, t], t] == -D[Exp[-x/H]*V[x, t], x],
          D[T[x, t], t] ==
          D[Exp[-x/H]*V[x, t], x] - V[x, t]*Rho[x, t]*gpara -
          gamma*Exp[-x/H]*D[V[x, t], x] + gamma*d*D[T[x, t], {x, 2}],
          V[0, t] == 0, V[1, t] == 0, V[x, 0] == Sin[Pi*x/L],
          Rho[0, t] == 0, Rho[1, t] == 0, Rho[x, 0] == 0,
          T[0, t] == 0, T[1, t] == 0, Derivative[1, 0][T][1, t] == 0,
          T[x, 0] == 0};
          {V, Rho, T} = NDSolveValue[System, {V, Rho, T}, {x, 0, 1}, {t, 0, 5}]


          enter image description here



          Plot3D[{V[x, t], Rho[x, t], T[x, t]}, {x, 0, 1}, {t, 0, 5}]


          enter image description here






          share|improve this answer









          $endgroup$













          • $begingroup$
            Thank you very much. I am using mathematica 11.3, when i use this code in my .nb, its showing errors: General::ivar: 3 is not a valid variable. I need to install different version of mathematica to avoid errors?
            $endgroup$
            – Danial
            12 mins ago












          • $begingroup$
            @Danial, works for me in V11.3. Try quiting your kernel, perhaps?
            $endgroup$
            – user21
            11 mins ago












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "387"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          Danial is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f196892%2ferrors-in-solving-coupled-pdes%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          4












          $begingroup$

          Here is a version that fixes the syntax errors but there is a warning message indicating instability you should look into:



          ClearAll[V, Rho, T]
          gamma = 5/3; ep = 0.05; d = 0.01; L = 1; H = 1.1; gpara = 0.38;
          System = {
          D[V[x, t],
          t] == -1/gamma/Exp[-x/H]*(D[Rho[x, t], x] + D[T[x, t], x]) +
          Rho[x, t]/Exp[-x/H]*gpara + 1.3*ep*D[V[x, t], {x, 2}],
          D[Rho[x, t], t] == -D[Exp[-x/H]*V[x, t], x],
          D[T[x, t], t] ==
          D[Exp[-x/H]*V[x, t], x] - V[x, t]*Rho[x, t]*gpara -
          gamma*Exp[-x/H]*D[V[x, t], x] + gamma*d*D[T[x, t], {x, 2}],
          V[0, t] == 0, V[1, t] == 0, V[x, 0] == Sin[Pi*x/L],
          Rho[0, t] == 0, Rho[1, t] == 0, Rho[x, 0] == 0,
          T[0, t] == 0, T[1, t] == 0, Derivative[1, 0][T][1, t] == 0,
          T[x, 0] == 0};
          {V, Rho, T} = NDSolveValue[System, {V, Rho, T}, {x, 0, 1}, {t, 0, 5}]


          enter image description here



          Plot3D[{V[x, t], Rho[x, t], T[x, t]}, {x, 0, 1}, {t, 0, 5}]


          enter image description here






          share|improve this answer









          $endgroup$













          • $begingroup$
            Thank you very much. I am using mathematica 11.3, when i use this code in my .nb, its showing errors: General::ivar: 3 is not a valid variable. I need to install different version of mathematica to avoid errors?
            $endgroup$
            – Danial
            12 mins ago












          • $begingroup$
            @Danial, works for me in V11.3. Try quiting your kernel, perhaps?
            $endgroup$
            – user21
            11 mins ago
















          4












          $begingroup$

          Here is a version that fixes the syntax errors but there is a warning message indicating instability you should look into:



          ClearAll[V, Rho, T]
          gamma = 5/3; ep = 0.05; d = 0.01; L = 1; H = 1.1; gpara = 0.38;
          System = {
          D[V[x, t],
          t] == -1/gamma/Exp[-x/H]*(D[Rho[x, t], x] + D[T[x, t], x]) +
          Rho[x, t]/Exp[-x/H]*gpara + 1.3*ep*D[V[x, t], {x, 2}],
          D[Rho[x, t], t] == -D[Exp[-x/H]*V[x, t], x],
          D[T[x, t], t] ==
          D[Exp[-x/H]*V[x, t], x] - V[x, t]*Rho[x, t]*gpara -
          gamma*Exp[-x/H]*D[V[x, t], x] + gamma*d*D[T[x, t], {x, 2}],
          V[0, t] == 0, V[1, t] == 0, V[x, 0] == Sin[Pi*x/L],
          Rho[0, t] == 0, Rho[1, t] == 0, Rho[x, 0] == 0,
          T[0, t] == 0, T[1, t] == 0, Derivative[1, 0][T][1, t] == 0,
          T[x, 0] == 0};
          {V, Rho, T} = NDSolveValue[System, {V, Rho, T}, {x, 0, 1}, {t, 0, 5}]


          enter image description here



          Plot3D[{V[x, t], Rho[x, t], T[x, t]}, {x, 0, 1}, {t, 0, 5}]


          enter image description here






          share|improve this answer









          $endgroup$













          • $begingroup$
            Thank you very much. I am using mathematica 11.3, when i use this code in my .nb, its showing errors: General::ivar: 3 is not a valid variable. I need to install different version of mathematica to avoid errors?
            $endgroup$
            – Danial
            12 mins ago












          • $begingroup$
            @Danial, works for me in V11.3. Try quiting your kernel, perhaps?
            $endgroup$
            – user21
            11 mins ago














          4












          4








          4





          $begingroup$

          Here is a version that fixes the syntax errors but there is a warning message indicating instability you should look into:



          ClearAll[V, Rho, T]
          gamma = 5/3; ep = 0.05; d = 0.01; L = 1; H = 1.1; gpara = 0.38;
          System = {
          D[V[x, t],
          t] == -1/gamma/Exp[-x/H]*(D[Rho[x, t], x] + D[T[x, t], x]) +
          Rho[x, t]/Exp[-x/H]*gpara + 1.3*ep*D[V[x, t], {x, 2}],
          D[Rho[x, t], t] == -D[Exp[-x/H]*V[x, t], x],
          D[T[x, t], t] ==
          D[Exp[-x/H]*V[x, t], x] - V[x, t]*Rho[x, t]*gpara -
          gamma*Exp[-x/H]*D[V[x, t], x] + gamma*d*D[T[x, t], {x, 2}],
          V[0, t] == 0, V[1, t] == 0, V[x, 0] == Sin[Pi*x/L],
          Rho[0, t] == 0, Rho[1, t] == 0, Rho[x, 0] == 0,
          T[0, t] == 0, T[1, t] == 0, Derivative[1, 0][T][1, t] == 0,
          T[x, 0] == 0};
          {V, Rho, T} = NDSolveValue[System, {V, Rho, T}, {x, 0, 1}, {t, 0, 5}]


          enter image description here



          Plot3D[{V[x, t], Rho[x, t], T[x, t]}, {x, 0, 1}, {t, 0, 5}]


          enter image description here






          share|improve this answer









          $endgroup$



          Here is a version that fixes the syntax errors but there is a warning message indicating instability you should look into:



          ClearAll[V, Rho, T]
          gamma = 5/3; ep = 0.05; d = 0.01; L = 1; H = 1.1; gpara = 0.38;
          System = {
          D[V[x, t],
          t] == -1/gamma/Exp[-x/H]*(D[Rho[x, t], x] + D[T[x, t], x]) +
          Rho[x, t]/Exp[-x/H]*gpara + 1.3*ep*D[V[x, t], {x, 2}],
          D[Rho[x, t], t] == -D[Exp[-x/H]*V[x, t], x],
          D[T[x, t], t] ==
          D[Exp[-x/H]*V[x, t], x] - V[x, t]*Rho[x, t]*gpara -
          gamma*Exp[-x/H]*D[V[x, t], x] + gamma*d*D[T[x, t], {x, 2}],
          V[0, t] == 0, V[1, t] == 0, V[x, 0] == Sin[Pi*x/L],
          Rho[0, t] == 0, Rho[1, t] == 0, Rho[x, 0] == 0,
          T[0, t] == 0, T[1, t] == 0, Derivative[1, 0][T][1, t] == 0,
          T[x, 0] == 0};
          {V, Rho, T} = NDSolveValue[System, {V, Rho, T}, {x, 0, 1}, {t, 0, 5}]


          enter image description here



          Plot3D[{V[x, t], Rho[x, t], T[x, t]}, {x, 0, 1}, {t, 0, 5}]


          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 1 hour ago









          user21user21

          21k55998




          21k55998












          • $begingroup$
            Thank you very much. I am using mathematica 11.3, when i use this code in my .nb, its showing errors: General::ivar: 3 is not a valid variable. I need to install different version of mathematica to avoid errors?
            $endgroup$
            – Danial
            12 mins ago












          • $begingroup$
            @Danial, works for me in V11.3. Try quiting your kernel, perhaps?
            $endgroup$
            – user21
            11 mins ago


















          • $begingroup$
            Thank you very much. I am using mathematica 11.3, when i use this code in my .nb, its showing errors: General::ivar: 3 is not a valid variable. I need to install different version of mathematica to avoid errors?
            $endgroup$
            – Danial
            12 mins ago












          • $begingroup$
            @Danial, works for me in V11.3. Try quiting your kernel, perhaps?
            $endgroup$
            – user21
            11 mins ago
















          $begingroup$
          Thank you very much. I am using mathematica 11.3, when i use this code in my .nb, its showing errors: General::ivar: 3 is not a valid variable. I need to install different version of mathematica to avoid errors?
          $endgroup$
          – Danial
          12 mins ago






          $begingroup$
          Thank you very much. I am using mathematica 11.3, when i use this code in my .nb, its showing errors: General::ivar: 3 is not a valid variable. I need to install different version of mathematica to avoid errors?
          $endgroup$
          – Danial
          12 mins ago














          $begingroup$
          @Danial, works for me in V11.3. Try quiting your kernel, perhaps?
          $endgroup$
          – user21
          11 mins ago




          $begingroup$
          @Danial, works for me in V11.3. Try quiting your kernel, perhaps?
          $endgroup$
          – user21
          11 mins ago










          Danial is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          Danial is a new contributor. Be nice, and check out our Code of Conduct.













          Danial is a new contributor. Be nice, and check out our Code of Conduct.












          Danial is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Mathematica Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          Use MathJax to format equations. MathJax reference.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f196892%2ferrors-in-solving-coupled-pdes%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          “%fieldName is a required field.”, in Magento2 REST API Call for GET Method Type The Next...

          How to change City field to a dropdown in Checkout step Magento 2Magento 2 : How to change UI field(s)...

          夢乃愛華...