View Issue Details

IDProjectCategoryView StatusLast Update
0003634OpenFOAMBugpublic2021-02-25 21:47
ReporterfedericoAssigned Tohenry 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformGNU/LinuxOSUbuntuOS Version14.04
Product Version 
Fixed in Version8 
Summary0003634: multiphaseEulerFoam does not reproduce the analytical solution for the Sod Shock tube problem
DescriptionmultiphaseEulerFoam (OpenFOAM 8) is not reproducing the exact solution for the single phase Sod shock tube benchmark. In particular, the temperature field is significantly different (see figure). This issue is not observed in older OpenFOAM versions. TwoPhaseEulerFoam is not presenting this problem and reactingEulerFoam is affected since OpenFOAM 6.

Please find attached the results for the test performed with different OpenFOAM versions ( dashed line representing the exact solution). The “first bad commit” is also reported in the “Additional information” section.

Summary for reactingTwoPhaseEulerFoam:
OF-4 - ok.
OF-5 - convergence issue (easily solved just re-adding fluid.correct() at the beginning of the loop in pEqn.H). Then the solution is ok.
OF-6 - not good (higher temperature)
OF-7 - not good (higher temperature)
OF-8 - multiphasePhaseEulerFoam: not good (higher temperature)
Steps To Reproduce1- Enter Sod shock tube test case for OF8 (multiphaseEulerFoam) or OF<=7 (reactingTwoPhaseEulerFoam). The analytical solution is also included. For OF<=5 change the phase system in constant/phaseProperties dict.

2- ./Allclean; ./Allrun

3- paraview -> load state file -> ParaviewState/vsAnalytical.pvsm (paraview version
5.0-5.6)

4- select “thermo:rho.gas” and click “apply” to check gas density
Additional InformationThis issue/bug is first observed with the following commit (found with “git bisect”):
 
commit e352828514abe029065d8032ec78516c980a7a2d
Date: Thu Mar 22 11:36:43 2018 +0000

    reactingMultiphaseEulerFoam: Stationary phase

            Two new phase models have been added as selectable options for
    reactingMultiphaseEulerFoam; pureStationaryPhaseModel ...
TagsNo tags attached.

Activities

federico

2021-02-24 09:54

reporter  

SodShockTube-Issue.zip (710,467 bytes)

henry

2021-02-24 15:40

manager   ~0011897

Thanks for the detailed bug-report, this should now be fixed in OpenFOAM-dev:

commit a060c63235710dcebdb33fc8601ecab7bf7ba0fb (HEAD -> master, origin/master, origin/HEAD)
Author: Henry Weller <http://cfd.direct>
Date: Wed Feb 24 15:37:28 2021 +0000

    multiphaseEulerFoam: Corrected handling of K for energy equation
    
    Resolves bug-report https://bugs.openfoam.org/view.php?id=3634

henry

2021-02-24 19:03

manager   ~0011898

I have also pushed the fix to OpenFOAM-8: commit 078af2d2d26518a6e5e4a75cb26308959db04e8c

henry

2021-02-25 18:32

manager   ~0011900

I have compiled OpenFOAM-dev with gcc and clang and see no problems.

federico

2021-02-25 21:33

reporter   ~0011901

I confirm that this bug is solved with OpenFOAM-8 updated at

commit: 078af2d2d26518a6e5e4a75cb26308959db04e8c
multiphaseEulerFoam: Corrected handling of K for energy equation

thank you very much for your prompt replay !

Issue History

Date Modified Username Field Change
2021-02-24 09:54 federico New Issue
2021-02-24 09:54 federico File Added: SodShockTube-Issue.zip
2021-02-24 09:54 federico File Added: SodSchock_OF8_multiphase.png
2021-02-24 09:54 federico File Added: SodSchock_OF7_twoPhase.png
2021-02-24 09:54 federico File Added: SodSchock_OF7_reactingTwoPhase.png
2021-02-24 09:54 federico File Added: SodSchock_OF4_reactingTwophase.png
2021-02-24 10:56 henry Description Updated View Revisions
2021-02-24 11:07 henry Priority urgent => normal
2021-02-24 15:40 henry Note Added: 0011897
2021-02-24 19:03 henry Note Added: 0011898
2021-02-25 18:32 henry Note Added: 0011900
2021-02-25 21:33 federico File Added: SodShock_OF8-updated_multiphaseEulerFoam.png
2021-02-25 21:33 federico Note Added: 0011901
2021-02-25 21:47 henry Assigned To => henry
2021-02-25 21:47 henry Status new => resolved
2021-02-25 21:47 henry Resolution open => fixed
2021-02-25 21:47 henry Fixed in Version => 8