From 708121af36018d4121ef52d823f15d50ed57b46e Mon Sep 17 00:00:00 2001 From: oleburghardt Date: Wed, 29 Jan 2020 14:30:43 +0100 Subject: [PATCH 01/23] Tidy up CHeatIteration by inheriting from CFluidIteration. --- SU2_CFD/include/iteration_structure.hpp | 79 +----------------- SU2_CFD/src/iteration_structure.cpp | 104 +----------------------- 2 files changed, 5 insertions(+), 178 deletions(-) diff --git a/SU2_CFD/include/iteration_structure.hpp b/SU2_CFD/include/iteration_structure.hpp index 83475978f9d1..51f644568bd2 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. @@ -736,31 +721,6 @@ class CHeatIteration : public CIteration { unsigned short val_iZone, unsigned short val_iInst); - /*! - * \brief Perform a single iteration of the wave system. - * \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. - * \param[in] solver - Container vector with all the solutions. - * \param[in] numerics - Description of the numerical method (the way in which the equations are solved). - * \param[in] config - Definition of the particular problem. - * \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); - /*! * \brief Updates the containers for the heat system. * \param[in] ??? - Description here. @@ -776,41 +736,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/src/iteration_structure.cpp b/SU2_CFD/src/iteration_structure.cpp index 65290d3ef25c..84678f8a8ffb 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, @@ -1226,107 +1214,21 @@ void CHeatIteration::Update(COutput *output, 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) { - - unsigned short Inner_Iter, nInner_Iter = config[val_iZone]->GetnInner_Iter(); - bool StopCalc = false; - - /*--- Preprocess the solver ---*/ - 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); - - 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 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 (StopCalc) break; - - } - - if (multizone){ - - Output(output, geometry, solver, config, - 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); - } - - //output->SetConvHistory_Body(NULL, geometry, solver, config, integration, true, 0.0, val_iZone, INST_0); - -} CFEAIteration::CFEAIteration(CConfig *config) : CIteration(config) { } CFEAIteration::~CFEAIteration(void) { } From 9d4e4080623af4cd1844e9d18b1cf9d5d72ccb55 Mon Sep 17 00:00:00 2001 From: oleburghardt Date: Wed, 29 Jan 2020 14:31:52 +0100 Subject: [PATCH 02/23] Small fix in CHeatFVMVariable so that it can be used in unsteady runs. --- SU2_CFD/src/variables/CHeatFVMVariable.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SU2_CFD/src/variables/CHeatFVMVariable.cpp b/SU2_CFD/src/variables/CHeatFVMVariable.cpp index 0e3b6951d631..820d248173fb 100644 --- a/SU2_CFD/src/variables/CHeatFVMVariable.cpp +++ b/SU2_CFD/src/variables/CHeatFVMVariable.cpp @@ -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(); } From 02eea235d7a213344f24b3086b9de6d6578daa45 Mon Sep 17 00:00:00 2001 From: oleburghardt Date: Wed, 29 Jan 2020 14:32:55 +0100 Subject: [PATCH 03/23] Quick solution to set same physical time step in all zones for unsteady multizone runs. This needs to be improved. --- SU2_CFD/src/drivers/CMultizoneDriver.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SU2_CFD/src/drivers/CMultizoneDriver.cpp b/SU2_CFD/src/drivers/CMultizoneDriver.cpp index e9843044ae0a..7f0439c6ac32 100644 --- a/SU2_CFD/src/drivers/CMultizoneDriver.cpp +++ b/SU2_CFD/src/drivers/CMultizoneDriver.cpp @@ -147,6 +147,10 @@ void CMultizoneDriver::StartSolver() { driver_config->Set_StartTime(StartTime); + for (iZone = 0; iZone < nZone; iZone++) { + config_container[iZone]->SetDelta_UnstTimeND(config_container[ZONE_0]->GetDelta_UnstTimeND()); + } + /*--- Main external loop of the solver. Runs for the number of time steps required. ---*/ if (rank == MASTER_NODE) From f35f26021a9f38c0dc82bb1fd8c7e2dcba81dcc1 Mon Sep 17 00:00:00 2001 From: oleburghardt Date: Wed, 29 Jan 2020 14:56:37 +0100 Subject: [PATCH 04/23] Add test case incomp_2d_unsteady (basically incomp_2d with additional options to turn it into its unsteady version). --- .../incomp_2d_unsteady/cht_2d_3cylinders.cfg | 61 +++++ .../incomp_2d_unsteady/flow_cylinder.cfg | 245 ++++++++++++++++++ .../incomp_2d_unsteady/solid_cylinder1.cfg | 173 +++++++++++++ .../incomp_2d_unsteady/solid_cylinder2.cfg | 174 +++++++++++++ .../incomp_2d_unsteady/solid_cylinder3.cfg | 174 +++++++++++++ 5 files changed, 827 insertions(+) create mode 100644 TestCases/coupled_cht/incomp_2d_unsteady/cht_2d_3cylinders.cfg create mode 100644 TestCases/coupled_cht/incomp_2d_unsteady/flow_cylinder.cfg create mode 100644 TestCases/coupled_cht/incomp_2d_unsteady/solid_cylinder1.cfg create mode 100644 TestCases/coupled_cht/incomp_2d_unsteady/solid_cylinder2.cfg create mode 100644 TestCases/coupled_cht/incomp_2d_unsteady/solid_cylinder3.cfg 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..6cdf33daea49 --- /dev/null +++ b/TestCases/coupled_cht/incomp_2d_unsteady/cht_2d_3cylinders.cfg @@ -0,0 +1,61 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% 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 = YES +% +% +TIME_MARCHING= DUAL_TIME_STEPPING-2ND_ORDER +% +% +TIME_STEP= 0.05 +% +% +MAX_TIME= 100.0 +% +% +TIME_ITER= 2000 +% +% Number of total iterations +OUTER_ITER = 100 +% +% Courant-Friedrichs-Lewy condition of the finest grid +CFL_NUMBER= 50.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]) +% +% +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..2783cd3a3390 --- /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.000210322 +% +% 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..7387c3b301c3 --- /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_FVM +% +% 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= 350.0 +% +% Nettis case: hollow cylinder (air w/ 4x the conductivity) +% +% Solid density (kg/m^3) +SOLID_DENSITY= 0.000210322 +% +% 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..f0c46a8e44c3 --- /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_FVM +% +% 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= 350.0 +% +% Nettis case: hollow cylinder (air w/ 4x the conductivity) +% +% Solid density (kg/m^3) +SOLID_DENSITY= 0.000210322 +% +% 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..c253a8bdba7e --- /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_FVM +% +% 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= 350.0 +% +% Nettis case: hollow cylinder (air w/ 4x the conductivity) +% +% Solid density (kg/m^3) +SOLID_DENSITY= 0.000210322 +% +% 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 From 7ce063ef58e112d74e5a9eb6e5c57c8e7841f95e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schotth=C3=B6fer?= Date: Wed, 29 Jan 2020 15:06:01 +0100 Subject: [PATCH 05/23] added time convergence monitoring for multizone driver --- SU2_CFD/include/drivers/CDiscAdjMultizoneDriver.hpp | 7 +++++++ SU2_CFD/include/drivers/CDiscAdjSinglezoneDriver.hpp | 4 ++-- SU2_CFD/include/drivers/CMultizoneDriver.hpp | 7 +++++++ SU2_CFD/src/drivers/CDiscAdjSinglezoneDriver.cpp | 4 ---- SU2_CFD/src/drivers/CMultizoneDriver.cpp | 7 ++++--- SU2_CFD/src/drivers/CSinglezoneDriver.cpp | 5 ++--- SU2_CFD/src/output/COutput.cpp | 2 ++ 7 files changed, 24 insertions(+), 12 deletions(-) diff --git a/SU2_CFD/include/drivers/CDiscAdjMultizoneDriver.hpp b/SU2_CFD/include/drivers/CDiscAdjMultizoneDriver.hpp index 26e65e1664ea..61897290fc22 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 fab8dc8de331..9c70aa39dbac 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 0d9565e1aa0d..d4fe29e3eb56 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 wheter 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/src/drivers/CDiscAdjSinglezoneDriver.cpp b/SU2_CFD/src/drivers/CDiscAdjSinglezoneDriver.cpp index 95a0731b20f1..048d67c158e4 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/CMultizoneDriver.cpp b/SU2_CFD/src/drivers/CMultizoneDriver.cpp index e9843044ae0a..4b831fb01dfe 100644 --- a/SU2_CFD/src/drivers/CMultizoneDriver.cpp +++ b/SU2_CFD/src/drivers/CMultizoneDriver.cpp @@ -656,7 +656,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 +689,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 995ce3fb59c7..5f4dbd524bd1 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/output/COutput.cpp b/SU2_CFD/src/output/COutput.cpp index f26b22d09686..34c9e6a4a96b 100644 --- a/SU2_CFD/src/output/COutput.cpp +++ b/SU2_CFD/src/output/COutput.cpp @@ -271,6 +271,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) { From da8a69115a7118db9b33957484120818546ae67f Mon Sep 17 00:00:00 2001 From: oleburghardt Date: Thu, 30 Jan 2020 11:31:47 +0100 Subject: [PATCH 06/23] Small revert. --- SU2_CFD/include/iteration_structure.hpp | 24 +++++++++ SU2_CFD/src/iteration_structure.cpp | 67 +++++++++++++++++++++++++ 2 files changed, 91 insertions(+) diff --git a/SU2_CFD/include/iteration_structure.hpp b/SU2_CFD/include/iteration_structure.hpp index 51f644568bd2..51d6e6876412 100644 --- a/SU2_CFD/include/iteration_structure.hpp +++ b/SU2_CFD/include/iteration_structure.hpp @@ -721,6 +721,30 @@ class CHeatIteration : public CFluidIteration { unsigned short val_iZone, unsigned short val_iInst); + /*! + * \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. + * \param[in] solver - Container vector with all the solutions. + * \param[in] numerics - Description of the numerical method (the way in which the equations are solved). + * \param[in] config - Definition of the particular problem. + * \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. + */ + 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); + /*! * \brief Updates the containers for the heat system. * \param[in] ??? - Description here. diff --git a/SU2_CFD/src/iteration_structure.cpp b/SU2_CFD/src/iteration_structure.cpp index 84678f8a8ffb..a97f8a47ad41 100644 --- a/SU2_CFD/src/iteration_structure.cpp +++ b/SU2_CFD/src/iteration_structure.cpp @@ -1201,6 +1201,73 @@ void CHeatIteration::Iterate(COutput *output, } +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) { + + /*--- 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); + + /*--- 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); + + /*--- 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); + + /*--- 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); + } + + /*--- If the iteration has converged, break the loop ---*/ + if (StopCalc) break; + } + + if (multizone && steady) { + Output(output, geometry, solver, config, + 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, From 9ce981106809ca789c47c0187ff76c6868e1e703 Mon Sep 17 00:00:00 2001 From: oleburghardt Date: Fri, 31 Jan 2020 13:54:43 +0100 Subject: [PATCH 07/23] Quick solution to fix missing reference time in heat solvers (this needs to be improved even more). --- SU2_CFD/src/drivers/CMultizoneDriver.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SU2_CFD/src/drivers/CMultizoneDriver.cpp b/SU2_CFD/src/drivers/CMultizoneDriver.cpp index ddcd17f68f4d..e4de172e557e 100644 --- a/SU2_CFD/src/drivers/CMultizoneDriver.cpp +++ b/SU2_CFD/src/drivers/CMultizoneDriver.cpp @@ -148,7 +148,11 @@ void CMultizoneDriver::StartSolver() { driver_config->Set_StartTime(StartTime); for (iZone = 0; iZone < nZone; iZone++) { - config_container[iZone]->SetDelta_UnstTimeND(config_container[ZONE_0]->GetDelta_UnstTimeND()); + if (config_container[iZone]->GetKind_Solver() == HEAT_EQUATION_FVM) { + + config_container[iZone]->SetDelta_UnstTimeND(config_container[ZONE_0]->GetDelta_UnstTimeND()); + config_container[iZone]->SetTime_Ref(config_container[ZONE_0]->GetTime_Ref()); + } } /*--- Main external loop of the solver. Runs for the number of time steps required. ---*/ From 4a6344cc3dd7cafc5e05d1e8a4a797fbfb528ee0 Mon Sep 17 00:00:00 2001 From: oleburghardt Date: Fri, 31 Jan 2020 15:37:35 +0100 Subject: [PATCH 08/23] Increasing Reynolds number (by higher density) in unsteady CHT test case for better unsteady effects. --- .../coupled_cht/incomp_2d_unsteady/cht_2d_3cylinders.cfg | 4 ++-- TestCases/coupled_cht/incomp_2d_unsteady/flow_cylinder.cfg | 2 +- TestCases/coupled_cht/incomp_2d_unsteady/solid_cylinder1.cfg | 4 ++-- TestCases/coupled_cht/incomp_2d_unsteady/solid_cylinder2.cfg | 4 ++-- TestCases/coupled_cht/incomp_2d_unsteady/solid_cylinder3.cfg | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/TestCases/coupled_cht/incomp_2d_unsteady/cht_2d_3cylinders.cfg b/TestCases/coupled_cht/incomp_2d_unsteady/cht_2d_3cylinders.cfg index 6cdf33daea49..b11a165bda4e 100644 --- a/TestCases/coupled_cht/incomp_2d_unsteady/cht_2d_3cylinders.cfg +++ b/TestCases/coupled_cht/incomp_2d_unsteady/cht_2d_3cylinders.cfg @@ -43,7 +43,7 @@ MAX_TIME= 100.0 TIME_ITER= 2000 % % Number of total iterations -OUTER_ITER = 100 +OUTER_ITER = 200 % % Courant-Friedrichs-Lewy condition of the finest grid CFL_NUMBER= 50.0 @@ -55,7 +55,7 @@ MESH_FILENAME= mesh_cht_3cyl.su2 MESH_FORMAT= SU2 % % -HISTORY_OUTPUT= (ITER, BGS_RES[0], BGS_RES[1], BGS_RES[2], BGS_RES[3], HEAT[0]) +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 index 2783cd3a3390..f65cbda8ba72 100644 --- a/TestCases/coupled_cht/incomp_2d_unsteady/flow_cylinder.cfg +++ b/TestCases/coupled_cht/incomp_2d_unsteady/flow_cylinder.cfg @@ -60,7 +60,7 @@ INC_DENSITY_MODEL= VARIABLE INC_ENERGY_EQUATION = YES % % Initial density for incompressible flows (1.2886 kg/m^3 by default) -INC_DENSITY_INIT= 0.000210322 +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 ) diff --git a/TestCases/coupled_cht/incomp_2d_unsteady/solid_cylinder1.cfg b/TestCases/coupled_cht/incomp_2d_unsteady/solid_cylinder1.cfg index 7387c3b301c3..fb1c3f8cc538 100644 --- a/TestCases/coupled_cht/incomp_2d_unsteady/solid_cylinder1.cfg +++ b/TestCases/coupled_cht/incomp_2d_unsteady/solid_cylinder1.cfg @@ -48,12 +48,12 @@ MARKER_MONITORING= ( NONE ) INC_NONDIM= DIMENSIONAL % % Temperature initialization value -SOLID_TEMPERATURE_INIT= 350.0 +SOLID_TEMPERATURE_INIT= 288.15 % % Nettis case: hollow cylinder (air w/ 4x the conductivity) % % Solid density (kg/m^3) -SOLID_DENSITY= 0.000210322 +SOLID_DENSITY= 0.0210322 % % Solid specific heat (J/kg*K) SPECIFIC_HEAT_CP= 1004.703 diff --git a/TestCases/coupled_cht/incomp_2d_unsteady/solid_cylinder2.cfg b/TestCases/coupled_cht/incomp_2d_unsteady/solid_cylinder2.cfg index f0c46a8e44c3..cdb1fda9df63 100644 --- a/TestCases/coupled_cht/incomp_2d_unsteady/solid_cylinder2.cfg +++ b/TestCases/coupled_cht/incomp_2d_unsteady/solid_cylinder2.cfg @@ -48,12 +48,12 @@ MARKER_MONITORING= ( NONE ) INC_NONDIM= DIMENSIONAL % % Temperature initialization value -SOLID_TEMPERATURE_INIT= 350.0 +SOLID_TEMPERATURE_INIT= 288.15 % % Nettis case: hollow cylinder (air w/ 4x the conductivity) % % Solid density (kg/m^3) -SOLID_DENSITY= 0.000210322 +SOLID_DENSITY= 0.0210322 % % Solid specific heat (J/kg*K) SPECIFIC_HEAT_CP= 1004.703 diff --git a/TestCases/coupled_cht/incomp_2d_unsteady/solid_cylinder3.cfg b/TestCases/coupled_cht/incomp_2d_unsteady/solid_cylinder3.cfg index c253a8bdba7e..136ee1194457 100644 --- a/TestCases/coupled_cht/incomp_2d_unsteady/solid_cylinder3.cfg +++ b/TestCases/coupled_cht/incomp_2d_unsteady/solid_cylinder3.cfg @@ -48,12 +48,12 @@ MARKER_MONITORING= ( NONE ) INC_NONDIM= DIMENSIONAL % % Temperature initialization value -SOLID_TEMPERATURE_INIT= 350.0 +SOLID_TEMPERATURE_INIT= 288.15 % % Nettis case: hollow cylinder (air w/ 4x the conductivity) % % Solid density (kg/m^3) -SOLID_DENSITY= 0.000210322 +SOLID_DENSITY= 0.0210322 % % Solid specific heat (J/kg*K) SPECIFIC_HEAT_CP= 1004.703 From 64a170d110a931d7e8a02abe4b4170efba909f8d Mon Sep 17 00:00:00 2001 From: oleburghardt Date: Mon, 3 Feb 2020 11:44:34 +0100 Subject: [PATCH 09/23] Change test case parameters. --- .../coupled_cht/incomp_2d_unsteady/cht_2d_3cylinders.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TestCases/coupled_cht/incomp_2d_unsteady/cht_2d_3cylinders.cfg b/TestCases/coupled_cht/incomp_2d_unsteady/cht_2d_3cylinders.cfg index b11a165bda4e..5823dfea69e4 100644 --- a/TestCases/coupled_cht/incomp_2d_unsteady/cht_2d_3cylinders.cfg +++ b/TestCases/coupled_cht/incomp_2d_unsteady/cht_2d_3cylinders.cfg @@ -43,10 +43,10 @@ MAX_TIME= 100.0 TIME_ITER= 2000 % % Number of total iterations -OUTER_ITER = 200 +OUTER_ITER = 100 % % Courant-Friedrichs-Lewy condition of the finest grid -CFL_NUMBER= 50.0 +CFL_NUMBER= 100.0 % % Mesh input file MESH_FILENAME= mesh_cht_3cyl.su2 From b8dd47c9312e12773a191f72a150afbfcbd49aef Mon Sep 17 00:00:00 2001 From: oleburghardt Date: Wed, 5 Feb 2020 12:08:38 +0100 Subject: [PATCH 10/23] Adapt unsteady CHT test case parameters to prepare it as regression test. --- .../coupled_cht/incomp_2d_unsteady/cht_2d_3cylinders.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TestCases/coupled_cht/incomp_2d_unsteady/cht_2d_3cylinders.cfg b/TestCases/coupled_cht/incomp_2d_unsteady/cht_2d_3cylinders.cfg index 5823dfea69e4..2f5dfe2f34b6 100644 --- a/TestCases/coupled_cht/incomp_2d_unsteady/cht_2d_3cylinders.cfg +++ b/TestCases/coupled_cht/incomp_2d_unsteady/cht_2d_3cylinders.cfg @@ -40,10 +40,10 @@ TIME_STEP= 0.05 MAX_TIME= 100.0 % % -TIME_ITER= 2000 +TIME_ITER= 2 % % Number of total iterations -OUTER_ITER = 100 +OUTER_ITER = 10 % % Courant-Friedrichs-Lewy condition of the finest grid CFL_NUMBER= 100.0 From 36e4291c69188a6d1dd3418eeef3bbd550b83a98 Mon Sep 17 00:00:00 2001 From: oleburghardt Date: Wed, 5 Feb 2020 14:02:50 +0100 Subject: [PATCH 11/23] Add unsteady CHT case to regression tests. --- .../incomp_2d_unsteady/cht_2d_3cylinders.cfg | 2 +- TestCases/parallel_regression.py | 12 ++++++++++++ TestCases/serial_regression.py | 12 ++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/TestCases/coupled_cht/incomp_2d_unsteady/cht_2d_3cylinders.cfg b/TestCases/coupled_cht/incomp_2d_unsteady/cht_2d_3cylinders.cfg index 2f5dfe2f34b6..8ec80fa7abcb 100644 --- a/TestCases/coupled_cht/incomp_2d_unsteady/cht_2d_3cylinders.cfg +++ b/TestCases/coupled_cht/incomp_2d_unsteady/cht_2d_3cylinders.cfg @@ -40,7 +40,7 @@ TIME_STEP= 0.05 MAX_TIME= 100.0 % % -TIME_ITER= 2 +TIME_ITER= 3 % % Number of total iterations OUTER_ITER = 10 diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index 2cfe4a9c3255..39eea33fc58d 100644 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -1100,6 +1100,18 @@ def main(): cht_incompressible.tol = 0.00001 test_list.append(cht_incompressible) + # CHT incompressible unsteady + cht_incompressible = TestCase('cht_incompressible_unsteady') + cht_incompressible.cfg_dir = "coupled_cht/incomp_2d_unsteady" + cht_incompressible.cfg_file = "cht_2d_3cylinders.cfg" + cht_incompressible.test_iter = 3 + cht_incompressible.test_vals = [-1.350742, -0.080384, -0.080386, -0.080383] #last 4 columns + cht_incompressible.su2_exec = "SU2_CFD" + cht_incompressible.timeout = 1600 + cht_incompressible.multizone = True + cht_incompressible.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 3c28aa39894f..2b8567ccb63e 100644 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -1195,6 +1195,18 @@ def main(): cht_incompressible.tol = 0.00001 test_list.append(cht_incompressible) + # CHT incompressible unsteady + cht_incompressible = TestCase('cht_incompressible_unsteady') + cht_incompressible.cfg_dir = "coupled_cht/incomp_2d_unsteady" + cht_incompressible.cfg_file = "cht_2d_3cylinders.cfg" + cht_incompressible.test_iter = 3 + cht_incompressible.test_vals = [-1.356091, -0.080383, -0.080387, -0.080384] #last 4 columns + cht_incompressible.su2_exec = "SU2_CFD" + cht_incompressible.timeout = 1600 + cht_incompressible.multizone = True + cht_incompressible.tol = 0.00001 + test_list.append(cht_incompressible_unsteady) + # CHT compressible cht_incompressible = TestCase('cht_compressible') cht_incompressible.cfg_dir = "coupled_cht/comp_2d" From b8f571e849046270ac079f3f7f0bff1ebf4944ea Mon Sep 17 00:00:00 2001 From: oleburghardt Date: Wed, 5 Feb 2020 14:35:52 +0100 Subject: [PATCH 12/23] Small fix. --- TestCases/parallel_regression.py | 18 +++++++++--------- TestCases/serial_regression.py | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index 9e5ed23bb5c4..c6f8d46d5b2b 100644 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -1101,15 +1101,15 @@ def main(): test_list.append(cht_incompressible) # CHT incompressible unsteady - cht_incompressible = TestCase('cht_incompressible_unsteady') - cht_incompressible.cfg_dir = "coupled_cht/incomp_2d_unsteady" - cht_incompressible.cfg_file = "cht_2d_3cylinders.cfg" - cht_incompressible.test_iter = 3 - cht_incompressible.test_vals = [-1.350742, -0.080384, -0.080386, -0.080383] #last 4 columns - cht_incompressible.su2_exec = "SU2_CFD" - cht_incompressible.timeout = 1600 - cht_incompressible.multizone = True - cht_incompressible.tol = 0.00001 + 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 = 3 + cht_incompressible_unsteady.test_vals = [-1.350742, -0.080384, -0.080386, -0.080383] #last 4 columns + cht_incompressible_unsteady.su2_exec = "SU2_CFD" + cht_incompressible_unsteady.timeout = 1600 + cht_incompressible_unsteady.multizone = True + cht_incompressible_unsteady.tol = 0.00001 test_list.append(cht_incompressible_unsteady) # CHT compressible diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index 0f29f3b6fa92..74fa0dbc6916 100644 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -1196,15 +1196,15 @@ def main(): test_list.append(cht_incompressible) # CHT incompressible unsteady - cht_incompressible = TestCase('cht_incompressible_unsteady') - cht_incompressible.cfg_dir = "coupled_cht/incomp_2d_unsteady" - cht_incompressible.cfg_file = "cht_2d_3cylinders.cfg" - cht_incompressible.test_iter = 3 - cht_incompressible.test_vals = [-1.356091, -0.080383, -0.080387, -0.080384] #last 4 columns - cht_incompressible.su2_exec = "SU2_CFD" - cht_incompressible.timeout = 1600 - cht_incompressible.multizone = True - cht_incompressible.tol = 0.00001 + 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 = 3 + 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.tol = 0.00001 test_list.append(cht_incompressible_unsteady) # CHT compressible From 008c35acb9a6c5826c192f79ec1ecd5591586688 Mon Sep 17 00:00:00 2001 From: oleburghardt Date: Wed, 5 Feb 2020 15:57:58 +0100 Subject: [PATCH 13/23] Another small fix. --- TestCases/parallel_regression.py | 1 + TestCases/serial_regression.py | 1 + 2 files changed, 2 insertions(+) diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index c6f8d46d5b2b..02f5cd427764 100644 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -1109,6 +1109,7 @@ def main(): 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) diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index 74fa0dbc6916..235da146eb0b 100644 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -1204,6 +1204,7 @@ def main(): 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) From 4cebf3453f0584b243f2ae27bff776d7479e57e0 Mon Sep 17 00:00:00 2001 From: oleburghardt Date: Wed, 5 Feb 2020 17:00:58 +0100 Subject: [PATCH 14/23] Yet another small fix for unsteady regression test. --- TestCases/parallel_regression.py | 2 +- TestCases/serial_regression.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index 02f5cd427764..1029f6349d61 100644 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -1104,7 +1104,7 @@ def main(): 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 = 3 + cht_incompressible_unsteady.test_iter = 2 cht_incompressible_unsteady.test_vals = [-1.350742, -0.080384, -0.080386, -0.080383] #last 4 columns cht_incompressible_unsteady.su2_exec = "SU2_CFD" cht_incompressible_unsteady.timeout = 1600 diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index 235da146eb0b..e95c54a1572e 100644 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -1199,7 +1199,7 @@ def main(): 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 = 3 + 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 From 382e82f5e43fadb5d64e63289db8e125e37ffe95 Mon Sep 17 00:00:00 2001 From: oleburghardt Date: Thu, 6 Feb 2020 11:03:13 +0100 Subject: [PATCH 15/23] Adapt to parallel regression test values. --- TestCases/parallel_regression.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index 1029f6349d61..0a2767816a60 100644 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -1105,7 +1105,7 @@ def main(): 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.350742, -0.080384, -0.080386, -0.080383] #last 4 columns + 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 From 772756adc9c951618c778b644596bcff6a08b35e Mon Sep 17 00:00:00 2001 From: oleburghardt Date: Thu, 6 Feb 2020 14:51:11 +0100 Subject: [PATCH 16/23] Replace fixed value hack for multizone reference time adjustment by applying the minimum value. --- SU2_CFD/src/drivers/CMultizoneDriver.cpp | 28 +++++++++++++++++------- SU2_CFD/src/solvers/CHeatSolverFVM.cpp | 3 +++ 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/SU2_CFD/src/drivers/CMultizoneDriver.cpp b/SU2_CFD/src/drivers/CMultizoneDriver.cpp index 2eef65a069f8..4d5f8d0a5f26 100644 --- a/SU2_CFD/src/drivers/CMultizoneDriver.cpp +++ b/SU2_CFD/src/drivers/CMultizoneDriver.cpp @@ -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 time steps for each zone run at the same (physical) speed.) ---*/ + + 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 @@ -147,14 +167,6 @@ void CMultizoneDriver::StartSolver() { driver_config->Set_StartTime(StartTime); - for (iZone = 0; iZone < nZone; iZone++) { - if (config_container[iZone]->GetKind_Solver() == HEAT_EQUATION_FVM) { - - config_container[iZone]->SetDelta_UnstTimeND(config_container[ZONE_0]->GetDelta_UnstTimeND()); - config_container[iZone]->SetTime_Ref(config_container[ZONE_0]->GetTime_Ref()); - } - } - /*--- Main external loop of the solver. Runs for the number of time steps required. ---*/ if (rank == MASTER_NODE) diff --git a/SU2_CFD/src/solvers/CHeatSolverFVM.cpp b/SU2_CFD/src/solvers/CHeatSolverFVM.cpp index ce3f3e6fc3b9..cbe05f881dfb 100644 --- a/SU2_CFD/src/solvers/CHeatSolverFVM.cpp +++ b/SU2_CFD/src/solvers/CHeatSolverFVM.cpp @@ -178,6 +178,9 @@ CHeatSolverFVM::CHeatSolverFVM(CGeometry *geometry, CConfig *config, unsigned sh } config->SetTemperature_Ref(Temperature_Ref); + /*--- We set the reference time to a fixed value of 1s. ---*/ + + config->SetTime_Ref(1.0); /*--- Set the reference values for heat fluxes. If the heat solver runs stand-alone, * thermal conductivity is read directly from config file ---*/ From 8e27cf89cfbd2fbf971dae291783f0d9a49bb2cd Mon Sep 17 00:00:00 2001 From: oleburghardt Date: Thu, 6 Feb 2020 15:06:06 +0100 Subject: [PATCH 17/23] Improve comment. --- SU2_CFD/src/drivers/CMultizoneDriver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SU2_CFD/src/drivers/CMultizoneDriver.cpp b/SU2_CFD/src/drivers/CMultizoneDriver.cpp index 4d5f8d0a5f26..340411d08610 100644 --- a/SU2_CFD/src/drivers/CMultizoneDriver.cpp +++ b/SU2_CFD/src/drivers/CMultizoneDriver.cpp @@ -140,7 +140,7 @@ 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 time steps for each zone run at the same (physical) speed.) ---*/ + * (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(); From 4606456fcc205108645402dbec0dc9f98f4bf20a Mon Sep 17 00:00:00 2001 From: oleburghardt Date: Fri, 7 Feb 2020 10:07:27 +0100 Subject: [PATCH 18/23] Quick workaround for multizone reference times incorporating the FEA solver (that does not set a reference time). --- SU2_CFD/src/drivers/CMultizoneDriver.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SU2_CFD/src/drivers/CMultizoneDriver.cpp b/SU2_CFD/src/drivers/CMultizoneDriver.cpp index 340411d08610..3e2ba49a9b6c 100644 --- a/SU2_CFD/src/drivers/CMultizoneDriver.cpp +++ b/SU2_CFD/src/drivers/CMultizoneDriver.cpp @@ -145,7 +145,8 @@ void CMultizoneDriver::StartSolver() { su2double Time_Ref = config_container[ZONE_0]->GetTime_Ref(); for (iZone = 1; iZone < nZone; iZone++) { - if (config_container[iZone]->GetTime_Ref() < Time_Ref) + if ((config_container[iZone]->GetTime_Ref() < Time_Ref) + && (config_container[iZone]->GetKind_Solver() == FEM_ELASTICITY)) Time_Ref = config_container[iZone]->GetTime_Ref(); } From d103c4acba24a25c2b0635bf03931016880482fa Mon Sep 17 00:00:00 2001 From: oleburghardt Date: Fri, 7 Feb 2020 10:16:24 +0100 Subject: [PATCH 19/23] (Correct) quick workaround for multizone reference times incorporating the FEA solver (that does not set a reference time). --- SU2_CFD/src/drivers/CMultizoneDriver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SU2_CFD/src/drivers/CMultizoneDriver.cpp b/SU2_CFD/src/drivers/CMultizoneDriver.cpp index 3e2ba49a9b6c..58398fc0ff42 100644 --- a/SU2_CFD/src/drivers/CMultizoneDriver.cpp +++ b/SU2_CFD/src/drivers/CMultizoneDriver.cpp @@ -146,7 +146,7 @@ void CMultizoneDriver::StartSolver() { for (iZone = 1; iZone < nZone; iZone++) { if ((config_container[iZone]->GetTime_Ref() < Time_Ref) - && (config_container[iZone]->GetKind_Solver() == FEM_ELASTICITY)) + && (config_container[iZone]->GetKind_Solver() != FEM_ELASTICITY)) Time_Ref = config_container[iZone]->GetTime_Ref(); } From 70618308561cabd9fb586ebbc9a75fd1bd698c21 Mon Sep 17 00:00:00 2001 From: oleburghardt Date: Fri, 7 Feb 2020 13:27:17 +0100 Subject: [PATCH 20/23] Small change for Time_Ref initialization. --- Common/src/CConfig.cpp | 2 ++ SU2_CFD/src/drivers/CMultizoneDriver.cpp | 3 +-- SU2_CFD/src/solvers/CHeatSolverFVM.cpp | 4 ---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 6c6650d78f2e..6be1f74c33a4 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) { diff --git a/SU2_CFD/src/drivers/CMultizoneDriver.cpp b/SU2_CFD/src/drivers/CMultizoneDriver.cpp index 58398fc0ff42..340411d08610 100644 --- a/SU2_CFD/src/drivers/CMultizoneDriver.cpp +++ b/SU2_CFD/src/drivers/CMultizoneDriver.cpp @@ -145,8 +145,7 @@ void CMultizoneDriver::StartSolver() { su2double Time_Ref = config_container[ZONE_0]->GetTime_Ref(); for (iZone = 1; iZone < nZone; iZone++) { - if ((config_container[iZone]->GetTime_Ref() < Time_Ref) - && (config_container[iZone]->GetKind_Solver() != FEM_ELASTICITY)) + if (config_container[iZone]->GetTime_Ref() < Time_Ref) Time_Ref = config_container[iZone]->GetTime_Ref(); } diff --git a/SU2_CFD/src/solvers/CHeatSolverFVM.cpp b/SU2_CFD/src/solvers/CHeatSolverFVM.cpp index cbe05f881dfb..6417dd522ac1 100644 --- a/SU2_CFD/src/solvers/CHeatSolverFVM.cpp +++ b/SU2_CFD/src/solvers/CHeatSolverFVM.cpp @@ -178,10 +178,6 @@ CHeatSolverFVM::CHeatSolverFVM(CGeometry *geometry, CConfig *config, unsigned sh } config->SetTemperature_Ref(Temperature_Ref); - /*--- We set the reference time to a fixed value of 1s. ---*/ - - config->SetTime_Ref(1.0); - /*--- Set the reference values for heat fluxes. If the heat solver runs stand-alone, * thermal conductivity is read directly from config file ---*/ From c3c114cf6fa14e2c401bdc3cb5aaba898d4a2b1d Mon Sep 17 00:00:00 2001 From: oleburghardt Date: Tue, 18 Feb 2020 15:27:02 +0100 Subject: [PATCH 21/23] Remove 'FVM' extensions from all names related to the finite volume heat solver. --- Common/include/option_structure.hpp | 6 +- Common/src/CConfig.cpp | 4 +- .../{CHeatSolverFVM.hpp => CHeatSolver.hpp} | 29 ++-- ...CHeatFVMVariable.hpp => CHeatVariable.hpp} | 10 +- .../src/drivers/CDiscAdjMultizoneDriver.cpp | 2 +- SU2_CFD/src/drivers/CDriver.cpp | 136 +++++++++--------- SU2_CFD/src/drivers/CMultizoneDriver.cpp | 2 +- .../cht/CConjugateHeatInterface.cpp | 2 +- SU2_CFD/src/iteration_structure.cpp | 2 +- SU2_CFD/src/meson.build | 4 +- .../src/output/output_structure_legacy.cpp | 18 +-- .../{CHeatSolverFVM.cpp => CHeatSolver.cpp} | 56 ++++---- ...CHeatFVMVariable.cpp => CHeatVariable.cpp} | 8 +- .../coupled_cht/comp_2d/solid_cylinder1.cfg | 2 +- .../coupled_cht/comp_2d/solid_cylinder2.cfg | 2 +- .../coupled_cht/comp_2d/solid_cylinder3.cfg | 2 +- .../disc_adj_incomp_2d/solid_cylinder1.cfg | 2 +- .../disc_adj_incomp_2d/solid_cylinder2.cfg | 2 +- .../disc_adj_incomp_2d/solid_cylinder3.cfg | 2 +- .../coupled_cht/incomp_2d/solid_cylinder1.cfg | 2 +- .../coupled_cht/incomp_2d/solid_cylinder2.cfg | 2 +- .../coupled_cht/incomp_2d/solid_cylinder3.cfg | 2 +- .../incomp_2d_unsteady/solid_cylinder1.cfg | 2 +- .../incomp_2d_unsteady/solid_cylinder2.cfg | 2 +- .../incomp_2d_unsteady/solid_cylinder3.cfg | 2 +- 25 files changed, 152 insertions(+), 151 deletions(-) rename SU2_CFD/include/solvers/{CHeatSolverFVM.hpp => CHeatSolver.hpp} (96%) rename SU2_CFD/include/variables/{CHeatFVMVariable.hpp => CHeatVariable.hpp} (93%) rename SU2_CFD/src/solvers/{CHeatSolverFVM.cpp => CHeatSolver.cpp} (95%) rename SU2_CFD/src/variables/{CHeatFVMVariable.cpp => CHeatVariable.cpp} (90%) diff --git a/Common/include/option_structure.hpp b/Common/include/option_structure.hpp index e2e7577808e3..f673811e3e47 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 1ca3a1a220db..2d0ab350f885 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -4820,7 +4820,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: @@ -8176,7 +8176,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/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/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 c27ac93e3c32..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; } diff --git a/SU2_CFD/src/interfaces/cht/CConjugateHeatInterface.cpp b/SU2_CFD/src/interfaces/cht/CConjugateHeatInterface.cpp index e9a500807a02..6503e78647eb 100644 --- a/SU2_CFD/src/interfaces/cht/CConjugateHeatInterface.cpp +++ b/SU2_CFD/src/interfaces/cht/CConjugateHeatInterface.cpp @@ -62,7 +62,7 @@ void CConjugateHeatInterface::GetDonor_Variable(CSolver *donor_solution, CGeomet || (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 + 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 b6676594585e..c9ba0c817c2d 100644 --- a/SU2_CFD/src/iteration_structure.cpp +++ b/SU2_CFD/src/iteration_structure.cpp @@ -1195,7 +1195,7 @@ 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); 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/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 6417dd522ac1..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 */ @@ -240,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(); @@ -254,7 +254,7 @@ CHeatSolverFVM::CHeatSolverFVM(CGeometry *geometry, CConfig *config, unsigned sh SolverName = "HEAT"; } -CHeatSolverFVM::~CHeatSolverFVM(void) { +CHeatSolver::~CHeatSolver(void) { unsigned short iMarker; @@ -268,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); @@ -300,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 ---*/ @@ -314,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; @@ -452,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; @@ -504,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; @@ -550,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; @@ -644,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; @@ -715,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; @@ -783,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; @@ -848,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; @@ -902,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; @@ -1021,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; @@ -1090,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; @@ -1180,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; @@ -1319,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; @@ -1538,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; @@ -1583,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; @@ -1677,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; @@ -1741,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 90% rename from SU2_CFD/src/variables/CHeatFVMVariable.cpp rename to SU2_CFD/src/variables/CHeatVariable.cpp index 4144ed291a45..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; 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/solid_cylinder1.cfg b/TestCases/coupled_cht/incomp_2d_unsteady/solid_cylinder1.cfg index fb1c3f8cc538..5cc8ce385b83 100644 --- a/TestCases/coupled_cht/incomp_2d_unsteady/solid_cylinder1.cfg +++ b/TestCases/coupled_cht/incomp_2d_unsteady/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_unsteady/solid_cylinder2.cfg b/TestCases/coupled_cht/incomp_2d_unsteady/solid_cylinder2.cfg index cdb1fda9df63..85124ce7e40e 100644 --- a/TestCases/coupled_cht/incomp_2d_unsteady/solid_cylinder2.cfg +++ b/TestCases/coupled_cht/incomp_2d_unsteady/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_unsteady/solid_cylinder3.cfg b/TestCases/coupled_cht/incomp_2d_unsteady/solid_cylinder3.cfg index 136ee1194457..7dbd61cdb63f 100644 --- a/TestCases/coupled_cht/incomp_2d_unsteady/solid_cylinder3.cfg +++ b/TestCases/coupled_cht/incomp_2d_unsteady/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 From 0796772097d7683e6ceca8117c7ffc9291762d5c Mon Sep 17 00:00:00 2001 From: oleburghardt Date: Tue, 25 Feb 2020 11:49:07 +0100 Subject: [PATCH 22/23] Typos and spaces. --- SU2_CFD/include/drivers/CMultizoneDriver.hpp | 6 ++--- SU2_CFD/include/iteration_structure.hpp | 22 +++++++++---------- SU2_CFD/src/iteration_structure.cpp | 2 +- .../incomp_2d_unsteady/cht_2d_3cylinders.cfg | 12 +++++----- 4 files changed, 22 insertions(+), 20 deletions(-) diff --git a/SU2_CFD/include/drivers/CMultizoneDriver.hpp b/SU2_CFD/include/drivers/CMultizoneDriver.hpp index 078c3fe4a98e..e3bdb7eec98a 100644 --- a/SU2_CFD/include/drivers/CMultizoneDriver.hpp +++ b/SU2_CFD/include/drivers/CMultizoneDriver.hpp @@ -132,9 +132,9 @@ class CMultizoneDriver : public CDriver { bool Monitor(unsigned long TimeIter); /*! - * \brief Returns wheter all specified windowed-time-averaged ouputs have been converged - * \return Boolean indicating whether the problem is converged. - */ + * \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 664313a35cb9..388609f12a1d 100644 --- a/SU2_CFD/include/iteration_structure.hpp +++ b/SU2_CFD/include/iteration_structure.hpp @@ -733,17 +733,17 @@ class CHeatIteration : public CFluidIteration { * \param[in] grid_movement - Volume grid movement classes of the problem. * \param[in] FFDBox - FFD FFDBoxes 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); + 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); /*! * \brief Updates the containers for the heat system. diff --git a/SU2_CFD/src/iteration_structure.cpp b/SU2_CFD/src/iteration_structure.cpp index c9ba0c817c2d..64408875f47e 100644 --- a/SU2_CFD/src/iteration_structure.cpp +++ b/SU2_CFD/src/iteration_structure.cpp @@ -1229,6 +1229,7 @@ void CHeatIteration::Solve(COutput *output, #endif /*--- Preprocess the solver ---*/ + Preprocess(output, integration, geometry, solver, numerics, config, surface_movement, grid_movement, FFDBox, val_iZone, INST_0); @@ -1281,7 +1282,6 @@ void CHeatIteration::Update(COutput *output, unsigned short val_iInst) { unsigned short iMesh; - unsigned long TimeIter = config[ZONE_0]->GetTimeIter(); /*--- Dual time stepping strategy ---*/ diff --git a/TestCases/coupled_cht/incomp_2d_unsteady/cht_2d_3cylinders.cfg b/TestCases/coupled_cht/incomp_2d_unsteady/cht_2d_3cylinders.cfg index 8ec80fa7abcb..249e9928a848 100644 --- a/TestCases/coupled_cht/incomp_2d_unsteady/cht_2d_3cylinders.cfg +++ b/TestCases/coupled_cht/incomp_2d_unsteady/cht_2d_3cylinders.cfg @@ -27,19 +27,21 @@ MARKER_ZONE_INTERFACE= (cylinder_outer1, cylinder_inner1, cylinder_outer2, cylin % 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 From fd49a5971318cb3b2979a8de1fb0934ee9c2e750 Mon Sep 17 00:00:00 2001 From: oleburghardt Date: Tue, 25 Feb 2020 12:14:12 +0100 Subject: [PATCH 23/23] Small change (adding paranthesis around booleans). --- SU2_CFD/src/interfaces/cht/CConjugateHeatInterface.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SU2_CFD/src/interfaces/cht/CConjugateHeatInterface.cpp b/SU2_CFD/src/interfaces/cht/CConjugateHeatInterface.cpp index 6503e78647eb..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 - || 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();