Skip to content

ReynoldsAnalogy CHT model uses incorrect name to look-up fluidThermo

Summary

The ReynoldsAnalogy model uses name to look-up the fluidThermo model.

Steps to reproduce

Define a heatTransferCoeff function with the ReynoldsAnalogy HTC model and use it with a compressible solver without defining the CpInf.

Example:

myCoeff
{
  type            heatTransferCoeff;
  libs            ("libfieldFunctionObjects.so");

  field           T;
  htcModel        ReynoldsAnalogy;
  patches         (my_wall);
  UInf            (1 0 0);

  executeControl  writeTime;
  writeControl    writeTime;
}

What is the current bug behaviour?

An error is displayed:

--> FOAM FATAL ERROR: Unable to set Cp for patch 2

From function virtual Foam::tmp<Foam::Field<double> > Foam::heatTransferCoeffModels::ReynoldsAnalogy::Cp(Foam::label) const
in file heatTransferCoeff/heatTransferCoeffModels/ReynoldsAnalogy/ReynoldsAnalogy.C at line 93.

FOAM exiting

What is the expected correct behavior?

The heatTransferCoeff function should look-up the fluidThermo model and compute the specific heat.

Possible fixes

In the file ReynoldsAnalogy.C at lines 84 and 87 replace fluidThermo::typeName with fluidThermo::dictName.