<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">OJFD</journal-id><journal-title-group><journal-title>Open Journal of Fluid Dynamics</journal-title></journal-title-group><issn pub-type="epub">2165-3852</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/ojfd.2023.131003</article-id><article-id pub-id-type="publisher-id">OJFD-123858</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Physics&amp;Mathematics</subject></subj-group></article-categories><title-group><article-title>
 
 
  Shared Memory Semi-Implicit Solver for Hydrodynamical Instability Processes
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Augusto</surname><given-names>Kielbowicz</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Diego</surname><given-names>Fernández</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Adriana</surname><given-names>Saal</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Claudio</surname><given-names>El Hasi</given-names></name><xref ref-type="aff" rid="aff2"><sup>2</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Carlos</surname><given-names>Vigh</given-names></name><xref ref-type="aff" rid="aff3"><sup>3</sup></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib></contrib-group><aff id="aff1"><addr-line>Instituto de Ciencias, Universidad Nacional de General Sarmiento, Los Polvorines, Argentina</addr-line></aff><aff id="aff3"><addr-line>Departamento de Física, Facultad de Ciencias Exactas y Naturales, Universidad de Buenos Aires, Buenos Aires, Argentina</addr-line></aff><aff id="aff2"><addr-line>Departamento de Ciencias Básicas, Facultad de Ingeniería, Universidad Argentina de la Empresa, Buenos Aires, Argentina</addr-line></aff><pub-date pub-type="epub"><day>14</day><month>02</month><year>2023</year></pub-date><volume>13</volume><issue>01</issue><fpage>32</fpage><lpage>46</lpage><history><date date-type="received"><day>20,</day>	<month>November</month>	<year>2022</year></date><date date-type="rev-recd"><day>21,</day>	<month>March</month>	<year>2023</year>	</date><date date-type="accepted"><day>24,</day>	<month>March</month>	<year>2023</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
  The Advection-Diffusion Reaction (ADR) equation appears in many problems in nature. This constitutes a general model that is useful in various scenarios, from porous media to atmospheric processes. Particularly, it is used at the interface between two fluids where different types of instabilities due to surface mobility may appear. Together with the ADR equation, the Darcy-Brinkman model describes the phenomena known as fingering that appear in different contexts. The study of this type of system gains in complexity when the number of chemical species dissolved in both fluids increases. With more solutes, the increasing complexity of this phenomenon generally requires much computational power. To face the need for more computational resources, we build a solver tool based on an Alternating Direction Implicit (ADI) scheme that can be run in Central Processing Unit (CPU) and Graphic Processing Unit (GPU) architectures on any notebook. The implementation is done using the MATLAB platform to compare both versions. It is shown that using the GPU version strongly saves both resources and calculation times.
 
</p></abstract><kwd-group><kwd>Fingering</kwd><kwd> Fluids</kwd><kwd> Simulations</kwd><kwd> Numerical Solver</kwd><kwd> Hele-Shaw Cell</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>The numerical modeling of a natural phenomenon usually demands intensive computational work. The dynamics of the interaction between two fluids is a typical example that requires the use of several specific equations such as the Advection-Diffusion Reaction (ADR) equation or the Darcy-Brinkman (DB) equation. This constitutes a general model useful in several physical phenomena, from porous media to atmospheric processes, where several variables may be involved and solving strategies are generally highly demanding in terms of computational cost. Although we will restrict ourselves to natural phenomena, there are other disciplines, like economy in the social science, which can be addressed like complex systems where behaviors highly sensitive to perturbations can be modeled mathematically to describe various economic processes [<xref ref-type="bibr" rid="scirp.123858-ref1">1</xref>]. Furthermore, sometimes to describe properly a system or to have a better resolution of the numerical results, the grid refinement increases the computational requirements.</p><p>When solving the ADR equation to simulate miscible fluid displacement, a variety of methods have been applied. They include finite differences, pseudo-spectral methods, and modified methods of characteristics, among others. Also, finite element methods have been applied (see [<xref ref-type="bibr" rid="scirp.123858-ref2">2</xref>] and references therein).</p><p>In field problems or situations with several species interacting, the increasing complexity of the problem makes it necessary to appeal to optimization criteria that save computational resources and reduce the time of the simulations. Clearly, the optimization strategies are dependent on hardware and software. Usually, sequential codes are used, but they are not adequate for parallelization. However, parallelization and high-performance computing resources have become fundamental strategies to improve numerical performance (see [<xref ref-type="bibr" rid="scirp.123858-ref3">3</xref>] and references therein). Notwithstanding this new paradigm, the procedure is not straightforward. In shared-memory bus-based multiprocessors, when the number of processors grows, the processors spend an increasing amount of time waiting for access to the bus (and shared memory). This contention reduces the performance of processors and imposes a limitation on the number of processors that can be used efficiently in bus-based systems. For example, [<xref ref-type="bibr" rid="scirp.123858-ref4">4</xref>] is made a detailed study concerning to the relationship between the behavior of shared-memory bus-based multiprocessors system and its time performance.</p><p>Several examples appear in the literature where the ADR equation was applied not only to solve environmental processes, but also most daily life issues [<xref ref-type="bibr" rid="scirp.123858-ref5">5</xref>]. Meanwhile, the use of Graphics Processing Unit (GPU) has deserved much attention lately. For example, in [<xref ref-type="bibr" rid="scirp.123858-ref6">6</xref>], the processing time could be improved by a factor of 70 using a General-Purpose Graphics Processing Unit (GPGPU) code considering heterogeneous and anisotropic media. In [<xref ref-type="bibr" rid="scirp.123858-ref7">7</xref>], a GPU algorithm was applied to hydrogeologic processes showing different benchmarks. Su et al. [<xref ref-type="bibr" rid="scirp.123858-ref8">8</xref>] presented the parallelization of a well-known code (MIN3P-THCm) widely used for the simulation of reactive transport modelling to assess long-term geochemical processes. Li et al. [<xref ref-type="bibr" rid="scirp.123858-ref9">9</xref>] proposed parallelization codes to study hydrological problems in Basin Rivers. Other applications of GPU are possible, for example, to speed up Fast Fourier Transformation for imaging processing [<xref ref-type="bibr" rid="scirp.123858-ref10">10</xref>].</p><p>Here, we use a high-level environment such as MATLAB [<xref ref-type="bibr" rid="scirp.123858-ref11">11</xref>] which has many friendly tools available for profiling and visualization that also includes a battery of NVIDIA GPU resources that allow us to implement parallelizing criteria. Our main purpose is to have a low-cost code dedicated to modeling fingering phenomena experimentally conducted in a Hele-Shaw cell to analyze several processes. To validate the outputs, we compare them with previous experimental and numerical works. In order to validate the accuracy of our algorithm, we will compare our results with previous experimental and numerical works [<xref ref-type="bibr" rid="scirp.123858-ref12">12</xref>] [<xref ref-type="bibr" rid="scirp.123858-ref13">13</xref>] [<xref ref-type="bibr" rid="scirp.123858-ref14">14</xref>]. To verify its efficiency, we will compare the computing time of several simulations.</p><p>In the next section, we present the physical context. In Section 3, we present the ADI method to solve this kind of problem and the essential characteristics of our algorithm and discuss optimization and parallelization strategies. In Section 4, we perform quality tests of rendering and benchmarking. Finally, we present our conclusions.</p></sec><sec id="s2"><title>2. Physical and Mathematical Context</title><p>The phenomenon of interfacial deformation between two fluids appears in several branches of science and technology. Its dynamics have been extensively studied experimentally, theoretically, and numerically (see earlier works of Whitaker [<xref ref-type="bibr" rid="scirp.123858-ref15">15</xref>] [<xref ref-type="bibr" rid="scirp.123858-ref16">16</xref>], Turner et al. [<xref ref-type="bibr" rid="scirp.123858-ref17">17</xref>] and Homsy [<xref ref-type="bibr" rid="scirp.123858-ref18">18</xref>] ). The mentioned deformations appear like fingers that invade the phase of lower mobility, causing the velocity of advance of one fluid onto the other to be strongly increased. The instabilities can be caused by density difference (Rayleigh-Taylor, a denser fluid on top of a less dense one [<xref ref-type="bibr" rid="scirp.123858-ref19">19</xref>] ), viscosity difference (Saffman-Taylor, a less viscous fluid displacing a more viscous one), difference in diffusion coefficients, or by concentration difference of the same solute in both fluids and double diffusion [<xref ref-type="bibr" rid="scirp.123858-ref20">20</xref>]. For example, the case of Turner instability is found in oceans when two water masses of different salt concentrations and at different temperatures come into contact [<xref ref-type="bibr" rid="scirp.123858-ref21">21</xref>].</p><p>Lately, particular attention has been paid to the case of bimolecular reactions of the form A + B → C [<xref ref-type="bibr" rid="scirp.123858-ref22">22</xref>] [<xref ref-type="bibr" rid="scirp.123858-ref23">23</xref>] and to the dissolution of CO<sub>2</sub> (g) in aqueous solutions (see also [<xref ref-type="bibr" rid="scirp.123858-ref24">24</xref>] and references therein). Rayleigh-Taylor (RT), Double Diffusion (DD), and/or Dynamic Layer Convection type instabilities appear in all these systems. The case of the liquid-liquid interfaces has deserved detailed studies, both numerical and experimental. It has been shown that generally in, a priori, stable systems; the occurrence of hydrodynamics instabilities is regulated by the existence of chemical reactions [<xref ref-type="bibr" rid="scirp.123858-ref25">25</xref>]. In situations that could give rise to both RT and DD processes, the existence of chemical reactions causes important changes in the fingering pattern [<xref ref-type="bibr" rid="scirp.123858-ref22">22</xref>]. CO<sub>2</sub> dissolution has also been extensively analyzed in the context of its geological sequestration.</p><p>Due to the difficulties to make a realistic experiment, to analyze and characterize which mechanisms are at the origin of these instabilities, a typical laboratory experimental array is a Hele-Shaw cell as shown in <xref ref-type="fig" rid="fig1">Figure 1</xref>, which consists of two plates separated by a thin space. The cell has a width L<sub>y</sub>, a highness L<sub>x</sub> and thickness e, with e = L<sub>y</sub>, L<sub>x</sub> (see more details in [<xref ref-type="bibr" rid="scirp.123858-ref23">23</xref>] ).</p><p>To study the variety of processes that could be considered, we make an example with a bimolecular reaction in a Hele-Shaw cell. In this way, we consider a bidimensional stationary, laminar, incompressible, and isothermal flow. As the problem is bidimensional, we can express the field velocity in terms of the stream function ψ ( v x = ∂ y ψ and v y = − ∂ x ψ ).</p><p>For the case of a reactive system like A + B → C, after some mathematical steps; the set of dynamical equations which describes the problem can be written in its dimensionless form as [<xref ref-type="bibr" rid="scirp.123858-ref24">24</xref>] :</p><p>∂ t a + ( v ⋅ ∇ ) a = δ a ∇ 2 a − a b (1)</p><p>∂ t b + ( v ⋅ ∇ ) b = δ b ∇ 2 b − a b (2)</p><p>∂ t c + ( v ⋅ ∇ ) c = δ b ∇ 2 c + a b (3)</p><p>ω − ∇ 2 ω = − ∂ y Γ ( a , b , c ) (4)</p><p>Γ ( a , b , c ) = R a a + R b b + R c c (5)</p><p>The first three equations correspond to the transport equations for two reactives (a and b) and the product (c), the fourth describes the motion of the fluid (the Brinkmann equation), in terms of the dimensionless curl of the velocity ω = ∇ &#215; V = ∇ 2 ψ [<xref ref-type="bibr" rid="scirp.123858-ref24">24</xref>] and the last one is the density (Γ) of the fluid. v is the velocity and δ is the dispersion coefficient, while R is the corresponding Rayleigh number associated with buoyancy driven flows.</p></sec><sec id="s3"><title>3. Numerical Strategy and Implementation</title><p>To solve the kind of problems described by the equations stated above, there are different strategies, but usually the most frequent are pseudo-spectral codes [<xref ref-type="bibr" rid="scirp.123858-ref25">25</xref>] using Fast Fourier Transform (FFT) libraries and semi-implicit finite difference schemes [<xref ref-type="bibr" rid="scirp.123858-ref26">26</xref>] [<xref ref-type="bibr" rid="scirp.123858-ref27">27</xref>].</p><p>In pseudo-spectral codes, it is necessary to impose periodic boundary conditions requiring to duplicate the computational domain, as shown in <xref ref-type="fig" rid="fig2">Figure 2</xref>(A), and</p><p>increasing memory resources. Meanwhile, in semi-implicit finite difference schemes the physical and numerical domains are the same, and the boundary conditions are imposed more straightforwardly (see <xref ref-type="fig" rid="fig2">Figure 2</xref>(B)). In what follows, we will use the semi-implicit method and apply optimization techniques.</p><sec id="s3_1"><title>3.1. Optimization</title><p>In general, for specific scientific applications, numerical codes are written to solve a particular problem. This means that probably there is no place for efficiency and speeding up in the first step to fulfill this objective. Parallel computing is the way to follow. However, before implementing a parallel code, it is mandatory to assure an optimal serial version of it. After that, it is necessary to choose the proper parallelization strategy.</p></sec><sec id="s3_2"><title>3.2. Vectorization</title><p>To reduce the number of computations, in MATLAB is easy to optimize through vectorization of the set of variables in the system of Equations (1)-(5). Some advantages of implementing this strategy are concise and simple programming and reduction of processing time.</p></sec><sec id="s3_3"><title>3.3. Shared and Distributed Memory</title><p>In a shared memory architecture, a number of independent processors share a single memory and they can directly access any data location. In distributed-memory, messages are used to coordinate data transmission between processors. The time needed to exchange data between processors is in favor of shared memory computers which communicate faster than distributed memory computers. CPU and GPU paradigms intelligently combine the best features of both to achieve even further computational gains. Both are increasingly being seen as indispensable coprocessors, instead of substitutes for each other. We exploit the parallelisms in computation via the NVIDIA CUDA programming model.</p></sec><sec id="s3_4"><title>3.4. ADI Scheme</title><p>Semi-implicit codes are conditional stable, and the stability is easy to manage numerically. We use the Alternating Direction Implicit (ADI) method, this method computes the nearest neighbors in alternate directions in one intermediate step (see stencil scheme in <xref ref-type="fig" rid="fig3">Figure 3</xref>). For more details, see [<xref ref-type="bibr" rid="scirp.123858-ref27">27</xref>] and references therein. The use of this scheme has the following advantages; the boundary conditions are more realistic and allow using around 90% of the integration domain as shown in <xref ref-type="fig" rid="fig2">Figure 2</xref>(B).</p></sec><sec id="s3_5"><title>3.5. Algorithm</title><p>We implement our model, Equations (1)-(5), in a MATLAB environment. For the problem, we are facing on the boundary conditions used are:</p><p>v ⋅ n ⌣ = 0 (No flux condition) (6)</p><p>And Wood’s conditions on the vorticity [<xref ref-type="bibr" rid="scirp.123858-ref28">28</xref>] :</p><p>ω | x = − 3 ψ | x + Δ x ( Δ x ) 2 − 1 2 ω | x + Δ x en x = 0 (7)</p><p>ω | x = − 3 ψ | x − Δ x ( Δ x ) 2 − 1 2 ω | L x − Δ x en x = L x (8)</p><p>ω | y = − 3 ψ | y + Δ y ( Δ y ) 2 − 1 2 ω | y + Δ y en y = 0 (9)</p><p>ω | y = − 3 ψ | L y − Δ y ( Δ y ) 2 − 1 2 ω | L y − Δ y en y = L y (10)</p><p>The algorithm follows the diagram flux shown in <xref ref-type="fig" rid="fig4">Figure 4</xref>, the modules presented are:</p><p>&#183; Initialization: Initialize all variables and fields.</p><p>&#183; Inputs: We introduce the input values of the numerical experiment, which includes concentrations values, diffusivities, kind of reactions and Rayleigh numbers, initial velocities.</p><p>&#183; Stability condition checking: In each iteration, step is necessary to assure that numerical information speed is lower than physical information speed:</p><p>( v x Δ t Δ x ) 2 &lt; 2 δ i Δ t Δ x 2 &lt; 1 (11)</p><p>( v y Δ t Δ y ) 2 &lt; 2 δ i Δ t Δ y 2 &lt; 1 (12)</p><p>&#183; DB if statement: the key point of the algorithm is to decide if this is a Darcy-Brinkman problem or not.</p><p>If so, the code activates the:</p><p>&#183; Vorticity module: The code computes the vorticity including the diffusion term, If not, it goes directly to the following module:</p><p>&#183; Streamline module. This module computes the streamline functions and its boundary conditions. After that, begins the loop at the desirable final time.</p><p>&#183; Velocity: In each step, the velocity field is computed using direct forward time iteration and checking stability again.</p><p>&#183; ADR (ADI) module: Computes the chemical reactive-diffusion-advection evolution. Here, we implement the ADI scheme and solve the tridiagonal system that appears in this kind of resolution [<xref ref-type="bibr" rid="scirp.123858-ref26">26</xref>].</p><p>&#183; Outputs: Finally, the outputs are saved.</p><p>Essentially, this flux diagram is for the serial version but the parallel one has the same spirit.</p></sec></sec><sec id="s4"><title>4. Numerical Experiments</title><p>In the previous sections, we exposed the main ideas to develop two versions of a code used to simulate the onset of instabilities in some physical situations, a CPU sequential vectorized version and a GPU-CUDA parallelized version. From here on, we are going to probe the goodness of them to reproduce the experimental results. On the other hand, we will see that the codes are versatile enough to manage an increasing number of variables. Meanwhile, the GPU version is more efficient to process information.</p><sec id="s4_1"><title>4.1. Case A → A: Physical Behavior</title><p>The first example to study is a numerical experiment considering just one species. That corresponds to gaseous CO<sub>2</sub> absorption in a liquid medium (A → A), as it is the case of CO<sub>2</sub> sequestration. <xref ref-type="fig" rid="fig5">Figure 5</xref> shows the concentration map comparison at the same final time simulation for the CPU and GPU versions, which is consistent with the real and numerical experiments made in [<xref ref-type="bibr" rid="scirp.123858-ref12">12</xref>] and [<xref ref-type="bibr" rid="scirp.123858-ref13">13</xref>]. The similarity between the previous and present results is remarkable. In <xref ref-type="fig" rid="fig6">Figure 6</xref>, we compare each point of the grid for the results of both versions of the code, with the same and different initial seeds to see consistency of the outputs of the system. For different initial seeds, the solutions are qualitatively identical into a range of 10% relative to the total concentration. Based on these results, we can</p><p>conclude that both codes correctly reproduce the experiments.</p></sec><sec id="s4_2"><title>4.2. Case A → A: Benchmarking</title><p>We also consider the speed-up of the GPU version compared to the CPU version. <xref ref-type="fig" rid="fig7">Figure 7</xref> shows that a very low-resolution GPU is not convenient due to the time needed for initialization variables requires around 40 seconds. For higher resolutions, the optimized version is clearly faster than the CPU version.</p></sec><sec id="s4_3"><title>4.3. Case A + B → C: Physical Behavior</title><p>Here, we apply both codes to a more complex situation a bimolecular reaction, i.e., two species A and B that react and give a product C. In <xref ref-type="fig" rid="fig8">Figure 8</xref>, we show</p><p>the fingering evolution at a given time of the CPU (left) and GPU (right) versions. Both numerical results are quite like the real experiments [<xref ref-type="bibr" rid="scirp.123858-ref29">29</xref>].</p><p>To verify the accuracy between versions, we computed, for the simulations corresponding to <xref ref-type="fig" rid="fig8">Figure 8</xref>, the difference for each grid point comparing the concentrations A, B and C in both versions. In <xref ref-type="fig" rid="fig9">Figure 9</xref>(A), we showed that if we use the same initial noise seed to generate the evolution, we obtain the same output. In Figures 9(B)-(D), we used different initial noise seeds in CPU and GPU versions. As seen in the figures the concentration difference for each case is of the order of 1% - 5% with respect to the absolute concentration values for each reactive species. The difference for concentration C in this scale is not appreciable.</p></sec><sec id="s4_4"><title>4.4. Case A + B→ C: Benchmarking</title><p>To get some idea of the comparative performance of both versions of the code, we make several experiments ranging from 50 &#215; 50 to 900 &#215; 900 grid points for the same final time, the results are shown in <xref ref-type="fig" rid="fig1">Figure 1</xref>0(A). It is clearly seen, on</p><p>a logarithmic scale, that the GPU strategy runs more than an order of magnitude faster than the CPU one. In <xref ref-type="fig" rid="fig1">Figure 1</xref>0(B), we show the computational time ratio of CPU over GPU. As seen the GPU version is faster than CPU version after around 40,000 grid points. At 900,000 grid points, the ratio of computational time is around 18.</p><p>Both figures show that the setting and initialization of the code require extra time for the GPU version. This time is relevant for smaller grids, but for numerical domains of the order of 100 &#215; 100 points the computational time cost is similar. Then, for greater grids, the time consumption for the simulations strongly grows in the case of the CPU version with respect to the GPU version. It means that for low resolution experiments, it is not strictly necessary to use parallelization, but is mandatory when the resolution requirements imply many grid points.</p></sec><sec id="s4_5"><title>4.5. Case A + B → C + D</title><p>The codes presented here can easily be adapted to problems with an increasing number of variables. For instance, the analysis of a bimolecular reaction is sometimes performed using color indicators to visualize how the reaction proceeds. Recently, it was discovered that the color indicators are not passive species, but they play a role in the development of the instabilities. In this way, the number of involved species must be increased. To compare the performance of both codes when the number of variables becomes greater, we study a bimolecular reaction including a color indicator (A + B → C + D) [<xref ref-type="bibr" rid="scirp.123858-ref29">29</xref>]. Also, in this case, the results of the numerical simulations using CPU and GPU versions of the code are like the real experiments. In <xref ref-type="fig" rid="fig1">Figure 1</xref>1, we present the map of the density and total concentration. Allow us to observe that numerically, we can study each species separately to get a better understanding of the physical subjacent processes. <xref ref-type="fig" rid="fig1">Figure 1</xref>2 shows how each reactant and product contributes to the behavior of the whole system.</p></sec></sec><sec id="s5"><title>5. Conclusions</title><p>We present an optimized solver for problems related to the advection-diffusion</p><p>reaction equation. We developed two versions using a semi-implicit scheme. The codes are implemented in MATLAB using vectorized architectures for CPU and GPU-CUDA. With these tools, we can analyze the study of how to solve fingering phenomena using ADR models. To stress the main ideas presented here, we can say that:</p><p>1) The fingering problem is explicitly solved using both sequential vectorize and GPU versions of the code.</p><p>2) The numerical results of the presented cases agree with experimental results and other numerical results shown in previous works.</p><p>3) For low-resolution simulations, the performance of both codes is similar, but for grids of a larger number of points, the use of GPU is more suitable. It is seen that as the number of grid points increases, the GPU version becomes more efficient.</p><p>4) This solver code could be implemented in an arbitrary number of variables; this will allow us to study phenomena including temperature, for example.</p><p>In summary, we get a code that can be useful even in an environment where not much hardware power is available.</p></sec><sec id="s6"><title>Acknowledgements</title><p>The authors are grateful for the financial support of UNGS.</p></sec><sec id="s7"><title>Conflicts of Interest</title><p>The authors declare no conflicts of interest regarding the publication of this paper.</p></sec><sec id="s8"><title>Cite this paper</title><p>Kielbowicz, A., Fern&#225;ndez, D., Saal, A., El Hasi, C. and Vigh, C. (2023) Shared Memory Semi-Implicit Solver for Hydrodynamical Instability Processes. Open Journal of Fluid Dynamics, 13, 32-46. https://doi.org/10.4236/ojfd.2023.131003</p></sec></body><back><ref-list><title>References</title><ref id="scirp.123858-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Perevoznikov, E. and Lomteva, E. (2019) Modeling of Economic Processes, Instability and Chaos. Journal of Applied Mathematics and Physics, 7, 356-363. https://doi.org/10.4236/jamp.2019.72027</mixed-citation></ref><ref id="scirp.123858-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Sesini, P.A., de Souza, D.A. and Coutinho, A.L. (2010) Finite Element Simulation of Viscous Fingering in Miscible Displacements at High Mobility-Ratios. Journal of the Brazilian Society of Mechanical Sciences and Engineering, 32, 292-299. https://doi.org/10.1590/S1678-58782010000300013</mixed-citation></ref><ref id="scirp.123858-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Narang, H., Wu, F. and Mohammed, A.R. (2019) An Efficient Acceleration of Solving Heat and Mass Transfer Equations with the First Kind Boundary Conditions in Capillary Porous Radially Composite Cylinder Using Programmable Graphics Hardware. Journal of Computer and Communications, 7, 267-281. https://doi.org/10.4236/jcc.2019.77022</mixed-citation></ref><ref id="scirp.123858-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Zuberek, W.M. (2018) Timed Petri Net Models of Shared-Memory Bus-Based Multiprocessors. Journal of Computer and Communications, 6, 1-14. https://doi.org/10.4236/jcc.2018.610001</mixed-citation></ref><ref id="scirp.123858-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Egidi, N., Giacomini, J., Maponi, P., Perticarini, A., Cognigni, L. and Fioretti, L. (2022) An Advection-Diffusion-Reaction Model for Coffee Percolation. Computational and Ap-plied Mathematics, 41, Article No. 229. https://doi.org/10.1007/s40314-022-01929-9</mixed-citation></ref><ref id="scirp.123858-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Carlotto, T., da Silva, R.V. and Grzybowski, J.M.V. (2019) GPGPU-Accelerated Environmental Modelling Based on the 2D Advection-Reaction-Diffusion Equation. Environmental Modelling &amp; Software, 116, 87-99. https://doi.org/10.1016/j.envsoft.2019.02.001</mixed-citation></ref><ref id="scirp.123858-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Le, P.V., Kumar, P., Valocchi, A.J. and Dang, H.V. (2015) GPU-Based High-Performance Computing for Integrated Surface-Sub-Surface Flow Modeling. Environmental Modelling &amp; Software, 73, 1-13. https://doi.org/10.1016/j.envsoft.2015.07.015</mixed-citation></ref><ref id="scirp.123858-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Su, D., Mayer, K.U. and MacQuarrie, K.T.B. (2017) Parallelization of MIN3P-THCm: A High Performance Computational Framework for Subsurface Flow and Reactive Transport Simulation. Environmental Modelling &amp; Software, 95, 271-289. https://doi.org/10.1016/j.envsoft.2017.06.008</mixed-citation></ref><ref id="scirp.123858-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Li, T., Wang, G., Chen, J. and Wang, H. (2011) Dynamic Parallelization of Hydrological Model Simulations. Environmental Modelling &amp; Software, 26, 1736-1746. https://doi.org/10.1016/j.envsoft.2011.07.015</mixed-citation></ref><ref id="scirp.123858-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">Haque, M.N. and Uddin, M.S. (2011) Accelerating Fast Fourier Transformation for Image Processing Using Graphics Processing Unit. International Conference on Signal Processing, Image Processing, and Pattern Recognition, Jeju Island, 8-10 December 2011, 300-309.https://doi.org/10.1007/978-3-642-27183-0_32</mixed-citation></ref><ref id="scirp.123858-ref11"><label>11</label><mixed-citation publication-type="other" xlink:type="simple">MATLAB, 9.2.0.538062. (R2017a) The MathWorks Inc., Natick, MA.</mixed-citation></ref><ref id="scirp.123858-ref12"><label>12</label><mixed-citation publication-type="other" xlink:type="simple">Fernandez, D., Binda, L., Zalts, A., El Hasi, C. and D’Onofrio, A. (2018) Lateral Movements in Rayleigh-Taylor Instabilities Due to Frontiers. Numerical Analysis. Chaos: An Interdisciplinary Journal of Nonlinear Science, 28, Article ID: 013108. https://doi.org/10.1063/1.4995396</mixed-citation></ref><ref id="scirp.123858-ref13"><label>13</label><mixed-citation publication-type="other" xlink:type="simple">Binda, L., Fernandez, D., El Hasi, C., Zalts, A. and D’Onofrio, A. (2018) Lateral Movements in Rayleigh-Taylor Instabilities Due to Frontiers. Experimental Study. Chaos: An Interdisciplinary Journal of Nonlinear Science, 28, Article ID: 013107. https://doi.org/10.1063/1.4995395</mixed-citation></ref><ref id="scirp.123858-ref14"><label>14</label><mixed-citation publication-type="other" xlink:type="simple">Kuster, S., Riolfo, L.A., Zalts, A., El Hasi, C., Almarcha, C., Trevelyan, P.M.J. and D’Onofrio, A. (2011) Differential Diffusion Effects on Buoyancy-Driven Instabilities of Acid-Base Fronts: The Case of a Color Indicator. Physical Chemistry Chemical Physics, 13, 17295-17303. https://doi.org/10.1039/c1cp21185d</mixed-citation></ref><ref id="scirp.123858-ref15"><label>15</label><mixed-citation publication-type="other" xlink:type="simple">Whitaker, N. (1990) Numerical Solution of the Hele-Shaw Equations. Journal of Computational Physics, 90, 176-199. https://doi.org/10.1016/0021-9991(90)90202-Chttp://www.sciencedirect.com/science/article/pii/002199919090202C</mixed-citation></ref><ref id="scirp.123858-ref16"><label>16</label><mixed-citation publication-type="other" xlink:type="simple">Whitaker, N. (1994) Some Numerical Methods for the Hele-Shaw Equations. Journal of Computational Physics, 111, 81-88. https://doi.org/10.1006/jcph.1994.1046</mixed-citation></ref><ref id="scirp.123858-ref17"><label>17</label><mixed-citation publication-type="other" xlink:type="simple">Turner, J. (1974) Double-Diffusive Phenomena. Annual Review of Fluid Mechanics, 6, 37-54. https://doi.org/10.1146/annurev.fl.06.010174.000345</mixed-citation></ref><ref id="scirp.123858-ref18"><label>18</label><mixed-citation publication-type="other" xlink:type="simple">Homsy, G.M. (1987) Viscous Fingering in Porous Media. Annual Review of Fluid Mechanics, 19, 271-311. https://doi.org/10.1146/annurev.fl.19.010187.001415</mixed-citation></ref><ref id="scirp.123858-ref19"><label>19</label><mixed-citation publication-type="other" xlink:type="simple">Sharp, D.H. (1984) An Overview of Rayleigh-Taylor Instability. Physica D: Nonlinear Phenomena, 12, 3-18. https://doi.org/10.1016/0167-2789(84)90510-4</mixed-citation></ref><ref id="scirp.123858-ref20"><label>20</label><mixed-citation publication-type="other" xlink:type="simple">Lemaigre, L., Budroni, M.A., Riolfo, L.A., Grosfils, P. and De Wit, A. (2013) Asymmetric Rayleigh-Taylor and Double-Diffusive Fingers in Reactive Systems. Physics of Fluids, 25, Article ID: 014103. https://doi.org/10.1063/1.4774321</mixed-citation></ref><ref id="scirp.123858-ref21"><label>21</label><mixed-citation publication-type="other" xlink:type="simple">You, Y. (2002) A Global Ocean Climatological Atlas of the Turner Angle: Implications for Double-Diffusion and Water-Mass Structure. Deep Sea Research Part I: Oceanographic Research Papers, 49, 2075-2093. https://doi.org/10.1016/S0967-0637(02)00099-7</mixed-citation></ref><ref id="scirp.123858-ref22"><label>22</label><mixed-citation publication-type="other" xlink:type="simple">Trevelyan, P.M.J., Almarcha, C. and De Wit, A. (2015) Buoyancy-Driven Instabilities Around Miscible A + B → C Reaction Fronts: A General Classification. Physical Review E, 91, Article ID: 023001. https://doi.org/10.1103/PhysRevE.91.023001</mixed-citation></ref><ref id="scirp.123858-ref23"><label>23</label><mixed-citation publication-type="other" xlink:type="simple">Zalts, A., El Hasi, C., Rubio, D., Urena, A. and D’Onofrio, A. (2008) Pattern Formation Driven by an Acid-Base Neutralization Reaction in Aqueous Media in a Gravitational Field. Physical Review E, 77, Article ID: 015304. https://doi.org/10.1103/PhysRevE.77.015304</mixed-citation></ref><ref id="scirp.123858-ref24"><label>24</label><mixed-citation publication-type="other" xlink:type="simple">Tan, C.T. and Homsy, G.M. (1986) Stability of Miscible Displacements in Porous Media: Rectilinear Flow. The Physics of Fluids, 29, Article No. 3548. https://doi.org/10.1063/1.865832</mixed-citation></ref><ref id="scirp.123858-ref25"><label>25</label><mixed-citation publication-type="other" xlink:type="simple">Mangiavacchi, N., Coutinho, A.L.G.A. and Ebecken, N.F.F. (1997) Parallel Pseudo-Spectral Simulations of Nonlinear Viscous Fingering in Mis-Cible Displacements. WIT Transactions on the Built Environment, 32, 498-506.</mixed-citation></ref><ref id="scirp.123858-ref26"><label>26</label><mixed-citation publication-type="other" xlink:type="simple">Tan, C.T. and Homsy, G.M. (1988) Simulation of Nonlinear Viscous Fingering in Miscible Displacement. The Physics of Fluids, 31, 1330-1338. https://doi.org/10.1063/1.866726</mixed-citation></ref><ref id="scirp.123858-ref27"><label>27</label><mixed-citation publication-type="other" xlink:type="simple">Press, W.H., Teukolsky, S.A., Vetterling, W.T. and Flannery, B.P. (1993) Numerical Recipes in Fortran 77: The Art of Scientific Computing. 2nd Edition, Cambridge University Press, Cambridge, MA.</mixed-citation></ref><ref id="scirp.123858-ref28"><label>28</label><mixed-citation publication-type="other" xlink:type="simple">Woods, L.C. (1954) A Note on the Numerical Solution of Fourth Order Differential Equations. Aeronautical Quarterly, 5, 176-184. https://doi.org/10.1017/S0001925900001177</mixed-citation></ref><ref id="scirp.123858-ref29"><label>29</label><mixed-citation publication-type="other" xlink:type="simple">Kim, M.C. and Cardoso, S.S. (2019) Diffusivity Ratio Effect on the Onset of the Buoyancy-Driven Instability of an A + B → C Chemical Reaction System in a Hele-Shaw Cell: Numerical Simulations and Comparison with Experiments. Physics of Fluids, 31, Article ID: 084101. https://doi.org/10.1063/1.5094913</mixed-citation></ref></ref-list></back></article>