0
$\begingroup$

Edit: (copying from my comment)

Let's consider the inverse problem when I need to transfer velocities from particles to the grid (inverse bilinear interpolation). How'd I transfer a particle's x-velocity to the velocities located at cell's face in the Q region? Would the particle's velocity be distributed among the 2 face-velocities (as opposed to 4 face velocities in non-boundary locations)?


I'm implementing staggered grid for a PIC simulation (pressures in the center of a cell, velocities on faces) and I'm trying to find out how to interpolate the velocities. To simplify my problem, let's consider the 2D case;

PIC staggered grid

  • red dot = pressure (irrelevant to my question)
  • blue bar = the x-axis component of velocity
  • green bar = the y-axis component of velocity

If I was to implement the grid based on the above image, I'd store 3 arrays:

  • 3x4 array for the (blue) x-velocities
  • 4x3 array for the (green) y-velocities
  • 3x3 array for the (red) pressures

The problem with these array's sizes is interpolation of velocities at the grid boundaries – imagine you'd want to interpolate the (blue) x-velocity (from the 3x4 array) for particles that are located in the lower half of the bottom cells (the lower half of a cell is the part of the cell, that is below the blue bar representing x-velocities - take a look at the second image below – it's the area marked as Q).

When I'd want to interpolate the x-velocity in the center (non-boundary) cells, everything would be OK – I'd choose 4 nearest (blue) velocities for a given position in the grid and based on the 4 velocities, I'd bilinearly interpolate the velocity.

However, when I'd try to interpolate in the lower-half of the bottom cells, I'd no longer have 4 velocities to interpolate from – only the 2. The interpolation would degrade from bilinear into linear! (And I suppose that's incorrect implementation of staggered grid interpolation.)


The obvious fix would be to store the velocities on grid's verticies instead of on faces. The velocity for a face could then be linearly interpolated from 2 neighboring verticies when needed. Is this the conventional/preferred/best way how to solve interpolation of velocities on staggered grid?

Velocities stored on verticies, the face velocities are interpolated when needed.

  • green bars = x-velocities stored on grid's verticies
  • orange bars = linearly interpolated x-velocities from 2 green bars
  • yellow points = the sample point for which velocity needs to be interpolated
  • Q = the lower(upper)-half of the bottom(top) cells
  • A = the sample point in the Q region
$\endgroup$
4
  • 2
    $\begingroup$ Aren't there boundary conditions at the boundaries that can be used for the interpolation? $\endgroup$ Commented Oct 25, 2016 at 18:47
  • $\begingroup$ @AbhilashReddyM Thank you for pointing me to the right direction - I'm just starting with PIC, so I don't know a lot of (basic) stuff yet. I have another question: let's consider the inverse problem when I need to transfer velocities from particles to the grid (inverse bilinear interpolation) - should I also utilize boundary conditions? How'd I e.g. transfer a particle's x-velocity to the velocities located at cell's face in the Q region? Would the particle's velocity be distributed among the 2 face-velocities (as opposed to 4 face velocities in non-boundary locations)? $\endgroup$
    – sarasvati
    Commented Oct 25, 2016 at 19:38
  • $\begingroup$ Sorry. I don't actually work with PIC methods. $\endgroup$ Commented Oct 25, 2016 at 19:45
  • $\begingroup$ @AbhilashReddyM OK. I'll update my question to include the inverse problem too. $\endgroup$
    – sarasvati
    Commented Oct 25, 2016 at 19:58

1 Answer 1

0
$\begingroup$

For the fluid->particle problem, @AbhilashReddyM gave you the answer, the boundary condition will give you the value of $v_x$ at the boundaries.

For the particle->fluid problem, yes, it is a boundary condition that you need to use, but not necessarily the one of your fluid problem: e.g. if particles are allowed to slide/roll against the boundary while the fluid obeys no-slip condition, then you have a different BC for each.

Note that for clarity, you should have asked questions separately.

$\endgroup$
7
  • $\begingroup$ Could you please explain the "particle's x-velocity component"->"staggered grid" conversion at boundary? Consider this grid's cell [2,1]. There's a particle b. It has (pink) velocity v_b. v_b has x-velocity component called v_bx (purple). How do I transfer v_bx to the staggered grid (the grid is represented by the orange bars on cell's faces). Do I just split v_bx via linear interpolation between gx_2 and gx_3? If not, how would a boundary condition help me? (to be continued) $\endgroup$
    – sarasvati
    Commented Nov 18, 2016 at 17:09
  • $\begingroup$ (continuing) AFAIK in PIC, there's BC stating that the velocity component normal to the boundary should be 0 - which seems to be fullfilled in the case of particle b's x-velocity component: the cell that b is in has boundary normal perpendicular to both gx_2 and gx_3. So how can such a boundary condition help me to splat b's velocity to the grid? Thank you. $\endgroup$
    – sarasvati
    Commented Nov 18, 2016 at 17:13
  • $\begingroup$ The p->f problem can be understood as a form of linear regression from point data to an interpolant of velocities of particle phase at your points gx_i and (for your "Q region") at the boundary. So the BC is crucial to define this interpolant. $\endgroup$
    – Joce
    Commented Nov 18, 2016 at 20:15
  • $\begingroup$ Let's say I have the slip condition defined - now, I don't understand how this BC could help me in the case of particle b. Can you please state a concrete example how v_bx would be transfered to the grid? (I obviously tried to google this problem up, but I've seen no concrete definition of how to do the particle->grid interpolation at boundary. For example take a look at page 21 of this PDF - there's stated how to interopolate velocity at the interior cells, but not at boundaries.) $\endgroup$
    – sarasvati
    Commented Nov 19, 2016 at 0:29
  • 1
    $\begingroup$ Slip condition means symmetry with respect to the boundary, as simple as this. $\endgroup$
    – Joce
    Commented Nov 19, 2016 at 11:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.