Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Common/src/CConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4381,6 +4381,11 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i

Radiation = (Kind_Radiation != RADIATION_MODEL::NONE);

/*--- The P1 model uses the dimensional Stefan-Boltzmann constant with the solver temperature. ---*/
if (Radiation && Ref_Inc_NonDim != DIMENSIONAL) {
SU2_MPI::Error("RADIATION_MODEL requires INC_NONDIM= DIMENSIONAL.", CURRENT_FUNCTION);
}

/*--- Check for unsupported features. ---*/

if ((Kind_Solver != MAIN_SOLVER::EULER && Kind_Solver != MAIN_SOLVER::NAVIER_STOKES && Kind_Solver != MAIN_SOLVER::RANS) && (TimeMarching == TIME_MARCHING::HARMONIC_BALANCE)){
Expand Down
1 change: 1 addition & 0 deletions SU2_CFD/include/solvers/CFVMFlowSolverBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ class CFVMFlowSolverBase : public CSolver {
vector<su2double> Surface_HF_Visc; /*!< \brief Total (integrated) heat flux for each monitored surface. */
vector<su2double> Surface_MaxHF_Visc; /*!< \brief Maximum heat flux for each monitored surface. */
vector<su2double> HF_Visc; /*!< \brief Heat load (viscous contribution) for each boundary. */
const CSolver* RadSolver = nullptr; /*!< \brief Radiation solver, whose wall heat flux is added to HeatFlux. */
vector<su2double> MaxHF_Visc; /*!< \brief Maximum heat flux (viscous contribution) for each boundary. */
su2double AllBound_HF_Visc = 0.0; /*!< \brief Heat load (viscous contribution) for all the boundaries. */
su2double AllBound_MaxHF_Visc = 0.0; /*!< \brief Maximum heat flux (viscous contribution) for all boundaries. */
Expand Down
16 changes: 16 additions & 0 deletions SU2_CFD/include/solvers/CFVMFlowSolverBase.inl
Original file line number Diff line number Diff line change
Expand Up @@ -2683,6 +2683,16 @@ void CFVMFlowSolverBase<V, FlowRegime>::Friction_Forces(const CGeometry* geometr
}
const bool catalytic = nemo && config->GetCatalytic_Wall(iMarker);

/*--- With a radiation model, walls also absorb the radiative heat flux of the Marshak condition.
* The wall temperature is the one the radiation solver uses in its boundary conditions. ---*/
const bool radiative_wall = (RadSolver != nullptr) && (KindBC == BC_TYPE::ISOTHERMAL ||
KindBC == BC_TYPE::HEAT_FLUX || KindBC == BC_TYPE::CHT_WALL_INTERFACE);
su2double Emissivity = 0.0, Twall_Rad = 0.0;
if (radiative_wall) {
Emissivity = config->GetWall_Emissivity(Marker_Tag);
if (KindBC == BC_TYPE::ISOTHERMAL) Twall_Rad = config->GetIsothermal_Temperature(Marker_Tag) / RefTemperature;
}

/*--- Loop over the vertices to compute the forces (work-shared across threads, see
* Pressure_Forces for why the chunk size is computed and the barrier skipped). ---*/

Expand Down Expand Up @@ -2793,6 +2803,12 @@ void CFVMFlowSolverBase<V, FlowRegime>::Friction_Forces(const CGeometry* geometr
if (FlowRegime == ENUM_REGIME::INCOMPRESSIBLE && !energy) dTdn = 0.0;
HeatFlux[iMarker][iVertex] = thermal_conductivity * dTdn * RefHeatFlux;
}

if (radiative_wall) {
su2double Twall_local = Twall_Rad;
if (KindBC != BC_TYPE::ISOTHERMAL) Twall_local = nodes->GetTemperature(iPoint);
HeatFlux[iMarker][iVertex] += RadSolver->GetWallHeatFlux_Rad(iPoint, Emissivity, Twall_local);
}
} else {

const auto& thermal_conductivity_tr = nodes->GetThermalConductivity(iPoint);
Expand Down
12 changes: 12 additions & 0 deletions SU2_CFD/include/solvers/CRadP1Solver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,4 +256,16 @@ class CRadP1Solver final: public CRadSolver {
*/
inline su2double GetTemperature_Inf(void) const { return Temperature_Inf; }

/*!
* \brief Marshak radiative heat flux into a wall, Theta*(G - 4*sigma*T_w^4).
* \note Positive when the wall absorbs heat.
* \param[in] iPoint - Point on the wall.
* \param[in] emissivity - Emissivity of the wall.
* \param[in] Twall - Temperature of the wall.
*/
inline su2double GetWallHeatFlux_Rad(unsigned long iPoint, su2double emissivity, su2double Twall) const override {
const su2double Theta = emissivity / (2.0 * (2.0 - emissivity));
return Theta * (nodes->GetSolution(iPoint, 0) - 4.0 * STEFAN_BOLTZMANN * pow(Twall, 4.0));
}

};
11 changes: 11 additions & 0 deletions SU2_CFD/include/solvers/CSolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2414,6 +2414,17 @@ class CSolver {
*/
inline virtual su2double GetTotal_HeatFlux() const { return 0; }

/*!
* \brief Get the radiative heat flux into a wall at a point, from the Marshak condition.
* \param[in] iPoint - Point on the wall.
* \param[in] emissivity - Emissivity of the wall.
* \param[in] Twall - Temperature of the wall.
* \return Heat flux, positive when the wall absorbs heat. Zero for solvers without radiation.
*/
inline virtual su2double GetWallHeatFlux_Rad(unsigned long iPoint, su2double emissivity, su2double Twall) const {
return 0;
}

/*!
* \brief A virtual member.
* \return Value of the heat load (integrated heat flux).
Expand Down
4 changes: 2 additions & 2 deletions SU2_CFD/src/output/CFlowOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1945,9 +1945,9 @@ void CFlowOutput::AddHeatCoefficients(const CConfig* config) {

/// BEGIN_GROUP: HEAT, DESCRIPTION: Heat coefficients on all surfaces set with MARKER_MONITORING.
/// DESCRIPTION: Total heatflux
AddHistoryOutput("TOTAL_HEATFLUX", "HF", ScreenOutputFormat::SCIENTIFIC, "HEAT", "Total heatflux on all surfaces set with MARKER_MONITORING.", HistoryFieldType::COEFFICIENT);
AddHistoryOutput("TOTAL_HEATFLUX", "HF", ScreenOutputFormat::SCIENTIFIC, "HEAT", "Total heatflux on all surfaces set with MARKER_MONITORING, including radiation if a RADIATION_MODEL is used.", HistoryFieldType::COEFFICIENT);
/// DESCRIPTION: Maximal heatflux
AddHistoryOutput("MAXIMUM_HEATFLUX", "maxHF", ScreenOutputFormat::SCIENTIFIC, "HEAT", "Maximum heatflux across all surfaces set with MARKER_MONITORING.", HistoryFieldType::COEFFICIENT);
AddHistoryOutput("MAXIMUM_HEATFLUX", "maxHF", ScreenOutputFormat::SCIENTIFIC, "HEAT", "Maximum heatflux across all surfaces set with MARKER_MONITORING, including radiation if a RADIATION_MODEL is used.", HistoryFieldType::COEFFICIENT);

vector<string> Marker_Monitoring;
Marker_Monitoring.reserve(config->GetnMarker_Monitoring());
Expand Down
4 changes: 4 additions & 0 deletions SU2_CFD/src/solvers/CIncEulerSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1042,6 +1042,10 @@ void CIncEulerSolver::CommonPreprocessing(CGeometry *geometry, CSolver **solver_
unsigned short iRKStep, unsigned short RunTime_EqSystem, bool Output) {
SU2_ZONE_SCOPED

/*--- The wall heat flux of Friction_Forces includes the radiative heat flux. ---*/

if (iMesh == MESH_0 && config->AddRadiation()) RadSolver = solver_container[RAD_SOL];

const bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT);
const bool center = (config->GetKind_ConvNumScheme_Flow() == SPACE_CENTERED);
const bool center_jst = (config->GetKind_Centered_Flow() == CENTERED::JST || config->GetKind_Centered_Flow() == CENTERED::LD2) && (iMesh == MESH_0);
Expand Down
2 changes: 1 addition & 1 deletion TestCases/parallel_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -1703,7 +1703,7 @@ def main():
p1rad.cfg_dir = "radiation/p1model"
p1rad.cfg_file = "configp1.cfg"
p1rad.test_iter = 50
p1rad.test_vals = [-8.197112, -7.856394, -2.380743, 0.381122, -57.186000]
p1rad.test_vals = [-8.197112, -7.856394, -2.380743, 0.381122, -3211.700000]
test_list.append(p1rad)


Expand Down
2 changes: 1 addition & 1 deletion TestCases/serial_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -1268,7 +1268,7 @@ def main():
p1rad.cfg_dir = "radiation/p1model"
p1rad.cfg_file = "configp1.cfg"
p1rad.test_iter = 50
p1rad.test_vals = [-8.284673, -8.008659, -2.424204, 0.389030, -56.560000]
p1rad.test_vals = [-8.284673, -8.008659, -2.424204, 0.389030, -3190.600000]
test_list.append(p1rad)

# ###############################
Expand Down
10 changes: 10 additions & 0 deletions TestCases/tutorials.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,16 @@ def main():
pywrapper_psi_quench.command = TestCase.Command("mpirun -np 2", "python", "run.py")
test_list.append(pywrapper_psi_quench)

# custom source: volumetric heat source with the P1 radiation model
pywrapper_p1_cavity = TestCase('p1_radiation_python')
pywrapper_p1_cavity.cfg_dir = "../Tutorials/multiphysics/P1_radiation_python"
pywrapper_p1_cavity.cfg_file = "cavity.cfg"
pywrapper_p1_cavity.test_iter = 20
pywrapper_p1_cavity.test_vals = [-7.708332, -8.047920, -7.885417, -2.607572, -3.352777, 9.108100]
pywrapper_p1_cavity.test_vals_aarch64 = [-7.710578, -8.043164, -7.883466, -2.603692, -3.354051, 9.082500]
pywrapper_p1_cavity.command = TestCase.Command("mpirun -np 2", "python", "run.py")
test_list.append(pywrapper_p1_cavity)


######################################
### RUN TESTS ###
Expand Down