Skip to content

Commit 919900a

Browse files
authored
Merge pull request #1290 from su2code/streamwise_spanwise_periodic
CFVMOutput & Streamwise+spanwise periodic
2 parents dc2c9e1 + 1771391 commit 919900a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+299
-282
lines changed

Common/src/CConfig.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4662,8 +4662,8 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
46624662
SU2_MPI::Error("Streamwise Periodic Flow currently only implemented for incompressible flow.", CURRENT_FUNCTION);
46634663
if (Kind_Solver == INC_EULER)
46644664
SU2_MPI::Error("Streamwise Periodic Flow + Incompressible Euler: Not tested yet.", CURRENT_FUNCTION);
4665-
if (nMarker_PerBound != 2)
4666-
SU2_MPI::Error("Streamwise Periodic Flow currently only implemented for one Periodic Marker pair. Combining Streamwise and Spanwise periodicity not possible in the moment.", CURRENT_FUNCTION);
4665+
if (nMarker_PerBound == 0)
4666+
SU2_MPI::Error("A MARKER_PERIODIC pair has to be set with KIND_STREAMWISE_PERIODIC != NONE.", CURRENT_FUNCTION);
46674667
if (Energy_Equation && Streamwise_Periodic_Temperature && nMarker_Isothermal != 0)
46684668
SU2_MPI::Error("No MARKER_ISOTHERMAL marker allowed with STREAMWISE_PERIODIC_TEMPERATURE= YES, only MARKER_HEATFLUX & MARKER_SYM.", CURRENT_FUNCTION);
46694669
if (DiscreteAdjoint && Kind_Streamwise_Periodic == ENUM_STREAMWISE_PERIODIC::MASSFLOW)

SU2_CFD/include/interfaces/CInterface.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ class CInterface {
7070
unsigned short nSpanMaxAllZones = 0;
7171

7272
unsigned short nVar = 0;
73+
static constexpr size_t MAXNDIM = 3; /*!< \brief Max number of space dimensions, used in some static arrays. */
7374

7475
public:
7576
/*!
File renamed without changes.

SU2_CFD/include/output/CAdjHeatOutput.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* \file output_fea_discadj.hpp
2+
* \file CAdjHeatOutput.hpp
33
* \brief Headers of the adjoint heat output.
44
* \author T. Albring
55
* \version 7.1.1 "Blackbird"
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
/*!
2+
* \file CFVMOutput.hpp
3+
* \brief Headers of the Finite Volume Method output.
4+
* \author T. Kattmann
5+
* \version 7.1.1 "Blackbird"
6+
*
7+
* SU2 Project Website: https://su2code.github.io
8+
*
9+
* The SU2 Project is maintained by the SU2 Foundation
10+
* (http://su2foundation.org)
11+
*
12+
* Copyright 2012-2021, SU2 Contributors (cf. AUTHORS.md)
13+
*
14+
* SU2 is free software; you can redistribute it and/or
15+
* modify it under the terms of the GNU Lesser General Public
16+
* License as published by the Free Software Foundation; either
17+
* version 2.1 of the License, or (at your option) any later version.
18+
*
19+
* SU2 is distributed in the hope that it will be useful,
20+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
21+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22+
* Lesser General Public License for more details.
23+
*
24+
* You should have received a copy of the GNU Lesser General Public
25+
* License along with SU2. If not, see <http://www.gnu.org/licenses/>.
26+
*/
27+
28+
#pragma once
29+
30+
#include "COutput.hpp"
31+
32+
class CFVMOutput : public COutput{
33+
protected:
34+
/*!
35+
* \brief Constructor of the class
36+
*/
37+
CFVMOutput(CConfig *config, unsigned short nDim, bool femOutput);
38+
39+
/*!
40+
* \brief Destructor of the class.
41+
*/
42+
~CFVMOutput(void) = default;
43+
44+
/*!
45+
* \brief Add Coordinates to output.
46+
*/
47+
void AddCoordinates();
48+
49+
/*!
50+
* \brief Load the coordinates.
51+
*/
52+
template<class T>
53+
inline void LoadCoordinates(const T& Coord, const unsigned long iPoint) {
54+
SetVolumeOutputValue("COORD-X", iPoint, Coord[0]);
55+
SetVolumeOutputValue("COORD-Y", iPoint, Coord[1]);
56+
if (nDim == 3)
57+
SetVolumeOutputValue("COORD-Z", iPoint, Coord[2]);
58+
}
59+
60+
/*!
61+
* \brief Add common FVM outputs.
62+
*/
63+
void AddCommonFVMOutputs(const CConfig* config);
64+
65+
/*!
66+
* \brief Load common FVM outputs.
67+
*/
68+
void LoadCommonFVMOutputs(const CConfig* config, const CGeometry* geometry, unsigned long iPoint);
69+
};

SU2_CFD/include/output/CFlowIncOutput.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/*!
2-
* \file CFlowIncCompOutput.hpp
1+
/*!
2+
* \file CFlowIncOutput.hpp
33
* \brief Headers of the incompressible flow output.
44
* \author T. Albring, R. Sanchez
55
* \version 7.1.1 "Blackbird"

SU2_CFD/include/output/CFlowOutput.hpp

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727

2828
#pragma once
2929

30-
#include "COutput.hpp"
30+
#include "CFVMOutput.hpp"
3131
#include "../variables/CVariable.hpp"
3232

33-
class CFlowOutput : public COutput{
33+
class CFlowOutput : public CFVMOutput{
3434
public:
3535
/*!
3636
* \brief Constructor of the class
@@ -142,14 +142,4 @@ class CFlowOutput : public COutput{
142142
*/
143143
void LoadTimeAveragedData(unsigned long iPoint, CVariable *node_flow);
144144

145-
/*!
146-
* \brief Add common FVM outputs.
147-
*/
148-
void AddCommonFVMOutputs(const CConfig* config);
149-
150-
/*!
151-
* \brief Load common FVM outputs.
152-
*/
153-
void LoadCommonFVMOutputs(const CConfig* config, const CGeometry* geometry, unsigned long iPoint);
154-
155145
};

SU2_CFD/include/output/CHeatOutput.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* \file CHeatOutput.hpp
3-
* \brief Headers of the heat output.
3+
* \brief Headers of the heat output.
44
* \author R. Sanchez, T. Albring.
55
* \version 7.1.1 "Blackbird"
66
*
@@ -27,15 +27,15 @@
2727

2828
#pragma once
2929

30-
#include "COutput.hpp"
30+
#include "CFVMOutput.hpp"
3131

3232

3333
/*! \class CHeatOutput
3434
* \brief Output class for heat problems.
3535
* \author R. Sanchez, T. Albring.
3636
* \date June 5, 2018.
3737
*/
38-
class CHeatOutput final: public COutput {
38+
class CHeatOutput final: public CFVMOutput {
3939
public:
4040

4141
/*!

SU2_CFD/include/output/CMeshOutput.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* \file CMeshOutput.hpp
3-
* \brief Headers of the mesh output.
3+
* \brief Headers of the mesh output.
44
* \author R. Sanchez, T. Albring.
55
* \version 7.1.1 "Blackbird"
66
*

SU2_CFD/include/output/CMultizoneOutput.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* \file CDriverOutput.hpp
2+
* \file CMultizoneOutput.hpp
33
* \brief Headers of the main subroutines for screen and history output in multizone problems.
44
* \author R. Sanchez, T. Albring
55
* \version 7.1.1 "Blackbird"
@@ -44,7 +44,7 @@
4444
using namespace std;
4545

4646
/*!
47-
* \class CDriverOutput
47+
* \class CMultizoneOutput
4848
* \brief Class for writing the multizone output.
4949
* \author R. Sanchez, T. Albring.
5050
*/
@@ -53,7 +53,7 @@ class CMultizoneOutput final: public COutput {
5353
protected:
5454
unsigned short nZone; //!< Number of zones
5555

56-
string bgs_res_name; //!< Block-Gauss seidel residual name
56+
string bgs_res_name; //!< Block-Gauss Seidel residual name
5757
bool write_zone; //!< Boolean indicating whether the individual zones write to screen
5858

5959
public:

0 commit comments

Comments
 (0)