diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index 66f7e35a23e..ba800f1a8e3 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -5989,6 +5989,11 @@ class CConfig { */ su2double GetStreamwise_Periodic_PressureDrop(void) const { return Streamwise_Periodic_PressureDrop; } + /*! + * \brief Set the value of the pressure delta from which body force vector is computed. Necessary for Restart metadata. + */ + void SetStreamwise_Periodic_PressureDrop(su2double Streamwise_Periodic_PressureDrop_) { Streamwise_Periodic_PressureDrop = Streamwise_Periodic_PressureDrop_; } + /*! * \brief Get the value of the massflow from which body force vector is computed. * \return Massflow for body force computation. diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index f505d1b7852..054ecbd42ec 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -4788,8 +4788,8 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i pressure drop objective function is selected. ---*/ for (unsigned short iObj = 0; iObj < nObj; iObj++) { - if ((Kind_ObjFunc[iObj] == SURFACE_PRESSURE_DROP) && (nMarker_Analyze != 2)) { - SU2_MPI::Error("Must list two markers for the pressure drop objective function.\n Expected format: MARKER_ANALYZE= (outlet_name, inlet_name).", CURRENT_FUNCTION); + if ((Kind_ObjFunc[iObj] == SURFACE_PRESSURE_DROP) && (nMarker_Analyze < 2)) { + SU2_MPI::Error("Must list the first two markers for the pressure drop objective function.\n Expected format: MARKER_ANALYZE= (outlet_name, inlet_name, ...).", CURRENT_FUNCTION); } } @@ -5733,8 +5733,16 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { break; } } + if(!found) { - SU2_MPI::Error("DV_MARKER contains marker names that do not exist in the lists of BCs in the config file.", CURRENT_FUNCTION); + if (nZone==1) + SU2_MPI::Error("DV_MARKER contains marker names that do not exist in the lists of BCs in the config file.", CURRENT_FUNCTION); + // In case of multiple zones, the markers might appear only in zonal config and not in the Master. + // A loop over all zones would need to be included which is not straight forward as this can only be + // checked once all zonal configs are read. + else if (rank == MASTER_NODE) + cout << "Warning: DV_MARKER contains marker names that do not exist in the lists of BCs of the master config file.\n" + "Make sure the marker names exist in the zonal config files" << endl; } } diff --git a/SU2_CFD/include/output/CMultizoneOutput.hpp b/SU2_CFD/include/output/CMultizoneOutput.hpp index 308c919d8f3..c7dd56be6f1 100644 --- a/SU2_CFD/include/output/CMultizoneOutput.hpp +++ b/SU2_CFD/include/output/CMultizoneOutput.hpp @@ -66,14 +66,15 @@ class CMultizoneOutput final: public COutput { /*! * \brief Load the multizone history output field values * \param[in] output - Container holding the output instances per zone. + * \param[in] config - Definition of the particular problem. */ - void LoadMultizoneHistoryData(const COutput* const* output) override; + void LoadMultizoneHistoryData(const COutput* const* output, const CConfig* const* config) override; /*! * \brief Set the available multizone history output fields * \param[in] output - Container holding the output instances per zone. */ - void SetMultizoneHistoryOutputFields(const COutput* const* output) override; + void SetMultizoneHistoryOutputFields(const COutput* const* output, const CConfig* const* config) override; /*! * \brief Determines if the history file output. diff --git a/SU2_CFD/include/output/COutput.hpp b/SU2_CFD/include/output/COutput.hpp index 9b6da6cf484..29aad51313b 100644 --- a/SU2_CFD/include/output/COutput.hpp +++ b/SU2_CFD/include/output/COutput.hpp @@ -432,6 +432,14 @@ class COutput { return historyOutput_List; } + /*! + * \brief Get the list of all per-surface fields + * \return Vector container all output per-surface fields + */ + const vector& GetHistoryOutputPerSurface_List() const { + return historyOutputPerSurface_List; + } + /*! * \brief Get the map containing all output fields * \return Map containing all output fields @@ -440,6 +448,14 @@ class COutput { return historyOutput_Map; } + /*! + * \brief Get the map containing all output per-surface fields + * \return Map containing all output per-surface fields + */ + const map>& GetHistoryPerSurfaceFields() const { + return historyOutputPerSurface_Map; + } + /*! * \brief Monitor the convergence of an output field * \param[in] config - Definition of the particular problem. @@ -824,8 +840,9 @@ class COutput { /*! * \brief Load the multizone history output field values * \param[in] output - Container holding the output instances per zone. + * \param[in] config - Definition of the particular problem. */ - inline virtual void LoadMultizoneHistoryData(const COutput* const* output) {} + inline virtual void LoadMultizoneHistoryData(const COutput* const* output, const CConfig* const* config) {} /*! * \brief Set the available history output fields @@ -837,7 +854,7 @@ class COutput { * \brief Set the available multizone history output fields * \param[in] output - Container holding the output instances per zone. */ - inline virtual void SetMultizoneHistoryOutputFields(const COutput* const* output) {} + inline virtual void SetMultizoneHistoryOutputFields(const COutput* const* output, const CConfig* const* config) {} /*! * \brief Write any additional files defined for the current solver. diff --git a/SU2_CFD/include/solvers/CHeatSolver.hpp b/SU2_CFD/include/solvers/CHeatSolver.hpp index 15a0e35ce59..e8874c2ac03 100644 --- a/SU2_CFD/include/solvers/CHeatSolver.hpp +++ b/SU2_CFD/include/solvers/CHeatSolver.hpp @@ -313,15 +313,17 @@ class CHeatSolver final : public CSolver { * \param[in] solver - Container vector with all the solutions. */ void Evaluate_ObjFunc(const CConfig *config, CSolver**) override { + const auto weight = config->GetWeight_ObjFunc(0); + switch (config->GetKind_ObjFunc()) { case TOTAL_HEATFLUX: - Total_ComboObj = Total_HeatFlux; + Total_ComboObj = weight * Total_HeatFlux; break; case AVG_TEMPERATURE: - Total_ComboObj = Total_AverageT; + Total_ComboObj = weight * Total_AverageT; break; case CUSTOM_OBJFUNC: - Total_ComboObj = Total_Custom_ObjFunc; + Total_ComboObj = weight * Total_Custom_ObjFunc; break; default: Total_ComboObj = 0.0; diff --git a/SU2_CFD/src/output/CFlowOutput.cpp b/SU2_CFD/src/output/CFlowOutput.cpp index 5985e70dc20..96d3577ecc3 100644 --- a/SU2_CFD/src/output/CFlowOutput.cpp +++ b/SU2_CFD/src/output/CFlowOutput.cpp @@ -67,10 +67,10 @@ void CFlowOutput::AddAnalyzeSurfaceOutput(const CConfig *config){ /// DESCRIPTION: Average total pressure AddHistoryOutput("SURFACE_TOTAL_PRESSURE", "Avg_TotalPress", ScreenOutputFormat::SCIENTIFIC, "FLOW_COEFF", "Total average total pressure on all markers set in MARKER_ANALYZE", HistoryFieldType::COEFFICIENT); /// DESCRIPTION: Pressure drop - if (config->GetnMarker_Analyze() == 2) { + if (config->GetnMarker_Analyze() >= 2) { AddHistoryOutput("SURFACE_PRESSURE_DROP", "Pressure_Drop", ScreenOutputFormat::SCIENTIFIC, "FLOW_COEFF", "Total pressure drop on all markers set in MARKER_ANALYZE", HistoryFieldType::COEFFICIENT); } else if (rank == MASTER_NODE) { - cout << "\nWARNING: SURFACE_PRESSURE_DROP can only be computed for 2 surfaces (outlet, inlet)\n" << endl; + cout << "\nWARNING: SURFACE_PRESSURE_DROP can only be computed for at least 2 surfaces (outlet, inlet, ...)\n" << endl; } if (config->GetKind_Species_Model() != SPECIES_MODEL::NONE) { /// DESCRIPTION: Average Species @@ -530,7 +530,7 @@ void CFlowOutput::SetAnalyzeSurface(const CSolver* const*solver, const CGeometry which require the outlet to be listed first. This is a simple first version that could be generalized to a different orders/lists/etc. ---*/ - if (nMarker_Analyze == 2) { + if (nMarker_Analyze >= 2) { su2double PressureDrop = (Surface_Pressure_Total[1] - Surface_Pressure_Total[0]) * config->GetPressure_Ref(); for (iMarker_Analyze = 0; iMarker_Analyze < nMarker_Analyze; iMarker_Analyze++) { config->SetSurface_PressureDrop(iMarker_Analyze, PressureDrop); @@ -1736,7 +1736,8 @@ void CFlowOutput::Set_NearfieldInverseDesign(CSolver *solver, const CGeometry *g void CFlowOutput::WriteAdditionalFiles(CConfig *config, CGeometry *geometry, CSolver **solver_container){ - if (config->GetFixed_CL_Mode()){ + if (config->GetFixed_CL_Mode() || + (config->GetKind_Streamwise_Periodic() == ENUM_STREAMWISE_PERIODIC::MASSFLOW)){ WriteMetaData(config); } @@ -1757,6 +1758,8 @@ void CFlowOutput::WriteMetaData(const CConfig *config){ /*--- All processors open the file. ---*/ if (rank == MASTER_NODE) { + cout << "Writing Flow Meta-Data file: " << filename << endl; + meta_file.open(filename.c_str(), ios::out); meta_file.precision(15); @@ -1783,6 +1786,10 @@ void CFlowOutput::WriteMetaData(const CConfig *config){ config->GetKind_Solver() == MAIN_SOLVER::DISC_ADJ_RANS )) { meta_file << "SENS_AOA=" << GetHistoryFieldValue("SENS_AOA") * PI_NUMBER / 180.0 << endl; } + + if(config->GetKind_Streamwise_Periodic() == ENUM_STREAMWISE_PERIODIC::MASSFLOW) { + meta_file << "STREAMWISE_PERIODIC_PRESSURE_DROP=" << GetHistoryFieldValue("STREAMWISE_DP") << endl; + } } meta_file.close(); diff --git a/SU2_CFD/src/output/CMultizoneOutput.cpp b/SU2_CFD/src/output/CMultizoneOutput.cpp index 99064d64bc2..7082f5aa572 100644 --- a/SU2_CFD/src/output/CMultizoneOutput.cpp +++ b/SU2_CFD/src/output/CMultizoneOutput.cpp @@ -78,7 +78,7 @@ CMultizoneOutput::CMultizoneOutput(const CConfig* driver_config, const CConfig* } -void CMultizoneOutput::LoadMultizoneHistoryData(const COutput* const* output) { +void CMultizoneOutput::LoadMultizoneHistoryData(const COutput* const* output, const CConfig* const* config) { string nameMultizone, zoneIndex; su2double comboValue = 0; @@ -97,11 +97,31 @@ void CMultizoneOutput::LoadMultizoneHistoryData(const COutput* const* output) { comboValue += item.second.value; } } + + /*-- Load the PerSurface values.- ---*/ + for (const auto& item : output[iZone]->GetHistoryPerSurfaceFields()) { + const auto& name = item.first; + nameMultizone = name + zoneIndex; + + /*--- Determine whether nMaker_Analyze/Monitoring has to be looped. ---*/ + const auto& group = item.second[0].outputGroup; + unsigned short nMarker = 0; + if (group == "FLOW_COEFF_SURF") + nMarker = config[iZone]->GetnMarker_Analyze(); + else if (group == "AERO_COEFF_SURF") + nMarker = config[iZone]->GetnMarker_Monitoring(); + else + SU2_MPI::Error("Per Surface output group unknown: " + group, CURRENT_FUNCTION); + + for (unsigned short iMarker = 0; iMarker < nMarker; iMarker++) { + SetHistoryOutputPerSurfaceValue(nameMultizone, item.second[iMarker].value, iMarker); + }// for iMarker + }// for HistPerSurfFields } SetHistoryOutputValue("COMBO", comboValue); } -void CMultizoneOutput::SetMultizoneHistoryOutputFields(const COutput* const* output) { +void CMultizoneOutput::SetMultizoneHistoryOutputFields(const COutput* const* output, const CConfig* const* config) { string name, header, group, zoneIndex; @@ -125,6 +145,56 @@ void CMultizoneOutput::SetMultizoneHistoryOutputFields(const COutput* const* out AddHistoryOutput(name, header, field.screenFormat, group, "", field.fieldType ); } } + + /*--- Prepare Marker lists that are passed to 'AddHistoryOutputPerSurface'. ---*/ + vector Marker_Analyze; + for (unsigned short iMarker_Analyze = 0; iMarker_Analyze < config[iZone]->GetnMarker_Analyze(); iMarker_Analyze++) { + Marker_Analyze.push_back(config[iZone]->GetMarker_Analyze_TagBound(iMarker_Analyze)); + } + + vector Marker_Monitoring; + for (unsigned short iMarker_Monitoring = 0; iMarker_Monitoring < config[iZone]->GetnMarker_Monitoring(); iMarker_Monitoring++) { + Marker_Monitoring.push_back(config[iZone]->GetMarker_Monitoring_TagBound(iMarker_Monitoring)); + } + + /*--- Add the PerSurface outputs. ---*/ + const auto& ZoneHistoryPerSurfaceFields = output[iZone]->GetHistoryPerSurfaceFields(); + + for (const auto& nameSinglezone : output[iZone]->GetHistoryOutputPerSurface_List()) { + + const auto& field = ZoneHistoryPerSurfaceFields.at(nameSinglezone); + + name = nameSinglezone + zoneIndex; + + /*--- Remove the unnecessary Marker name from the fieldName, i.e. "Avg_Massflow(inlet)"->"Avg_Massflow". ---*/ + /*--- Note that index zero in 'field[0]' refers to a specific Marker. Some attributes remain constant over the markers + like the first part of the name, the screenFormat and the fieldType. ---*/ + string baseheader; + const auto pos = field[0].fieldName.find('('); + if (pos != std::string::npos) + baseheader = field[0].fieldName.substr(0, pos); + else + SU2_MPI::Error("Cannot process PerSurface *_SURF history output: " + baseheader, CURRENT_FUNCTION); + + header = baseheader + zoneIndex; + /*--- Attach zone-index to the group after determining which group it is. ---*/ + group = field[0].outputGroup; + + /*--- Determine whether Maker_Analyze/Monitoring has to be used. ---*/ + vector* Marker; + if (group == "FLOW_COEFF_SURF") + Marker = &Marker_Analyze; + else if (group == "AERO_COEFF_SURF") + Marker = &Marker_Monitoring; + else { + Marker = &Marker_Analyze; // dummy to suppress maybe-uninitialized warning + SU2_MPI::Error("Per Surface output group unknown: " + group, CURRENT_FUNCTION); + } + + group += zoneIndex; + + AddHistoryOutputPerSurface(name, header, field[0].screenFormat, group, *Marker, field[0].fieldType ); + } } AddHistoryOutput("COMBO", "ComboObj", ScreenOutputFormat::SCIENTIFIC, "COMBO", "Combined obj. function value.", HistoryFieldType::COEFFICIENT); } diff --git a/SU2_CFD/src/output/COutput.cpp b/SU2_CFD/src/output/COutput.cpp index 7d09aae1073..890a6561fe5 100644 --- a/SU2_CFD/src/output/COutput.cpp +++ b/SU2_CFD/src/output/COutput.cpp @@ -236,7 +236,7 @@ void COutput::SetMultizoneHistory_Output(COutput **output, CConfig **config, CCo LoadCommonHistoryData(driver_config); - LoadMultizoneHistoryData(output); + LoadMultizoneHistoryData(output, config); Convergence_Monitoring(driver_config, curOuterIter); @@ -1365,7 +1365,7 @@ void COutput::PreprocessMultizoneHistoryOutput(COutput **output, CConfig **confi /*--- Set the History output fields using a virtual function call to the child implementation ---*/ - SetMultizoneHistoryOutputFields(output); + SetMultizoneHistoryOutputFields(output, config); /*--- Postprocess the history fields. Creates new fields based on the ones set in the child classes ---*/ diff --git a/SU2_CFD/src/solvers/CEulerSolver.cpp b/SU2_CFD/src/solvers/CEulerSolver.cpp index f325cf07ce0..0f5b7bfe996 100644 --- a/SU2_CFD/src/solvers/CEulerSolver.cpp +++ b/SU2_CFD/src/solvers/CEulerSolver.cpp @@ -94,11 +94,10 @@ CEulerSolver::CEulerSolver(CGeometry *geometry, CConfig *config, else Unst_RestartIter = SU2_TYPE::Int(config->GetRestart_Iter())-1; } - string filename_ = "flow"; - filename_ = config->GetFilename(filename_, ".meta", Unst_RestartIter); - /*--- Read and store the restart metadata. ---*/ + string filename_ = "flow"; + filename_ = config->GetFilename(filename_, ".meta", Unst_RestartIter); Read_SU2_Restart_Metadata(geometry, config, adjoint, filename_); } diff --git a/SU2_CFD/src/solvers/CIncEulerSolver.cpp b/SU2_CFD/src/solvers/CIncEulerSolver.cpp index 11445707794..5e17736681f 100644 --- a/SU2_CFD/src/solvers/CIncEulerSolver.cpp +++ b/SU2_CFD/src/solvers/CIncEulerSolver.cpp @@ -47,7 +47,7 @@ CIncEulerSolver::CIncEulerSolver(CGeometry *geometry, CConfig *config, unsigned ifstream restart_file; unsigned short nZone = geometry->GetnZone(); bool restart = (config->GetRestart() || config->GetRestart_Flow()); - int Unst_RestartIter; + int Unst_RestartIter = 0; unsigned short iZone = config->GetiZone(); bool dual_time = ((config->GetTime_Marching() == TIME_MARCHING::DT_STEPPING_1ST) || (config->GetTime_Marching() == TIME_MARCHING::DT_STEPPING_2ND)); @@ -91,9 +91,16 @@ CIncEulerSolver::CIncEulerSolver(CGeometry *geometry, CConfig *config, unsigned /*--- Read and store the restart metadata. ---*/ -// Read_SU2_Restart_Metadata(geometry, config, false, filename_); + filename_ = "flow"; + filename_ = config->GetFilename(filename_, ".meta", Unst_RestartIter); + Read_SU2_Restart_Metadata(geometry, config, adjoint, filename_); } + if (restart && (config->GetKind_Streamwise_Periodic() == ENUM_STREAMWISE_PERIODIC::MASSFLOW)) { + string filename_ = "flow"; + filename_ = config->GetFilename(filename_, ".meta", Unst_RestartIter); + Read_SU2_Restart_Metadata(geometry, config, adjoint, filename_); + } /*--- Set the gamma value ---*/ diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index b75a6f449d5..57ca1d5544e 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -176,7 +176,7 @@ void CIncNSSolver::GetStreamwise_Periodic_Properties(const CGeometry *geometry, } // loop periodic boundaries } // loop MarkerAll - // MPI Communication: Sum Area, Sum rho*A & T*A and divide by AreaGlobbal, sum massflow + // MPI Communication: Sum Area, Sum rho*A & T*A and divide by AreaGlobal, sum massflow su2double Area_Global(0), Average_Density_Global(0), MassFlow_Global(0), Temperature_Global(0); SU2_MPI::Allreduce(&Area_Local, &Area_Global, 1, MPI_DOUBLE, MPI_SUM, SU2_MPI::GetComm()); SU2_MPI::Allreduce(&Average_Density_Local, &Average_Density_Global, 1, MPI_DOUBLE, MPI_SUM, SU2_MPI::GetComm()); @@ -216,10 +216,10 @@ void CIncNSSolver::GetStreamwise_Periodic_Properties(const CGeometry *geometry, (e.g. 4x for INC_RANS restart). Each time, the pressure drop gets updated. For INC_RANS restarts it gets called 2x before the restart files are read such that the current massflow is Area*inital-velocity which can be way off! - With this there is still a slight inconsitency wrt to a non-restarted simulation: The restarted "zero-th" + With this there is still a slight inconsistency wrt to a non-restarted simulation: The restarted "zero-th" iteration does not get a pressure-update but the continuing simulation would have an update here. This can be fully neglected if the pressure drop is converged. And for all other cases it should be minor difference at - best ---*/ + best. ---*/ if((nZone==1 && InnerIter>0) || (nZone>1 && OuterIter>0)) { SPvals.Streamwise_Periodic_PressureDrop = Pressure_Drop_new; @@ -232,7 +232,7 @@ void CIncNSSolver::GetStreamwise_Periodic_Properties(const CGeometry *geometry, /*---------------------------------------------------------------------------------------------*/ /*--- 3. Compute the integrated Heatflow [W] for the energy equation source term, heatflux ---*/ /*--- boundary term and recovered Temperature. The computation is not completely clear. ---*/ - /*--- Here the Heatflux from all Bounary markers in the config-file is used. ---*/ + /*--- Here the Heatflux from all Boundary markers in the config-file is used. ---*/ /*---------------------------------------------------------------------------------------------*/ su2double HeatFlow_Local = 0.0, HeatFlow_Global = 0.0; diff --git a/SU2_CFD/src/solvers/CSolver.cpp b/SU2_CFD/src/solvers/CSolver.cpp index 0ec0b5438f8..5d9b81c3dc5 100644 --- a/SU2_CFD/src/solvers/CSolver.cpp +++ b/SU2_CFD/src/solvers/CSolver.cpp @@ -3332,6 +3332,7 @@ void CSolver::Read_SU2_Restart_Metadata(CGeometry *geometry, CConfig *config, bo su2double dCMx_dCL_ = config->GetdCMx_dCL(); su2double dCMy_dCL_ = config->GetdCMy_dCL(); su2double dCMz_dCL_ = config->GetdCMz_dCL(); + su2double SPPressureDrop_ = config->GetStreamwise_Periodic_PressureDrop(); string::size_type position; unsigned long InnerIter_ = 0; ifstream restart_file; @@ -3357,6 +3358,7 @@ void CSolver::Read_SU2_Restart_Metadata(CGeometry *geometry, CConfig *config, bo position = text_line.find ("ITER=",0); if (position != string::npos) { + // TODO: 'ITER=' has 5 chars, not 9! text_line.erase (0,9); InnerIter_ = atoi(text_line.c_str()); } @@ -3409,6 +3411,14 @@ void CSolver::Read_SU2_Restart_Metadata(CGeometry *geometry, CConfig *config, bo text_line.erase (0,15); dCMz_dCL_ = atof(text_line.c_str()); } + /*--- Streamwise periodic pressure drop for prescribed massflow cases. ---*/ + + position = text_line.find ("STREAMWISE_PERIODIC_PRESSURE_DROP=",0); + if (position != string::npos) { + // Erase the name from the line, 'STREAMWISE_PERIODIC_PRESSURE_DROP=' has 34 chars. + text_line.erase (0,34); SPPressureDrop_ = atof(text_line.c_str()); + } + } /*--- Close the restart meta file. ---*/ @@ -3500,6 +3510,16 @@ void CSolver::Read_SU2_Restart_Metadata(CGeometry *geometry, CConfig *config, bo } + if (config->GetDiscard_InFiles() == false) { + if ((config->GetStreamwise_Periodic_PressureDrop() != SPPressureDrop_) && (rank == MASTER_NODE)) + cout <<"WARNING: SU2 will use the STREAMWISE_PERIODIC_PRESSURE_DROP provided in the direct solution file: " << std::setprecision(16) << SPPressureDrop_ << endl; + config->SetStreamwise_Periodic_PressureDrop(SPPressureDrop_); + } + else { + if ((config->GetStreamwise_Periodic_PressureDrop() != SPPressureDrop_) && (rank == MASTER_NODE)) + cout <<"WARNING: Discarding the STREAMWISE_PERIODIC_PRESSURE_DROP in the direct solution file." << endl; + } + /*--- External iteration ---*/ if ((config->GetDiscard_InFiles() == false) && (!adjoint || (adjoint && config->GetRestart()))) diff --git a/TestCases/TestCase.py b/TestCases/TestCase.py index 8dcee2fee98..438482adf9b 100644 --- a/TestCases/TestCase.py +++ b/TestCases/TestCase.py @@ -79,7 +79,7 @@ def run_test(self): passed = True exceed_tol = False timed_out = False - iter_missing = False + iter_missing = True start_solver = True # if root, add flag to mpirun diff --git a/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_2d/configMaster.cfg b/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_2d/configMaster.cfg index c34ee4da917..b2a8a4dd23d 100644 --- a/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_2d/configMaster.cfg +++ b/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_2d/configMaster.cfg @@ -24,10 +24,10 @@ OUTER_ITER= 4000 % %CHT_ROBIN= NO % -SCREEN_OUTPUT= ( OUTER_ITER, BGS_PRESSURE[0], BGS_TEMPERATURE[0], BGS_TEMPERATURE[1], STREAMWISE_MASSFLOW[0], STREAMWISE_DP[0], AVG_TEMPERATURE[1] ) +SCREEN_OUTPUT= ( OUTER_ITER, BGS_PRESSURE[0], BGS_TEMPERATURE[0], BGS_TEMPERATURE[1], STREAMWISE_MASSFLOW[0], STREAMWISE_DP[0], AVG_TEMPERATURE[1], SURFACE_MASSFLOW[0] ) SCREEN_WRT_FREQ_OUTER= 100 % -HISTORY_OUTPUT= ( ITER, BGS_RES[0], BGS_RES[1], RMS_RES[0], RMS_RES[1], STREAMWISE_PERIODIC[0], FLOW_COEFF[0], HEAT[1], LINSOL[0], LINSOL[1], HEAT[0] ) +HISTORY_OUTPUT= ( ITER, BGS_RES[0], BGS_RES[1], RMS_RES[0], RMS_RES[1], STREAMWISE_PERIODIC[0], FLOW_COEFF[0], FLOW_COEFF_SURF[0], HEAT[1], LINSOL[0], LINSOL[1], HEAT[0] ) % OUTPUT_FILES= ( RESTART, PARAVIEW_MULTIBLOCK ) OUTPUT_WRT_FREQ= 1000 diff --git a/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_3d/configFluid.cfg b/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_3d/configFluid.cfg index 41aa9ff855c..74f2cb925f2 100644 --- a/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_3d/configFluid.cfg +++ b/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_3d/configFluid.cfg @@ -105,9 +105,10 @@ TIME_DISCRE_TURB= EULER_IMPLICIT % % --------------------------- CONVERGENCE PARAMETERS --------------------------% % -CONV_RESIDUAL_MINVAL= -26 -CONV_STARTITER= 100000000 +CONV_FIELD= RMS_TEMPERATURE +CONV_RESIDUAL_MINVAL= -18 +CONV_STARTITER= 100 % % ------------------------- INPUT/OUTPUT INFORMATION --------------------------% % -HISTORY_OUTPUT= ( ITER, RMS_RES, STREAMWISE_PERIODIC, FLOW_COEFF ) +%HISTORY_OUTPUT= ( ITER, RMS_RES, STREAMWISE_PERIODIC, FLOW_COEFF ) diff --git a/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_3d/configMaster.cfg b/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_3d/configMaster.cfg index d5bc1f77c29..e6eccb781f7 100644 --- a/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_3d/configMaster.cfg +++ b/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_3d/configMaster.cfg @@ -10,6 +10,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % SOLVER= MULTIPHYSICS +RESTART_SOL= YES % CONFIG_LIST = (configFluid.cfg, configSolid.cfg) % @@ -17,18 +18,18 @@ MARKER_ZONE_INTERFACE= (fluid_bottom_interface, solid_bottom_interface, fluid_pi % MARKER_CHT_INTERFACE= (fluid_bottom_interface, solid_bottom_interface, fluid_pin1, solid_pin1, fluid_pin2, solid_pin2, fluid_pin3, solid_pin3 ) % -OUTER_ITER = 15000 +OUTER_ITER = 31 % CONV_RESIDUAL_MINVAL= -26 % SCREEN_OUTPUT= (OUTER_ITER, BGS_PRESSURE[0], BGS_TEMPERATURE[0], BGS_TEMPERATURE[1], STREAMWISE_MASSFLOW[0], STREAMWISE_DP[0], AVG_TEMPERATURE[1] ) SCREEN_WRT_FREQ_OUTER= 100 % +HISTORY_OUTPUT= ( ITER, RMS_RES[0], RMS_RES[1], STREAMWISE_PERIODIC[0], FLOW_COEFF[0], HEAT[1] ) +% OUTPUT_FILES= (RESTART, PARAVIEW_MULTIBLOCK) OUTPUT_WRT_FREQ= 2500 % -%CHT_ROBIN= NO -% % Mesh input file MESH_FILENAME= 3D_chtPinArray_coarse.su2 % diff --git a/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_3d/configSolid.cfg b/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_3d/configSolid.cfg index 731429e16e2..8a6bacdb58a 100644 --- a/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_3d/configSolid.cfg +++ b/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_3d/configSolid.cfg @@ -58,8 +58,9 @@ LINEAR_SOLVER_ITER= 15 % % --------------------------- CONVERGENCE PARAMETERS --------------------------% % -CONV_RESIDUAL_MINVAL= -20 -CONV_STARTITER= 10000000000 +CONV_FIELD= RMS_TEMPERATURE +CONV_RESIDUAL_MINVAL= -18 +CONV_STARTITER= 100 % % -------------------- HEAT NUMERICAL METHOD DEFINITION -----------------------% % @@ -68,4 +69,4 @@ TIME_DISCRE_HEAT= EULER_IMPLICIT % % ------------------------- INPUT/OUTPUT INFORMATION --------------------------% % -HISTORY_OUTPUT= (ITER, RMS_RES, HEAT) +%HISTORY_OUTPUT= (ITER, RMS_RES, HEAT) diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index 46b5dc098bf..640d595a5f9 100644 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -1411,12 +1411,12 @@ def main(): cht_compressible.tol = 0.00001 test_list.append(cht_compressible) - # 2D CHT case streamwise periodicity + # 2D CHT case streamwise periodicity. Also test Multizone PerSurface screen output. sp_pinArray_cht_2d_dp_hf = TestCase('sp_pinArray_cht_2d_dp_hf') sp_pinArray_cht_2d_dp_hf.cfg_dir = "incomp_navierstokes/streamwise_periodic/chtPinArray_2d" sp_pinArray_cht_2d_dp_hf.cfg_file = "configMaster.cfg" sp_pinArray_cht_2d_dp_hf.test_iter = 100 - sp_pinArray_cht_2d_dp_hf.test_vals = [0.246959, -0.811849, -0.962120, -0.753320, 208.023676, 349.990000] #last 7 lines + sp_pinArray_cht_2d_dp_hf.test_vals = [0.246959, -0.811849, -0.962120, -0.753320, 208.023676, 349.990000, -8.9660e-10, -7.5332e-01, 7.5332e-01] sp_pinArray_cht_2d_dp_hf.su2_exec = "mpirun -n 2 SU2_CFD" sp_pinArray_cht_2d_dp_hf.timeout = 1600 sp_pinArray_cht_2d_dp_hf.tol = 0.00001 @@ -1428,7 +1428,7 @@ def main(): sp_pinArray_3d_cht_mf_hf_tp.cfg_dir = "incomp_navierstokes/streamwise_periodic/chtPinArray_3d" sp_pinArray_3d_cht_mf_hf_tp.cfg_file = "configMaster.cfg" sp_pinArray_3d_cht_mf_hf_tp.test_iter = 30 - sp_pinArray_3d_cht_mf_hf_tp.test_vals = [0.511984, -0.894867, -0.451962, -0.008477, 214.707868, 365.670000] #last 7 lines + sp_pinArray_3d_cht_mf_hf_tp.test_vals = [-13.380025, -7.476945, -7.025285, -0.009675, 99.879812, 4.1920e+02] sp_pinArray_3d_cht_mf_hf_tp.su2_exec = "mpirun -n 2 SU2_CFD" sp_pinArray_3d_cht_mf_hf_tp.timeout = 1600 sp_pinArray_3d_cht_mf_hf_tp.tol = 0.00001 diff --git a/TestCases/tutorials.py b/TestCases/tutorials.py index e2ee0697457..fa40656d351 100644 --- a/TestCases/tutorials.py +++ b/TestCases/tutorials.py @@ -49,7 +49,7 @@ def main(): cht_incompressible_unsteady.cfg_dir = "../Tutorials/multiphysics/unsteady_cht/" cht_incompressible_unsteady.cfg_file = "cht_2d_3cylinders.cfg" cht_incompressible_unsteady.test_iter = 2 - cht_incompressible_unsteady.test_vals = [-2.659390, -2.533160, -0.080399, -0.080399, -0.080399, -12.421450, 0.0000e+00, 0.0000e+00, 2.3824e+02] #last 9 columns + cht_incompressible_unsteady.test_vals = [-2.659390, -2.533160, -0.080399, -0.080399, -0.080399, -12.421450, 0.0000e+00, 0.0, 0.0, 0.0, 0.0000e+00, 2.3824e+02] #last columns cht_incompressible_unsteady.su2_exec = "mpirun -n 2 SU2_CFD" cht_incompressible_unsteady.timeout = 1600 cht_incompressible_unsteady.multizone = True