diff --git a/Common/include/option_structure.hpp b/Common/include/option_structure.hpp index 7b9c2336cd8f..457262aa7b04 100644 --- a/Common/include/option_structure.hpp +++ b/Common/include/option_structure.hpp @@ -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. */ @@ -202,7 +202,7 @@ static const MapType 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) @@ -210,7 +210,7 @@ static const MapType Solver_Map = { 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) diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index e29637c3a3ae..0f5ef1891764 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -1062,6 +1062,8 @@ void CConfig::SetPointersNull(void) { Mesh_Box_Size = NULL; + Time_Ref = 1.0; + } void CConfig::SetRunTime_Options(void) { @@ -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: @@ -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); diff --git a/SU2_CFD/include/drivers/CDiscAdjMultizoneDriver.hpp b/SU2_CFD/include/drivers/CDiscAdjMultizoneDriver.hpp index bbda2314d3ce..52d5880d14cf 100644 --- a/SU2_CFD/include/drivers/CDiscAdjMultizoneDriver.hpp +++ b/SU2_CFD/include/drivers/CDiscAdjMultizoneDriver.hpp @@ -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;}; + }; diff --git a/SU2_CFD/include/drivers/CDiscAdjSinglezoneDriver.hpp b/SU2_CFD/include/drivers/CDiscAdjSinglezoneDriver.hpp index 9d587ea4d6a7..e2c23060b662 100644 --- a/SU2_CFD/include/drivers/CDiscAdjSinglezoneDriver.hpp +++ b/SU2_CFD/include/drivers/CDiscAdjSinglezoneDriver.hpp @@ -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;}; }; diff --git a/SU2_CFD/include/drivers/CMultizoneDriver.hpp b/SU2_CFD/include/drivers/CMultizoneDriver.hpp index db35496ebd5f..e3bdb7eec98a 100644 --- a/SU2_CFD/include/drivers/CMultizoneDriver.hpp +++ b/SU2_CFD/include/drivers/CMultizoneDriver.hpp @@ -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(); + } }; diff --git a/SU2_CFD/include/iteration_structure.hpp b/SU2_CFD/include/iteration_structure.hpp index 927cda189f7a..388609f12a1d 100644 --- a/SU2_CFD/include/iteration_structure.hpp +++ b/SU2_CFD/include/iteration_structure.hpp @@ -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: /*! @@ -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. @@ -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. @@ -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. */ 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. @@ -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); - }; /*! diff --git a/SU2_CFD/include/solvers/CHeatSolverFVM.hpp b/SU2_CFD/include/solvers/CHeatSolver.hpp similarity index 96% rename from SU2_CFD/include/solvers/CHeatSolverFVM.hpp rename to SU2_CFD/include/solvers/CHeatSolver.hpp index ab00530ae94e..7adb3a4f5381 100644 --- a/SU2_CFD/include/solvers/CHeatSolverFVM.hpp +++ b/SU2_CFD/include/solvers/CHeatSolver.hpp @@ -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 * \version 7.0.1 "Blackbird" * * SU2 Project Website: https://su2code.github.io @@ -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, @@ -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. @@ -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. @@ -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]; } -}; \ No newline at end of file +}; diff --git a/SU2_CFD/include/variables/CHeatFVMVariable.hpp b/SU2_CFD/include/variables/CHeatVariable.hpp similarity index 93% rename from SU2_CFD/include/variables/CHeatFVMVariable.hpp rename to SU2_CFD/include/variables/CHeatVariable.hpp index b620f04ac8ad..d7831d500430 100644 --- a/SU2_CFD/include/variables/CHeatFVMVariable.hpp +++ b/SU2_CFD/include/variables/CHeatVariable.hpp @@ -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" @@ -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. */ @@ -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. diff --git a/SU2_CFD/src/drivers/CDiscAdjMultizoneDriver.cpp b/SU2_CFD/src/drivers/CDiscAdjMultizoneDriver.cpp index 2c7a500895ac..3194c8c151d1 100644 --- a/SU2_CFD/src/drivers/CDiscAdjMultizoneDriver.cpp +++ b/SU2_CFD/src/drivers/CDiscAdjMultizoneDriver.cpp @@ -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: diff --git a/SU2_CFD/src/drivers/CDiscAdjSinglezoneDriver.cpp b/SU2_CFD/src/drivers/CDiscAdjSinglezoneDriver.cpp index c8693efb6984..8366c291922f 100644 --- a/SU2_CFD/src/drivers/CDiscAdjSinglezoneDriver.cpp +++ b/SU2_CFD/src/drivers/CDiscAdjSinglezoneDriver.cpp @@ -542,7 +542,3 @@ void CDiscAdjSinglezoneDriver::SecondaryRecording(){ AD::ClearAdjoints(); } - -bool CDiscAdjSinglezoneDriver::GetTimeConvergence() const{ - return false; -} diff --git a/SU2_CFD/src/drivers/CDriver.cpp b/SU2_CFD/src/drivers/CDriver.cpp index f9b7771dd207..0b23e05421e9 100644 --- a/SU2_CFD/src/drivers/CDriver.cpp +++ b/SU2_CFD/src/drivers/CDriver.cpp @@ -51,7 +51,7 @@ #include "../../include/solvers/CAdjEulerSolver.hpp" #include "../../include/solvers/CAdjNSSolver.hpp" #include "../../include/solvers/CAdjTurbSolver.hpp" -#include "../../include/solvers/CHeatSolverFVM.hpp" +#include "../../include/solvers/CHeatSolver.hpp" #include "../../include/solvers/CFEASolver.hpp" #include "../../include/solvers/CTemplateSolver.hpp" #include "../../include/solvers/CDiscAdjSolver.hpp" @@ -1092,10 +1092,10 @@ void CDriver::Solver_Preprocessing(CConfig* config, CGeometry** geometry, CSolve bool euler, ns, turbulent, fem_euler, fem_ns, fem_turbulent, fem_transition, adj_euler, adj_ns, adj_turb, - heat_fvm, + heat, disc_adj_heat, fem, disc_adj_fem, spalart_allmaras, neg_spalart_allmaras, menter_sst, transition, - template_solver, disc_adj, disc_adj_turb, disc_adj_heat, + template_solver, disc_adj, disc_adj_turb, fem_dg_flow, fem_dg_shock_persson, e_spalart_allmaras, comp_spalart_allmaras, e_comp_spalart_allmaras; @@ -1112,7 +1112,7 @@ void CDriver::Solver_Preprocessing(CConfig* config, CGeometry** geometry, CSolve neg_spalart_allmaras = false; disc_adj = false; fem = false; disc_adj_fem = false; - heat_fvm = false; disc_adj_heat = false; + heat = false; disc_adj_heat = false; transition = false; fem_transition = false; template_solver = false; fem_dg_flow = false; fem_dg_shock_persson = false; @@ -1126,31 +1126,31 @@ void CDriver::Solver_Preprocessing(CConfig* config, CGeometry** geometry, CSolve switch (config->GetKind_Solver()) { case TEMPLATE_SOLVER: template_solver = true; break; case EULER : euler = true; compressible = true; break; - case NAVIER_STOKES: ns = true; compressible = true; heat_fvm = config->GetWeakly_Coupled_Heat(); break; - case RANS : ns = true; turbulent = true; compressible = true; if (config->GetKind_Trans_Model() == LM) transition = true; heat_fvm = config->GetWeakly_Coupled_Heat(); break; + case NAVIER_STOKES: ns = true; compressible = true; heat = config->GetWeakly_Coupled_Heat(); break; + case RANS : ns = true; turbulent = true; compressible = true; if (config->GetKind_Trans_Model() == LM) transition = true; heat = config->GetWeakly_Coupled_Heat(); break; case INC_EULER : euler = true; incompressible = true; break; - case INC_NAVIER_STOKES: ns = true; incompressible = true; heat_fvm = config->GetWeakly_Coupled_Heat(); break; - case INC_RANS : ns = true; turbulent = true; incompressible = true; if (config->GetKind_Trans_Model() == LM) transition = true; heat_fvm = config->GetWeakly_Coupled_Heat(); break; + case INC_NAVIER_STOKES: ns = true; incompressible = true; heat = config->GetWeakly_Coupled_Heat(); break; + case INC_RANS : ns = true; turbulent = true; incompressible = true; if (config->GetKind_Trans_Model() == LM) transition = true; heat = config->GetWeakly_Coupled_Heat(); break; case FEM_EULER : fem_euler = true; compressible = true; break; case FEM_NAVIER_STOKES: fem_ns = true; compressible = true; break; case FEM_RANS : fem_ns = true; fem_turbulent = true; compressible = true; if(config->GetKind_Trans_Model() == LM) fem_transition = true; break; case FEM_LES : fem_ns = true; compressible = true; break; - case HEAT_EQUATION_FVM: heat_fvm = true; break; + case HEAT_EQUATION: heat = true; break; case FEM_ELASTICITY: fem = true; break; case ADJ_EULER : euler = true; adj_euler = true; compressible = true; break; case ADJ_NAVIER_STOKES : ns = true; turbulent = (config->GetKind_Turb_Model() != NONE); compressible = true; adj_ns = true; break; case ADJ_RANS : ns = true; turbulent = true; adj_ns = true; compressible = true; adj_turb = (!config->GetFrozen_Visc_Cont()); break; case DISC_ADJ_EULER: euler = true; disc_adj = true; compressible = true; break; - case DISC_ADJ_NAVIER_STOKES: ns = true; disc_adj = true; compressible = true; heat_fvm = config->GetWeakly_Coupled_Heat(); break; - case DISC_ADJ_RANS: ns = true; turbulent = true; disc_adj = true; compressible = true; disc_adj_turb = (!config->GetFrozen_Visc_Disc()); heat_fvm = config->GetWeakly_Coupled_Heat(); break; + case DISC_ADJ_NAVIER_STOKES: ns = true; disc_adj = true; compressible = true; heat = config->GetWeakly_Coupled_Heat(); break; + case DISC_ADJ_RANS: ns = true; turbulent = true; disc_adj = true; compressible = true; disc_adj_turb = (!config->GetFrozen_Visc_Disc()); heat = config->GetWeakly_Coupled_Heat(); break; case DISC_ADJ_INC_EULER: euler = true; disc_adj = true; incompressible = true; break; - case DISC_ADJ_INC_NAVIER_STOKES: ns = true; disc_adj = true; incompressible = true; heat_fvm = config->GetWeakly_Coupled_Heat(); break; - case DISC_ADJ_INC_RANS: ns = true; turbulent = true; disc_adj = true; incompressible = true; disc_adj_turb = (!config->GetFrozen_Visc_Disc()); heat_fvm = config->GetWeakly_Coupled_Heat(); break; + case DISC_ADJ_INC_NAVIER_STOKES: ns = true; disc_adj = true; incompressible = true; heat = config->GetWeakly_Coupled_Heat(); break; + case DISC_ADJ_INC_RANS: ns = true; turbulent = true; disc_adj = true; incompressible = true; disc_adj_turb = (!config->GetFrozen_Visc_Disc()); heat = config->GetWeakly_Coupled_Heat(); break; case DISC_ADJ_FEM_EULER: fem_euler = true; disc_adj = true; compressible = true; break; case DISC_ADJ_FEM_NS: fem_ns = true; disc_adj = true; compressible = true; break; case DISC_ADJ_FEM_RANS: fem_ns = true; fem_turbulent = true; disc_adj = true; compressible = true; if(config->GetKind_Trans_Model() == LM) fem_transition = true; break; case DISC_ADJ_FEM: fem = true; disc_adj_fem = true; compressible = true; break; - case DISC_ADJ_HEAT: heat_fvm = true; disc_adj_heat = true; break; + case DISC_ADJ_HEAT: heat = true; disc_adj_heat = true; break; } /*--- Determine the kind of FEM solver used for the flow. ---*/ @@ -1251,8 +1251,8 @@ void CDriver::Solver_Preprocessing(CConfig* config, CGeometry** geometry, CSolve if(fem_transition) SU2_MPI::Error("Finite element transition model not yet implemented.", CURRENT_FUNCTION); } - if (heat_fvm) { - solver[iMGlevel][HEAT_SOL] = new CHeatSolverFVM(geometry[iMGlevel], config, iMGlevel); + if (heat) { + solver[iMGlevel][HEAT_SOL] = new CHeatSolver(geometry[iMGlevel], config, iMGlevel); if (iMGlevel == MESH_0) DOFsPerPoint += solver[iMGlevel][HEAT_SOL]->GetnVar(); } if (fem) { @@ -1292,7 +1292,7 @@ void CDriver::Solver_Preprocessing(CConfig* config, CGeometry** geometry, CSolve solver[iMGlevel][ADJTURB_SOL] = new CDiscAdjSolver(geometry[iMGlevel], config, solver[iMGlevel][TURB_SOL], RUNTIME_TURB_SYS, iMGlevel); if (iMGlevel == MESH_0) DOFsPerPoint += solver[iMGlevel][ADJTURB_SOL]->GetnVar(); } - if (heat_fvm) { + if (heat) { solver[iMGlevel][ADJHEAT_SOL] = new CDiscAdjSolver(geometry[iMGlevel], config, solver[iMGlevel][HEAT_SOL], RUNTIME_HEAT_SYS, iMGlevel); if (iMGlevel == MESH_0) DOFsPerPoint += solver[iMGlevel][ADJHEAT_SOL]->GetnVar(); } @@ -1378,7 +1378,7 @@ void CDriver::Inlet_Preprocessing(CSolver ***solver, CGeometry **geometry, case EULER : case INC_EULER: euler = true; break; case NAVIER_STOKES: case INC_NAVIER_STOKES: ns = true; break; case RANS : case INC_RANS: ns = true; turbulent = true; break; - case HEAT_EQUATION_FVM: heat = true; break; + case HEAT_EQUATION: heat = true; break; case FEM_ELASTICITY: fem = true; break; case ADJ_EULER : euler = true; adj_euler = true; break; case ADJ_NAVIER_STOKES : ns = true; turbulent = (config->GetKind_Turb_Model() != NONE); adj_ns = true; break; @@ -1462,7 +1462,7 @@ void CDriver::Solver_Restart(CSolver ***solver, CGeometry **geometry, bool euler, ns, turbulent, adj_euler, adj_ns, adj_turb, - heat_fvm, fem, fem_euler, fem_ns, fem_dg_flow, + heat, fem, fem_euler, fem_ns, fem_dg_flow, template_solver, disc_adj, disc_adj_fem, disc_adj_turb, disc_adj_heat; int val_iter = 0; @@ -1474,7 +1474,7 @@ void CDriver::Solver_Restart(CSolver ***solver, CGeometry **geometry, disc_adj = false; fem = false; disc_adj_fem = false; disc_adj_turb = false; - heat_fvm = false; disc_adj_heat = false; + heat = false; disc_adj_heat = false; template_solver = false; /*--- Check for restarts and use the LoadRestart() routines. ---*/ @@ -1508,25 +1508,25 @@ void CDriver::Solver_Restart(CSolver ***solver, CGeometry **geometry, switch (config->GetKind_Solver()) { case TEMPLATE_SOLVER: template_solver = true; break; case EULER : case INC_EULER: euler = true; break; - case NAVIER_STOKES: case INC_NAVIER_STOKES: ns = true; heat_fvm = config->GetWeakly_Coupled_Heat(); break; - case RANS : case INC_RANS: ns = true; turbulent = true; heat_fvm = config->GetWeakly_Coupled_Heat(); break; + case NAVIER_STOKES: case INC_NAVIER_STOKES: ns = true; heat = config->GetWeakly_Coupled_Heat(); break; + case RANS : case INC_RANS: ns = true; turbulent = true; heat = config->GetWeakly_Coupled_Heat(); break; case FEM_EULER : fem_euler = true; break; case FEM_NAVIER_STOKES: fem_ns = true; break; case FEM_RANS : fem_ns = true; break; case FEM_LES : fem_ns = true; break; - case HEAT_EQUATION_FVM: heat_fvm = true; break; + case HEAT_EQUATION: heat = true; break; case FEM_ELASTICITY: fem = true; break; case ADJ_EULER : euler = true; adj_euler = true; break; case ADJ_NAVIER_STOKES : ns = true; turbulent = (config->GetKind_Turb_Model() != NONE); adj_ns = true; break; case ADJ_RANS : ns = true; turbulent = true; adj_ns = true; adj_turb = (!config->GetFrozen_Visc_Cont()); break; case DISC_ADJ_EULER: case DISC_ADJ_INC_EULER: euler = true; disc_adj = true; break; - case DISC_ADJ_NAVIER_STOKES: case DISC_ADJ_INC_NAVIER_STOKES: ns = true; disc_adj = true; heat_fvm = config->GetWeakly_Coupled_Heat(); break; - case DISC_ADJ_RANS: case DISC_ADJ_INC_RANS: ns = true; turbulent = true; disc_adj = true; disc_adj_turb = (!config->GetFrozen_Visc_Disc()); heat_fvm = config->GetWeakly_Coupled_Heat(); break; + case DISC_ADJ_NAVIER_STOKES: case DISC_ADJ_INC_NAVIER_STOKES: ns = true; disc_adj = true; heat = config->GetWeakly_Coupled_Heat(); break; + case DISC_ADJ_RANS: case DISC_ADJ_INC_RANS: ns = true; turbulent = true; disc_adj = true; disc_adj_turb = (!config->GetFrozen_Visc_Disc()); heat = config->GetWeakly_Coupled_Heat(); break; case DISC_ADJ_FEM_EULER: fem_euler = true; disc_adj = true; break; case DISC_ADJ_FEM_NS: fem_ns = true; disc_adj = true; break; case DISC_ADJ_FEM_RANS: fem_ns = true; turbulent = true; disc_adj = true; disc_adj_turb = (!config->GetFrozen_Visc_Disc()); break; case DISC_ADJ_FEM: fem = true; disc_adj_fem = true; break; - case DISC_ADJ_HEAT: heat_fvm = true; disc_adj_heat = true; break; + case DISC_ADJ_HEAT: heat = true; disc_adj_heat = true; break; } @@ -1554,7 +1554,7 @@ void CDriver::Solver_Restart(CSolver ***solver, CGeometry **geometry, if (fem_dg_flow) solver[MESH_0][FLOW_SOL]->LoadRestart(geometry, solver, config, val_iter, update_geo); } - if (heat_fvm) { + if (heat) { solver[MESH_0][HEAT_SOL]->LoadRestart(geometry, solver, config, val_iter, update_geo); } } @@ -1563,7 +1563,7 @@ void CDriver::Solver_Restart(CSolver ***solver, CGeometry **geometry, if (template_solver) { no_restart = true; } - if (heat_fvm) { + if (heat) { solver[MESH_0][HEAT_SOL]->LoadRestart(geometry, solver, config, val_iter, update_geo); } if (adj_euler || adj_ns) { @@ -1611,7 +1611,7 @@ void CDriver::Solver_Postprocessing(CSolver ****solver, CGeometry **geometry, unsigned short iMGlevel; bool euler, ns, turbulent, adj_euler, adj_ns, adj_turb, - heat_fvm, fem, + heat, fem, spalart_allmaras, neg_spalart_allmaras, menter_sst, transition, template_solver, disc_adj, disc_adj_turb, disc_adj_fem, disc_adj_heat, e_spalart_allmaras, comp_spalart_allmaras, e_comp_spalart_allmaras; @@ -1624,7 +1624,7 @@ void CDriver::Solver_Postprocessing(CSolver ****solver, CGeometry **geometry, neg_spalart_allmaras = false; disc_adj = false; fem = false; disc_adj_fem = false; - heat_fvm = false; disc_adj_heat = false; + heat = false; disc_adj_heat = false; transition = false; template_solver = false; e_spalart_allmaras = false; comp_spalart_allmaras = false; e_comp_spalart_allmaras = false; @@ -1634,25 +1634,25 @@ void CDriver::Solver_Postprocessing(CSolver ****solver, CGeometry **geometry, switch (config->GetKind_Solver()) { case TEMPLATE_SOLVER: template_solver = true; break; case EULER : case INC_EULER: euler = true; break; - case NAVIER_STOKES: case INC_NAVIER_STOKES: ns = true; heat_fvm = config->GetWeakly_Coupled_Heat(); break; - case RANS : case INC_RANS: ns = true; turbulent = true; if (config->GetKind_Trans_Model() == LM) transition = true; heat_fvm = config->GetWeakly_Coupled_Heat(); break; + case NAVIER_STOKES: case INC_NAVIER_STOKES: ns = true; heat = config->GetWeakly_Coupled_Heat(); break; + case RANS : case INC_RANS: ns = true; turbulent = true; if (config->GetKind_Trans_Model() == LM) transition = true; heat = config->GetWeakly_Coupled_Heat(); break; case FEM_EULER : euler = true; break; case FEM_NAVIER_STOKES: case FEM_LES: ns = true; break; case FEM_RANS: ns = true; turbulent = true; if (config->GetKind_Trans_Model() == LM) transition = true; break; - case HEAT_EQUATION_FVM: heat_fvm = true; break; + case HEAT_EQUATION: heat = true; break; case FEM_ELASTICITY: fem = true; break; case ADJ_EULER : euler = true; adj_euler = true; break; case ADJ_NAVIER_STOKES : ns = true; turbulent = (config->GetKind_Turb_Model() != NONE); adj_ns = true; break; case ADJ_RANS : ns = true; turbulent = true; adj_ns = true; adj_turb = (!config->GetFrozen_Visc_Cont()); break; case DISC_ADJ_EULER: case DISC_ADJ_INC_EULER: euler = true; disc_adj = true; break; - case DISC_ADJ_NAVIER_STOKES: case DISC_ADJ_INC_NAVIER_STOKES: ns = true; disc_adj = true; heat_fvm = config->GetWeakly_Coupled_Heat(); break; - case DISC_ADJ_RANS: case DISC_ADJ_INC_RANS: ns = true; turbulent = true; disc_adj = true; disc_adj_turb = (!config->GetFrozen_Visc_Disc()); heat_fvm = config->GetWeakly_Coupled_Heat(); break; + case DISC_ADJ_NAVIER_STOKES: case DISC_ADJ_INC_NAVIER_STOKES: ns = true; disc_adj = true; heat = config->GetWeakly_Coupled_Heat(); break; + case DISC_ADJ_RANS: case DISC_ADJ_INC_RANS: ns = true; turbulent = true; disc_adj = true; disc_adj_turb = (!config->GetFrozen_Visc_Disc()); heat = config->GetWeakly_Coupled_Heat(); break; case DISC_ADJ_FEM_EULER: euler = true; disc_adj = true; break; case DISC_ADJ_FEM_NS: ns = true; disc_adj = true; break; case DISC_ADJ_FEM_RANS: ns = true; turbulent = true; disc_adj = true; disc_adj_turb = (!config->GetFrozen_Visc_Disc()); break; case DISC_ADJ_FEM: fem = true; disc_adj_fem = true; break; - case DISC_ADJ_HEAT: heat_fvm = true; disc_adj_heat = true; break; + case DISC_ADJ_HEAT: heat = true; disc_adj_heat = true; break; } /*--- Assign turbulence model booleans ---*/ @@ -1687,7 +1687,7 @@ void CDriver::Solver_Postprocessing(CSolver ****solver, CGeometry **geometry, if (disc_adj_turb || adj_turb) { delete solver[val_iInst][iMGlevel][ADJTURB_SOL]; } - if (heat_fvm) { + if (heat) { delete solver[val_iInst][iMGlevel][ADJHEAT_SOL]; } } @@ -1710,7 +1710,7 @@ void CDriver::Solver_Postprocessing(CSolver ****solver, CGeometry **geometry, delete solver[val_iInst][iMGlevel][TRANS_SOL]; } } - if (heat_fvm) { + if (heat) { delete solver[val_iInst][iMGlevel][HEAT_SOL]; } if (fem) { @@ -1749,7 +1749,7 @@ void CDriver::Integration_Preprocessing(CConfig *config, CIntegration **&integra bool euler, adj_euler, ns, adj_ns, turbulent, adj_turb, fem, fem_euler, fem_ns, fem_turbulent, - heat_fvm, template_solver, transition, disc_adj, disc_adj_fem, disc_adj_heat; + heat, template_solver, transition, disc_adj, disc_adj_fem, disc_adj_heat; /*--- Initialize some useful booleans ---*/ euler = false; adj_euler = false; @@ -1759,7 +1759,7 @@ void CDriver::Integration_Preprocessing(CConfig *config, CIntegration **&integra fem_euler = false; fem_ns = false; fem_turbulent = false; - heat_fvm = false; disc_adj_heat = false; + heat = false; disc_adj_heat = false; fem = false; disc_adj_fem = false; transition = false; template_solver = false; @@ -1768,13 +1768,13 @@ void CDriver::Integration_Preprocessing(CConfig *config, CIntegration **&integra switch (config->GetKind_Solver()) { case TEMPLATE_SOLVER: template_solver = true; break; case EULER : case INC_EULER: euler = true; break; - case NAVIER_STOKES: case INC_NAVIER_STOKES: ns = true; heat_fvm = config->GetWeakly_Coupled_Heat(); break; - case RANS : case INC_RANS: ns = true; turbulent = true; if (config->GetKind_Trans_Model() == LM) transition = true; heat_fvm = config->GetWeakly_Coupled_Heat(); break; + case NAVIER_STOKES: case INC_NAVIER_STOKES: ns = true; heat = config->GetWeakly_Coupled_Heat(); break; + case RANS : case INC_RANS: ns = true; turbulent = true; if (config->GetKind_Trans_Model() == LM) transition = true; heat = config->GetWeakly_Coupled_Heat(); break; case FEM_EULER : fem_euler = true; break; case FEM_NAVIER_STOKES: fem_ns = true; break; case FEM_RANS : fem_ns = true; fem_turbulent = true; break; case FEM_LES : fem_ns = true; break; - case HEAT_EQUATION_FVM: heat_fvm = true; break; + case HEAT_EQUATION: heat = true; break; case FEM_ELASTICITY: fem = true; break; case ADJ_EULER : euler = true; adj_euler = true; break; case ADJ_NAVIER_STOKES : ns = true; turbulent = (config->GetKind_Turb_Model() != NONE); adj_ns = true; break; @@ -1783,10 +1783,10 @@ void CDriver::Integration_Preprocessing(CConfig *config, CIntegration **&integra case DISC_ADJ_FEM_EULER: fem_euler = true; disc_adj = true; break; case DISC_ADJ_FEM_NS: fem_ns = true; disc_adj = true; break; case DISC_ADJ_FEM_RANS: fem_ns = true; fem_turbulent = true; disc_adj = true; break; - case DISC_ADJ_NAVIER_STOKES: case DISC_ADJ_INC_NAVIER_STOKES: ns = true; disc_adj = true; heat_fvm = config->GetWeakly_Coupled_Heat(); break; - case DISC_ADJ_RANS : case DISC_ADJ_INC_RANS: ns = true; turbulent = true; disc_adj = true; heat_fvm = config->GetWeakly_Coupled_Heat(); break; + case DISC_ADJ_NAVIER_STOKES: case DISC_ADJ_INC_NAVIER_STOKES: ns = true; disc_adj = true; heat = config->GetWeakly_Coupled_Heat(); break; + case DISC_ADJ_RANS : case DISC_ADJ_INC_RANS: ns = true; turbulent = true; disc_adj = true; heat = config->GetWeakly_Coupled_Heat(); break; case DISC_ADJ_FEM: fem = true; disc_adj_fem = true; break; - case DISC_ADJ_HEAT: heat_fvm = true; disc_adj_heat = true; break; + case DISC_ADJ_HEAT: heat = true; disc_adj_heat = true; break; } /*--- Allocate solution for a template problem ---*/ @@ -1797,7 +1797,7 @@ void CDriver::Integration_Preprocessing(CConfig *config, CIntegration **&integra if (ns) integration[FLOW_SOL] = new CMultiGridIntegration(config); if (turbulent) integration[TURB_SOL] = new CSingleGridIntegration(config); if (transition) integration[TRANS_SOL] = new CSingleGridIntegration(config); - if (heat_fvm) integration[HEAT_SOL] = new CSingleGridIntegration(config); + if (heat) integration[HEAT_SOL] = new CSingleGridIntegration(config); if (fem) integration[FEA_SOL] = new CStructuralIntegration(config); /*--- Allocate integration container for finite element flow solver. ---*/ @@ -1823,7 +1823,7 @@ void CDriver::Integration_Preprocessing(CConfig *config, CIntegration **&integra void CDriver::Integration_Postprocessing(CIntegration ***integration, CGeometry **geometry, CConfig *config, unsigned short val_iInst) { bool euler, adj_euler, ns, adj_ns, turbulent, adj_turb, fem, fem_euler, fem_ns, fem_turbulent, - heat_fvm, template_solver, transition, disc_adj, disc_adj_fem, disc_adj_heat; + heat, template_solver, transition, disc_adj, disc_adj_fem, disc_adj_heat; /*--- Initialize some useful booleans ---*/ euler = false; adj_euler = false; @@ -1833,7 +1833,7 @@ void CDriver::Integration_Postprocessing(CIntegration ***integration, CGeometry fem_euler = false; fem_ns = false; fem_turbulent = false; - heat_fvm = false; disc_adj_heat = false; + heat = false; disc_adj_heat = false; fem = false; disc_adj_fem = false; transition = false; template_solver = false; @@ -1842,25 +1842,25 @@ void CDriver::Integration_Postprocessing(CIntegration ***integration, CGeometry switch (config->GetKind_Solver()) { case TEMPLATE_SOLVER: template_solver = true; break; case EULER : case INC_EULER: euler = true; break; - case NAVIER_STOKES: case INC_NAVIER_STOKES: ns = true; heat_fvm = config->GetWeakly_Coupled_Heat(); break; - case RANS : case INC_RANS: ns = true; turbulent = true; if (config->GetKind_Trans_Model() == LM) transition = true; heat_fvm = config->GetWeakly_Coupled_Heat(); break; + case NAVIER_STOKES: case INC_NAVIER_STOKES: ns = true; heat = config->GetWeakly_Coupled_Heat(); break; + case RANS : case INC_RANS: ns = true; turbulent = true; if (config->GetKind_Trans_Model() == LM) transition = true; heat = config->GetWeakly_Coupled_Heat(); break; case FEM_EULER : fem_euler = true; break; case FEM_NAVIER_STOKES: fem_ns = true; break; case FEM_RANS : fem_ns = true; fem_turbulent = true; break; case FEM_LES : fem_ns = true; break; - case HEAT_EQUATION_FVM: heat_fvm = true; break; + case HEAT_EQUATION: heat = true; break; case FEM_ELASTICITY: fem = true; break; case ADJ_EULER : euler = true; adj_euler = true; break; case ADJ_NAVIER_STOKES : ns = true; turbulent = (config->GetKind_Turb_Model() != NONE); adj_ns = true; break; case ADJ_RANS : ns = true; turbulent = true; adj_ns = true; adj_turb = (!config->GetFrozen_Visc_Cont()); break; case DISC_ADJ_EULER : case DISC_ADJ_INC_EULER: euler = true; disc_adj = true; break; - case DISC_ADJ_NAVIER_STOKES: case DISC_ADJ_INC_NAVIER_STOKES: ns = true; disc_adj = true; heat_fvm = config->GetWeakly_Coupled_Heat(); break; - case DISC_ADJ_RANS : case DISC_ADJ_INC_RANS: ns = true; turbulent = true; disc_adj = true; heat_fvm = config->GetWeakly_Coupled_Heat(); break; + case DISC_ADJ_NAVIER_STOKES: case DISC_ADJ_INC_NAVIER_STOKES: ns = true; disc_adj = true; heat = config->GetWeakly_Coupled_Heat(); break; + case DISC_ADJ_RANS : case DISC_ADJ_INC_RANS: ns = true; turbulent = true; disc_adj = true; heat = config->GetWeakly_Coupled_Heat(); break; case DISC_ADJ_FEM_EULER: fem_euler = true; disc_adj = true; break; case DISC_ADJ_FEM_NS: fem_ns = true; disc_adj = true; break; case DISC_ADJ_FEM_RANS: fem_ns = true; fem_turbulent = true; disc_adj = true; break; case DISC_ADJ_FEM: fem = true; disc_adj_fem = true; break; - case DISC_ADJ_HEAT: heat_fvm = true; disc_adj_heat = true; break; + case DISC_ADJ_HEAT: heat = true; disc_adj_heat = true; break; } /*--- DeAllocate solution for a template problem ---*/ @@ -1870,7 +1870,7 @@ void CDriver::Integration_Postprocessing(CIntegration ***integration, CGeometry if (euler || ns) delete integration[val_iInst][FLOW_SOL]; if (turbulent) delete integration[val_iInst][TURB_SOL]; if (transition) delete integration[val_iInst][TRANS_SOL]; - if (heat_fvm) delete integration[val_iInst][HEAT_SOL]; + if (heat) delete integration[val_iInst][HEAT_SOL]; if (fem) delete integration[val_iInst][FEA_SOL]; if (disc_adj_fem) delete integration[val_iInst][ADJFEA_SOL]; if (disc_adj_heat) delete integration[val_iInst][ADJHEAT_SOL]; @@ -1918,11 +1918,11 @@ void CDriver::Numerics_Preprocessing(CConfig *config, CGeometry **geometry, CSol /*--- Initialize some useful booleans ---*/ bool euler, ns, turbulent, adj_euler, adj_ns, adj_turb, fem, fem_euler, fem_ns, fem_turbulent; bool spalart_allmaras, neg_spalart_allmaras, e_spalart_allmaras, comp_spalart_allmaras, e_comp_spalart_allmaras, menter_sst; - bool heat_fvm, transition, template_solver; + bool heat, transition, template_solver; euler = ns = turbulent = adj_euler = adj_ns = adj_turb = fem = fem_euler = fem_ns = fem_turbulent = false; spalart_allmaras = neg_spalart_allmaras = e_spalart_allmaras = comp_spalart_allmaras = e_comp_spalart_allmaras = menter_sst = false; - heat_fvm = transition = template_solver = false; + heat = transition = template_solver = false; /*--- Assign booleans ---*/ switch (config->GetKind_Solver()) { @@ -1931,13 +1931,13 @@ void CDriver::Numerics_Preprocessing(CConfig *config, CGeometry **geometry, CSol case NAVIER_STOKES: case DISC_ADJ_NAVIER_STOKES:compressible = true; ns = true; break; case RANS : case DISC_ADJ_RANS: ns = true; compressible = true; turbulent = true; if (config->GetKind_Trans_Model() == LM) transition = true; break; case INC_EULER : case DISC_ADJ_INC_EULER: incompressible =true; euler = true; break; - case INC_NAVIER_STOKES: case DISC_ADJ_INC_NAVIER_STOKES:incompressible =true; ns = true; heat_fvm = config->GetWeakly_Coupled_Heat(); break; - case INC_RANS : case DISC_ADJ_INC_RANS: incompressible =true; ns = true; turbulent = true; heat_fvm = config->GetWeakly_Coupled_Heat(); if (config->GetKind_Trans_Model() == LM) transition = true; break; + case INC_NAVIER_STOKES: case DISC_ADJ_INC_NAVIER_STOKES:incompressible =true; ns = true; heat = config->GetWeakly_Coupled_Heat(); break; + case INC_RANS : case DISC_ADJ_INC_RANS: incompressible =true; ns = true; turbulent = true; heat = config->GetWeakly_Coupled_Heat(); if (config->GetKind_Trans_Model() == LM) transition = true; break; case FEM_EULER : case DISC_ADJ_FEM_EULER : compressible =true; fem_euler = true; break; case FEM_NAVIER_STOKES: case DISC_ADJ_FEM_NS : compressible =true; fem_ns = true; break; case FEM_RANS : case DISC_ADJ_FEM_RANS : compressible =true; fem_ns = true; fem_turbulent = true; break; case FEM_LES : compressible =true; fem_ns = true; break; - case HEAT_EQUATION_FVM: case DISC_ADJ_HEAT: heat_fvm = true; break; + case HEAT_EQUATION: case DISC_ADJ_HEAT: heat = true; break; case FEM_ELASTICITY: case DISC_ADJ_FEM: fem = true; break; case ADJ_EULER : compressible =true; euler = true; adj_euler = true; break; case ADJ_NAVIER_STOKES : compressible =true; ns = true; turbulent = (config->GetKind_Turb_Model() != NONE); adj_ns = true; break; @@ -1983,7 +1983,7 @@ void CDriver::Numerics_Preprocessing(CConfig *config, CGeometry **geometry, CSol //if (fem_turbulent) nVar_Turb = solver_container[MESH_0][FEM_TURB_SOL]->GetnVar(); if (fem) nVar_FEM = solver[MESH_0][FEA_SOL]->GetnVar(); - if (heat_fvm) nVar_Heat = solver[MESH_0][HEAT_SOL]->GetnVar(); + if (heat) nVar_Heat = solver[MESH_0][HEAT_SOL]->GetnVar(); /*--- Number of variables for adjoint problem ---*/ @@ -2416,7 +2416,7 @@ void CDriver::Numerics_Preprocessing(CConfig *config, CGeometry **geometry, CSol } /*--- Solver definition of the finite volume heat solver ---*/ - if (heat_fvm) { + if (heat) { /*--- Definition of the viscous scheme for each equation and mesh level ---*/ for (iMGlevel = 0; iMGlevel <= config->GetnMGLevels(); iMGlevel++) { @@ -2744,7 +2744,7 @@ void CDriver::Iteration_Preprocessing(CConfig* config, CIteration *&iteration) { iteration = new CFEMFluidIteration(config); break; - case HEAT_EQUATION_FVM: + case HEAT_EQUATION: if (rank == MASTER_NODE) cout << "Heat iteration (finite volume method)." << endl; iteration = new CHeatIteration(config); @@ -2996,7 +2996,7 @@ void CDriver::Interface_Preprocessing(CConfig **config, CSolver***** solver, CGe structural_target = true; break; - case HEAT_EQUATION_FVM: case DISC_ADJ_HEAT: + case HEAT_EQUATION: case DISC_ADJ_HEAT: heat_target = true; break; } @@ -3014,7 +3014,7 @@ void CDriver::Interface_Preprocessing(CConfig **config, CSolver***** solver, CGe structural_donor = true; break; - case HEAT_EQUATION_FVM : case DISC_ADJ_HEAT: + case HEAT_EQUATION : case DISC_ADJ_HEAT: heat_donor = true; break; } @@ -3303,7 +3303,7 @@ void CDriver::Output_Preprocessing(CConfig **config, CConfig *driver_config, COu cout << "Euler/Navier-Stokes/RANS output structure." << endl; output[iZone] = new CFlowIncOutput(config[iZone], nDim); break; - case HEAT_EQUATION_FVM: + case HEAT_EQUATION: if (rank == MASTER_NODE) cout << "Heat output structure." << endl; output[iZone] = new CHeatOutput(config[iZone], nDim); @@ -3747,7 +3747,7 @@ bool CFluidDriver::Monitor(unsigned long ExtIter) { switch (config_container[ZONE_0]->GetKind_Solver()) { case EULER: case NAVIER_STOKES: case RANS: StopCalc = integration_container[ZONE_0][INST_0][FLOW_SOL]->GetConvergence(); break; - case HEAT_EQUATION_FVM: + case HEAT_EQUATION: StopCalc = integration_container[ZONE_0][INST_0][HEAT_SOL]->GetConvergence(); break; case FEM_ELASTICITY: StopCalc = integration_container[ZONE_0][INST_0][FEA_SOL]->GetConvergence(); break; diff --git a/SU2_CFD/src/drivers/CMultizoneDriver.cpp b/SU2_CFD/src/drivers/CMultizoneDriver.cpp index 40953d750900..5a93bc59e769 100644 --- a/SU2_CFD/src/drivers/CMultizoneDriver.cpp +++ b/SU2_CFD/src/drivers/CMultizoneDriver.cpp @@ -84,7 +84,7 @@ CMultizoneDriver::CMultizoneDriver(char* confFile, case FEM_ELASTICITY: structural_zone = true; break; - case HEAT_EQUATION_FVM: + case HEAT_EQUATION: heat_zone = true; break; } @@ -139,6 +139,26 @@ CMultizoneDriver::~CMultizoneDriver(void) { void CMultizoneDriver::StartSolver() { + /*--- Find out the minimum of all references times and then set each zone to this (same) value. + * (To ensure that all zones run synchronously in time, be it a dimensional or non-dimensionalized one.) ---*/ + + su2double Time_Ref = config_container[ZONE_0]->GetTime_Ref(); + + for (iZone = 1; iZone < nZone; iZone++) { + if (config_container[iZone]->GetTime_Ref() < Time_Ref) + Time_Ref = config_container[iZone]->GetTime_Ref(); + } + + for (iZone = 0; iZone < nZone; iZone++) { + + config_container[iZone]->SetTime_Ref(Time_Ref); + + /*--- Recompute some values as the reference time might has changed in iZone ---*/ + + config_container[iZone]->SetDelta_UnstTimeND(config_container[iZone]->GetDelta_UnstTime() / Time_Ref); + config_container[iZone]->SetTotal_UnstTimeND(config_container[iZone]->GetTotal_UnstTime() / Time_Ref); + } + #ifndef HAVE_MPI StartTime = su2double(clock())/su2double(CLOCKS_PER_SEC); #else @@ -656,7 +676,7 @@ bool CMultizoneDriver::Monitor(unsigned long TimeIter){ unsigned long nOuterIter, OuterIter, nTimeIter; su2double MaxTime, CurTime; - bool TimeDomain, InnerConvergence, FinalTimeReached, MaxIterationsReached; + bool TimeDomain, InnerConvergence, FinalTimeReached, MaxIterationsReached, TimeConvergence; OuterIter = driver_config->GetOuterIter(); nOuterIter = driver_config->GetnOuter_Iter(); @@ -689,12 +709,13 @@ bool CMultizoneDriver::Monitor(unsigned long TimeIter){ if (TimeDomain == YES) { /*--- Check whether the outer time integration has reached the final time ---*/ - + TimeConvergence = GetTimeConvergence(); FinalTimeReached = CurTime >= MaxTime; MaxIterationsReached = TimeIter+1 >= nTimeIter; - if ((FinalTimeReached || MaxIterationsReached) && (rank == MASTER_NODE)){ + if ((TimeConvergence || FinalTimeReached || MaxIterationsReached) && (rank == MASTER_NODE)){ cout << endl << "----------------------------- Solver Exit -------------------------------"; + if (TimeConvergence) cout << endl << "All windowed time-averaged convergence criteria are fullfilled." << endl; if (FinalTimeReached) cout << endl << "Maximum time reached (MAX_TIME = " << MaxTime << "s)." << endl; else cout << endl << "Maximum number of time iterations reached (TIME_ITER = " << nTimeIter << ")." << endl; cout << "-------------------------------------------------------------------------" << endl; diff --git a/SU2_CFD/src/drivers/CSinglezoneDriver.cpp b/SU2_CFD/src/drivers/CSinglezoneDriver.cpp index 1f099d695102..35a7e196cf99 100644 --- a/SU2_CFD/src/drivers/CSinglezoneDriver.cpp +++ b/SU2_CFD/src/drivers/CSinglezoneDriver.cpp @@ -280,19 +280,18 @@ bool CSinglezoneDriver::Monitor(unsigned long TimeIter){ } - /*--- Check whether the outer time integration has reached the final time ---*/ - TimeConvergence = GetTimeConvergence(); if (TimeDomain == YES) { /*--- Check whether the outer time integration has reached the final time ---*/ + TimeConvergence = GetTimeConvergence(); FinalTimeReached = CurTime >= MaxTime; MaxIterationsReached = TimeIter+1 >= nTimeIter; if ((FinalTimeReached || MaxIterationsReached || TimeConvergence) && (rank == MASTER_NODE)){ cout << endl << "----------------------------- Solver Exit -------------------------------"; - if (TimeConvergence) cout << endl << "Windowed time averaged objective function convergence criterion is fullfilled." << endl; + if (TimeConvergence) cout << endl << "All windowed time-averaged convergence criteria are fullfilled." << endl; if (FinalTimeReached) cout << endl << "Maximum time reached (MAX_TIME = " << MaxTime << "s)." << endl; if (MaxIterationsReached) cout << endl << "Maximum number of time iterations reached (TIME_ITER = " << nTimeIter << ")." << endl; cout << "-------------------------------------------------------------------------" << endl; diff --git a/SU2_CFD/src/interfaces/cht/CConjugateHeatInterface.cpp b/SU2_CFD/src/interfaces/cht/CConjugateHeatInterface.cpp index e9a500807a02..166ec4c6b5a5 100644 --- a/SU2_CFD/src/interfaces/cht/CConjugateHeatInterface.cpp +++ b/SU2_CFD/src/interfaces/cht/CConjugateHeatInterface.cpp @@ -57,13 +57,13 @@ void CConjugateHeatInterface::GetDonor_Variable(CSolver *donor_solution, CGeomet || (donor_config->GetKind_Solver() == RANS) || (donor_config->GetKind_Solver() == DISC_ADJ_NAVIER_STOKES) || (donor_config->GetKind_Solver() == DISC_ADJ_RANS)); - bool incompressible_flow = ((donor_config->GetKind_Solver() == INC_NAVIER_STOKES) + bool incompressible_flow = (((donor_config->GetKind_Solver() == INC_NAVIER_STOKES) || (donor_config->GetKind_Solver() == INC_RANS) || (donor_config->GetKind_Solver() == DISC_ADJ_INC_NAVIER_STOKES) || (donor_config->GetKind_Solver() == DISC_ADJ_INC_RANS)) - && (donor_config->GetEnergy_Equation()); - bool heat_equation = (donor_config->GetKind_Solver() == HEAT_EQUATION_FVM - || donor_config->GetKind_Solver() == DISC_ADJ_HEAT); + && (donor_config->GetEnergy_Equation())); + bool heat_equation = ((donor_config->GetKind_Solver() == HEAT_EQUATION) + || (donor_config->GetKind_Solver() == DISC_ADJ_HEAT)); Coord = donor_geometry->node[Point_Donor]->GetCoord(); diff --git a/SU2_CFD/src/iteration_structure.cpp b/SU2_CFD/src/iteration_structure.cpp index 2d9b04460c84..64408875f47e 100644 --- a/SU2_CFD/src/iteration_structure.cpp +++ b/SU2_CFD/src/iteration_structure.cpp @@ -1177,22 +1177,10 @@ void CFEMFluidIteration::Postprocess(COutput *output, unsigned short val_iZone, unsigned short val_iInst){} -CHeatIteration::CHeatIteration(CConfig *config) : CIteration(config) { } +CHeatIteration::CHeatIteration(CConfig *config) : CFluidIteration(config) { } CHeatIteration::~CHeatIteration(void) { } -void CHeatIteration::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) { } - void CHeatIteration::Iterate(COutput *output, CIntegration ****integration, CGeometry ****geometry, @@ -1207,125 +1195,106 @@ void CHeatIteration::Iterate(COutput *output, /*--- Update global parameters ---*/ - config[val_iZone]->SetGlobalParam(HEAT_EQUATION_FVM, RUNTIME_HEAT_SYS); + config[val_iZone]->SetGlobalParam(HEAT_EQUATION, RUNTIME_HEAT_SYS); integration[val_iZone][val_iInst][HEAT_SOL]->SingleGrid_Iteration(geometry, solver, numerics, config, RUNTIME_HEAT_SYS, val_iZone, val_iInst); } -void CHeatIteration::Update(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) { - - unsigned short iMesh; - su2double Physical_dt, Physical_t; - unsigned long TimeIter = config[ZONE_0]->GetTimeIter(); - - /*--- Dual time stepping strategy ---*/ - if ((config[val_iZone]->GetTime_Marching() == DT_STEPPING_1ST) || - (config[val_iZone]->GetTime_Marching() == DT_STEPPING_2ND)) { - - /*--- Update dual time solver ---*/ - for (iMesh = 0; iMesh <= config[val_iZone]->GetnMGLevels(); iMesh++) { - integration[val_iZone][val_iInst][HEAT_SOL]->SetDualTime_Solver(geometry[val_iZone][val_iInst][iMesh], solver[val_iZone][val_iInst][iMesh][HEAT_SOL], config[val_iZone], iMesh); - integration[val_iZone][val_iInst][HEAT_SOL]->SetConvergence(false); - } - - Physical_dt = config[val_iZone]->GetDelta_UnstTime(); - Physical_t = (TimeIter+1)*Physical_dt; - if (Physical_t >= config[val_iZone]->GetTotal_UnstTime()) - integration[val_iZone][val_iInst][HEAT_SOL]->SetConvergence(true); - } -} -bool CHeatIteration::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) { return false; } -void CHeatIteration::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) { } - void CHeatIteration::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) { - unsigned short Inner_Iter, nInner_Iter = config[val_iZone]->GetnInner_Iter(); + /*--- Boolean to determine if we are running a static or dynamic case ---*/ + bool steady = !config[val_iZone]->GetTime_Domain(); + + unsigned long Inner_Iter, nInner_Iter = config[val_iZone]->GetnInner_Iter(); bool StopCalc = false; + /*--- Synchronization point before a single solver iteration. + Compute the wall clock time required. ---*/ + +#ifndef HAVE_MPI + StartTime = su2double(clock())/su2double(CLOCKS_PER_SEC); +#else + StartTime = MPI_Wtime(); +#endif + /*--- Preprocess the solver ---*/ - Preprocess(output, integration, geometry, - solver, numerics, config, - surface_movement, grid_movement, FFDBox, val_iZone, INST_0); + + Preprocess(output, integration, geometry, solver, numerics, config, + surface_movement, grid_movement, FFDBox, val_iZone, INST_0); /*--- For steady-state flow simulations, we need to loop over ExtIter for the number of time steps ---*/ /*--- However, ExtIter is the number of FSI iterations, so nIntIter is used in this case ---*/ for (Inner_Iter = 0; Inner_Iter < nInner_Iter; Inner_Iter++){ - + config[val_iZone]->SetInnerIter(Inner_Iter); - Iterate(output, integration, geometry, - solver, numerics, config, - surface_movement, grid_movement, FFDBox, val_iZone, INST_0); + /*--- Run a single iteration of the solver ---*/ + Iterate(output, integration, geometry, solver, numerics, config, + surface_movement, grid_movement, FFDBox, val_iZone, INST_0); + + /*--- Monitor the pseudo-time ---*/ + StopCalc = Monitor(output, integration, geometry, solver, numerics, config, + surface_movement, grid_movement, FFDBox, val_iZone, INST_0); - if (config[val_iZone]->GetMultizone_Problem() || config[val_iZone]->GetSinglezone_Driver()){ - output->SetHistory_Output(geometry[val_iZone][INST_0][MESH_0], solver[val_iZone][INST_0][MESH_0], config[val_iZone], config[val_iZone]->GetTimeIter(), config[val_iZone]->GetOuterIter(), Inner_Iter); + /*--- Output files at intermediate iterations if the problem is single zone ---*/ + + if (singlezone && steady) { + Output(output, geometry, solver, config, Inner_Iter, StopCalc, val_iZone, val_iInst); } - - /*--- Output files at intermediate time positions if the problem is single zone ---*/ - if (singlezone) Output(output, geometry, solver, config, - config[val_iZone]->GetInnerIter(), StopCalc, val_iZone, val_iInst); - - /*--- If convergence was reached in every zone --*/ - StopCalc = integration[val_iZone][INST_0][HEAT_SOL]->GetConvergence(); + /*--- If the iteration has converged, break the loop ---*/ if (StopCalc) break; - } - if (multizone){ - + if (multizone && steady) { Output(output, geometry, solver, config, - config[val_iZone]->GetOuterIter(), StopCalc, val_iZone, val_iInst); - + config[val_iZone]->GetOuterIter(), + StopCalc, val_iZone, val_iInst); + /*--- Set the fluid convergence to false (to make sure outer subiterations converge) ---*/ - + integration[val_iZone][INST_0][HEAT_SOL]->SetConvergence(false); } +} + +void CHeatIteration::Update(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) { - //output->SetConvHistory_Body(NULL, geometry, solver, config, integration, true, 0.0, val_iZone, INST_0); + unsigned short iMesh; + + /*--- Dual time stepping strategy ---*/ + if ((config[val_iZone]->GetTime_Marching() == DT_STEPPING_1ST) || + (config[val_iZone]->GetTime_Marching() == DT_STEPPING_2ND)) { + + /*--- Update dual time solver ---*/ + + for (iMesh = 0; iMesh <= config[val_iZone]->GetnMGLevels(); iMesh++) { + integration[val_iZone][val_iInst][HEAT_SOL]->SetDualTime_Solver(geometry[val_iZone][val_iInst][iMesh], solver[val_iZone][val_iInst][iMesh][HEAT_SOL], config[val_iZone], iMesh); + integration[val_iZone][val_iInst][HEAT_SOL]->SetConvergence(false); + } + } } CFEAIteration::CFEAIteration(CConfig *config) : CIteration(config) { } diff --git a/SU2_CFD/src/meson.build b/SU2_CFD/src/meson.build index 1b52182367f8..b731e0ca0f57 100644 --- a/SU2_CFD/src/meson.build +++ b/SU2_CFD/src/meson.build @@ -59,7 +59,7 @@ su2_cfd_src += files(['output/CAdjElasticityOutput.cpp', su2_cfd_src += files(['variables/CIncNSVariable.cpp', 'variables/CTransLMVariable.cpp', 'variables/CAdjEulerVariable.cpp', - 'variables/CHeatFVMVariable.cpp', + 'variables/CHeatVariable.cpp', 'variables/CTurbVariable.cpp', 'variables/CAdjNSVariable.cpp', 'variables/CBaselineVariable.cpp', @@ -92,7 +92,7 @@ su2_cfd_src += files(['solvers/CAdjEulerSolver.cpp', 'solvers/CFEASolver.cpp', 'solvers/CFEM_DG_EulerSolver.cpp', 'solvers/CFEM_DG_NSSolver.cpp', - 'solvers/CHeatSolverFVM.cpp', + 'solvers/CHeatSolver.cpp', 'solvers/CIncEulerSolver.cpp', 'solvers/CIncNSSolver.cpp', 'solvers/CMeshSolver.cpp', diff --git a/SU2_CFD/src/output/COutput.cpp b/SU2_CFD/src/output/COutput.cpp index d712d7b0ad75..a4d29610ed5b 100644 --- a/SU2_CFD/src/output/COutput.cpp +++ b/SU2_CFD/src/output/COutput.cpp @@ -274,6 +274,8 @@ void COutput::SetMultizoneHistory_Output(COutput **output, CConfig **config, CCo Postprocess_HistoryData(driver_config); + MonitorTimeConvergence(driver_config, curTimeIter); + /*--- Output using only the master node ---*/ if (rank == MASTER_NODE && !noWriting) { diff --git a/SU2_CFD/src/output/output_structure_legacy.cpp b/SU2_CFD/src/output/output_structure_legacy.cpp index 86d19cb4f708..41aa2f31875f 100644 --- a/SU2_CFD/src/output/output_structure_legacy.cpp +++ b/SU2_CFD/src/output/output_structure_legacy.cpp @@ -4544,7 +4544,7 @@ void COutputLegacy::SetConvHistory_Header(ofstream *ConvHist_file, CConfig *conf ConvHist_file[0] << end; break; - case HEAT_EQUATION_FVM: + case HEAT_EQUATION: ConvHist_file[0] << begin << heat_coeff; ConvHist_file[0] << heat_resid << end; break; @@ -4732,7 +4732,7 @@ void COutputLegacy::SetConvHistory_Body(ofstream *ConvHist_file, config[val_iZone]->GetKind_Solver() == DISC_ADJ_INC_RANS); bool adjoint = cont_adj || disc_adj; bool frozen_visc = (cont_adj && config[val_iZone]->GetFrozen_Visc_Cont()) ||( disc_adj && config[val_iZone]->GetFrozen_Visc_Disc()); - bool heat = ((config[val_iZone]->GetKind_Solver() == HEAT_EQUATION_FVM) || (config[val_iZone]->GetWeakly_Coupled_Heat())); + bool heat = ((config[val_iZone]->GetKind_Solver() == HEAT_EQUATION) || (config[val_iZone]->GetWeakly_Coupled_Heat())); bool weakly_coupled_heat = config[val_iZone]->GetWeakly_Coupled_Heat(); bool flow = (config[val_iZone]->GetKind_Solver() == EULER) || (config[val_iZone]->GetKind_Solver() == NAVIER_STOKES) || (config[val_iZone]->GetKind_Solver() == RANS) || (config[val_iZone]->GetKind_Solver() == FEM_EULER) || @@ -4768,7 +4768,7 @@ void COutputLegacy::SetConvHistory_Body(ofstream *ConvHist_file, if (ExtraHeatOutputZone > nZone) { SU2_MPI::Error("Error in output routine: Extra output zone number exceeds total number of zones.", CURRENT_FUNCTION); } - else if ((config[ExtraHeatOutputZone]->GetKind_Solver() != HEAT_EQUATION_FVM)) { + else if ((config[ExtraHeatOutputZone]->GetKind_Solver() != HEAT_EQUATION)) { SU2_MPI::Error("Error in output routine: No heat solver in extra output zone.", CURRENT_FUNCTION); } else { @@ -5137,7 +5137,7 @@ void COutputLegacy::SetConvHistory_Body(ofstream *ConvHist_file, break; - case HEAT_EQUATION_FVM: + case HEAT_EQUATION: /*--- Heat coefficients ---*/ @@ -5475,7 +5475,7 @@ void COutputLegacy::SetConvHistory_Body(ofstream *ConvHist_file, break; - case HEAT_EQUATION_FVM: + case HEAT_EQUATION: SPRINTF (direct_coeff, ", %14.8e, %14.8e, %14.8e", Total_Heat, Total_MaxHeat, Total_Temperature); SPRINTF (heat_resid, ", %14.8e", log10 (residual_heat[0])); @@ -5767,7 +5767,7 @@ void COutputLegacy::SetConvHistory_Body(ofstream *ConvHist_file, break; - case HEAT_EQUATION_FVM : + case HEAT_EQUATION : if (!Unsteady) cout << endl << " Iter" << " Time(s)"; else cout << endl << " IntIter" << " ExtIter"; @@ -6146,7 +6146,7 @@ void COutputLegacy::SetConvHistory_Body(ofstream *ConvHist_file, break; - case HEAT_EQUATION_FVM: + case HEAT_EQUATION: if (!DualTime_Iteration) { config[val_iZone]->GetHistFile()[0] << begin << direct_coeff << heat_resid << end; @@ -12282,7 +12282,7 @@ void COutputLegacy::SetResult_Files_Parallel(CSolver *****solver_container, case FEM_ELASTICITY: case DISC_ADJ_FEM: LoadLocalData_Elasticity(config[iZone], geometry[iZone][iInst][MESH_0], solver_container[iZone][iInst][MESH_0], iZone); break; - case HEAT_EQUATION_FVM: + case HEAT_EQUATION: LoadLocalData_Base(config[iZone], geometry[iZone][iInst][MESH_0], solver_container[iZone][iInst][MESH_0], iZone); break; case FEM_EULER: case FEM_NAVIER_STOKES: case FEM_RANS: case FEM_LES: @@ -14482,7 +14482,7 @@ void COutputLegacy::LoadLocalData_Base(CConfig *config, CGeometry *geometry, CSo in this zone for output. ---*/ switch (config->GetKind_Solver()) { - case HEAT_EQUATION_FVM: FirstIndex = HEAT_SOL; break; + case HEAT_EQUATION: FirstIndex = HEAT_SOL; break; } nVar_First = solver[FirstIndex]->GetnVar(); diff --git a/SU2_CFD/src/solvers/CHeatSolverFVM.cpp b/SU2_CFD/src/solvers/CHeatSolver.cpp similarity index 95% rename from SU2_CFD/src/solvers/CHeatSolverFVM.cpp rename to SU2_CFD/src/solvers/CHeatSolver.cpp index ce3f3e6fc3b9..24cb96b9571f 100644 --- a/SU2_CFD/src/solvers/CHeatSolverFVM.cpp +++ b/SU2_CFD/src/solvers/CHeatSolver.cpp @@ -1,5 +1,5 @@ /*! - * \file CHeatSolverFVM.cpp + * \file CHeatSolver.cpp * \brief Main subrotuines for solving the heat equation * \author F. Palacios, T. Economon * \version 7.0.1 "Blackbird" @@ -26,15 +26,15 @@ */ -#include "../../include/solvers/CHeatSolverFVM.hpp" +#include "../../include/solvers/CHeatSolver.hpp" -CHeatSolverFVM::CHeatSolverFVM(void) : CSolver() { +CHeatSolver::CHeatSolver(void) : CSolver() { ConjugateVar = NULL; HeatFlux = NULL; } -CHeatSolverFVM::CHeatSolverFVM(CGeometry *geometry, CConfig *config, unsigned short iMesh) : CSolver() { +CHeatSolver::CHeatSolver(CGeometry *geometry, CConfig *config, unsigned short iMesh) : CSolver() { unsigned short iVar, iDim, nLineLets, iMarker; unsigned long iVertex; @@ -43,7 +43,7 @@ CHeatSolverFVM::CHeatSolverFVM(CGeometry *geometry, CConfig *config, unsigned sh int rank = MASTER_NODE; - bool heat_equation = ((config->GetKind_Solver() == HEAT_EQUATION_FVM) || + bool heat_equation = ((config->GetKind_Solver() == HEAT_EQUATION) || (config->GetKind_Solver() == DISC_ADJ_HEAT)); /* A grid is defined as dynamic if there's rigid grid movement or grid deformation AND the problem is time domain */ @@ -178,7 +178,6 @@ CHeatSolverFVM::CHeatSolverFVM(CGeometry *geometry, CConfig *config, unsigned sh } config->SetTemperature_Ref(Temperature_Ref); - /*--- Set the reference values for heat fluxes. If the heat solver runs stand-alone, * thermal conductivity is read directly from config file ---*/ @@ -241,7 +240,7 @@ CHeatSolverFVM::CHeatSolverFVM(CGeometry *geometry, CConfig *config, unsigned sh /*--- Initialize the nodes vector. ---*/ - nodes = new CHeatFVMVariable(config->GetTemperature_FreeStreamND(), nPoint, nDim, nVar, config); + nodes = new CHeatVariable(config->GetTemperature_FreeStreamND(), nPoint, nDim, nVar, config); SetBaseClassPointerToNodes(); @@ -255,7 +254,7 @@ CHeatSolverFVM::CHeatSolverFVM(CGeometry *geometry, CConfig *config, unsigned sh SolverName = "HEAT"; } -CHeatSolverFVM::~CHeatSolverFVM(void) { +CHeatSolver::~CHeatSolver(void) { unsigned short iMarker; @@ -269,7 +268,7 @@ CHeatSolverFVM::~CHeatSolverFVM(void) { if (nodes != nullptr) delete nodes; } -void CHeatSolverFVM::Preprocessing(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iMesh, unsigned short iRKStep, unsigned short RunTime_EqSystem, bool Output) { +void CHeatSolver::Preprocessing(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iMesh, unsigned short iRKStep, unsigned short RunTime_EqSystem, bool Output) { unsigned long iPoint; bool center = (config->GetKind_ConvNumScheme_Heat() == SPACE_CENTERED); @@ -301,9 +300,9 @@ void CHeatSolverFVM::Preprocessing(CGeometry *geometry, CSolver **solver_contain if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) SetSolution_Gradient_LS(geometry, config); } -void CHeatSolverFVM::Postprocessing(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iMesh) { } +void CHeatSolver::Postprocessing(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iMesh) { } -void CHeatSolverFVM::LoadRestart(CGeometry **geometry, CSolver ***solver, CConfig *config, int val_iter, bool val_update_geo) { +void CHeatSolver::LoadRestart(CGeometry **geometry, CSolver ***solver, CConfig *config, int val_iter, bool val_update_geo) { /*--- Restart the solution from file information ---*/ @@ -315,7 +314,7 @@ void CHeatSolverFVM::LoadRestart(CGeometry **geometry, CSolver ***solver, CConfi || (config->GetKind_Solver() == DISC_ADJ_INC_NAVIER_STOKES) || (config->GetKind_Solver() == DISC_ADJ_INC_RANS)); - bool heat_equation = ((config->GetKind_Solver() == HEAT_EQUATION_FVM) || + bool heat_equation = ((config->GetKind_Solver() == HEAT_EQUATION) || (config->GetKind_Solver() == DISC_ADJ_HEAT)); su2double Area_Children, Area_Parent, *Coord, *Solution_Fine; @@ -453,7 +452,7 @@ void CHeatSolverFVM::LoadRestart(CGeometry **geometry, CSolver ***solver, CConfi } -void CHeatSolverFVM::SetUndivided_Laplacian(CGeometry *geometry, CConfig *config) { +void CHeatSolver::SetUndivided_Laplacian(CGeometry *geometry, CConfig *config) { unsigned long iPoint, jPoint, iEdge; su2double *Diff; @@ -505,7 +504,7 @@ void CHeatSolverFVM::SetUndivided_Laplacian(CGeometry *geometry, CConfig *config } -void CHeatSolverFVM::Centered_Residual(CGeometry *geometry, CSolver **solver_container, CNumerics *numerics, +void CHeatSolver::Centered_Residual(CGeometry *geometry, CSolver **solver_container, CNumerics *numerics, CConfig *config, unsigned short iMesh, unsigned short iRKStep) { su2double *V_i, *V_j, Temp_i, Temp_j; @@ -551,7 +550,7 @@ void CHeatSolverFVM::Centered_Residual(CGeometry *geometry, CSolver **solver_con } } -void CHeatSolverFVM::Upwind_Residual(CGeometry *geometry, CSolver **solver_container, CNumerics *numerics, CConfig *config, unsigned short iMesh) { +void CHeatSolver::Upwind_Residual(CGeometry *geometry, CSolver **solver_container, CNumerics *numerics, CConfig *config, unsigned short iMesh) { su2double *V_i, *V_j, Temp_i, Temp_i_Corrected, Temp_j, Temp_j_Corrected, **Gradient_i, **Gradient_j, Project_Grad_i, Project_Grad_j, **Temp_i_Grad, **Temp_j_Grad, Project_Temp_i_Grad, Project_Temp_j_Grad; @@ -645,7 +644,7 @@ void CHeatSolverFVM::Upwind_Residual(CGeometry *geometry, CSolver **solver_conta } -void CHeatSolverFVM::Viscous_Residual(CGeometry *geometry, CSolver **solver_container, CNumerics *numerics, CConfig *config, unsigned short iMesh, unsigned short iRKStep) { +void CHeatSolver::Viscous_Residual(CGeometry *geometry, CSolver **solver_container, CNumerics *numerics, CConfig *config, unsigned short iMesh, unsigned short iRKStep) { su2double laminar_viscosity, Prandtl_Lam, Prandtl_Turb, eddy_viscosity_i, eddy_viscosity_j, thermal_diffusivity_i, thermal_diffusivity_j, Temp_i, Temp_j, **Temp_i_Grad, **Temp_j_Grad; @@ -716,9 +715,9 @@ void CHeatSolverFVM::Viscous_Residual(CGeometry *geometry, CSolver **solver_cont } } -void CHeatSolverFVM::Source_Residual(CGeometry *geometry, CSolver **solver_container, CNumerics *numerics, CNumerics *second_numerics, CConfig *config, unsigned short iMesh) { } +void CHeatSolver::Source_Residual(CGeometry *geometry, CSolver **solver_container, CNumerics *numerics, CNumerics *second_numerics, CConfig *config, unsigned short iMesh) { } -void CHeatSolverFVM::Set_Heatflux_Areas(CGeometry *geometry, CConfig *config) { +void CHeatSolver::Set_Heatflux_Areas(CGeometry *geometry, CConfig *config) { unsigned short iMarker, iMarker_HeatFlux, Monitoring, iDim; unsigned long iPoint, iVertex; @@ -784,7 +783,7 @@ void CHeatSolverFVM::Set_Heatflux_Areas(CGeometry *geometry, CConfig *config) { delete[] Local_Surface_Areas; } -void CHeatSolverFVM::BC_Isothermal_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, +void CHeatSolver::BC_Isothermal_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) { unsigned long iPoint, iVertex, Point_Normal; @@ -849,7 +848,7 @@ void CHeatSolverFVM::BC_Isothermal_Wall(CGeometry *geometry, CSolver **solver_co } } -void CHeatSolverFVM::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, +void CHeatSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) { unsigned short iDim; @@ -903,7 +902,7 @@ void CHeatSolverFVM::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_cont } } -void CHeatSolverFVM::BC_Inlet(CGeometry *geometry, CSolver **solver_container, +void CHeatSolver::BC_Inlet(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) { unsigned short iDim; @@ -1022,7 +1021,7 @@ void CHeatSolverFVM::BC_Inlet(CGeometry *geometry, CSolver **solver_container, } -void CHeatSolverFVM::BC_Outlet(CGeometry *geometry, CSolver **solver_container, +void CHeatSolver::BC_Outlet(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) { unsigned short iDim; @@ -1091,7 +1090,7 @@ void CHeatSolverFVM::BC_Outlet(CGeometry *geometry, CSolver **solver_container, } -void CHeatSolverFVM::BC_ConjugateHeat_Interface(CGeometry *geometry, CSolver **solver_container, CNumerics *numerics, CConfig *config, unsigned short val_marker) { +void CHeatSolver::BC_ConjugateHeat_Interface(CGeometry *geometry, CSolver **solver_container, CNumerics *numerics, CConfig *config, unsigned short val_marker) { unsigned long iVertex, iPoint, total_index; unsigned short iDim, iVar; @@ -1181,7 +1180,7 @@ void CHeatSolverFVM::BC_ConjugateHeat_Interface(CGeometry *geometry, CSolver **s } } -void CHeatSolverFVM::Heat_Fluxes(CGeometry *geometry, CSolver **solver_container, CConfig *config) { +void CHeatSolver::Heat_Fluxes(CGeometry *geometry, CSolver **solver_container, CConfig *config) { unsigned long iVertex, iPoint, iPointNormal; unsigned short Boundary, Monitoring, iMarker, iDim; @@ -1320,7 +1319,7 @@ void CHeatSolverFVM::Heat_Fluxes(CGeometry *geometry, CSolver **solver_container Total_HeatFlux = AllBound_HeatFlux; } -void CHeatSolverFVM::SetTime_Step(CGeometry *geometry, CSolver **solver_container, CConfig *config, +void CHeatSolver::SetTime_Step(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iMesh, unsigned long Iteration) { unsigned short iDim, iMarker; @@ -1539,7 +1538,7 @@ void CHeatSolverFVM::SetTime_Step(CGeometry *geometry, CSolver **solver_containe } } -void CHeatSolverFVM::ExplicitEuler_Iteration(CGeometry *geometry, CSolver **solver_container, CConfig *config) { +void CHeatSolver::ExplicitEuler_Iteration(CGeometry *geometry, CSolver **solver_container, CConfig *config) { su2double *local_Residual, *local_Res_TruncError, Vol, Delta, Res; unsigned short iVar; @@ -1584,7 +1583,7 @@ void CHeatSolverFVM::ExplicitEuler_Iteration(CGeometry *geometry, CSolver **solv } -void CHeatSolverFVM::ImplicitEuler_Iteration(CGeometry *geometry, CSolver **solver_container, CConfig *config) { +void CHeatSolver::ImplicitEuler_Iteration(CGeometry *geometry, CSolver **solver_container, CConfig *config) { unsigned short iVar; unsigned long iPoint, total_index; @@ -1678,7 +1677,7 @@ void CHeatSolverFVM::ImplicitEuler_Iteration(CGeometry *geometry, CSolver **solv } -void CHeatSolverFVM::SetInitialCondition(CGeometry **geometry, CSolver ***solver_container, CConfig *config, unsigned long TimeIter) { +void CHeatSolver::SetInitialCondition(CGeometry **geometry, CSolver ***solver_container, CConfig *config, unsigned long TimeIter) { unsigned long iPoint, Point_Fine; unsigned short iMesh, iChildren, iVar; @@ -1742,7 +1741,7 @@ void CHeatSolverFVM::SetInitialCondition(CGeometry **geometry, CSolver ***solver } } -void CHeatSolverFVM::SetResidual_DualTime(CGeometry *geometry, CSolver **solver_container, CConfig *config, +void CHeatSolver::SetResidual_DualTime(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iRKStep, unsigned short iMesh, unsigned short RunTime_EqSystem) { /*--- Local variables ---*/ diff --git a/SU2_CFD/src/variables/CHeatFVMVariable.cpp b/SU2_CFD/src/variables/CHeatVariable.cpp similarity index 85% rename from SU2_CFD/src/variables/CHeatFVMVariable.cpp rename to SU2_CFD/src/variables/CHeatVariable.cpp index a1f8861b8bfc..ea8beb2d11ce 100644 --- a/SU2_CFD/src/variables/CHeatFVMVariable.cpp +++ b/SU2_CFD/src/variables/CHeatVariable.cpp @@ -1,6 +1,6 @@ /*! - * \file CHeatFVMVariable.cpp - * \brief Definition of the solution fields. + * \file CHeatVariable.cpp + * \brief Definition of the variables for heat equation problems. * \author F. Palacios, T. Economon * \version 7.0.1 "Blackbird" * @@ -26,10 +26,10 @@ */ -#include "../../include/variables/CHeatFVMVariable.hpp" +#include "../../include/variables/CHeatVariable.hpp" -CHeatFVMVariable::CHeatFVMVariable(su2double heat, unsigned long npoint, unsigned long ndim, unsigned long nvar, CConfig *config) +CHeatVariable::CHeatVariable(su2double heat, unsigned long npoint, unsigned long ndim, unsigned long nvar, CConfig *config) : CVariable(npoint, ndim, nvar, config), Gradient_Reconstruction(config->GetReconstructionGradientRequired() ? Gradient_Aux : Gradient) { bool low_fidelity = false; @@ -79,6 +79,10 @@ CHeatFVMVariable::CHeatFVMVariable(su2double heat, unsigned long npoint, unsigne Max_Lambda_Visc.resize(nPoint); Delta_Time.resize(nPoint); + /* Under-relaxation parameter. */ + UnderRelaxation.resize(nPoint) = su2double(1.0); + LocalCFL.resize(nPoint) = su2double(0.0); + if (config->GetMultizone_Problem()) Set_BGSSolution_k(); } diff --git a/TestCases/coupled_cht/comp_2d/solid_cylinder1.cfg b/TestCases/coupled_cht/comp_2d/solid_cylinder1.cfg index 52bf3556c122..9e86543b9a6d 100644 --- a/TestCases/coupled_cht/comp_2d/solid_cylinder1.cfg +++ b/TestCases/coupled_cht/comp_2d/solid_cylinder1.cfg @@ -10,7 +10,7 @@ % Physical governing equations (EULER, NAVIER_STOKES, % WAVE_EQUATION, HEAT_EQUATION, FEM_ELASTICITY, % POISSON_EQUATION) -SOLVER= HEAT_EQUATION_FVM +SOLVER= HEAT_EQUATION % % Restart solution (NO, YES) RESTART_SOL= NO diff --git a/TestCases/coupled_cht/comp_2d/solid_cylinder2.cfg b/TestCases/coupled_cht/comp_2d/solid_cylinder2.cfg index 9ad5951c1be4..b78769e57ac5 100644 --- a/TestCases/coupled_cht/comp_2d/solid_cylinder2.cfg +++ b/TestCases/coupled_cht/comp_2d/solid_cylinder2.cfg @@ -10,7 +10,7 @@ % Physical governing equations (EULER, NAVIER_STOKES, % WAVE_EQUATION, HEAT_EQUATION, FEM_ELASTICITY, % POISSON_EQUATION) -SOLVER= HEAT_EQUATION_FVM +SOLVER= HEAT_EQUATION % % Restart solution (NO, YES) RESTART_SOL= NO diff --git a/TestCases/coupled_cht/comp_2d/solid_cylinder3.cfg b/TestCases/coupled_cht/comp_2d/solid_cylinder3.cfg index 9166a55eca8f..d640d0d1edfa 100644 --- a/TestCases/coupled_cht/comp_2d/solid_cylinder3.cfg +++ b/TestCases/coupled_cht/comp_2d/solid_cylinder3.cfg @@ -10,7 +10,7 @@ % Physical governing equations (EULER, NAVIER_STOKES, % WAVE_EQUATION, HEAT_EQUATION, FEM_ELASTICITY, % POISSON_EQUATION) -SOLVER= HEAT_EQUATION_FVM +SOLVER= HEAT_EQUATION % % Restart solution (NO, YES) RESTART_SOL= NO diff --git a/TestCases/coupled_cht/disc_adj_incomp_2d/solid_cylinder1.cfg b/TestCases/coupled_cht/disc_adj_incomp_2d/solid_cylinder1.cfg index e522d5e20ad4..2b403f8dfe6e 100644 --- a/TestCases/coupled_cht/disc_adj_incomp_2d/solid_cylinder1.cfg +++ b/TestCases/coupled_cht/disc_adj_incomp_2d/solid_cylinder1.cfg @@ -10,7 +10,7 @@ % Physical governing equations (EULER, NAVIER_STOKES, % WAVE_EQUATION, HEAT_EQUATION, FEM_ELASTICITY, % POISSON_EQUATION) -SOLVER= HEAT_EQUATION_FVM +SOLVER= HEAT_EQUATION % % Restart solution (NO, YES) RESTART_SOL= NO diff --git a/TestCases/coupled_cht/disc_adj_incomp_2d/solid_cylinder2.cfg b/TestCases/coupled_cht/disc_adj_incomp_2d/solid_cylinder2.cfg index 058746e24943..262728cd2269 100644 --- a/TestCases/coupled_cht/disc_adj_incomp_2d/solid_cylinder2.cfg +++ b/TestCases/coupled_cht/disc_adj_incomp_2d/solid_cylinder2.cfg @@ -10,7 +10,7 @@ % Physical governing equations (EULER, NAVIER_STOKES, % WAVE_EQUATION, HEAT_EQUATION, FEM_ELASTICITY, % POISSON_EQUATION) -SOLVER= HEAT_EQUATION_FVM +SOLVER= HEAT_EQUATION % % Restart solution (NO, YES) RESTART_SOL= NO diff --git a/TestCases/coupled_cht/disc_adj_incomp_2d/solid_cylinder3.cfg b/TestCases/coupled_cht/disc_adj_incomp_2d/solid_cylinder3.cfg index 47c0c16d36d2..365dfe3a40f0 100644 --- a/TestCases/coupled_cht/disc_adj_incomp_2d/solid_cylinder3.cfg +++ b/TestCases/coupled_cht/disc_adj_incomp_2d/solid_cylinder3.cfg @@ -10,7 +10,7 @@ % Physical governing equations (EULER, NAVIER_STOKES, % WAVE_EQUATION, HEAT_EQUATION, FEM_ELASTICITY, % POISSON_EQUATION) -SOLVER= HEAT_EQUATION_FVM +SOLVER= HEAT_EQUATION % % Restart solution (NO, YES) RESTART_SOL= NO diff --git a/TestCases/coupled_cht/incomp_2d/solid_cylinder1.cfg b/TestCases/coupled_cht/incomp_2d/solid_cylinder1.cfg index 9a041f9b2cba..a13ba671aae7 100644 --- a/TestCases/coupled_cht/incomp_2d/solid_cylinder1.cfg +++ b/TestCases/coupled_cht/incomp_2d/solid_cylinder1.cfg @@ -10,7 +10,7 @@ % Physical governing equations (EULER, NAVIER_STOKES, % WAVE_EQUATION, HEAT_EQUATION, FEM_ELASTICITY, % POISSON_EQUATION) -SOLVER= HEAT_EQUATION_FVM +SOLVER= HEAT_EQUATION % % Restart solution (NO, YES) RESTART_SOL= NO diff --git a/TestCases/coupled_cht/incomp_2d/solid_cylinder2.cfg b/TestCases/coupled_cht/incomp_2d/solid_cylinder2.cfg index aa0fd5570b98..cd442b463c56 100644 --- a/TestCases/coupled_cht/incomp_2d/solid_cylinder2.cfg +++ b/TestCases/coupled_cht/incomp_2d/solid_cylinder2.cfg @@ -10,7 +10,7 @@ % Physical governing equations (EULER, NAVIER_STOKES, % WAVE_EQUATION, HEAT_EQUATION, FEM_ELASTICITY, % POISSON_EQUATION) -SOLVER= HEAT_EQUATION_FVM +SOLVER= HEAT_EQUATION % % Restart solution (NO, YES) RESTART_SOL= NO diff --git a/TestCases/coupled_cht/incomp_2d/solid_cylinder3.cfg b/TestCases/coupled_cht/incomp_2d/solid_cylinder3.cfg index 3a0ea34342dd..e4dfae06741e 100644 --- a/TestCases/coupled_cht/incomp_2d/solid_cylinder3.cfg +++ b/TestCases/coupled_cht/incomp_2d/solid_cylinder3.cfg @@ -10,7 +10,7 @@ % Physical governing equations (EULER, NAVIER_STOKES, % WAVE_EQUATION, HEAT_EQUATION, FEM_ELASTICITY, % POISSON_EQUATION) -SOLVER= HEAT_EQUATION_FVM +SOLVER= HEAT_EQUATION % % Restart solution (NO, YES) RESTART_SOL= NO diff --git a/TestCases/coupled_cht/incomp_2d_unsteady/cht_2d_3cylinders.cfg b/TestCases/coupled_cht/incomp_2d_unsteady/cht_2d_3cylinders.cfg new file mode 100644 index 000000000000..249e9928a848 --- /dev/null +++ b/TestCases/coupled_cht/incomp_2d_unsteady/cht_2d_3cylinders.cfg @@ -0,0 +1,63 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% SU2 configuration file % +% Case description: 2D cylinder array with CHT couplings % +% Author: O. Burghardt, T. Economon % +% Institution: Chair for Scientific Computing, TU Kaiserslautern % +% Date: August 8, 2019 % +% File Version 6.0.1 "Falcon" % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% +% Physical governing equations (EULER, NAVIER_STOKES, +% WAVE_EQUATION, HEAT_EQUATION, FEM_ELASTICITY, +% POISSON_EQUATION) +SOLVER= MULTIPHYSICS +% +% Mathematical problem (DIRECT, CONTINUOUS_ADJOINT, DISCRETE_ADJOINT) +MATH_PROBLEM= DIRECT +% +% +CONFIG_LIST = (flow_cylinder.cfg, solid_cylinder1.cfg, solid_cylinder2.cfg, solid_cylinder3.cfg) +% +% +MARKER_ZONE_INTERFACE= (cylinder_outer1, cylinder_inner1, cylinder_outer2, cylinder_inner2, cylinder_outer3, cylinder_inner3) +% +% +MARKER_CHT_INTERFACE= (cylinder_outer1, cylinder_inner1, cylinder_outer2, cylinder_inner2, cylinder_outer3, cylinder_inner3) +% +% Time domain simulation +TIME_DOMAIN = YES +% +% Unsteady simulation (NO, TIME_STEPPING, DUAL_TIME_STEPPING-1ST_ORDER, +% DUAL_TIME_STEPPING-2ND_ORDER, HARMONIC_BALANCE) +TIME_MARCHING= DUAL_TIME_STEPPING-2ND_ORDER +% +% Time Step for dual time stepping simulations (s) -- Only used when UNST_CFL_NUMBER = 0.0 +% For the DG-FEM solver it is used as a synchronization time when UNST_CFL_NUMBER != 0.0 +TIME_STEP= 0.05 +% +% Total Physical Time for dual time stepping simulations (s) +MAX_TIME= 100.0 +% +% Maximum number of time iterations +TIME_ITER= 3 +% +% Number of total iterations +OUTER_ITER = 10 +% +% Courant-Friedrichs-Lewy condition of the finest grid +CFL_NUMBER= 100.0 +% +% Mesh input file +MESH_FILENAME= mesh_cht_3cyl.su2 +% +% Mesh input file format (SU2, CGNS, NETCDF_ASCII) +MESH_FORMAT= SU2 +% +% +HISTORY_OUTPUT= (ITER, BGS_RES[0], BGS_RES[1], BGS_RES[2], BGS_RES[3], HEAT[0], AERO_COEFF[0]) +% +% +OUTPUT_FILES=(RESTART, PARAVIEW_MULTIBLOCK) diff --git a/TestCases/coupled_cht/incomp_2d_unsteady/flow_cylinder.cfg b/TestCases/coupled_cht/incomp_2d_unsteady/flow_cylinder.cfg new file mode 100644 index 000000000000..f65cbda8ba72 --- /dev/null +++ b/TestCases/coupled_cht/incomp_2d_unsteady/flow_cylinder.cfg @@ -0,0 +1,245 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% SU2 configuration file % +% Case description: Steady incompressible laminar flow around heated cylinders % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% ------------- DIRECT, ADJOINT, AND LINEARIZED PROBLEM DEFINITION ------------% +% +% Physical governing equations (EULER, NAVIER_STOKES, +% WAVE_EQUATION, HEAT_EQUATION, FEM_ELASTICITY, +% POISSON_EQUATION) +SOLVER= INC_NAVIER_STOKES +% +% If Navier-Stokes, kind of turbulent model (NONE, SA) +KIND_TURB_MODEL= NONE +% +% Restart solution (NO, YES) +RESTART_SOL= NO +% +% Objective function in gradient evaluation (DRAG, LIFT, SIDEFORCE, MOMENT_X, +% MOMENT_Y, MOMENT_Z, EFFICIENCY, +% EQUIVALENT_AREA, NEARFIELD_PRESSURE, +% FORCE_X, FORCE_Y, FORCE_Z, THRUST, +% TORQUE, TOTAL_HEATFLUX, +% MAXIMUM_HEATFLUX, INVERSE_DESIGN_PRESSURE, +% INVERSE_DESIGN_HEATFLUX, SURFACE_TOTAL_PRESSURE, +% SURFACE_MASSFLOW, SURFACE_STATIC_PRESSURE, SURFACE_MACH) +% For a weighted sum of objectives: separate by commas, add OBJECTIVE_WEIGHT and MARKER_MONITORING in matching order. +OBJECTIVE_FUNCTION= TOTAL_HEATFLUX +% +% List of weighting values when using more than one OBJECTIVE_FUNCTION. Separate by commas and match with MARKER_MONITORING. +OBJECTIVE_WEIGHT = 1.0 +% +% Read binary restart files (YES, NO) +READ_BINARY_RESTART = YES +% +% Data written to history file +HISTORY_OUTPUT=(ITER, RMS_RES, HEAT) + +% -------------------- BOUNDARY CONDITION DEFINITION --------------------------% +% +% Farfield boundary marker(s) (NONE = no marker) +MARKER_FAR= ( farfield ) +% +% Marker(s) of the surface to be plotted or designed +MARKER_PLOTTING= (cylinder_outer1, cylinder_outer2, cylinder_outer3) +% +% Marker(s) of the surface where the functional (Cd, Cl, etc.) will be evaluated +MARKER_MONITORING= (cylinder_outer1, cylinder_outer2, cylinder_outer3) + +% ---------------- INCOMPRESSIBLE FLOW CONDITION DEFINITION -------------------% +% +% Density model within the incompressible flow solver. +% Options are CONSTANT (default), BOUSSINESQ, or VARIABLE. If VARIABLE, +% an appropriate fluid model must be selected. +INC_DENSITY_MODEL= VARIABLE +% +% Solve the energy equation in the incompressible flow solver +INC_ENERGY_EQUATION = YES +% +% Initial density for incompressible flows (1.2886 kg/m^3 by default) +INC_DENSITY_INIT= 0.0210322 +% +% Initial velocity for incompressible flows (1.0,0,0 m/s by default) +INC_VELOCITY_INIT= ( 3.40297, 0.0, 0.0 ) +% +% Initial temperature for incompressible flows that include the +% energy equation (288.15 K by default). Value is ignored if +% INC_ENERGY_EQUATION is false. +INC_TEMPERATURE_INIT= 288.15 +% +% Non-dimensionalization scheme for incompressible flows. Options are +% INITIAL_VALUES (default), REFERENCE_VALUES, or DIMENSIONAL. +% INC_*_REF values are ignored unless REFERENCE_VALUES is chosen. +INC_NONDIM= DIMENSIONAL + +% ---- IDEAL GAS, POLYTROPIC, VAN DER WAALS AND PENG ROBINSON CONSTANTS -------% +% +% Fluid model (STANDARD_AIR, IDEAL_GAS, VW_GAS, PR_GAS, +% CONSTANT_DENSITY, INC_IDEAL_GAS) +FLUID_MODEL= INC_IDEAL_GAS +% +% Specific heat at constant pressure, Cp (1004.703 J/kg*K (air)). +% Incompressible fluids with energy eqn. only (CONSTANT_DENSITY, INC_IDEAL_GAS). +SPECIFIC_HEAT_CP= 1004.703 +% +% Molecular weight for an incompressible ideal gas (28.96 g/mol (air) default) +% Incompressible fluids with energy eqn. only (CONSTANT_DENSITY, INC_IDEAL_GAS). +MOLECULAR_WEIGHT= 28.96 + +% --------------------------- VISCOSITY MODEL ---------------------------------% +% +% Viscosity model (SUTHERLAND, CONSTANT_VISCOSITY). +VISCOSITY_MODEL= CONSTANT_VISCOSITY +% +% Molecular Viscosity that would be constant (1.716E-5 by default) +MU_CONSTANT= 1.7893e-05 +% +% Sutherland Viscosity Ref (1.716E-5 default value for AIR SI) +MU_REF= 1.716E-5 +% +% Sutherland Temperature Ref (273.15 K default value for AIR SI) +MU_T_REF= 273.15 +% +% Sutherland constant (110.4 default value for AIR SI) +SUTHERLAND_CONSTANT= 110.4 + +% --------------------------- THERMAL CONDUCTIVITY MODEL ----------------------% +% +% Conductivity model (CONSTANT_CONDUCTIVITY, CONSTANT_PRANDTL). +CONDUCTIVITY_MODEL= CONSTANT_PRANDTL +% +% Molecular Thermal Conductivity that would be constant (0.0257 by default) +KT_CONSTANT= 0.0257 +% +% Laminar Prandtl number (0.72 (air), only for CONSTANT_PRANDTL) +PRANDTL_LAM= 0.72 +% +% Turbulent Prandtl number (0.9 (air), only for CONSTANT_PRANDTL) +PRANDTL_TURB= 0.90 + +% ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% +% +% Numerical method for spatial gradients (GREEN_GAUSS, WEIGHTED_LEAST_SQUARES) +NUM_METHOD_GRAD= GREEN_GAUSS + +% ------------------------ LINEAR SOLVER DEFINITION ---------------------------% +% +% Linear solver or smoother for implicit formulations (BCGSTAB, FGMRES, SMOOTHER_JACOBI, +% SMOOTHER_ILU, SMOOTHER_LUSGS, +% SMOOTHER_LINELET) +LINEAR_SOLVER= FGMRES +% +% Preconditioner of the Krylov linear solver (ILU, LU_SGS, LINELET, JACOBI) +LINEAR_SOLVER_PREC= ILU +% +% Linael solver ILU preconditioner fill-in level (0 by default) +LINEAR_SOLVER_ILU_FILL_IN= 0 +% +% Minimum error of the linear solver for implicit formulations +LINEAR_SOLVER_ERROR= 1E-15 +% +% Max number of iterations of the linear solver for the implicit formulation +LINEAR_SOLVER_ITER= 5 + +% -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% +% +% Convective numerical method (JST, LAX-FRIEDRICH, CUSP, ROE, AUSM, HLLC, +% TURKEL_PREC, MSW) +CONV_NUM_METHOD_FLOW= FDS +% +% Monotonic Upwind Scheme for Conservation Laws (TVD) in the flow equations. +% Required for 2nd order upwind schemes (NO, YES) +MUSCL_FLOW= YES +% +% Slope limiter (NONE, VENKATAKRISHNAN, VENKATAKRISHNAN_WANG, +% BARTH_JESPERSEN, VAN_ALBADA_EDGE) +SLOPE_LIMITER_FLOW= NONE +% +% Time discretization (RUNGE-KUTTA_EXPLICIT, EULER_IMPLICIT, EULER_EXPLICIT) +TIME_DISCRE_FLOW= EULER_IMPLICIT + +% --------------------------- CONVERGENCE PARAMETERS --------------------------% +% +% Min value of the residual (log10 of the residual) +CONV_RESIDUAL_MINVAL= -19 +% +% Start convergence criteria at iteration number +CONV_STARTITER= 10 +% +% Number of elements to apply the criteria +CONV_CAUCHY_ELEMS= 100 +% +% Epsilon to control the series convergence +CONV_CAUCHY_EPS= 1E-6 + +% ------------------------- INPUT/OUTPUT INFORMATION --------------------------% +% +% Restart flow input file +SOLUTION_FILENAME= solution_flow.dat +% +% Restart adjoint input file +SOLUTION_ADJ_FILENAME= solution_adj.dat +% +% Output file format (TECPLOT, TECPLOT_BINARY, PARAVIEW, +% FIELDVIEW, FIELDVIEW_BINARY) +TABULAR_FORMAT= TECPLOT +% +% Output file convergence history (w/o extension) +CONV_FILENAME= history +% +% Output file with the forces breakdown +BREAKDOWN_FILENAME= forces_breakdown.dat +% +% Output file restart flow +RESTART_FILENAME= restart_flow.dat +% +% Output file restart adjoint +RESTART_ADJ_FILENAME= restart_adj.dat +% +% Output file flow (w/o extension) variables +VOLUME_FILENAME= flow +% +% Output file adjoint (w/o extension) variables +VOLUME_ADJ_FILENAME= adjoint +% +% Output Objective function +VALUE_OBJFUNC_FILENAME= of_eval.dat +% +% Output objective function gradient (using continuous adjoint) +GRAD_OBJFUNC_FILENAME= of_grad.dat +% +% Output file surface flow coefficient (w/o extension) +SURFACE_FILENAME= surface_flow +% +% Output file surface adjoint coefficient (w/o extension) +SURFACE_ADJ_FILENAME= surface_adjoint +% +% Writing solution file frequency +WRT_SOL_FREQ= 250 +% +% Writing convergence history frequency +WRT_CON_FREQ= 1 + +% ------------------------ GRID DEFORMATION PARAMETERS ------------------------% +% +% Linear solver or smoother for implicit formulations (FGMRES, RESTARTED_FGMRES, BCGSTAB) +DEFORM_LINEAR_SOLVER= FGMRES +% +% Number of smoothing iterations for mesh deformation +DEFORM_LINEAR_SOLVER_ITER= 200 +% +% Number of nonlinear deformation iterations (surface deformation increments) +DEFORM_NONLINEAR_ITER= 1 +% +% Print the residuals during mesh deformation to the console (YES, NO) +DEFORM_CONSOLE_OUTPUT= YES +% +% Type of element stiffness imposed for FEA mesh deformation (INVERSE_VOLUME, +% WALL_DISTANCE, CONSTANT_STIFFNESS) +DEFORM_STIFFNESS_TYPE= INVERSE_VOLUME +% +% Visualize the deformation (NO, YES) +VISUALIZE_VOLUME_DEF= YES diff --git a/TestCases/coupled_cht/incomp_2d_unsteady/solid_cylinder1.cfg b/TestCases/coupled_cht/incomp_2d_unsteady/solid_cylinder1.cfg new file mode 100644 index 000000000000..5cc8ce385b83 --- /dev/null +++ b/TestCases/coupled_cht/incomp_2d_unsteady/solid_cylinder1.cfg @@ -0,0 +1,173 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% SU2 configuration file % +% Case description: Steady incompressible laminar flow around heated cylinders % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% ------------- DIRECT, ADJOINT, AND LINEARIZED PROBLEM DEFINITION ------------% +% +% Physical governing equations (EULER, NAVIER_STOKES, +% WAVE_EQUATION, HEAT_EQUATION, FEM_ELASTICITY, +% POISSON_EQUATION) +SOLVER= HEAT_EQUATION +% +% Restart solution (NO, YES) +RESTART_SOL= NO +% +% Objective function in gradient evaluation (DRAG, LIFT, SIDEFORCE, MOMENT_X, +% MOMENT_Y, MOMENT_Z, EFFICIENCY, +% EQUIVALENT_AREA, NEARFIELD_PRESSURE, +% FORCE_X, FORCE_Y, FORCE_Z, THRUST, +% TORQUE, TOTAL_HEATFLUX, +% MAXIMUM_HEATFLUX, INVERSE_DESIGN_PRESSURE, +% INVERSE_DESIGN_HEATFLUX, SURFACE_TOTAL_PRESSURE, +% SURFACE_MASSFLOW, SURFACE_STATIC_PRESSURE, SURFACE_MACH) +% For a weighted sum of objectives: separate by commas, add OBJECTIVE_WEIGHT and MARKER_MONITORING in matching order. +OBJECTIVE_FUNCTION= TOTAL_HEATFLUX +% +% List of weighting values when using more than one OBJECTIVE_FUNCTION. Separate by commas and match with MARKER_MONITORING. +OBJECTIVE_WEIGHT = 1.0 +% +% Read binary restart files (YES, NO) +READ_BINARY_RESTART = YES + +% -------------------- BOUNDARY CONDITION DEFINITION --------------------------% +% +MARKER_ISOTHERMAL= ( core1, 350.0 ) +% +% Marker(s) of the surface to be plotted or designed +MARKER_PLOTTING= (cylinder_inner1 ) +% +% Marker(s) of the surface where the functional (Cd, Cl, etc.) will be evaluated +MARKER_MONITORING= ( NONE ) + +% ---------------- (SOLIDS) CONDUCTION CONDITION DEFINITION -------------------% +% +% We should keep the dimensionalization of the coupled flow solver +INC_NONDIM= DIMENSIONAL +% +% Temperature initialization value +SOLID_TEMPERATURE_INIT= 288.15 +% +% Nettis case: hollow cylinder (air w/ 4x the conductivity) +% +% Solid density (kg/m^3) +SOLID_DENSITY= 0.0210322 +% +% Solid specific heat (J/kg*K) +SPECIFIC_HEAT_CP= 1004.703 +% +% Solid thermal conductivity (W/m*K) +SOLID_THERMAL_CONDUCTIVITY= 0.1028 + +% ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% +% +% Numerical method for spatial gradients (GREEN_GAUSS, WEIGHTED_LEAST_SQUARES) +NUM_METHOD_GRAD= GREEN_GAUSS + +% ------------------------ LINEAR SOLVER DEFINITION ---------------------------% +% +% Linear solver or smoother for implicit formulations (BCGSTAB, FGMRES, SMOOTHER_JACOBI, +% SMOOTHER_ILU, SMOOTHER_LUSGS, +% SMOOTHER_LINELET) +LINEAR_SOLVER= FGMRES +% +% Preconditioner of the Krylov linear solver (ILU, LU_SGS, LINELET, JACOBI) +LINEAR_SOLVER_PREC= ILU +% +% Linael solver ILU preconditioner fill-in level (0 by default) +LINEAR_SOLVER_ILU_FILL_IN= 0 +% +% Minimum error of the linear solver for implicit formulations +LINEAR_SOLVER_ERROR= 1E-15 +% +% Max number of iterations of the linear solver for the implicit formulation +LINEAR_SOLVER_ITER= 5 + +% -------------------- HEAT NUMERICAL METHOD DEFINITION -----------------------% +% +TIME_DISCRE_HEAT= EULER_IMPLICIT + +% --------------------------- CONVERGENCE PARAMETERS --------------------------% +% +% Min value of the residual (log10 of the residual) +CONV_RESIDUAL_MINVAL= -19 +% +% Start convergence criteria at iteration number +CONV_STARTITER= 10 +% +% Number of elements to apply the criteria +CONV_CAUCHY_ELEMS= 100 +% +% Epsilon to control the series convergence +CONV_CAUCHY_EPS= 1E-6 + +% ------------------------- INPUT/OUTPUT INFORMATION --------------------------% +% +% Restart flow input file +SOLUTION_FILENAME= solution_flow.dat +% +% Restart adjoint input file +SOLUTION_ADJ_FILENAME= solution_adj.dat +% +% Output file format (TECPLOT, TECPLOT_BINARY, PARAVIEW, +% FIELDVIEW, FIELDVIEW_BINARY) +TABULAR_FORMAT= TECPLOT +% +% Output file convergence history (w/o extension) +CONV_FILENAME= history +% +% Output file with the forces breakdown +BREAKDOWN_FILENAME= forces_breakdown.dat +% +% Output file restart flow +RESTART_FILENAME= restart_flow.dat +% +% Output file restart adjoint +RESTART_ADJ_FILENAME= restart_adj.dat +% +% Output file flow (w/o extension) variables +VOLUME_FILENAME= flow +% +% Output file adjoint (w/o extension) variables +VOLUME_ADJ_FILENAME= adjoint +% +% Output Objective function +VALUE_OBJFUNC_FILENAME= of_eval.dat +% +% Output objective function gradient (using continuous adjoint) +GRAD_OBJFUNC_FILENAME= of_grad.dat +% +% Output file surface flow coefficient (w/o extension) +SURFACE_FILENAME= surface_flow +% +% Output file surface adjoint coefficient (w/o extension) +SURFACE_ADJ_FILENAME= surface_adjoint +% +% Writing solution file frequency +WRT_SOL_FREQ= 250 +% +% Writing convergence history frequency +WRT_CON_FREQ= 1 + +% ------------------------ GRID DEFORMATION PARAMETERS ------------------------% +% +% Linear solver or smoother for implicit formulations (FGMRES, RESTARTED_FGMRES, BCGSTAB) +DEFORM_LINEAR_SOLVER= FGMRES +% +% Number of smoothing iterations for mesh deformation +DEFORM_LINEAR_SOLVER_ITER= 200 +% +% Number of nonlinear deformation iterations (surface deformation increments) +DEFORM_NONLINEAR_ITER= 1 +% +% Print the residuals during mesh deformation to the console (YES, NO) +DEFORM_CONSOLE_OUTPUT= YES +% +% Type of element stiffness imposed for FEA mesh deformation (INVERSE_VOLUME, +% WALL_DISTANCE, CONSTANT_STIFFNESS) +DEFORM_STIFFNESS_TYPE= INVERSE_VOLUME +% +% Visualize the deformation (NO, YES) +VISUALIZE_VOLUME_DEF= YES diff --git a/TestCases/coupled_cht/incomp_2d_unsteady/solid_cylinder2.cfg b/TestCases/coupled_cht/incomp_2d_unsteady/solid_cylinder2.cfg new file mode 100644 index 000000000000..85124ce7e40e --- /dev/null +++ b/TestCases/coupled_cht/incomp_2d_unsteady/solid_cylinder2.cfg @@ -0,0 +1,174 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% SU2 configuration file % +% Case description: Steady incompressible laminar flow around heated cylinders % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% ------------- DIRECT, ADJOINT, AND LINEARIZED PROBLEM DEFINITION ------------% +% +% Physical governing equations (EULER, NAVIER_STOKES, +% WAVE_EQUATION, HEAT_EQUATION, FEM_ELASTICITY, +% POISSON_EQUATION) +SOLVER= HEAT_EQUATION +% +% Restart solution (NO, YES) +RESTART_SOL= NO +% +% Objective function in gradient evaluation (DRAG, LIFT, SIDEFORCE, MOMENT_X, +% MOMENT_Y, MOMENT_Z, EFFICIENCY, +% EQUIVALENT_AREA, NEARFIELD_PRESSURE, +% FORCE_X, FORCE_Y, FORCE_Z, THRUST, +% TORQUE, TOTAL_HEATFLUX, +% MAXIMUM_HEATFLUX, INVERSE_DESIGN_PRESSURE, +% INVERSE_DESIGN_HEATFLUX, SURFACE_TOTAL_PRESSURE, +% SURFACE_MASSFLOW, SURFACE_STATIC_PRESSURE, SURFACE_MACH) +% For a weighted sum of objectives: separate by commas, add OBJECTIVE_WEIGHT and MARKER_MONITORING in matching order. +OBJECTIVE_FUNCTION= TOTAL_HEATFLUX +% +% List of weighting values when using more than one OBJECTIVE_FUNCTION. Separate by commas and match with MARKER_MONITORING. +OBJECTIVE_WEIGHT = 1.0 +% +% Read binary restart files (YES, NO) +READ_BINARY_RESTART = YES + +% -------------------- BOUNDARY CONDITION DEFINITION --------------------------% +% +MARKER_ISOTHERMAL= ( core2, 350.0 ) +% +% Marker(s) of the surface to be plotted or designed +MARKER_PLOTTING= (cylinder_inner2) +% +% Marker(s) of the surface where the functional (Cd, Cl, etc.) will be evaluated +MARKER_MONITORING= ( NONE ) + +% ---------------- (SOLIDS) CONDUCTION CONDITION DEFINITION -------------------% +% +% We should keep the dimensionalization of the coupled flow solver +INC_NONDIM= DIMENSIONAL +% +% Temperature initialization value +SOLID_TEMPERATURE_INIT= 288.15 +% +% Nettis case: hollow cylinder (air w/ 4x the conductivity) +% +% Solid density (kg/m^3) +SOLID_DENSITY= 0.0210322 +% +% Solid specific heat (J/kg*K) +SPECIFIC_HEAT_CP= 1004.703 +% +% Solid thermal conductivity (W/m*K) +SOLID_THERMAL_CONDUCTIVITY= 0.1028 + +% ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% +% +% Numerical method for spatial gradients (GREEN_GAUSS, WEIGHTED_LEAST_SQUARES) +NUM_METHOD_GRAD= GREEN_GAUSS + +% ------------------------ LINEAR SOLVER DEFINITION ---------------------------% +% +% Linear solver or smoother for implicit formulations (BCGSTAB, FGMRES, SMOOTHER_JACOBI, +% SMOOTHER_ILU, SMOOTHER_LUSGS, +% SMOOTHER_LINELET) +LINEAR_SOLVER= FGMRES +% +% Preconditioner of the Krylov linear solver (ILU, LU_SGS, LINELET, JACOBI) +LINEAR_SOLVER_PREC= ILU +% +% Linael solver ILU preconditioner fill-in level (0 by default) +LINEAR_SOLVER_ILU_FILL_IN= 0 +% +% Minimum error of the linear solver for implicit formulations +LINEAR_SOLVER_ERROR= 1E-15 +% +% Max number of iterations of the linear solver for the implicit formulation +LINEAR_SOLVER_ITER= 5 + +% -------------------- HEAT NUMERICAL METHOD DEFINITION -----------------------% +% +% Time discretization (EULER_IMPLICIT, EULER_EXPLICIT) +TIME_DISCRE_HEAT= EULER_IMPLICIT + +% --------------------------- CONVERGENCE PARAMETERS --------------------------% +% +% Min value of the residual (log10 of the residual) +CONV_RESIDUAL_MINVAL= -19 +% +% Start convergence criteria at iteration number +CONV_STARTITER= 10 +% +% Number of elements to apply the criteria +CONV_CAUCHY_ELEMS= 100 +% +% Epsilon to control the series convergence +CONV_CAUCHY_EPS= 1E-6 + +% ------------------------- INPUT/OUTPUT INFORMATION --------------------------% +% +% Restart flow input file +SOLUTION_FILENAME= solution_flow.dat +% +% Restart adjoint input file +SOLUTION_ADJ_FILENAME= solution_adj.dat +% +% Output file format (TECPLOT, TECPLOT_BINARY, PARAVIEW, +% FIELDVIEW, FIELDVIEW_BINARY) +TABULAR_FORMAT= TECPLOT +% +% Output file convergence history (w/o extension) +CONV_FILENAME= history +% +% Output file with the forces breakdown +BREAKDOWN_FILENAME= forces_breakdown.dat +% +% Output file restart flow +RESTART_FILENAME= restart_flow.dat +% +% Output file restart adjoint +RESTART_ADJ_FILENAME= restart_adj.dat +% +% Output file flow (w/o extension) variables +VOLUME_FILENAME= flow +% +% Output file adjoint (w/o extension) variables +VOLUME_ADJ_FILENAME= adjoint +% +% Output Objective function +VALUE_OBJFUNC_FILENAME= of_eval.dat +% +% Output objective function gradient (using continuous adjoint) +GRAD_OBJFUNC_FILENAME= of_grad.dat +% +% Output file surface flow coefficient (w/o extension) +SURFACE_FILENAME= surface_flow +% +% Output file surface adjoint coefficient (w/o extension) +SURFACE_ADJ_FILENAME= surface_adjoint +% +% Writing solution file frequency +WRT_SOL_FREQ= 250 +% +% Writing convergence history frequency +WRT_CON_FREQ= 1 + +% ------------------------ GRID DEFORMATION PARAMETERS ------------------------% +% +% Linear solver or smoother for implicit formulations (FGMRES, RESTARTED_FGMRES, BCGSTAB) +DEFORM_LINEAR_SOLVER= FGMRES +% +% Number of smoothing iterations for mesh deformation +DEFORM_LINEAR_SOLVER_ITER= 200 +% +% Number of nonlinear deformation iterations (surface deformation increments) +DEFORM_NONLINEAR_ITER= 1 +% +% Print the residuals during mesh deformation to the console (YES, NO) +DEFORM_CONSOLE_OUTPUT= YES +% +% Type of element stiffness imposed for FEA mesh deformation (INVERSE_VOLUME, +% WALL_DISTANCE, CONSTANT_STIFFNESS) +DEFORM_STIFFNESS_TYPE= INVERSE_VOLUME +% +% Visualize the deformation (NO, YES) +VISUALIZE_VOLUME_DEF= YES diff --git a/TestCases/coupled_cht/incomp_2d_unsteady/solid_cylinder3.cfg b/TestCases/coupled_cht/incomp_2d_unsteady/solid_cylinder3.cfg new file mode 100644 index 000000000000..7dbd61cdb63f --- /dev/null +++ b/TestCases/coupled_cht/incomp_2d_unsteady/solid_cylinder3.cfg @@ -0,0 +1,174 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% SU2 configuration file % +% Case description: Steady incompressible laminar flow around heated cylinders % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% ------------- DIRECT, ADJOINT, AND LINEARIZED PROBLEM DEFINITION ------------% +% +% Physical governing equations (EULER, NAVIER_STOKES, +% WAVE_EQUATION, HEAT_EQUATION, FEM_ELASTICITY, +% POISSON_EQUATION) +SOLVER= HEAT_EQUATION +% +% Restart solution (NO, YES) +RESTART_SOL= NO +% +% Objective function in gradient evaluation (DRAG, LIFT, SIDEFORCE, MOMENT_X, +% MOMENT_Y, MOMENT_Z, EFFICIENCY, +% EQUIVALENT_AREA, NEARFIELD_PRESSURE, +% FORCE_X, FORCE_Y, FORCE_Z, THRUST, +% TORQUE, TOTAL_HEATFLUX, +% MAXIMUM_HEATFLUX, INVERSE_DESIGN_PRESSURE, +% INVERSE_DESIGN_HEATFLUX, SURFACE_TOTAL_PRESSURE, +% SURFACE_MASSFLOW, SURFACE_STATIC_PRESSURE, SURFACE_MACH) +% For a weighted sum of objectives: separate by commas, add OBJECTIVE_WEIGHT and MARKER_MONITORING in matching order. +OBJECTIVE_FUNCTION= TOTAL_HEATFLUX +% +% List of weighting values when using more than one OBJECTIVE_FUNCTION. Separate by commas and match with MARKER_MONITORING. +OBJECTIVE_WEIGHT = 1.0 +% +% Read binary restart files (YES, NO) +READ_BINARY_RESTART = YES + +% -------------------- BOUNDARY CONDITION DEFINITION --------------------------% +% +MARKER_ISOTHERMAL= ( core3, 350.0 ) +% +% Marker(s) of the surface to be plotted or designed +MARKER_PLOTTING= ( cylinder_inner3 ) +% +% Marker(s) of the surface where the functional (Cd, Cl, etc.) will be evaluated +MARKER_MONITORING= ( NONE ) + +% ---------------- (SOLIDS) CONDUCTION CONDITION DEFINITION -------------------% +% +% We should keep the dimensionalization of the coupled flow solver +INC_NONDIM= DIMENSIONAL +% +% Temperature initialization value +SOLID_TEMPERATURE_INIT= 288.15 +% +% Nettis case: hollow cylinder (air w/ 4x the conductivity) +% +% Solid density (kg/m^3) +SOLID_DENSITY= 0.0210322 +% +% Solid specific heat (J/kg*K) +SPECIFIC_HEAT_CP= 1004.703 +% +% Solid thermal conductivity (W/m*K) +SOLID_THERMAL_CONDUCTIVITY= 0.1028 + +% ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% +% +% Numerical method for spatial gradients (GREEN_GAUSS, WEIGHTED_LEAST_SQUARES) +NUM_METHOD_GRAD= GREEN_GAUSS + +% ------------------------ LINEAR SOLVER DEFINITION ---------------------------% +% +% Linear solver or smoother for implicit formulations (BCGSTAB, FGMRES, SMOOTHER_JACOBI, +% SMOOTHER_ILU, SMOOTHER_LUSGS, +% SMOOTHER_LINELET) +LINEAR_SOLVER= FGMRES +% +% Preconditioner of the Krylov linear solver (ILU, LU_SGS, LINELET, JACOBI) +LINEAR_SOLVER_PREC= ILU +% +% Linael solver ILU preconditioner fill-in level (0 by default) +LINEAR_SOLVER_ILU_FILL_IN= 0 +% +% Minimum error of the linear solver for implicit formulations +LINEAR_SOLVER_ERROR= 1E-15 +% +% Max number of iterations of the linear solver for the implicit formulation +LINEAR_SOLVER_ITER= 5 + +% -------------------- HEAT NUMERICAL METHOD DEFINITION -----------------------% +% +% Time discretization (EULER_IMPLICIT, EULER_EXPLICIT) +TIME_DISCRE_HEAT= EULER_IMPLICIT + +% --------------------------- CONVERGENCE PARAMETERS --------------------------% +% +% Min value of the residual (log10 of the residual) +CONV_RESIDUAL_MINVAL= -19 +% +% Start convergence criteria at iteration number +CONV_STARTITER= 10 +% +% Number of elements to apply the criteria +CONV_CAUCHY_ELEMS= 100 +% +% Epsilon to control the series convergence +CONV_CAUCHY_EPS= 1E-6 + +% ------------------------- INPUT/OUTPUT INFORMATION --------------------------% +% +% Restart flow input file +SOLUTION_FILENAME= solution_flow.dat +% +% Restart adjoint input file +SOLUTION_ADJ_FILENAME= solution_adj.dat +% +% Output file format (TECPLOT, TECPLOT_BINARY, PARAVIEW, +% FIELDVIEW, FIELDVIEW_BINARY) +TABULAR_FORMAT= TECPLOT +% +% Output file convergence history (w/o extension) +CONV_FILENAME= history +% +% Output file with the forces breakdown +BREAKDOWN_FILENAME= forces_breakdown.dat +% +% Output file restart flow +RESTART_FILENAME= restart_flow.dat +% +% Output file restart adjoint +RESTART_ADJ_FILENAME= restart_adj.dat +% +% Output file flow (w/o extension) variables +VOLUME_FILENAME= flow +% +% Output file adjoint (w/o extension) variables +VOLUME_ADJ_FILENAME= adjoint +% +% Output Objective function +VALUE_OBJFUNC_FILENAME= of_eval.dat +% +% Output objective function gradient (using continuous adjoint) +GRAD_OBJFUNC_FILENAME= of_grad.dat +% +% Output file surface flow coefficient (w/o extension) +SURFACE_FILENAME= surface_flow +% +% Output file surface adjoint coefficient (w/o extension) +SURFACE_ADJ_FILENAME= surface_adjoint +% +% Writing solution file frequency +WRT_SOL_FREQ= 250 +% +% Writing convergence history frequency +WRT_CON_FREQ= 1 + +% ------------------------ GRID DEFORMATION PARAMETERS ------------------------% +% +% Linear solver or smoother for implicit formulations (FGMRES, RESTARTED_FGMRES, BCGSTAB) +DEFORM_LINEAR_SOLVER= FGMRES +% +% Number of smoothing iterations for mesh deformation +DEFORM_LINEAR_SOLVER_ITER= 200 +% +% Number of nonlinear deformation iterations (surface deformation increments) +DEFORM_NONLINEAR_ITER= 1 +% +% Print the residuals during mesh deformation to the console (YES, NO) +DEFORM_CONSOLE_OUTPUT= YES +% +% Type of element stiffness imposed for FEA mesh deformation (INVERSE_VOLUME, +% WALL_DISTANCE, CONSTANT_STIFFNESS) +DEFORM_STIFFNESS_TYPE= INVERSE_VOLUME +% +% Visualize the deformation (NO, YES) +VISUALIZE_VOLUME_DEF= YES diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index 84c18af4cefe..837cbe696f48 100644 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -1100,6 +1100,19 @@ def main(): cht_incompressible.tol = 0.00001 test_list.append(cht_incompressible) + # CHT incompressible unsteady + cht_incompressible_unsteady = TestCase('cht_incompressible_unsteady') + cht_incompressible_unsteady.cfg_dir = "coupled_cht/incomp_2d_unsteady" + cht_incompressible_unsteady.cfg_file = "cht_2d_3cylinders.cfg" + cht_incompressible_unsteady.test_iter = 2 + cht_incompressible_unsteady.test_vals = [-1.356091, -0.080383, -0.080387, -0.080384] #last 4 columns + cht_incompressible_unsteady.su2_exec = "SU2_CFD" + cht_incompressible_unsteady.timeout = 1600 + cht_incompressible_unsteady.multizone = True + cht_incompressible_unsteady.unsteady = True + cht_incompressible_unsteady.tol = 0.00001 + test_list.append(cht_incompressible_unsteady) + # CHT compressible cht_compressible = TestCase('cht_compressible') cht_compressible.cfg_dir = "coupled_cht/comp_2d" diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index a79fd50ec42a..5c7b744216fc 100644 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -1299,6 +1299,19 @@ def main(): cht_incompressible.tol = 0.00001 test_list.append(cht_incompressible) + # CHT incompressible unsteady + cht_incompressible_unsteady = TestCase('cht_incompressible_unsteady') + cht_incompressible_unsteady.cfg_dir = "coupled_cht/incomp_2d_unsteady" + cht_incompressible_unsteady.cfg_file = "cht_2d_3cylinders.cfg" + cht_incompressible_unsteady.test_iter = 2 + cht_incompressible_unsteady.test_vals = [-1.356091, -0.080383, -0.080387, -0.080384] #last 4 columns + cht_incompressible_unsteady.su2_exec = "SU2_CFD" + cht_incompressible_unsteady.timeout = 1600 + cht_incompressible_unsteady.multizone = True + cht_incompressible_unsteady.unsteady = True + cht_incompressible_unsteady.tol = 0.00001 + test_list.append(cht_incompressible_unsteady) + # CHT compressible cht_incompressible = TestCase('cht_compressible') cht_incompressible.cfg_dir = "coupled_cht/comp_2d"