View Issue Details

IDProjectCategoryView StatusLast Update
0002450OpenFOAMBugpublic2017-05-17 08:25
ReporterRichardM Assigned Tohenry  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionno change required 
PlatformGNU/LinuxOSUbuntuOS Version14.04
Product Versiondev 
Fixed in Versiondev 
Summary0002450: kOmegaSSTSato turbulence model doesn't call own correctNut() function
DescriptionIn the kOmegaSSTSato turbulence model (in reactingTwoPhaseEulerFoam solver), the function kOmegaSSTSato<BasicTurbulenceModel>::correctNut(), which contains the BIT formulation of the model, never is called, so this turbulence model does not behave in the expected way.

The reason seems to be, that in kOmegaSSTBase.C (which kOmegaSSTSato inherits from) correctNut() is called directly as a member function of the object BasicTurbulenceModel.
(L.124 BasicTurbulenceModel::correctNut();)

A work around already seems to be implemented by means of defining kOmegaSSTSato<BasicTurbulenceModel>::correct()
, calling
kOmegaSST<BasicTurbulenceModel>::correct();
but the call of correctNut() is missing.

Therefore the following call is proposed inside kOmegaSSTSato<BasicTurbulenceModel>::correct()
{
    ...
    this->correctNut();
}

(in kOmegaSSTSato.C, directly after Line 164)
Steps To ReproduceGive Info output from inside function kOmegaSSTSato<BasicTurbulenceModel>::correctNut() - this message never appears in the output stream.
Additional InformationTested with dev-version from 30th January, 2017.
Tagsturbulence models

Activities

Juho

2017-02-03 09:05

reporter   ~0007700

I can confirm the bug and the proposed fix.

henry

2017-02-03 09:31

manager   ~0007701

The proposed fix would solve the issue but is not ideal because correctNut(S2, F23) is still called the results of which are overridden by the call to this->correctNut(). A better and more general solution would be to make correctNut(S2, F23) virtual which I will work on.

Juho

2017-02-03 09:43

reporter   ~0007702

Yes, I just came to the same conclusion.

henry

2017-02-03 11:41

manager   ~0007705

Try

commit c1031e9678162742f370d8ddd29849cea196e588
Author: Henry Weller <http://cfd.direct>
Date: Fri Feb 3 10:52:35 2017 +0000

    kOmegaSSTBase: make correctNut(S2, F2) virtual
    kOmegaSSTSato: Change correctNut() to correctNut(S2, F2)
    
    Resolves bug-report https://bugs.openfoam.org/view.php?id=2450

and let me know if it resolves the problem.

RichardM

2017-02-03 14:44

reporter   ~0007706

I confirm that this problem is resolved.

henry

2017-02-03 15:20

manager   ~0007707

Resolved by c1031e9678162742f370d8ddd29849cea196e588

RichardM

2017-05-11 12:32

reporter   ~0008144

Could you include the fix in the 4.x bugfix version, please?

henry

2017-05-15 14:39

manager   ~0008147

The kOmegaSST model is significantly updated in OpenFOAM-dev and it is not trivial to back-port any or all of these changes to OpenFOAM-4.x.

If you would like to undertake this work yourself and provide a patch for OpenFOAM-4.x I would be happy to apply it, alternatively I would recommend that you use OpenFOAM-dev.

henry

2017-05-17 08:25

manager   ~0008156

Please reopen this report if you would like to provide a patch to OpenFOAM-4.x which adds this OpenFOAM-dev functionality.

Issue History

Date Modified Username Field Change
2017-02-03 07:58 RichardM New Issue
2017-02-03 07:58 RichardM Tag Attached: turbulence models
2017-02-03 09:05 Juho Note Added: 0007700
2017-02-03 09:31 henry Note Added: 0007701
2017-02-03 09:43 Juho Note Added: 0007702
2017-02-03 11:41 henry Note Added: 0007705
2017-02-03 14:44 RichardM Note Added: 0007706
2017-02-03 15:20 henry Assigned To => henry
2017-02-03 15:20 henry Status new => resolved
2017-02-03 15:20 henry Resolution open => fixed
2017-02-03 15:20 henry Fixed in Version => dev
2017-02-03 15:20 henry Note Added: 0007707
2017-05-11 12:32 RichardM Status resolved => feedback
2017-05-11 12:32 RichardM Resolution fixed => reopened
2017-05-11 12:32 RichardM Note Added: 0008144
2017-05-15 14:39 henry Note Added: 0008147
2017-05-17 08:25 henry Status feedback => closed
2017-05-17 08:25 henry Resolution reopened => no change required
2017-05-17 08:25 henry Note Added: 0008156