Skip to content

Fix swapped arguments in the compressible CHT wall temperature - #3003

Open
Syphonicc wants to merge 1 commit into
su2code:developfrom
Syphonicc:fix-cht-wall-temperature-args
Open

Syphonicc wants to merge 1 commit into
su2code:developfrom
Syphonicc:fix-cht-wall-temperature-args

Conversation

@Syphonicc

Copy link
Copy Markdown
Contributor

Proposed Changes

CNSSolver::BC_Isothermal_Wall_Generic calls GetCHTWallTemperature with dist_ij and thermal_conductivity swapped:

// declaration: (config, val_marker, iVertex, thermal_conductivity, dist_ij, There, Temperature_Ref)
Twall = GetCHTWallTemperature(config, val_marker, iVertex, dist_ij,
                              thermal_conductivity, There, Temperature_Ref);

Inside the function the fluid-side weight becomes HF_FactorHere = dist_ij * Viscosity_Ref / k instead of k * Viscosity_Ref / dist_ij, so the interface temperature computed by the AVERAGED_TEMPERATURE_NEUMANN_HEATFLUX and AVERAGED_TEMPERATURE_ROBIN_HEATFLUX couplings uses a wrong weighting between the fluid and solid sides. The incompressible solver (CIncNSSolver::BC_Wall_Generic) computes the same factor inline with the correct order. This PR swaps the two arguments back.

The DIRECT_* couplings (the default) do not use these arguments, so existing regression tests are unaffected.

Related Work

None.

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.

Testing

  • cht_compressible (coupled_cht/comp_2d, default DIRECT_TEMPERATURE_ROBIN_HEATFLUX): bit-identical to the reference values.
  • Same case with CHT_COUPLING_METHOD= AVERAGED_TEMPERATURE_NEUMANN_HEATFLUX, 2000 outer iterations, 4 ranks: the solution changes as expected (fluid-zone integrated heat flux -34.689 -> -34.683 W). The difference is small on this mesh because the near-wall cell temperature is close to the wall temperature, but it is mesh dependent.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant