View Issue Details

IDProjectCategoryView StatusLast Update
0003688OpenFOAMBugpublic2021-06-15 10:16
ReporterrvadrabadeAssigned Tohenry 
Status resolvedResolutionfixed 
PlatformUnixOSUbuntuOS Version18.04
Product Version8 
Fixed in Versiondev 
Summary0003688: Is Foam::multiphaseMixture::surfaceTensionForce() depends on phase order in transportProperties?
DescriptionI am debugging multiphaseInterFoam solver to understand the underlying physics. However, it is observed that the order of phases in constant/transportProperties.phases affects the accurate calculation of surface tension force (Foam::multiphaseMixture::surfaceTensionForce()).
In spite of having contact angle boundary defined for air phase [alpha.air] with original tutorial, the if(isA<alphaContactAngleFvPatchScalarField>(gbf[patchi])) condition in Foam::multiphaseMixture::correctContactAngle() [ multiphaseMixture.C L:414] is always false.
Further, if the air phase defined first in constant/transportProperties.phases then Foam::multiphaseMixture::correctContactAngle() works as expected see attachment damBreak4phaseModifiedCase.
The effect of accurate calculation of surface tension force considering the contact angle might be very small. However, I would like to know if this behavior is as per the design of the multiphaseInterFoam solver and is as expected or there is scope for improvement?
Steps To ReproduceAt first glance, it might be difficult to understand the issue. However, the following steps will be helpful to reproduce the mentioned behavior.
Steps for Original Case:

Download the attached folder
cd damBreak4phaseOriginalCase

Issue the following commands one by one in terminal (Ubuntu or WSL)

1. gdb multiphaseInterFoam
2. b multiphaseMixture.C:417 [say 'y' for prompt as breakpoint pending on future shared library]
3. run

Observe that the breakpoint will not hit even a single time.

Steps for Modified Case:

cd damBreak4phaseModifiedCase

Again, Issue the following commands one by one in terminal (Ubuntu or WSL)

1. gdb multiphaseInterFoam
2. b multiphaseMixture.C:417 [say 'y' for prompt as breakpoint pending on future shared library]
3. run

Observe that the application will surely break at the requested place.


Only change in the damBreak4phaseModifiedCase is the order of phase [with contact angle i.e, air] in constant/transportProperties.phases which might affect the solver.
Hence, I see, as air phase is defined last in constant/transportProperties.phases the contact angle contribution is not well captured in surface tension force (even though it might be small).
TagsNo tags attached.



2021-06-13 17:38

reporter (101,892 bytes) (102,548 bytes)


2021-06-14 10:46

manager   ~0012067

Try this commit in OpenFOAM-dev:

commit de76426d86f076e36332c3554753f7bf5cd377c2 (HEAD -> master, origin/master, origin/HEAD)
Author: Henry Weller <>
Date: Mon Jun 14 10:42:16 2021 +0100

    multiphaseInterFoam: Added test for contact angle in both phases in interface pair
    to ensure that the contact angle specification is used irrespective of which
    phase it is specified in. An error is reported if both phases of the interface
    pair have a contact angle specification as the specifications might be
    Resolves bug-report


2021-06-15 04:38

reporter   ~0012068

Hi Henry,
Fantastic. Thanks for resolution. soon, I will check and share my observations. As such from high level look, the added test is sufficient to ensure contact angle will be used irrespective of phase order. So, if you feel we can mark it as solved.

Also, currently, I see another similar scenario for compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C: Foam::multiphaseMixtureThermo::correctContactAngle. If possible, same resolution can be applied to other similar case, if multiple scenario found.

Thanks for your time and efforts.


2021-06-15 10:16

manager   ~0012069

Resolved by:
commit 7b7fa5a9af93d3a8a733f3cbda72b3daf03cf3ce
commit de76426d86f076e36332c3554753f7bf5cd377c2

Issue History

Date Modified Username Field Change
2021-06-12 04:38 rvadrabade New Issue
2021-06-13 17:38 rvadrabade File Added:
2021-06-13 17:38 rvadrabade File Added:
2021-06-14 10:46 henry Note Added: 0012067
2021-06-15 04:38 rvadrabade Note Added: 0012068
2021-06-15 10:16 henry Assigned To => henry
2021-06-15 10:16 henry Status new => resolved
2021-06-15 10:16 henry Resolution open => fixed
2021-06-15 10:16 henry Fixed in Version => dev
2021-06-15 10:16 henry Note Added: 0012069