Analytic Solution to the Piecewise Linear Interface Construction Problem and Its Application in Curvature Calculation for Volume-of-Fluid Simulation Codes
The plane–cube intersection problem has been discussed in the literature since 1984 and iterative solutions to it have been used as part of piecewise linear interface construction (PLIC) in computational fluid dynamics simulation codes ever since. In many cases, PLIC is the bottleneck of these simul...
Main Authors: | , |
---|---|
Format: | Article |
Language: | English |
Published: |
MDPI AG
2022-01-01
|
Series: | Computation |
Subjects: | |
Online Access: | https://www.mdpi.com/2079-3197/10/2/21 |
_version_ | 1797481531450589184 |
---|---|
author | Moritz Lehmann Stephan Gekle |
author_facet | Moritz Lehmann Stephan Gekle |
author_sort | Moritz Lehmann |
collection | DOAJ |
description | The plane–cube intersection problem has been discussed in the literature since 1984 and iterative solutions to it have been used as part of piecewise linear interface construction (PLIC) in computational fluid dynamics simulation codes ever since. In many cases, PLIC is the bottleneck of these simulations regarding computing time, so a faster analytic solution to the plane–cube intersection would greatly reduce the computing time for such simulations. We derive an analytic solution for all intersection cases and compare it to the previous solution from Scardovelli and Zaleski (Scardovelli, R.; Zaleski, S. Analytical relations connecting linear interfaces and volume fractions in rectangular grids. <i>J. Comput. Phys.</i><b>2000</b>, <i>164</i>, 228–237), which we further improve to include edge cases and micro-optimize to reduce arithmetic operations and branching. We then extend our comparison regarding computing time and accuracy to include two different iterative solutions as well. We find that the best choice depends on the employed hardware platform: on the CPU, Newton–Raphson is fastest with compiler optimization enabled, while analytic solutions perform better than iterative solutions without. On the GPU, the fastest method is our optimized version of the analytic SZ solution. We finally provide details on one of the applications of PLIC—curvature calculation for the Volume-of-Fluid model used for free surface fluid simulations in combination with the lattice Boltzmann method. |
first_indexed | 2024-03-09T22:15:55Z |
format | Article |
id | doaj.art-13ebe0e9be2e43c18b4148e93fbf09c9 |
institution | Directory Open Access Journal |
issn | 2079-3197 |
language | English |
last_indexed | 2024-03-09T22:15:55Z |
publishDate | 2022-01-01 |
publisher | MDPI AG |
record_format | Article |
series | Computation |
spelling | doaj.art-13ebe0e9be2e43c18b4148e93fbf09c92023-11-23T19:22:25ZengMDPI AGComputation2079-31972022-01-011022110.3390/computation10020021Analytic Solution to the Piecewise Linear Interface Construction Problem and Its Application in Curvature Calculation for Volume-of-Fluid Simulation CodesMoritz Lehmann0Stephan Gekle1Biofluid Simulation and Modeling, Theoretische Physik VI, University of Bayreuth, 95448 Bayreuth, GermanyBiofluid Simulation and Modeling, Theoretische Physik VI, University of Bayreuth, 95448 Bayreuth, GermanyThe plane–cube intersection problem has been discussed in the literature since 1984 and iterative solutions to it have been used as part of piecewise linear interface construction (PLIC) in computational fluid dynamics simulation codes ever since. In many cases, PLIC is the bottleneck of these simulations regarding computing time, so a faster analytic solution to the plane–cube intersection would greatly reduce the computing time for such simulations. We derive an analytic solution for all intersection cases and compare it to the previous solution from Scardovelli and Zaleski (Scardovelli, R.; Zaleski, S. Analytical relations connecting linear interfaces and volume fractions in rectangular grids. <i>J. Comput. Phys.</i><b>2000</b>, <i>164</i>, 228–237), which we further improve to include edge cases and micro-optimize to reduce arithmetic operations and branching. We then extend our comparison regarding computing time and accuracy to include two different iterative solutions as well. We find that the best choice depends on the employed hardware platform: on the CPU, Newton–Raphson is fastest with compiler optimization enabled, while analytic solutions perform better than iterative solutions without. On the GPU, the fastest method is our optimized version of the analytic SZ solution. We finally provide details on one of the applications of PLIC—curvature calculation for the Volume-of-Fluid model used for free surface fluid simulations in combination with the lattice Boltzmann method.https://www.mdpi.com/2079-3197/10/2/21PLICplane–cube intersectioncurvatureVolume-of-Fluidlattice Boltzmann methodGPU |
spellingShingle | Moritz Lehmann Stephan Gekle Analytic Solution to the Piecewise Linear Interface Construction Problem and Its Application in Curvature Calculation for Volume-of-Fluid Simulation Codes Computation PLIC plane–cube intersection curvature Volume-of-Fluid lattice Boltzmann method GPU |
title | Analytic Solution to the Piecewise Linear Interface Construction Problem and Its Application in Curvature Calculation for Volume-of-Fluid Simulation Codes |
title_full | Analytic Solution to the Piecewise Linear Interface Construction Problem and Its Application in Curvature Calculation for Volume-of-Fluid Simulation Codes |
title_fullStr | Analytic Solution to the Piecewise Linear Interface Construction Problem and Its Application in Curvature Calculation for Volume-of-Fluid Simulation Codes |
title_full_unstemmed | Analytic Solution to the Piecewise Linear Interface Construction Problem and Its Application in Curvature Calculation for Volume-of-Fluid Simulation Codes |
title_short | Analytic Solution to the Piecewise Linear Interface Construction Problem and Its Application in Curvature Calculation for Volume-of-Fluid Simulation Codes |
title_sort | analytic solution to the piecewise linear interface construction problem and its application in curvature calculation for volume of fluid simulation codes |
topic | PLIC plane–cube intersection curvature Volume-of-Fluid lattice Boltzmann method GPU |
url | https://www.mdpi.com/2079-3197/10/2/21 |
work_keys_str_mv | AT moritzlehmann analyticsolutiontothepiecewiselinearinterfaceconstructionproblemanditsapplicationincurvaturecalculationforvolumeoffluidsimulationcodes AT stephangekle analyticsolutiontothepiecewiselinearinterfaceconstructionproblemanditsapplicationincurvaturecalculationforvolumeoffluidsimulationcodes |