View Issue Details

IDProjectCategoryView StatusLast Update
0004201OpenFOAMBugpublic2025-01-15 13:56
Reporterjcallaham Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
Product Versiondev 
Summary0004201: viscousHeating fails with VoF
DescriptionBuild: dev-78c0718aeca6

When used with VoF, the viscousHeating model attempts to open a phase-specific momentumTransport dictionary:

```
void Foam::fv::viscousHeating::addSup
(
    const volScalarField& alpha,
    const volScalarField& rho,
    const volScalarField& he,
    fvMatrix<scalar>& eqn
) const
{
    const compressible::momentumTransportModel& momentumTransport =
        mesh().lookupType<compressible::momentumTransportModel>(phaseName_);

    volVectorField& U = const_cast<volVectorField&>(momentumTransport.U());

    mesh().schemes().setFluxRequired(U.name());

    eqn -= fvc::div
    (
        fvc::dotInterpolate(momentumTransport.divDevTau(U)->flux(), U)
    );
}
```

So it might look for a file named momentumTransport.water, for instance
Steps To ReproduceAdd the viscousHeating model to tutorials/compressibleVoF/damBreak:

constant/fvModels
```
/*--------------------------------*- C++ -*----------------------------------*\
  ========= |
  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
   \\ / O peration | Website: https://openfoam.org
    \\ / A nd | Version: dev
     \\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
    format ascii;
    class dictionary;
    location "constant";
    object fvModels;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

turbulenceDamping
{
    type compressible::VoFTurbulenceDamping;

    delta 1e-4;
}


viscousHeating
{
    type viscousHeating;
    phase water;
}

//************************************************************************* //
```
Additional InformationThis appears to be resolved by removing the phaseName_ argument to the momentumTransport lookup:

```
    const compressible::momentumTransportModel& momentumTransport =
        mesh().lookupType<compressible::momentumTransportModel>();
```

If I'm misunderstanding and there is supposed to be an independent momentumTransport file for each phase, could you point me to any documentation or examples that show how to properly configure this?

TagsNo tags attached.

Activities

henry

2025-01-15 13:56

manager   ~0013505

The viscousHeating fvModel does not support phase energy transport with mixture momentum transport, you will need to use phase momentum transport or a new version of viscousHeating which maps the information from the mixture momentum to the phase energy equations.

Issue History

Date Modified Username Field Change
2025-01-15 13:02 jcallaham New Issue
2025-01-15 13:56 henry Assigned To => henry
2025-01-15 13:56 henry Status new => closed
2025-01-15 13:56 henry Resolution open => no change required
2025-01-15 13:56 henry Note Added: 0013505