Custom Python wrapper marker BC values appropriately nondimensionalized by j-signorelli · Pull Request #2078 · su2code/SU2
A grep -R CustomBoundaryTemperature . and grep -R CustomBoundaryHeatFlux . doesn't seem to show anything done for the incompressible solver, and also doesn't appear to be an option here at least:
| /*--- Get the specified wall heat flux, temperature or heat transfer coefficient from config ---*/ | |
| su2double Wall_HeatFlux = 0.0, Twall = 0.0, Tinfinity = 0.0, Transfer_Coefficient = 0.0; | |
| switch (kind_boundary) { | |
| case HEAT_FLUX: | |
| Wall_HeatFlux = config->GetWall_HeatFlux(Marker_Tag) / config->GetHeat_Flux_Ref(); | |
| if (config->GetIntegrated_HeatFlux()) { | |
| Wall_HeatFlux /= geometry->GetSurfaceArea(config, val_marker); | |
| } | |
| break; | |
| case ISOTHERMAL: | |
| Twall = config->GetIsothermal_Temperature(Marker_Tag) / config->GetTemperature_Ref(); | |
| break; | |
| case HEAT_TRANSFER: | |
| Transfer_Coefficient = config->GetWall_HeatTransfer_Coefficient(Marker_Tag) * config->GetTemperature_Ref() / | |
| config->GetHeat_Flux_Ref(); | |
| Tinfinity = config->GetWall_HeatTransfer_Temperature(Marker_Tag) / config->GetTemperature_Ref(); | |
| break; | |
| default: | |
| SU2_MPI::Error("Unknown type of boundary condition.", CURRENT_FUNCTION); | |
| break; | |
| } |
However, I might have missed a spot here:
| void CMultiGridGeometry::SetMultiGridWallHeatFlux(const CGeometry* fine_grid, unsigned short val_marker) { | |
| struct { | |
| const CGeometry* fine_grid; | |
| unsigned short marker; | |
| su2double* target; | |
| su2double Get(unsigned long iVertex) const { return fine_grid->GetCustomBoundaryHeatFlux(marker, iVertex); } | |
| void Set(unsigned long iVertex, const su2double& val) const { target[iVertex] = val; } | |
| } wall_heat_flux; | |
| wall_heat_flux.fine_grid = fine_grid; | |
| wall_heat_flux.marker = val_marker; | |
| wall_heat_flux.target = CustomBoundaryHeatFlux[val_marker]; | |
| SetMultiGridWallQuantity(fine_grid, val_marker, wall_heat_flux); | |
| } | |
| void CMultiGridGeometry::SetMultiGridWallTemperature(const CGeometry* fine_grid, unsigned short val_marker) { | |
| struct { | |
| const CGeometry* fine_grid; | |
| unsigned short marker; | |
| su2double* target; | |
| su2double Get(unsigned long iVertex) const { return fine_grid->GetCustomBoundaryTemperature(marker, iVertex); } | |
| void Set(unsigned long iVertex, const su2double& val) const { target[iVertex] = val; } | |
| } wall_temperature; | |
| wall_temperature.fine_grid = fine_grid; | |
| wall_temperature.marker = val_marker; | |
| wall_temperature.target = CustomBoundaryTemperature[val_marker]; | |
| SetMultiGridWallQuantity(fine_grid, val_marker, wall_temperature); | |
| } |
but my guess is that it's fine since values from here are re-nondimensionalized from the above commits. Please let me know if not however - I am not familiar with the specifics of multigrid and its implementation.
Note that the commits above presume that values specified in CustomBoundaryTemperature and CustomBoundaryHeatFlux in CGeometry are dimensional, regardless if SU2 is in nondimensional mode. It might make more sense to have these be nondimensional and just ensure that incoming default values from a MARKER_ISOTHERMAL and MARKER_HEATFLUX are nondimensionalized appropriately, but in my opinion it is more straightforward to have users set dimensional temperatures and heat fluxes. However, then it would also make sense to return dimensional heat fluxes and temperatures as well for Python custom walls which I am not sure is currently how it is done.
Apologies for the long explanation, but curious to hear your input on this.
I will look into why one of the regression tests failed and get back to you.