Obtaining simultaneous equations from a dicretized Poisson's equation.

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite
1












I'm trying to simulate fluids using Moving particle semi-implicit method(MPS). Basically, for incompressible fluids, at every time step, a pressure term is calculated for each fluid particle to correct its velocity and position, to maintain the particle number density (PND).



The pressure term can obtained by solving this Poisson's equation:
$$nabla ^2lt Pgt_i = -fracrhodt cdot fraclt n^*gt_i - n^0n^0 quad (1) $$
After discretizing the left side, we get:
$$frac2dlambda n^0 sum_j not=i (P_j - P_i)W(|mathbf r_j - mathbf r_i|) = -fracrhodt cdot fraclt n^*gt_i - n^0n^0 quad (2)$$
where $P_i$ is the pressure at the particle $i$ and $P_j$ is pressure at neighboring particle $j$. $n^0$ is the default PND and $<n^*>_i$ is the temporary PND at time step $k$. $mathbf r_i$ is the position of particle i. Other tems are just constants. $W(|mathbf r_j - mathbf r_i|)$ is a weight kernel which looks like this:
$$W(r) = frac r_e r - 1, quad textif 0 < r < r_e \ = 0, quad textotherwise$$ r is distance between two particles and $r_e$ is the interaction radius. And the temporary PND is obtained by summing up weights to neighboring particles.
$$<n^*>_i = sum_jnot=i W(|mathbf r_j - mathbf r_i|)$$


The problem I have is that in every academic papper about MPS I've studied, says that a system of equations can be obtained from the equation (2), and the matrix representing these linear equations is sparse and symmetric. I have tried for weeks figuring out how to express the equation (2) as $Ax=b$, but without any success. Maybe I have missed something or maybe I'm just genuinly stupid. Any help is appreciated. Thank you so much.







share|cite|improve this question

























    up vote
    0
    down vote

    favorite
    1












    I'm trying to simulate fluids using Moving particle semi-implicit method(MPS). Basically, for incompressible fluids, at every time step, a pressure term is calculated for each fluid particle to correct its velocity and position, to maintain the particle number density (PND).



    The pressure term can obtained by solving this Poisson's equation:
    $$nabla ^2lt Pgt_i = -fracrhodt cdot fraclt n^*gt_i - n^0n^0 quad (1) $$
    After discretizing the left side, we get:
    $$frac2dlambda n^0 sum_j not=i (P_j - P_i)W(|mathbf r_j - mathbf r_i|) = -fracrhodt cdot fraclt n^*gt_i - n^0n^0 quad (2)$$
    where $P_i$ is the pressure at the particle $i$ and $P_j$ is pressure at neighboring particle $j$. $n^0$ is the default PND and $<n^*>_i$ is the temporary PND at time step $k$. $mathbf r_i$ is the position of particle i. Other tems are just constants. $W(|mathbf r_j - mathbf r_i|)$ is a weight kernel which looks like this:
    $$W(r) = frac r_e r - 1, quad textif 0 < r < r_e \ = 0, quad textotherwise$$ r is distance between two particles and $r_e$ is the interaction radius. And the temporary PND is obtained by summing up weights to neighboring particles.
    $$<n^*>_i = sum_jnot=i W(|mathbf r_j - mathbf r_i|)$$


    The problem I have is that in every academic papper about MPS I've studied, says that a system of equations can be obtained from the equation (2), and the matrix representing these linear equations is sparse and symmetric. I have tried for weeks figuring out how to express the equation (2) as $Ax=b$, but without any success. Maybe I have missed something or maybe I'm just genuinly stupid. Any help is appreciated. Thank you so much.







    share|cite|improve this question























      up vote
      0
      down vote

      favorite
      1









      up vote
      0
      down vote

      favorite
      1






      1





      I'm trying to simulate fluids using Moving particle semi-implicit method(MPS). Basically, for incompressible fluids, at every time step, a pressure term is calculated for each fluid particle to correct its velocity and position, to maintain the particle number density (PND).



      The pressure term can obtained by solving this Poisson's equation:
      $$nabla ^2lt Pgt_i = -fracrhodt cdot fraclt n^*gt_i - n^0n^0 quad (1) $$
      After discretizing the left side, we get:
      $$frac2dlambda n^0 sum_j not=i (P_j - P_i)W(|mathbf r_j - mathbf r_i|) = -fracrhodt cdot fraclt n^*gt_i - n^0n^0 quad (2)$$
      where $P_i$ is the pressure at the particle $i$ and $P_j$ is pressure at neighboring particle $j$. $n^0$ is the default PND and $<n^*>_i$ is the temporary PND at time step $k$. $mathbf r_i$ is the position of particle i. Other tems are just constants. $W(|mathbf r_j - mathbf r_i|)$ is a weight kernel which looks like this:
      $$W(r) = frac r_e r - 1, quad textif 0 < r < r_e \ = 0, quad textotherwise$$ r is distance between two particles and $r_e$ is the interaction radius. And the temporary PND is obtained by summing up weights to neighboring particles.
      $$<n^*>_i = sum_jnot=i W(|mathbf r_j - mathbf r_i|)$$


      The problem I have is that in every academic papper about MPS I've studied, says that a system of equations can be obtained from the equation (2), and the matrix representing these linear equations is sparse and symmetric. I have tried for weeks figuring out how to express the equation (2) as $Ax=b$, but without any success. Maybe I have missed something or maybe I'm just genuinly stupid. Any help is appreciated. Thank you so much.







      share|cite|improve this question













      I'm trying to simulate fluids using Moving particle semi-implicit method(MPS). Basically, for incompressible fluids, at every time step, a pressure term is calculated for each fluid particle to correct its velocity and position, to maintain the particle number density (PND).



      The pressure term can obtained by solving this Poisson's equation:
      $$nabla ^2lt Pgt_i = -fracrhodt cdot fraclt n^*gt_i - n^0n^0 quad (1) $$
      After discretizing the left side, we get:
      $$frac2dlambda n^0 sum_j not=i (P_j - P_i)W(|mathbf r_j - mathbf r_i|) = -fracrhodt cdot fraclt n^*gt_i - n^0n^0 quad (2)$$
      where $P_i$ is the pressure at the particle $i$ and $P_j$ is pressure at neighboring particle $j$. $n^0$ is the default PND and $<n^*>_i$ is the temporary PND at time step $k$. $mathbf r_i$ is the position of particle i. Other tems are just constants. $W(|mathbf r_j - mathbf r_i|)$ is a weight kernel which looks like this:
      $$W(r) = frac r_e r - 1, quad textif 0 < r < r_e \ = 0, quad textotherwise$$ r is distance between two particles and $r_e$ is the interaction radius. And the temporary PND is obtained by summing up weights to neighboring particles.
      $$<n^*>_i = sum_jnot=i W(|mathbf r_j - mathbf r_i|)$$


      The problem I have is that in every academic papper about MPS I've studied, says that a system of equations can be obtained from the equation (2), and the matrix representing these linear equations is sparse and symmetric. I have tried for weeks figuring out how to express the equation (2) as $Ax=b$, but without any success. Maybe I have missed something or maybe I'm just genuinly stupid. Any help is appreciated. Thank you so much.









      share|cite|improve this question












      share|cite|improve this question




      share|cite|improve this question








      edited Jul 22 at 11:58
























      asked Jul 21 at 15:32









      Neroro G-Rank

      12




      12

























          active

          oldest

          votes











          Your Answer




          StackExchange.ifUsing("editor", function ()
          return StackExchange.using("mathjaxEditing", function ()
          StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
          StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
          );
          );
          , "mathjax-editing");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "69"
          ;
          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',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          noCode: true, onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2858598%2fobtaining-simultaneous-equations-from-a-dicretized-poissons-equation%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes










           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2858598%2fobtaining-simultaneous-equations-from-a-dicretized-poissons-equation%23new-answer', 'question_page');

          );

          Post as a guest













































































          Comments

          Popular posts from this blog

          What is the equation of a 3D cone with generalised tilt?

          Color the edges and diagonals of a regular polygon

          Relationship between determinant of matrix and determinant of adjoint?