Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsteady CHT #854

Merged
merged 33 commits into from
Feb 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
708121a
Tidy up CHeatIteration by inheriting from CFluidIteration.
oleburghardt Jan 29, 2020
9d4e408
Small fix in CHeatFVMVariable so that it can be used in unsteady runs.
oleburghardt Jan 29, 2020
02eea23
Quick solution to set same physical time step in all zones for unstea…
oleburghardt Jan 29, 2020
f35f260
Add test case incomp_2d_unsteady (basically incomp_2d with additional…
oleburghardt Jan 29, 2020
18af1de
Merge branch 'develop' of https://github.com/su2code/SU2 into feature…
oleburghardt Jan 29, 2020
7ce063e
added time convergence monitoring for multizone driver
ScSteffen Jan 29, 2020
34aa908
Merge branch 'feature_unsteady_cht' of https://github.com/su2code/SU2…
ScSteffen Jan 29, 2020
da8a691
Small revert.
oleburghardt Jan 30, 2020
dbc8ff7
Merge branch 'feature_unsteady_cht' of https://github.com/su2code/SU2…
oleburghardt Jan 30, 2020
9ce9811
Quick solution to fix missing reference time in heat solvers (this ne…
oleburghardt Jan 31, 2020
4a6344c
Increasing Reynolds number (by higher density) in unsteady CHT test c…
oleburghardt Jan 31, 2020
64a170d
Change test case parameters.
oleburghardt Feb 3, 2020
18fa12a
Merge branch 'develop' into feature_unsteady_cht
talbring Feb 3, 2020
b8dd47c
Adapt unsteady CHT test case parameters to prepare it as regression t…
oleburghardt Feb 5, 2020
36e4291
Add unsteady CHT case to regression tests.
oleburghardt Feb 5, 2020
60358b6
Merge branch 'develop' of https://github.com/su2code/SU2 into feature…
oleburghardt Feb 5, 2020
725ceee
Merge branch 'feature_unsteady_cht' of https://github.com/su2code/SU2…
oleburghardt Feb 5, 2020
b8f571e
Small fix.
oleburghardt Feb 5, 2020
008c35a
Another small fix.
oleburghardt Feb 5, 2020
4cebf34
Yet another small fix for unsteady regression test.
oleburghardt Feb 5, 2020
382e82f
Adapt to parallel regression test values.
oleburghardt Feb 6, 2020
772756a
Replace fixed value hack for multizone reference time adjustment by a…
oleburghardt Feb 6, 2020
8e27cf8
Improve comment.
oleburghardt Feb 6, 2020
4606456
Quick workaround for multizone reference times incorporating the FEA …
oleburghardt Feb 7, 2020
d103c4a
(Correct) quick workaround for multizone reference times incorporatin…
oleburghardt Feb 7, 2020
7061830
Small change for Time_Ref initialization.
oleburghardt Feb 7, 2020
0e4f584
Merge branch 'develop' of https://github.com/su2code/SU2 into feature…
oleburghardt Feb 7, 2020
6702690
Merge branch 'develop' of https://github.com/su2code/SU2 into feature…
oleburghardt Feb 10, 2020
99f5284
Merge branch 'develop' of https://github.com/su2code/SU2 into feature…
oleburghardt Feb 18, 2020
c3c114c
Remove 'FVM' extensions from all names related to the finite volume h…
oleburghardt Feb 18, 2020
0796772
Typos and spaces.
oleburghardt Feb 25, 2020
cac5f03
Merge branch 'develop' of https://github.com/su2code/SU2 into feature…
oleburghardt Feb 25, 2020
fd49a59
Small change (adding paranthesis around booleans).
oleburghardt Feb 25, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Common/include/option_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ enum ENUM_SOLVER {
INC_EULER = 4, /*!< \brief Definition of the incompressible Euler's solver. */
INC_NAVIER_STOKES =5, /*!< \brief Definition of the incompressible Navier-Stokes' solver. */
INC_RANS = 6, /*!< \brief Definition of the incompressible Reynolds-averaged Navier-Stokes' (RANS) solver. */
HEAT_EQUATION_FVM = 7, /*!< \brief Definition of the finite volume heat solver. */
HEAT_EQUATION = 7, /*!< \brief Definition of the finite volume heat solver. */
FLUID_STRUCTURE_INTERACTION = 8, /*!< \brief Definition of a FSI solver. */
FEM_ELASTICITY = 9, /*!< \brief Definition of a FEM solver. */
ADJ_EULER = 10, /*!< \brief Definition of the continuous adjoint Euler's solver. */
Expand Down Expand Up @@ -202,15 +202,15 @@ static const MapType<string, ENUM_SOLVER> Solver_Map = {
MakePair("ADJ_EULER", ADJ_EULER)
MakePair("ADJ_NAVIER_STOKES", ADJ_NAVIER_STOKES)
MakePair("ADJ_RANS", ADJ_RANS )
MakePair("HEAT_EQUATION_FVM", HEAT_EQUATION_FVM)
MakePair("HEAT_EQUATION", HEAT_EQUATION)
MakePair("ELASTICITY", FEM_ELASTICITY)
MakePair("DISC_ADJ_EULER", DISC_ADJ_EULER)
MakePair("DISC_ADJ_RANS", DISC_ADJ_RANS)
MakePair("DISC_ADJ_NAVIERSTOKES", DISC_ADJ_NAVIER_STOKES)
MakePair("DISC_ADJ_INC_EULER", DISC_ADJ_INC_EULER)
MakePair("DISC_ADJ_INC_RANS", DISC_ADJ_INC_RANS)
MakePair("DISC_ADJ_INC_NAVIERSTOKES", DISC_ADJ_INC_NAVIER_STOKES)
MakePair("DISC_ADJ_HEAT_EQUATION_FVM", DISC_ADJ_HEAT)
MakePair("DISC_ADJ_HEAT_EQUATION", DISC_ADJ_HEAT)
MakePair("DISC_ADJ_FEM_EULER", DISC_ADJ_FEM_EULER)
MakePair("DISC_ADJ_FEM_RANS", DISC_ADJ_FEM_RANS)
MakePair("DISC_ADJ_FEM_NS", DISC_ADJ_FEM_NS)
Expand Down
6 changes: 4 additions & 2 deletions Common/src/CConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1062,6 +1062,8 @@ void CConfig::SetPointersNull(void) {

Mesh_Box_Size = NULL;

Time_Ref = 1.0;

}

void CConfig::SetRunTime_Options(void) {
Expand Down Expand Up @@ -4832,7 +4834,7 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
case FEM_ELASTICITY:
Kind_Solver = DISC_ADJ_FEM;
break;
case HEAT_EQUATION_FVM:
case HEAT_EQUATION:
Kind_Solver = DISC_ADJ_HEAT;
break;
default:
Expand Down Expand Up @@ -8188,7 +8190,7 @@ void CConfig::SetGlobalParam(unsigned short val_solver,
SetKind_TimeIntScheme(Kind_TimeIntScheme_AdjTurb);
}
break;
case HEAT_EQUATION_FVM:
case HEAT_EQUATION:
if (val_system == RUNTIME_HEAT_SYS) {
SetKind_ConvNumScheme(NONE, NONE, NONE, NONE, NONE, NONE);
SetKind_TimeIntScheme(Kind_TimeIntScheme_Heat);
Expand Down
7 changes: 7 additions & 0 deletions SU2_CFD/include/drivers/CDiscAdjMultizoneDriver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,11 @@ class CDiscAdjMultizoneDriver : public CMultizoneDriver {
* \param[in] iZone - Zone where solver residuals are computed.
*/
void SetResidual_BGS(unsigned short iZone);

/*!
* \brief gets Convergence on physical time scale, (deactivated in adjoint case)
* \return false
*/
inline bool GetTimeConvergence() const override {return false;};

};
4 changes: 2 additions & 2 deletions SU2_CFD/include/drivers/CDiscAdjSinglezoneDriver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ class CDiscAdjSinglezoneDriver : public CSinglezoneDriver {

/*!
* \brief gets Convergence on physical time scale, (deactivated in adjoint case)
* \return true, if convergence criteria has been met, else false
* \return false
*/
bool GetTimeConvergence() const override;
inline bool GetTimeConvergence() const override {return false;};

};
7 changes: 7 additions & 0 deletions SU2_CFD/include/drivers/CMultizoneDriver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,11 @@ class CMultizoneDriver : public CDriver {

bool Monitor(unsigned long TimeIter);

/*!
* \brief Returns whether all specified windowed-time-averaged ouputs have been converged
* \return Boolean indicating whether the problem is converged.
*/
inline virtual bool GetTimeConvergence() const{
return driver_output->GetTimeConvergence();
}
};
77 changes: 13 additions & 64 deletions SU2_CFD/include/iteration_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,8 @@ class CFEMFluidIteration : public CFluidIteration {
* \brief Class for driving an iteration of the heat system.
* \author T. Economon
*/
class CHeatIteration : public CIteration {
class CHeatIteration : public CFluidIteration {

public:

/*!
Expand All @@ -696,22 +697,6 @@ class CHeatIteration : public CIteration {
*/
~CHeatIteration(void);

/*!
* \brief Preprocessing to prepare for an iteration of the physics.
* \param[in] ??? - Description here.
*/
void Preprocess(COutput *output,
CIntegration ****integration,
CGeometry ****geometry,
CSolver *****solver,
CNumerics ******numerics,
CConfig **config,
CSurfaceMovement **surface_movement,
CVolumetricMovement ***grid_movement,
CFreeFormDefBox*** FFDBox,
unsigned short val_iZone,
unsigned short val_iInst);

/*!
* \brief Perform a single iteration of the heat system.
* \param[in] output - Pointer to the COutput class.
Expand All @@ -737,7 +722,7 @@ class CHeatIteration : public CIteration {
unsigned short val_iInst);

/*!
* \brief Perform a single iteration of the wave system.
* \brief Iterate the heat system for a number of Inner_Iter iterations.
* \param[in] output - Pointer to the COutput class.
* \param[in] integration - Container vector with all the integration methods.
* \param[in] geometry - Geometrical definition of the problem.
Expand All @@ -747,19 +732,18 @@ class CHeatIteration : public CIteration {
* \param[in] surface_movement - Surface movement classes of the problem.
* \param[in] grid_movement - Volume grid movement classes of the problem.
* \param[in] FFDBox - FFD FFDBoxes of the problem.
* \param[in] val_iZone - zone of the problem.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why you removed val_iZone ? val_iInst is missing as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are missing everywhere. I think one should add those consistently.

*/
void Solve(COutput *output,
CIntegration ****integration,
CGeometry ****geometry,
CSolver *****solver,
CNumerics ******numerics,
CConfig **config,
CSurfaceMovement **surface_movement,
CVolumetricMovement ***grid_movement,
CFreeFormDefBox*** FFDBox,
unsigned short val_iZone,
unsigned short val_iInst);
CIntegration ****integration,
CGeometry ****geometry,
CSolver *****solver,
CNumerics ******numerics,
CConfig **config,
CSurfaceMovement **surface_movement,
CVolumetricMovement ***grid_movement,
CFreeFormDefBox*** FFDBox,
unsigned short val_iZone,
unsigned short val_iInst);

/*!
* \brief Updates the containers for the heat system.
Expand All @@ -776,41 +760,6 @@ class CHeatIteration : public CIteration {
CFreeFormDefBox*** FFDBox,
unsigned short val_iZone,
unsigned short val_iInst);

/*!
* \brief Monitors the convergence and other metrics for the heat system.
* \param[in] ??? - Description here.
*/
bool Monitor(COutput *output,
CIntegration ****integration,
CGeometry ****geometry,
CSolver *****solver,
CNumerics ******numerics,
CConfig **config,
CSurfaceMovement **surface_movement,
CVolumetricMovement ***grid_movement,
CFreeFormDefBox*** FFDBox,
unsigned short val_iZone,
unsigned short val_iInst);

/*!
* \brief Postprocess ???.
* \param[in] solver - Container vector with all the solutions.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] config - Definition of the particular problem.
*/
void Postprocess(COutput *output,
CIntegration ****integration,
CGeometry ****geometry,
CSolver *****solver,
CNumerics ******numerics,
CConfig **config,
CSurfaceMovement **surface_movement,
CVolumetricMovement ***grid_movement,
CFreeFormDefBox*** FFDBox,
unsigned short val_iZone,
unsigned short val_iInst);

};

/*!
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* \file CHeatSolverFVM.hpp
* \brief Headers of the CHeatSolverFVM class
* \author O. Burghardt
* \file CHeatSolver.hpp
* \brief Headers of the CHeatSolver class
* \author F. Palacios, T. Economon
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unimportant ... but why did you change the file author?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a very minor correction. Don't know why, maybe for consistency. There are no real guidelines for that anyway.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"If you wrote everything you are the author" than seems to be the rule no?

* \version 7.0.1 "Blackbird"
*
* SU2 Project Website: https://su2code.github.io
Expand All @@ -28,14 +28,15 @@
#pragma once

#include "CSolver.hpp"
#include "../variables/CHeatFVMVariable.hpp"
#include "../variables/CHeatVariable.hpp"

/*! \class CHeatSolverFVM
* \brief Main class for defining the finite-volume heat solver.
* \author O. Burghardt
* \date January 19, 2018.
/*!
* \class CHeatSolver
* \brief Main class for defining the finite-volume heat solver.
* \author O. Burghardt
* \version 7.0.1 "Blackbird"
*/
class CHeatSolverFVM final : public CSolver {
class CHeatSolver final : public CSolver {
protected:
unsigned short nVarFlow, nMarker, CurrentMesh;
su2double **HeatFlux, *HeatFlux_per_Marker, *Surface_HF, Total_HeatFlux, AllBound_HeatFlux,
Expand All @@ -44,7 +45,7 @@ class CHeatSolverFVM final : public CSolver {
*Surface_Areas, Total_HeatFlux_Areas, Total_HeatFlux_Areas_Monitor;
su2double ***ConjugateVar, ***InterfaceVar;

CHeatFVMVariable* nodes = nullptr; /*!< \brief The highest level in the variable hierarchy this solver can safely use. */
CHeatVariable* nodes = nullptr; /*!< \brief The highest level in the variable hierarchy this solver can safely use. */

/*!
* \brief Return nodes to allow CSolver::base_nodes to be set.
Expand All @@ -56,17 +57,17 @@ class CHeatSolverFVM final : public CSolver {
/*!
* \brief Constructor of the class.
*/
CHeatSolverFVM(void);
CHeatSolver(void);

/*!
* \brief Constructor of the class.
*/
CHeatSolverFVM(CGeometry *geometry, CConfig *config, unsigned short iMesh);
CHeatSolver(CGeometry *geometry, CConfig *config, unsigned short iMesh);

/*!
* \brief Destructor of the class.
*/
virtual ~CHeatSolverFVM(void);
virtual ~CHeatSolver(void);

/*!
* \brief Restart residual and compute gradients.
Expand Down Expand Up @@ -380,4 +381,4 @@ class CHeatSolverFVM final : public CSolver {
*/
inline su2double GetHeatFlux(unsigned short val_marker, unsigned long val_vertex) const override { return HeatFlux[val_marker][val_vertex]; }

};
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* \file CHeatFVMVariable.hpp
* \file CHeatVariable.hpp
* \brief Class for defining the variables of the finite-volume heat equation solver.
* \author F. Palacios, T. Economon
* \version 7.0.1 "Blackbird"
Expand Down Expand Up @@ -30,12 +30,12 @@
#include "CVariable.hpp"

/*!
* \class CHeatFVMVariable
* \class CHeatVariable
* \brief Class for defining the variables of the finite-volume heat equation solver.
* \author O. Burghardt
* \version 7.0.1 "Blackbird"
*/
class CHeatFVMVariable final : public CVariable {
class CHeatVariable final : public CVariable {
protected:
MatrixType Solution_Direct; /*!< \brief Direct solution container for use in the adjoint Heat solver. */

Expand All @@ -51,12 +51,12 @@ class CHeatFVMVariable final : public CVariable {
* \param[in] nvar - Number of variables of the problem.
* \param[in] config - Definition of the particular problem.
*/
CHeatFVMVariable(su2double heat, unsigned long npoint, unsigned long ndim, unsigned long nvar, CConfig *config);
CHeatVariable(su2double heat, unsigned long npoint, unsigned long ndim, unsigned long nvar, CConfig *config);

/*!
* \brief Destructor of the class.
*/
~CHeatFVMVariable() = default;
~CHeatVariable() = default;

/*!
* \brief Get the value of the reconstruction variables gradient at a node.
Expand Down
2 changes: 1 addition & 1 deletion SU2_CFD/src/drivers/CDiscAdjMultizoneDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ void CDiscAdjMultizoneDriver::SetObjFunction(unsigned short kind_recording) {
case DISC_ADJ_EULER: case DISC_ADJ_NAVIER_STOKES: case DISC_ADJ_RANS:
// per-surface output to be added soon
break;
case HEAT_EQUATION_FVM: case DISC_ADJ_HEAT:
case HEAT_EQUATION: case DISC_ADJ_HEAT:
// per-surface output to be added soon
break;
default:
Expand Down
4 changes: 0 additions & 4 deletions SU2_CFD/src/drivers/CDiscAdjSinglezoneDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,3 @@ void CDiscAdjSinglezoneDriver::SecondaryRecording(){
AD::ClearAdjoints();

}

bool CDiscAdjSinglezoneDriver::GetTimeConvergence() const{
return false;
}
Loading