View Issue Details

IDProjectCategoryView StatusLast Update
0002531OpenFOAMBugpublic2017-06-30 12:50
Reporterssss Assigned Tochris  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Summary0002531: interMixingFoam is not using the correct limiters to calculte the limited fluxes of each phase
DescriptionIn the solver interMixingFoam, there seems to be a bug in the calculation of the limited fluxes, as the solver uses the same limiter values for the construction of both phases' fluxes

In the alphaEqns.H file, lines 175-176

alphaPhi1 = alphaPhi1BD + lambda*alphaPhi1
alphaPhi2 = alphaPhi2BD + lambda*alphaPhi2

Where the limiter is calculated with alpha2, alphaPhi2 and alphaPhi2BD:

In the alphaEqns.H file, lines 159-171:

MULES::limiter
(
    allLambda,
    1.0/runTime.deltaT(),value(),
    alpha2,
    alphaPhi2BD,
    alphaPhi2,
    zeroField(),
    zeroField(),
    1,
    0
);

The solution would be to compute each limited flux after computing the limiters for each phase
TagsNo tags attached.

Activities

henry

2017-04-24 14:48

manager   ~0008045

interMixingFoam uses a combined limiter to guarantee phase consistency which is appropriate in this case because only two of the phases are immiscible. Can you provide a patch and an example where your suggested change is needed?

For cases in which several phases are immiscible a full multiphase limiter is needed as used in multiphaseInterFoam.

ssss

2017-04-24 16:01

reporter  

modified.png (33,440 bytes)   
modified.png (33,440 bytes)   

ssss

2017-04-24 16:02

reporter  

original.png (39,156 bytes)   
original.png (39,156 bytes)   

ssss

2017-04-24 16:02

reporter  

alphaEqns.H (5,807 bytes)

ssss

2017-04-24 16:04

reporter   ~0008046

In my testcase I am simulating the impact of a drop of one fluid (shown as white in the contour figures) with a thin layer of another fluid miscible with the drop's fluid (shown as red in the contour figures). The inmiscible fluid is air (shown as blue in the contour figures). When the fluxes are computed using the limiters of the second phase alpha2, there exists diffusion between one of the miscible fluids and air which shouldn't occur (as shown in figure original.png). When modifying the solver to compute the fluxes using:

alphaPhi1 = alphaPhi1BD + lambda1*alphaPhi1
alphaPhi2 = alphaPhi2BD + lambda2*alphaPhi2

Where lambda1 and lambda2 are the limiters of each phase, the diffusion between the inmiscible and the miscible phase disappears (as seen in figure modified.png).

I don't know if this change will reduce the accuracy or stability of the solver in more complex testcases but it seems that in this testcase the original computation of the fluxes produces unphysical results.

I'll attach a proposed modification of the alphaEqns.H file of the interMixingFoam solver which calculates the fluxes using the limiter of each phase.

henry

2017-04-24 16:12

manager   ~0008047

How many test cases have you validated this change on? Do you see any phase consistency and conservation issues from having inconsistent limiters between the phases?

ssss

2017-04-25 12:48

reporter   ~0008048

Our team just started investigating these kind of flows and we don't have quite yet defined a set of testcases that would allow us to analyze phase consistency and mass conservation issues. I just tryed this new implementation in the tutorial interMixingFoam/damBreak (refining its mesh) and it seems that the new way of calculating the fluxes allows to preserve better the interface between the miscible and inmiscible phases. I don't see major mass conservation or phase consistency issues in the new implementation although we haven't performed simulations in complex testcases.

I will let you know in this bug report if we are able of providing a set of testcases that could help you decide which is the correct implementation. Moreover, if you have any suggestions for these testcases we would be willing to perform some validation of the results.

chris

2017-06-30 12:50

manager   ~0008313

No feedback from reporter

Issue History

Date Modified Username Field Change
2017-04-24 14:24 ssss New Issue
2017-04-24 14:48 henry Note Added: 0008045
2017-04-24 16:01 ssss File Added: modified.png
2017-04-24 16:02 ssss File Added: original.png
2017-04-24 16:02 ssss File Added: alphaEqns.H
2017-04-24 16:04 ssss Note Added: 0008046
2017-04-24 16:12 henry Note Added: 0008047
2017-04-25 12:48 ssss Note Added: 0008048
2017-06-30 12:50 chris Assigned To => chris
2017-06-30 12:50 chris Status new => closed
2017-06-30 12:50 chris Resolution open => fixed
2017-06-30 12:50 chris Note Added: 0008313