View Issue Details

IDProjectCategoryView StatusLast Update
0001531OpenFOAM[All Projects] Bugpublic2015-05-01 16:41
ReporterwillAssigned Tohenry 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSOpenSUSEOS Version13.1
Product Version 
Fixed in Version 
Summary0001531: compressibleInterDyMFoam pressure work error
DescriptionThe pressure work term in compressibleInterDyMFoam seems to generate an error when there is non-rigid body mesh motion. The temperature field reduces unphysically in the less dense phase as cells shrink.

The attached case is air over water with an outlet boundary at the top. The bottom wall moves upwards, pushing air out of the domain, and squashing the mesh cells. The temperature goes down in the air.

The problem is due to the changes made to phi by correctPhi.H. It can be fixed by using (Uf & mesh.Sf()) in the pressure work term, rather than fvc::absolute(phi). I've attached a patch. Unfortunately, this fix seems to cause the compressibleInterDyMFoam sloshingTank2D tutorial to diverge at about 21s.

I don't really know what correctPhi.H does, so I don't know if the problem could be fixed by changing this bit instead.
Steps To ReproduceExtract the case and run the Allrun script, then view the temperature field.
TagsNo tags attached.

Activities

will

2015-02-16 10:08

manager  

column.tar.gz (6,263 bytes)

will

2015-02-16 10:09

manager  

diff.pressureWork (2,099 bytes)

will

2015-02-16 10:09

manager  

t0.png (19,395 bytes)
t0.png (19,395 bytes)

will

2015-02-16 10:09

manager  

t0.5.png (19,437 bytes)
t0.5.png (19,437 bytes)

will

2015-02-16 10:09

manager  

t0.5_patch.png (19,410 bytes)
t0.5_patch.png (19,410 bytes)

henry

2015-02-16 10:30

manager   ~0003795

How recent is the OpenFOAM-2.3.x you are using?

will

2015-02-16 10:34

manager   ~0003796

10th Feb. Commit b9587e0ebc6eeec1e04f1bca4e8c301460905f15.

henry

2015-02-16 14:50

manager   ~0003798

What happens if you run without correctPhi:

PIMPLE
{
    momentumPredictor no;
    nOuterCorrectors 3;
    nCorrectors 1;
    nNonOrthogonalCorrectors 0;
    correctPhi no;
}

Note that correctPhi is a predictor step, it is not exact and not always beneficial. For these kinds of cases you should run with nOuterCorrectors > 1 to ensure all transport is updated following the changes in the fluxes and commpression effect, particularly for morphing meshes.

will

2015-02-16 15:11

manager   ~0003799

Running with "correctPhi no" removes the problem, which I guess isn't a surprise. Without correctPhi, fvc::absolute(phi) and (Uf & mesh.Sf()) should be identical. Running with more outer correctors helps, too.

I guess this isn't a bug then? Conclusion is that correctPhi shouldn't be used without outer correctors.

Thanks for the help.

henry

2015-02-16 15:14

manager   ~0003800

correctPhi may be needed to ensure boundedness of the phase-fraction in the predictor step.

Outer-correctors are generally needed for cases with mesh-motion other than solid-body motion.

henry

2015-02-16 15:31

manager   ~0003801

I have studied the changes to divU in your case and believe there is a better way to correctPhi while preserving the coppressibility effect. I will push the change when I have finished testing.

henry

2015-02-16 16:25

manager   ~0003802

Resolved by commit c1417d4c56fbceb4975120fef9f7e74afef22fa1

Issue History

Date Modified Username Field Change
2015-02-16 10:08 will New Issue
2015-02-16 10:08 will File Added: column.tar.gz
2015-02-16 10:09 will File Added: diff.pressureWork
2015-02-16 10:09 will File Added: t0.png
2015-02-16 10:09 will File Added: t0.5.png
2015-02-16 10:09 will File Added: t0.5_patch.png
2015-02-16 10:30 henry Note Added: 0003795
2015-02-16 10:34 will Note Added: 0003796
2015-02-16 14:50 henry Note Added: 0003798
2015-02-16 15:11 will Note Added: 0003799
2015-02-16 15:14 henry Note Added: 0003800
2015-02-16 15:31 henry Note Added: 0003801
2015-02-16 16:25 henry Note Added: 0003802
2015-02-16 16:25 henry Status new => resolved
2015-02-16 16:25 henry Resolution open => fixed
2015-02-16 16:25 henry Assigned To => henry