in reply to Re: Particle movement question
in thread Particle movement question

Requirements are far more useful. What are the rules you go by to determine how a particle behaves?

Replies are listed 'Best First'.
Re^3: Particle movement question
by koda123 (Initiate) on Apr 26, 2017 at 00:23 UTC

    The particle will act as a fluid being confined by a free boundary. The first processing step is marking all of the cells with particles in them as fluid cells, and then marking the rest of the cells depending on their neightbor (1 empty cell, 2 empty cells etc etc.) , also specifying the direction. I have that code as well if that wll clarify things. So given an initial velocity, I will make a series of calculations that give me new velocites and pressure at Tn+1. Then I can reassign the boundary conditions for the free boundary, and then re mark the Fluid cells (particle cells) and so on. I hope that answers your question .

      I am also having trouble making sense of this structure and converting it.

      /* Mark cells containing particles as fluid cells (loop over particle +s) */ /*------------------------------------------------------------------- +---*/ for (n=1;n<=N;n++) for(part=Particlelines[n].Particles; part->next != NULL; part=part +->next) { x = part->next->x; y = part->next->y; i = (int)(x/delx)+1; j = (int)(y/dely)+1; if (FLAG[i][j] < C_F) { /* delete particles in obstacle cells */ help = part->next->next; free(part->next); part->next = help; Particlelines[n].length--; } else FLAG[i][j] = FLAG[i][j] & ~C_E; }

        Do you know what a linked list is?


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
        In the absence of evidence, opinion is indistinguishable from prejudice. Suck that fhit