Branch data Line data Source code
1 : : // *****************************************************************************
2 : : /*!
3 : : \file src/PDE/CompFlow/Problem/SheddingFlow.cpp
4 : : \copyright 2012-2015 J. Bakosi,
5 : : 2016-2018 Los Alamos National Security, LLC.,
6 : : 2019-2021 Triad National Security, LLC.
7 : : All rights reserved. See the LICENSE file for details.
8 : : \brief Problem configuration for the compressible flow equations
9 : : \details This file defines a Problem policy class for the compressible flow
10 : : equations, defined in PDE/CompFlow/CompFlow.h. See PDE/CompFlow/Problem.h
11 : : for general requirements on Problem policy classes for CompFlow.
12 : : */
13 : : // *****************************************************************************
14 : :
15 : : #include "SheddingFlow.hpp"
16 : : #include "Inciter/InputDeck/InputDeck.hpp"
17 : : #include "FieldOutput.hpp"
18 : :
19 : : namespace inciter {
20 : :
21 : : extern ctr::InputDeck g_inputdeck;
22 : :
23 : : } // ::inciter
24 : :
25 : : using inciter::CompFlowProblemSheddingFlow;
26 : :
27 : : tk::InitializeFn::result_type
28 : 0 : CompFlowProblemSheddingFlow::initialize( ncomp_t system,
29 : : ncomp_t,
30 : : tk::real,
31 : : tk::real,
32 : : tk::real,
33 : : tk::real )
34 : : // *****************************************************************************
35 : : //! Evaluate initial solution at (x,y,z,t) for all components
36 : : //! \param[in] system Equation system index, i.e., which compressible
37 : : //! flow equation system we operate on among the systems of PDEs
38 : : //! \param[in] x X coordinate where to evaluate the solution
39 : : //! \return Values of all components evaluated at (x)
40 : : //! \note The function signature must follow tk::InitializeFn
41 : : // *****************************************************************************
42 : : {
43 : : using tag::param;
44 : :
45 : : // Assign uniform initial condition according to the farfield state
46 : : auto r = g_inputdeck.get< tag::param, eq,
47 : 0 : tag::farfield_density >()[ system ];
48 : : auto p = g_inputdeck.get< tag::param, eq,
49 : 0 : tag::farfield_pressure >()[ system ];
50 : : auto u = g_inputdeck.get< tag::param, eq,
51 [ - - ]: 0 : tag::farfield_velocity >()[ system ];
52 [ - - ]: 0 : auto rE = eos_totalenergy< eq >( system, r, u[0], u[1], u[2], p );
53 : :
54 [ - - ]: 0 : return {{ r, r*u[0], r*u[1], r*u[2], rE }};
55 : : }
56 : :
57 : : std::vector< std::string >
58 : 0 : CompFlowProblemSheddingFlow::names( ncomp_t ) const
59 : : // *****************************************************************************
60 : : // Return names of integral variables to be output to diagnostics file
61 : : //! \return Vector of strings labelling integral variables output
62 : : // *****************************************************************************
63 : : {
64 [ - - ][ - - ]: 0 : return { "r", "ru", "rv", "rw", "re" };
[ - - ][ - - ]
[ - - ][ - - ]
[ - - ][ - - ]
65 : : }
|