Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • openfoam openfoam
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 415
    • Issues 415
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 7
    • Merge requests 7
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • openfoamopenfoam
  • Issues
  • #946
Closed
Open
Issue created Jul 20, 2018 by Admin@OpenFOAM-adminMaintainer

turbulentHeatFluxTemperature doesn't work with buoyantBoussinesqPimpleFoam

Hi,

I am using OF 1612 on Centos 7, it was installed by following the tutorial on OFWiki.

I am currently modifying the hotRoom tutorial case under solver buoyantBoussinesqPimpleFoam to specify a constant heat flux at the floor. The modified BC for T is as below:

boundaryField
{
    floor
    /*{
        type            fixedValue;
        value           uniform 300; // Original
    }*/
    {
        type            compressible::turbulentHeatFluxTemperature; 
        heatSource      flux;
        q               uniform 10e5;
        value           uniform 293.15;
        kappaMethod     fluidThermo;
        kappa           none;
        Qr              none;
    }
    ceiling
    {
        type            fixedValue;
        value           uniform 300;
    }
    fixedWalls
    {
        type            zeroGradient;
    }
}

I think I followed the example set in the source code of compressible::turbulentHeatFluxTemperature. But when I run the simulation, it shows following error message:

Starting time loop

Courant Number mean: 0 max: 0
Time = 2

PIMPLE: iteration 1


--> FOAM FATAL ERROR:
Kappa defined to employ fluidThermo method, but thermo package not available

    From function Foam::tmp<Foam::Field<double> > Foam::temperatureCoupledBase::kappa(const scalarField&) const
    in file turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C at line 142.

FOAM exiting

I checked the source code of temperatureCoupledBase.C, the relevant source code associated with this error message is:

case mtFluidThermo:
        {
            typedef compressible::turbulenceModel turbulenceModel;

            word turbName(turbulenceModel::propertiesName);

            if
            (
                mesh.foundObject<turbulenceModel>(turbName)
            )
            {
                const turbulenceModel& turbModel =
                    mesh.lookupObject<turbulenceModel>(turbName);

                return turbModel.kappaEff(patchi);
            }
            else if (mesh.foundObject<fluidThermo>(basicThermo::dictName))
            {
                const fluidThermo& thermo =
                    mesh.lookupObject<fluidThermo>(basicThermo::dictName);

                return thermo.kappa(patchi);
            }
            else if (mesh.foundObject<basicThermo>(basicThermo::dictName))
            {
                const basicThermo& thermo =
                    mesh.lookupObject<basicThermo>(basicThermo::dictName);

                return thermo.kappa(patchi);
            }
            else
            {
                FatalErrorInFunction
                    << "Kappa defined to employ " << KMethodTypeNames_[method_]
                    << " method, but thermo package not available"
                    << exit(FatalError);
            }

            break;
        }

The lines of code after the first if statement suggests that the this BC will look into the turbulenceProperties dictionary at the constant directory. Then select the turbulence model specified in turbulenceProperties, then evaluate the kappa = kappaEff. So I suppose it will evaluate the kappa automatically rather than jumping to the final error message under the else statement. Please correct me if I understand it wrong.

Therefore, please can you double check it?

Kind regards, Yeru

Assignee
Assign to
Time tracking