Skip to content

Add the P1 radiative wall heat flux to TOTAL_HEATFLUX - #3048

Open
pragyaangaur wants to merge 7 commits into
su2code:developfrom
pragyaangaur:p1-radiative-wall-heatflux
Open

pragyaangaur wants to merge 7 commits into
su2code:developfrom
pragyaangaur:p1-radiative-wall-heatflux

Conversation

@pragyaangaur

@pragyaangaur pragyaangaur commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Proposed Changes

With RADIATION_MODEL= P1, the wall heat flux of the flow solver only held the conductive part, so the energy balance of a case with radiation could not be checked from the output. This was raised in the review of su2code/Tutorials#90.

  • CRadP1Solver::GetWallHeatFlux_Rad returns the Marshak wall flux Theta*(G - 4*sigma*Tw^4) at a point, positive when the wall absorbs heat. CSolver has a virtual that returns zero.
  • Friction_Forces adds it to HeatFlux[iMarker][iVertex] on ISOTHERMAL, HEAT_FLUX and CHT_WALL_INTERFACE walls, using the current incident radiation and the wall temperature that the P1 boundary conditions use. TOTAL_HEATFLUX, MAXIMUM_HEATFLUX, the per-surface values, the surface HEAT_FLUX field and the heat flux objective function therefore all include radiation, with the same treatment as the conductive flux.
  • The incompressible solver passes the radiation solver to the flow solver in CommonPreprocessing.
  • CConfig stops when a radiation model is used without INC_NONDIM= DIMENSIONAL, since the P1 model uses the dimensional Stefan-Boltzmann constant with the solver temperature.

Verification

  • In the P1 tutorial case (an air cavity with a python heat source), the heat into the walls is 15.807 W/m at an absorption coefficient of 1 1/m, against 15.808 W/m without radiation, so the balance closes. Before this change the output gave 14.96 W/m.
  • On p1adjoint with OBJECTIVE_FUNCTION= TOTAL_HEATFLUX and the first FFD variable, the discrete adjoint gives 4619.3 and a finite difference with step 1e-5 gives 4600.
  • discadj_rht (objective DRAG) matches its reference gradients.

Regression tests

  • p1rad: the residuals are unchanged and only the heat flux changes, to -3190.6 in the serial test. The walls in this case are black and held at 461 K and 115 K, so most of the heat crosses by radiation.
  • tutorials.py: adds p1_radiation_python, which runs multiphysics/P1_radiation_python from the Tutorials repository and checks the RMS residuals, including RMS_RAD_ENERGY, and the heat flux at iteration 20.

PR Checklist

  • I am submitting my contribution to the develop branch.
  • My contribution generates no new compiler warnings (try with --warnlevel=3 when using meson).
  • My contribution is commented and consistent with SU2 style (https://su2code.github.io/docs_v7/Style-Guide/).
  • I used the pre-commit hook to prevent dirty commits and used pre-commit run --all to format old commits.
  • I have added a test case that demonstrates my contribution, if necessary.
  • I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp), if necessary.

With RADIATION_MODEL= P1, TOTAL_HEATFLUX and TOTAL_HEATFLUX_ON_SURFACE only held the conductive heat flux, so the energy balance of a case with radiation did not close. CRadP1Solver now integrates the Marshak wall flux Theta*(G - 4*sigma*Tw^4) over the monitored isothermal and heat flux walls, and the incompressible output adds it to both fields. The p1rad reference values change only in the heat flux, and a regression test for the P1 radiation tutorial is added to tutorials.py.
The conditional operator mixed an AD expression with a double, which does not compile in the forward and reverse mode builds.
@pragyaangaur

pragyaangaur commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor Author

The tutorials.py job fails because the new p1_radiation_python test runs the case in multiphysics/P1_radiation_python, and CI checks out the develop branch of the Tutorials repository, where that folder does not exist until su2code/Tutorials#90 is merged. I ran the test locally through TestCase with mpirun -np 2 against that branch and it passes, so it should pass here once #90 is in.

I also updated the parallel p1rad heat flux to the value CI computes (-3199.9). Its residuals were already unchanged.

Comment thread SU2_CFD/src/solvers/CRadP1Solver.cpp Outdated
if (config->GetMarker_All_Monitoring(iMarker) != YES) continue;

const auto KindBC = config->GetMarker_All_KindBC(iMarker);
if (KindBC != BC_TYPE::ISOTHERMAL && KindBC != BC_TYPE::HEAT_FLUX) continue;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Conjugate heat transfer interfaces are skipped here, but BC_ConjugateHeat_Interface also applies BC_Marshak, and the flow solver counts the conductive flux on CHT_WALL_INTERFACE markers. With P1 radiation and a monitored CHT interface, TOTAL_HEATFLUX_ON_SURFACE stays conductive-only there.

Fix: accept BC_TYPE::CHT_WALL_INTERFACE as well, and take Twall from the flow temperature at the node, as BC_Marshak does for that boundary.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done. The radiative flux is now added for ISOTHERMAL, HEAT_FLUX and CHT_WALL_INTERFACE walls, the three wall types where the P1 solver applies the Marshak condition. For heat flux and CHT walls the wall temperature is the flow temperature at the node, as in BC_Marshak, and for isothermal walls it is the one BC_Isothermal_Wall uses. The built-in CHT coupling computes its own interface flux and does not read HeatFlux, so the coupled physics does not change.

Comment thread SU2_CFD/src/solvers/CRadP1Solver.cpp Outdated
const su2double Theta = Wall_Emissivity / (2.0*(2.0 - Wall_Emissivity));
const bool isothermal = (KindBC == BC_TYPE::ISOTHERMAL);
su2double Twall_iso = 0.0;
if (isothermal) Twall_iso = config->GetIsothermal_Temperature(Marker_Tag)/config->GetTemperature_Ref();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The radiative flux ends up in different units from the conductive flux it is added to in SetHeatCoefficients. The flow solver's HeatFlux is made dimensional with RefHeatFlux, but here T is divided by Temperature_Ref while STEFAN_BOLTZMANN is dimensional, and the result is never rescaled. For INC_NONDIM = INITIAL_VALUES or REFERENCE_VALUES, Temperature_Ref = T_freestream and the radiative term is off by Temperature_Ref^4 (and other reference factors), so TOTAL_HEATFLUX is a meaningless sum.

Fix: make the radiative term dimensional (consistent with RefHeatFlux) before it is added to the conductive flux, or reject non-dimensional runs that use radiation in CConfig.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I went with rejecting it. With INC_NONDIM other than DIMENSIONAL, the P1 source term itself already uses the non-dimensional solver temperature with the dimensional Stefan-Boltzmann constant, so the radiation model is inconsistent there and not only its output. CConfig now stops with "RADIATION_MODEL requires INC_NONDIM= DIMENSIONAL." The two P1 test cases and the tutorial are dimensional. In dimensional runs RefHeatFlux is 1, so both parts are in W/m^2.

Comment thread SU2_CFD/src/solvers/CRadP1Solver.cpp Outdated
if (!isothermal) Twall = solver_container[FLOW_SOL]->GetNodes()->GetTemperature(iPoint);
const su2double Ib_w = 4.0*STEFAN_BOLTZMANN*pow(Twall, 4.0);

HF_Local += Theta*(nodes->GetSolution(iPoint, 0) - Ib_w)*Area;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For axisymmetric runs the flow solver multiplies each vertex contribution by AxiFactor = 2*pi*y, but the radiative integral uses the plain area. The sum then mixes a revolved conductive flux with a per-radian radiative flux.

Fix: apply the same factor, e.g.

su2double AxiFactor = 1.0;
if (config->GetAxisymmetric()) AxiFactor = 2.0*PI_NUMBER*geometry->nodes->GetCoord(iPoint, 1);
HF_Local += Theta*(nodes->GetSolution(iPoint, 0) - Ib_w)*Area*AxiFactor;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I checked this, and the flow solver applies AxiFactor only to the forces. The heat integral is HF_Visc_Local += HeatFlux[iMarker][iVertex] * Area without it. The radiative flux is now added to HeatFlux[iMarker][iVertex] itself before that line (see the next reply), so the two parts are integrated the same way in axisymmetric runs. Whether the heat integral should get the factor for both is a separate question that I left alone here.

Comment thread SU2_CFD/src/output/CFlowOutput.cpp Outdated
su2double Total_HF_Rad = 0.0;
if (rad_solver != nullptr) Total_HF_Rad = rad_solver->GetTotal_HeatFlux_Rad();

SetHistoryOutputValue("TOTAL_HEATFLUX", flow_solver->GetTotal_HeatFlux() + Total_HF_Rad);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

With this change TOTAL_HEATFLUX means different things in the history output and in the objective function: Evaluate_ObjFunc still uses Surface_HF_Visc only, and the per-vertex surface HeatFlux field also leaves radiation out. A discrete adjoint or optimization with OBJECTIVE_FUNCTION = TOTAL_HEATFLUX and radiation on would differentiate a conductive-only value that differs from the history file (about -56 vs -3178 in p1rad).

Fix: include the radiative flux in the objective function and surface fields as well, or give the radiative sum its own output name (e.g. TOTAL_HEATFLUX_RAD) and leave TOTAL_HEATFLUX unchanged.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done, by including it everywhere. The radiative flux is now added per vertex to HeatFlux in Friction_Forces, from the current incident radiation, so TOTAL_HEATFLUX, TOTAL_HEATFLUX_ON_SURFACE, the surface HEAT_FLUX field and Evaluate_ObjFunc all see the same value. The changes to the output classes are reverted. I checked the adjoint on p1adjoint with OBJECTIVE_FUNCTION= TOTAL_HEATFLUX and the first FFD variable: the discrete adjoint gives 4619.3 and a finite difference with step 1e-5 gives 4600, within the precision of the printed heat flux. discadj_rht (objective DRAG) still matches its reference gradients.

if (rad_solver != nullptr) Total_HF_Rad = rad_solver->GetTotal_HeatFlux_Rad();

SetHistoryOutputValue("TOTAL_HEATFLUX", flow_solver->GetTotal_HeatFlux() + Total_HF_Rad);
SetHistoryOutputValue("MAXIMUM_HEATFLUX", flow_solver->GetTotal_MaxHeatFlux());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

MAXIMUM_HEATFLUX (and MAXIMUM_HEATFLUX_ON_SURFACE below) stay conductive-only while TOTAL_HEATFLUX next to them now includes radiation. In p1rad most of the heat crosses the wall by radiation, so the maximum describes only a small part of the wall load, and nothing in the output says the two fields cover different physics.

Fix: add the radiative flux to the maximum norm too, or state the difference in the field descriptions.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This now follows from the change above. MAXIMUM_HEATFLUX and MAXIMUM_HEATFLUX_ON_SURFACE are built from the same HeatFlux, so they include radiation as well. I also added to both field descriptions that they include radiation when a RADIATION_MODEL is used.

Comment on lines +42 to +44
* \brief Integrate the radiative heat flux into the monitored walls.
* \note The flux follows from the Marshak condition, Theta*(G - 4*sigma*T_w^4), and is positive
* when the wall absorbs heat, as for the conductive heat flux of the flow solver.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This description could be shorter:

Suggested change
* \brief Integrate the radiative heat flux into the monitored walls.
* \note The flux follows from the Marshak condition, Theta*(G - 4*sigma*T_w^4), and is positive
* when the wall absorbs heat, as for the conductive heat flux of the flow solver.
* \brief Integrate the Marshak radiative heat flux, Theta*(G - 4*sigma*T_w^4), into the monitored walls.
* \note Positive when the wall absorbs heat.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, the function this was on is gone in the rework, but the new GetWallHeatFlux_Rad uses this short description.

The radiative wall flux is now added to HeatFlux in Friction_Forces, so TOTAL_HEATFLUX, MAXIMUM_HEATFLUX, the per-surface values, the surface HEAT_FLUX field and the heat flux objective function all include it, with the same treatment as the conductive flux. It is computed from the current incident radiation on isothermal, heat flux and CHT walls, with the wall temperature that the P1 boundary conditions use. Radiation now requires INC_NONDIM= DIMENSIONAL, since the P1 model uses the dimensional Stefan-Boltzmann constant with the solver temperature.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants