<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Analysis of the behavior of OpenFOAM solvers for 3D problem of supersonic flow around a cone at an angle of attack</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>A.E. Bondarev</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>A.E. Kuvshinnikov bond@keldysh.ru</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>kuvsh</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>@yandex.com</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Keldysh Institute of Applied Mathematics RAS</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>This paper is devoted to comparative analysis of numerical methods accuracy. Comparative estimation of accuracy is performed for numerical methods presented as solvers integrated to open sotware package OpenFOAM. Three different OpenFOAM solvers are selected to numerically solve the problem of supersonic flow around a cone. The angle of attack, cone half-angle and Mach number were varied in the selected ranges with a certain step. This approach is implemented using a generalized computational experiment that allows, based on parallel technologies, the simultaneous solution of the same basic problem with different input parameters. A number of test calculations were carried out. The deviation fields of gas-dynamic quantities for all solvers are analyzed. The construction of a generalized computational experiment made it possible to compare the accuracy of the considered solvers not only for one, separately taken problem, but for a class of problems specified by the ranges of variation of the determining parameters. Such an assessment of accuracy can be very useful for users of the software package when choosing a solver. Also, the results obtained can be useful for solver developers.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Currently, there are many software packages that solve
the problems of flowing around elongated bodies of
rotation. The researcher may ask a question: which
package is best suited for such calculations. In [
        <xref ref-type="bibr" rid="ref1 ref2">1, 2</xref>
        ], it
was proposed to recreate at a modern level the technology
developed in the 80s at the Keldysh Institute of Applied
Mathematics by A.E. Bondarev and V.A. Cherkashin
under the leadership of A.V. Zabrodin. The essence of this
technology is that the drag coefficient Cx is considered as
the sum of the other three coefficients: Cp, Cf and Cd. This
approach was widely used in the problems of mass
industrial analysis of the aerodynamic properties of
elongated bodies of rotation and turned out to be very
effective [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>
        To calculate the aerodynamic characteristics of the
inviscid flow past elongated bodies of rotation, the
OpenFOAM software package was used [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. This is a free
software product designed to solve the problems of hydro
and gas dynamics. It is used in many fields of science and
technology, both in commercial and in academic
organizations. OpenFOAM contains a number of solvers
with various computational properties.
      </p>
      <p>
        It is necessary to clarify that some solvers were
previously created by the developers of the OpenFOAM
package [
        <xref ref-type="bibr" rid="ref5 ref6 ref7">5-7</xref>
        ], but users can create their own solvers [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
This work is devoted to a comparative analysis of the
accuracy of a number of solvers using the example of the
problem of supersonic flow around a cone at an angle of
attack.
      </p>
      <p>
        Similarly to [
        <xref ref-type="bibr" rid="ref1 ref2">1, 2</xref>
        ], tabular solutions [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] were used as a
reference. These tables were obtained using
finitedifference methods in a wide range of Mach numbers and
cone half-angle with a change in the angle of attack.
      </p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref1 ref2">1, 2</xref>
        ], the case of a flow near a cone at a zero angle
of attack was considered. The purpose of this article is to
solve a more general problem, namely, to find a flow
around a cone when the angle of attack changes. The
problem is solved in three-dimensional space of variable
determining parameters, where the Mach number, the
halfangle of the cone, and the angle of attack are considered as
the determining parameters. Thus, we obtain a numerical
solution for the class of problems, where the class is given
by the ranges of variation of the determining parameters.
      </p>
      <p>
        It should be noted that comparisons of solvers were
also made in [
        <xref ref-type="bibr" rid="ref10 ref11 ref12">10-12</xref>
        ]. However, these comparisons were
made using other examples and do not give clear
recommendations on choosing a solver for the class of
problems considered.
2.
      </p>
    </sec>
    <sec id="sec-2">
      <title>Materials and method</title>
      <p>
        The statement of the problem is presented in full
accordance with [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], which considers the results of an
inviscid flow around cones with different half-angles of
cones and angles of attack for different Mach numbers.
      </p>
      <p>We study the flow around an elongated body of
rotation, placed in a uniform supersonic ideal gas flow at
an angle of attack α = 0°, 5°, 10° with a Mach number M
= 3, 5. The body under investigation is a cone with a
halfangle of β = 10°, 15°, 20°. The conditions of the incoming
stream at the input are indicated by the index “∞”, and at
the output, by the index ξ, since the solution is self-similar
and depends on the dimensionless variable. The flow
scheme is shown in Fig. 1.</p>
      <p>For calculation, the Euler system of equations is used.
The system is supplemented by the ideal gas equation of
state.</p>
    </sec>
    <sec id="sec-3">
      <title>Compared solvers</title>
      <p>For comparison, 3 solvers are selected from the
OpenFOAM software package:</p>
      <p>
        rhoCentralFoam - is based on a central-upwind scheme
which is a combination of central difference and upwind
schemes [
        <xref ref-type="bibr" rid="ref5 ref6">5,6</xref>
        ].
      </p>
      <p>
        sonicFoam - is based on the PISO algorithm (Pressure
Implicit with Splitting of Operator) [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
      </p>
      <p>
        pisoCentralFoam - is a combination of a
centralupwind scheme with the PISO algorithm [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. The
pisoCentralFoam solver is not included in the standard set
of solvers; it was created at the Ivannikov Institute for
System Programming of the RAS.
      </p>
      <p>Calculations for all solvers were carried out using the
OpenFOAM version 2.3.0.</p>
    </sec>
    <sec id="sec-4">
      <title>Computations and results</title>
      <p>Mesh generation, initial and boundary conditions
Fig. 2 shows the computational domain. The setting of
the boundary conditions is presented in Table 1. The
parameters of the incoming flow are set on the left border,
denoted as “inlet”. The number of grid cells is 336000.</p>
      <p>
        The convergence study was carried out similarly to the
statement of the problem in [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] and showed a satisfactory
result.
      </p>
      <sec id="sec-4-1">
        <title>Choosing solvers parameters for unification</title>
        <p>
          In the OpenFOAM package, there are two options for
approximating differential operators: directly in the
solver's code or using the fvSchemes and fvSolution
configuration files. To make the comparison correct, we
used the same parameters where it was possible,
proceeding in the same way as in [
          <xref ref-type="bibr" rid="ref5 ref6">5, 6</xref>
          ]. In the file
fvSchemes: ddtSchemes - Euler, gradSchemes - Gauss
linear, divSchemes - Gauss linear, laplacianSchemes
Gauss linear corrected, interpolationSchemes - vanLeer. In
the file fvSolution: solver - smoothSolver, smoother
symGaussSeidel, tolerance - 1e-09, nCorrectors - 2,
nNonOrthogonalCorrectors - 1.
        </p>
      </sec>
      <sec id="sec-4-2">
        <title>Flow calculation</title>
        <p>
          ∑ ym − y mexact 2Vm ∑ y mexact 2 Vm
m m
where ym is the pressure p in the cell, Vm is the cell volume
for the cone half-angle β = 10°, 15°, 20° in steps of 5° and
the Mach numbers M =2 -7. The minimum values are
highlighted in bold. The values of ymexact are obtained by
interpolating table values from [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ] into grid cells. It should
be noted that the authors of the tables [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ] indicate the
admissibility of interpolation for all parameters and table
values.
        </p>
        <p>Next, we present several graphical representations of
tables 2-7.</p>
        <p>Further we will use abbreviations for solvers: rCF
(rhoCentralFoam), pCF (pisoCentralFoam), sF
(sonicFoam), QGDF (QGDFoam).
Fig. 4 shows the dependence of the deviation from the
exact solution in an analog of the norm L2 for pressure for
the cone half-angle β = 20° and the incoming flow Mach
number M = 3 with variation of the angle of attack α and
solvers (Table IV). One can notice an increase in deviation
with increasing angle of attack. The increase in the
deviation with increasing Mach number is also clearly
visible. Similar ratios are observed in other tables.</p>
        <p>Fig. 5 shows the dependence of the deviation from the
exact solution in an analog of the norm L2 for pressure for
the angle of attack α = 5° and the Mach number M = 3 with
variation of the choice of solver and the angle of the
halfcone of the cone. Here, with an increase in the half-angle
of the cone, the deviation from the exact solution also
increases.</p>
        <p>The results show that the rhoCentralFoam solver has a
minimum error rate for the pressure field. The
pisoCentralFoam solver is second in accuracy.</p>
        <p>Solver sonicFoam has oscillations at the front of the
shock wave. Such oscillations are amplified with an
increase in the angle of attack and the cone half-angle.
Thus, the error rates of this solver are maximum among all
compared solvers. Thus, it can be argued that the solvers
rhoCentralFoam and pisoCentrlFoam provide the best
accuracy for the class of problems and can be used in the
construction of computational technology for calculating
the flow for elongated bodies of rotation.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgments</title>
      <p>This work was supported by RFBR grants
19-0100402 and 20-01-00358.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Bondarev</surname>
            <given-names>A.E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kuvshinnikov</surname>
            <given-names>A.E.</given-names>
          </string-name>
          <article-title>Comparative study of the accuracy for OpenFOAM solvers</article-title>
          . - 2017
          <source>Ivannikov ISPRAS Open Conference (ISPRAS)</source>
          , Moscow, pp.
          <fpage>132</fpage>
          -
          <lpage>136</lpage>
          ,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Bondarev</surname>
            <given-names>A.E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kuvshinnikov</surname>
            <given-names>A.E.</given-names>
          </string-name>
          <article-title>Analysis of the accuracy of OpenFOAM solvers for the problem of supersonic flow around a cone</article-title>
          . - In: Shi Y. et al. (eds) Computational Science - ICCS
          <year>2018</year>
          .
          <source>ICCS 2018. Lecture Notes in Computer Science</source>
          , vol.
          <volume>10862</volume>
          . Springer, Cham,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Krasil</surname>
          </string-name>
          <article-title>'shchikov</article-title>
          <string-name>
            <given-names>A.P.</given-names>
            ,
            <surname>Gur'yashkin L.P. Eksperimental</surname>
          </string-name>
          <article-title>'nye issledovaniya tel vrashcheniya v giperzvukovykh potokakh. [Experimental investigations of bodies of rotation in hypersonic flows]</article-title>
          . - Moscow: FIZMATLIT,
          <year>2007</year>
          . [In Russian]
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>OpenFOAM</given-names>
            <surname>Foundation</surname>
          </string-name>
          . [Online]. Available: http://www.openfoam.org.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Kurganov</surname>
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tadmor</surname>
            <given-names>E.</given-names>
          </string-name>
          <article-title>New high-resolution central schemes for nonlinear conservation laws and convection-diffusion equations</article-title>
          . // J. Comput.
          <source>Phys.</source>
          , vol.
          <volume>160</volume>
          , pp.
          <fpage>241</fpage>
          -
          <lpage>282</lpage>
          ,
          <year>2000</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Greenshields</surname>
            <given-names>C.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Weller</surname>
            <given-names>H.G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gasparini</surname>
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Reese</surname>
            <given-names>J.M.</given-names>
          </string-name>
          <article-title>Implementation of semi-discrete, non-staggered central schemes in a colocated, polyhedral, finite volume framework, for high-speed viscous flows</article-title>
          . // Int. J.
          <string-name>
            <surname>Numer</surname>
          </string-name>
          .
          <source>Meth. Fluids</source>
          , vol.
          <volume>63</volume>
          , no.
          <issue>1</issue>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>21</lpage>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Issa</surname>
            <given-names>R.</given-names>
          </string-name>
          <article-title>Solution of the implicit discretized fluid flow equations by operator splitting</article-title>
          . // J. Comput.
          <source>Phys.</source>
          , vol.
          <volume>62</volume>
          , no.
          <issue>1</issue>
          , pp.
          <fpage>40</fpage>
          -
          <lpage>65</lpage>
          ,
          <year>1986</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Kraposhin</surname>
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bovtrikova</surname>
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Strijhak</surname>
            <given-names>S.</given-names>
          </string-name>
          <article-title>Adaptation of Kurganov-Tadmor numerical scheme for applying in combination with the PISO method in numerical simulation of flows in a wide range of Mach numbers</article-title>
          . // Procedia Computer Science, vol.
          <volume>66</volume>
          , pp.
          <fpage>43</fpage>
          -
          <lpage>52</lpage>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Babenko</surname>
            <given-names>K.I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Voskresenskii</surname>
            <given-names>G.P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lyubimov</surname>
            <given-names>A.N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rusanov</surname>
            <given-names>V.V.</given-names>
          </string-name>
          <article-title>Prostranstvennoe obtekanie gladkikh tel ideal'nym gazom, [Three-dimensional ideal gas flow past smooth bodies]</article-title>
          . - Мoscow: Nauka,
          <year>1964</year>
          . [In Russian]
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Karvatskii</surname>
            <given-names>A.Ya.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pulinets</surname>
            <given-names>I.V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lazarev</surname>
            <given-names>T.V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pedchenko</surname>
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Yu</surname>
          </string-name>
          .
          <article-title>Chislennoe modelirovanie sverkhzvukovogo obtekaniya klina s primeneniem svobodnogo otkrytogo programmnogo koda. [Numerical modelling of supersonic flow around a wedge with the use of free open software code OpenFOAM]</article-title>
          .
          <article-title>- Space science and technology</article-title>
          , vol.
          <volume>21</volume>
          , no.
          <issue>2</issue>
          , pp.
          <fpage>47</fpage>
          -
          <lpage>52</lpage>
          ,
          <year>2015</year>
          . [In Russian]
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <surname>Gutierrez</surname>
            <given-names>L.F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tamagno</surname>
            <given-names>J.P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Elaskar</surname>
            <given-names>S.A.</given-names>
          </string-name>
          <article-title>High speed flow simulation using OpenFOAM</article-title>
          . // Mecanica Computacional, vol. XXXI,
          <string-name>
            <surname>Salta</surname>
          </string-name>
          , Argentina, pp.
          <fpage>2939</fpage>
          -
          <lpage>2959</lpage>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <surname>Lorenzon</surname>
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Elaskar</surname>
            <given-names>S.A.</given-names>
          </string-name>
          <article-title>Simulacion de flujos supersonicos bidimensionales y axialmente simetricos con OpenFOAM</article-title>
          . // Revista de la Facultad de Ciencias Exactas, Fisicas y Naturales, vol.
          <volume>2</volume>
          , no.
          <issue>2</issue>
          , pp.
          <fpage>65</fpage>
          -
          <lpage>76</lpage>
          ,
          <year>2015</year>
          . Bondarev Alexander E.,
          <source>PhD</source>
          , senior researcher, Keldysh Institute of Applied Mathematics RAS.
          <article-title>E-mail: bond@keldysh</article-title>
          .ru. Kuvshinnikov Artem E., junior researcher, Keldysh Institute of Applied Mathematics RAS.
          <article-title>E-mail: kuvsh90@yandex</article-title>
          .com
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>