Skip to main content
Advertisement
Browse Subject Areas
?

Click through the PLOS taxonomy to find articles in your field.

For more information about PLOS Subject Areas, click here.

< Back to Article

Figure 1.

Fluid cell with three separate components.

Fluid cell c1 has density, velocity, and pressure components ρ, u, and p. The left and right coordinates of the cell are x1 and x2.

More »

Figure 1 Expand

Figure 2.

Fluid cell with three superimposed components.

Fluid cell c1 has density, velocity, and pressure components all superimposed on the same axis. The left and right coordinates of the cell are x1 and x2.

More »

Figure 2 Expand

Figure 3.

The Riemann problem.

The Riemann problem specifies initial density, velocity, and pressure values of ρl, ul, pl on the left side of the origin and ρr, ur, pr on the right side of the origin.

More »

Figure 3 Expand

Figure 4.

Sod’s shock tube problem at t = 0.0 seconds.

Sod’s shock tube problem showing initial density, velocity, and pressure values (ρl, ul, pl) = (1.0, 0.0, 1.0) and (ρr, ur, pr) = (0.125, 0.0, 0.1).

More »

Figure 4 Expand

Figure 5.

Sod’s shock tube problem at t = 1.5 seconds.

Sod’s shock tube problem showing density ρ, velocity u, and pressure p after 1.5 seconds of time evolution. We can see three flow features: an expansion fan, a contact, and a shock.

More »

Figure 5 Expand

Figure 6.

Sod’s shock tube problem time evolution from t = 0 to t = 1.5 seconds.

Sod’s shock tube problem showing density ρ, velocity u, and pressure p from time t = 0 to time t = 1.5 seconds. We can see three flow features: an expansion fan, a contact, and a shock. The contact and the shock both start at the origin and move to the right, with the shock running ahead due to its higher speed. The expansion fan gradually slopes left as more and more fluid flows to the right to feed the shock.

More »

Figure 6 Expand

Figure 7.

Eulerian description of fluid flow.

In the Eulerian description of fluid flow, the fluid moves through stationary cells. Consider a global coordinate system divided into three cells c1, c2, and c3. The fluid is traveling rightwards with velocity u. In panel A at time t1, a measurement at point xm1 will show the density ρ and pressure p of cell c1. In panel B at a later time t2 = (xm2xm1)/u, we measure the same density and pressure at point xm2 because the fluid has moved to the right by one cell width.

More »

Figure 7 Expand

Figure 8.

Lagrangian description of fluid flow.

In the Lagrangian description of fluid flow, the cells are part of the fluid and move along with it. Consider fluid cells c1 and c2 traveling with their own local coordinate systems. The cells and their coordinate systems are both traveling rightwards at velocity u in the global coordinate system. In panel A at time t1, and in panel B at any later time t2, points xm1 and xm2 in the cells’ coordinate systems remain at the same places in those cells. No fluid crosses cell edges.

More »

Figure 8 Expand

Figure 9.

Remeshing.

The eight cells in panel A can be remeshed into two cells in panel B that cover the same area and contain the same mass, momentum, and energy. Some CFD methods require remeshing to maintain accuracy or to prevent numerical difficulties.

More »

Figure 9 Expand

Figure 10.

Chaikin’s corner-cutting algorithm.

Starting with the triangle in panel A, cutting the corners off one-quarter of the way along each side gives us panel B. Panels C and D show the process carried out two more times. We can repeat this process until the curve has any desired smoothness.

More »

Figure 10 Expand

Figure 11.

Fluid cells.

A fluid divided into three cells c1, c2, and c3. The dotted line at the right shows that there are periodic boundary conditions, so the right side of c3 is adjacent to the left side of c1.

More »

Figure 11 Expand

Figure 12.

Fluid cells showing wavefronts and tracer particles.

A fluid divided into three cells c1, c2, and c3. The dotted line at the right shows that there are periodic boundary conditions. Wavefront w23 originates between c2 and c3, and contains tracer particles pl and pr that travel through the fluid at the local speed of sound a = sqrt(γp/ρ). The constant γ depends on the fluid (it has a value of 1.4 for air). The ρ and p values are those of the cell the particle is traveling through. Note that w31 (not labeled) extends into both c3 and c1 due to the periodic boundary conditions.

More »

Figure 12 Expand

Figure 13.

Error metric growing as a tracer particle travels.

A particle p traveling right as part of wavefront w. Its error metric Δ increases as the particle travels, with the slope of Δ changing at cell edges.

More »

Figure 13 Expand

Figure 14.

Chopping, flattening, and new cell creation.

Panel A shows the chopping of wavefront w23 out of the fluid, which chops off the right side of c2 and the left side of c3. Panel B shows the resulting chopped parts c2c and c3c. Panel C shows the flattening of the two chopped parts into a new cell c4 with the same mass, momentum, and energy. Panel D shows the insertion of the new cell c4 into the fluid and the creation of the new wavefronts w24 and w43 on its edges.

More »

Figure 14 Expand

Figure 15.

Pressure momentum and pressure energy vectors.

A single cell c1 showing left and right pressure momentum Ppl and Ppr, and left and right pressure energy Epl and Epr. Portions of these vectors are transferred to new cells during the chopping and flattening process, and this transfer is what causes the conversion between potential and kinetic energy and vice versa.

More »

Figure 15 Expand

Figure 16.

Chopping pressure momentum and pressure energy vectors.

Panel A shows a single cell c1 with the right side chopped off. Panel B shows the chopped mass, momentum, energy, pressure momentum Pp, and pressure energy Ep that are now contained in the chopped cell part c1c, which will be flattened into a new cell along with any other cells chopped out by the same wavefront. The amounts of mass, momentum, and energy transferred to c1c are proportional to the width of c1c, but the amounts of pressure momentum and pressure energy transferred to c1c are proportional to the time since the creation of c1.

More »

Figure 16 Expand

Figure 17.

Error metric growing as particles cross cell edges.

Panel A shows two particles pl and pr traveling through the fluid as part of wavefront w23. Panel B shows the particles’ error metrics Δpl and Δpr growing as the particles travel, and demonstrates how the error metric of each particle in a wavefront is tracked separately. Note how the slope of the error metric across each cell is proportional to the difference in the cells’ density ρ, velocity u, and pressure p at the edge the particle crossed to get into the cell.

More »

Figure 17 Expand

Figure 18.

Wavefront unioning.

A fluid divided into four cells c1, c2, c3, and c4. Wavefront w12 overlaps wavefront w23, which overlaps wavefront w34, so we must chop out the union wavefront wunion to properly account for the effects of each wavefront on the others.

More »

Figure 18 Expand

Figure 19.

The “213 problem”.

Panel A shows a fluid divided into three cells c1, c2, c3 of widths 2, 1, and 3 from left to right (hence the name “213 problem”). All three cells were created at time t = 0, and all three have density ρ = 1, pressure p = 1, and velocity u = 0. In a simulation without wavefront unioning, if wavefront w23 chopped out a new cell at time t = 2.5, that new cell would have a net momentum of −0.5. Panel B shows that this is because the rightward momentum Ppr from c1 levels off at t = 2.0, while the leftward momentum from c3 continues to increase until t = 3.0. This demonstrates that wavefront unioning is required to avoid unphysical changes in cell velocity during simulation.

More »

Figure 19 Expand

Figure 20.

Simulation event queue.

Queue of events associated with wavefront w23 in the previous example of the 213 problem. Events are ordered by increasing time, and the simulator always executes the event at the head of the queue.

More »

Figure 20 Expand

Figure 21.

Particle intersection time and maximum error time.

This figure shows all four possible event times for a single wavefront. Consider a fluid divided into four cells c1, c2, c3, and c4. Wavefront w23 contains particles pl and pr. Particle pl intersects cell c1 at time tintersection l, and reaches the maximum error metric at tmax error l. Particle pr intersects cell c4 at time tintersection r, and reaches the maximum error metric at tmax error r.

More »

Figure 21 Expand

Figure 22.

RRM flowchart.

Flowchart showing the outline of the complete RRM algorithm.

More »

Figure 22 Expand

Figure 23.

Test 1: Sod’s test problem at high accuracy.

Sod’s problem with initial conditions (ρl, ul, pl) = (1.0, 0.0, 1.0) and (ρr, ur, pr) = (0.125, 0.0, 0.1), with maximum error metric (Δmax ρ, Δmax u, Δmax p) = (1.0e-5, 1.0e-3, 1.0e-3), at time t = 1.5. This test shows typical RRM results: an s-shaped contact because RRM is not adiabatic across contacts, and a slight peak at the shock due to finite shock thickness.

More »

Figure 23 Expand

Figure 24.

Test 2: Modified Sod’s test problem with 100-to-1 pressure differential.

A modified version of Sod’s problem with initial conditions are (ρl, ul, pl) = (1.0, 0.0, 1.0) and (ρr, ur, pr) = (0.01, 0.0, 0.01), with maximum error metric (Δmax ρ, Δmax u, Δmax p) = (1.0e-4, 1.0e-4, 1.0e-3), at time t = 1.5. This test shows that RRM still gives good results on a problem that has a 100-to-1 pressure differential instead of the 10-to-1 differential of Sod’s problem.

More »

Figure 24 Expand

Figure 25.

Test 3: Modified Sod’s test problem with initial u = 1.0.

A modified version of Sod’s problem where the entire fluid moves right with u = 1.0, with initial conditions (ρl, ul, pl) = (1.0, 1.0, 1.0) and (ρr, ur, pr) = (0.125, 1.0, 0.1), with maximum error metric (Δmax ρ, Δmax u, Δmax p) = (5.0e-5, 1.0e-3, 1.0e-3), at time t = 1.5. This test shows one of the benefits of the fully Lagrangian nature of RRM. Since the cells all move to the right with u = 1.0, the shock front does not have to cross cell edges during the simulation, so the shock is just as sharp as in the u = 0 case.

More »

Figure 25 Expand

Figure 26.

Test 4: Toro test 1.

Toro’s test problem 1, with initial conditions (ρl, ul, pl) = (1.0, 0.75, 1.0) and (ρr, ur, pr) = (0.125, 0.0, 0.1), with maximum error metric (Δmax ρ, Δmax u, Δmax p) = (1.0e-5, 1.0e-4, 1.0e-4), at time t = 0.8. This test is similar to Sod’s problem, but the left cell is initially ramming into the right cell, so the velocity at the shock front is somewhat higher.

More »

Figure 26 Expand

Figure 27.

Test 5: Toro test 2.

Toro’s test problem 2, with initial conditions are (ρl, ul, pl) = (1.0, −2.0, 0.4) and (ρr, ur, pr) = (1.0, 2.0, 0.4), with maximum error metric (Δmax ρ, Δmax u, Δmax p) = (1.0e-5, 1.0e-5, 1.0e-5), at time t = 0.6. This test shows that RRM can correctly handle the near-vacuum state created in the center.

More »

Figure 27 Expand

Figure 28.

Test 6: Toro test 2 converging.

A modified “converging” version of Toro’s test problem 2, with initial conditions (ρl, ul, pl) = (1.0, 3.0, 0.4) and (ρr, ur, pr) = (1.0, −3.0, 0.4), with maximum error metric (Δmax ρ, Δmax u, Δmax p) = (5.0e-4, 5.0e-4, 5.0e-4), at time t = 1.1. This is a test of symmetry and momentum conservation, to make sure that two colliding cells will pile up into one stationary mass with sharp edges.

More »

Figure 28 Expand

Figure 29.

Test 7: Toro test 3.

Toro’s test problem 3, with initial conditions (ρl, ul, pl) = (1.0, 0.0, 1000.0) and (ρr, ur, pr) = (1.0, 0.0, 0.01), with maximum error metric (Δmax ρ, Δmax u, Δmax p) = (1.0e-5, 5.0e-3, 1.0e-2), at time t = 0.04. This test’s solution contains a strong shock very close to a contact. Since RRM is spatially adaptive, it simply creates many new cells between the shock and the contact to get the required accuracy.

More »

Figure 29 Expand

Figure 30.

Test 8: Toro test 4.

Toro’s test problem 4, with initial conditions (ρl, ul, pl) = (5.99924, 19.5975, 460.894) and (ρr, ur, pr) = (5.99242, −6.19633, 46.0950), with maximum error metric (Δmax ρ, Δmax u, Δmax p) = (5.0e-4, 1.0e-2, 1.0e-2), at time t = 0.15. The solution to this test has two rightward-traveling shocks with a contact between them. As usual, the shocks are sharply resolved and the contact is s-shaped due to RRM’s modeling of heat diffusion.

More »

Figure 30 Expand

Figure 31.

Test 9: Toro test 5.

Toro’s test problem 5, with initial conditions (ρl, ul, pl) = (1.0, −19.59745, 1000.0) and (ρr, ur, pr) = (1.0, −19.59745, 0.01), with maximum error metric (Δmax ρ, Δmax u, Δmax p) = (1.0e-5, 1.0e-2, 1.0e-2), at time t = 0.03. The initial values of this test were designed to give an almost stationary contact at the origin, which causes difficulties for some numerical methods. RRM handles stationary contacts the same as it does moving contacts, due to the Lagrangian nature of the simulation.

More »

Figure 31 Expand

Figure 32.

Sod’s test problem at high accuracy, showing cell density.

Sod’s problem with initial conditions (ρl, ul, pl) = (1.0, 0.0, 1.0) and (ρr, ur, pr) = (0.125, 0.0, 0.1), with maximum error metric (Δmax ρ, Δmax u, Δmax p) = (1.0e-5, 1.0e-3, 1.0e-3), at time t = 1.5. Each of the approximately 800 cells is shown by a single dot, except the two edge cells which have two dots apiece. This figure shows that RRM is good at concentrating cells (and thereby computational effort) in areas of primitive variable gradient.

More »

Figure 32 Expand

Figure 33.

Sod’s test problem at medium accuracy.

Sod’s problem with initial conditions (ρl, ul, pl) = (1.0, 0.0, 1.0) and (ρr, ur, pr) = (0.125, 0.0, 0.1), with the accuracy reduced by increasing the maximum error metric to (Δmax ρ, Δmax u, Δmax p) = (1.0e-3, 1.0e-2, 1.0e-2) to show how the simulation begins to degrade, at time t = 1.5. The shock is of increased thickness due to the lower accuracy, and is “blown back” from the correct location.

More »

Figure 33 Expand

Figure 34.

Sod’s test problem at low accuracy.

Sod’s problem with initial conditions (ρl, ul, pl) = (1.0, 0.0, 1.0) and (ρr, ur, pr) = (0.125, 0.0, 0.1), with the accuracy further reduced by increasing the maximum error metric to (Δmax ρ, Δmax u, Δmax p) = (1.0e-2, 1.0e-2, 1.0e-2) to show a more extreme failure, at time t = 1.5. The shock is even thicker due to the lower accuracy, and is “blown back” even farther from the correct location.

More »

Figure 34 Expand

Figure 35.

Integral error norm vs. maximum density error metric.

Maximum integral error norm emaxinorm and maximum number of cells nmax vs. the maximum density error metric Δmax ρ for Sod’s problem. Δmax ρ is swept from 1.0e-1 to 1.0e-5, while Δmax u and Δmax p are held constant at 1.0e-1. Simulation was from time t = 0.0 to t = 1.5. This figure shows that the error decreases logarithmically as the number of cells (and thus the computational effort) increases logarithmically.

More »

Figure 35 Expand

Figure 36.

Integral error norm vs. maximum velocity error metric.

Maximum integral error norm emaxinorm and the maximum number of cells nmax vs. the maximum velocity error metric Δmax u for Sod’s problem. Δmax u is swept from 1.0e-1 to 1.0e-5, while Δmax ρ and Δmax p are held constant at 1.0e-1. Simulation was from time t = 0.0 to t = 1.5. This figure shows that the error cannot be decreased past a certain point solely by adjusting Δmax u, since there is little velocity gradient across the contact (where most of the error is concentrated in this test).

More »

Figure 36 Expand

Figure 37.

Integral error norm vs. maximum pressure error metric.

Maximum integral error norm emaxinorm and the maximum number of cells nmax vs. the maximum pressure error metric Δmax p for Sod’s problem. Δmax p is swept from 1.0e-1 to 1.0e-5, while Δmax ρ and Δmax u are held constant at 1.0e-1. Simulation was from time t = 0.0 to t = 1.5. This figure shows that the error cannot be decreased past a certain point solely by adjusting Δmax p, since there is little pressure gradient across the contact (where most of the error is concentrated in this test).

More »

Figure 37 Expand

Figure 38.

Integral error norm vs. all maximum error metrics.

Maximum integral error norm emaxinorm and the maximum number of cells nmax vs. all three maximum error metrics Δmax ρ, Δmax u, and Δmax p for Sod’s problem. All three maximum error metrics are swept from 1.0e-1 to 1.0e-5 in tandem. Simulation was from time t = 0.0 to t = 1.5. This figure shows that there is a slight synergistic effect between the three maximum error metrics, since the minimum error achieved here is slightly lower than when each of the three is set to 1.0e-5 individually.

More »

Figure 38 Expand

Figure 39.

Conservation error vs. time on Sod’s problem over 5 seconds.

The three conservation errors for Sod’s problem over the first five seconds of flow time, at a time resolution of 0.01 seconds. This graph shows that mass, momentum and energy are all conserved to within about ±6.0e-14. Total mass in the simulation is 11.25 kg, total momentum is 0.0 m·s, and total energy is 27.5 J.

More »

Figure 39 Expand

Figure 40.

Sod’s problem with solid boundaries at x = −5 and x = 5.

Sod’s problem with solid boundaries at x = −5 and x = 5, from time t = 0 to t = 20. The initial conditions are (ρl, ul, pl) = (1.0, 0.0, 1.0) and (ρr, ur, pr) = (0.125, 0.0, 0.1). The maximum error metric is (Δmax ρ, Δmax u, Δmax p) = (1.0e-4, 1.0e-2, 1.0e-2). The shock wave hits the right boundary, reflects off it, and travels back across the fluid until it reflects off the left boundary.

More »

Figure 40 Expand

Figure 41.

Inrush problem with Dirichlet boundaries at x = −5 and x = 5.

An inrush problem with Dirichlet boundaries at x = −5 and x = 5, from time t = 0 to t = 10. The initial conditions are (ρl, ul, pl) = (0.1, 0.0, 0.2) and (ρr, ur, pr) = (0.1, 0.0, 0.2). The boundary values are (ρl, ul, pl) = (0.3, 0.6, 0.4) and (ρr, ur, pr) = (0.6, −0.6, 0.5). The maximum error metric is (Δmax ρ, Δmax u, Δmax p) = (1.0e-4, 1.0e-3, 1.0e-3). Two asymmetrical shocks propagate in from the edges, cross near the center, and continue to the opposite edges, where they are squelched by the boundary conditions.

More »

Figure 41 Expand

Figure 42.

Rightward flow problem with far-field boundaries at x = −5 and x = 5.

A rightward flow problem with free boundaries at x = −5 and x = 5, from time t = 0 to t = 15. The initial conditions are (ρl, ul, pl) = (0.8, 0.8, 0.1) and (ρr, ur, pr) = (0.1, 0.7, 0.05). The maximum error metric is (Δmax ρ, Δmax u, Δmax p) = (5.0e-5, 1.0e-4, 1.0e-4). Fast-moving fluid flows in from the left boundary and pushes the slower fluid in front of it, forcing it out of the right boundary. After about t = 14 all of the fluid is in the left state, since all the right fluid as been pushed out.

More »

Figure 42 Expand