View Issue Details

IDProjectCategoryView StatusLast Update
0004252OpenFOAMBugpublic2025-07-11 16:58
Reporterotaolafr Assigned Towill  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionno change required 
PlatformlinuxOSubutnuOS Version24.02
Product Version13 
Summary0004252: crash with unexpected error when using mass transfer and population balance together
DescriptionHello,
I am trying to migrate from my simulation in V12 to the newest V13. I am doing a multiphaseEuler simulation, a bubbleColumn with two phases:
liquid containing H2O
gas containing O2 and N2
and having mass transfer and population balance for the gas bubbles.
with the migration to V13, i moved the massTransfer to fvModels, separated heatTransfer to a file and momentumTransfer to another.
the simulation without population balance runs correctly but when I add it to the simulation I am getting this error:

```
populationBalance bubbles: Iteration 1
--> FOAM FATAL IO ERROR:
Cannot find fieldSource entry for phaseChange

file: unknown

    From function const Foam::GeometricFieldSources<Type, GeoMesh, PrimitiveField>::Source& Foam::GeometricFieldSources<Type, GeoMesh, PrimitiveField>::operator[](const Foam::word&) const [with Type = double; GeoMesh = Foam::volMesh; PrimitiveField = Foam::Field; Source = Foam::fvFieldSource<double>]
    in file /home/ubuntu/OpenFOAM/OpenFOAM-13/src/OpenFOAM/lnInclude/GeometricFieldSources.C at line 251.
```
I am adding the different dictionaries from the case (eventhought i based myself on the tutorials)
Additional Informationwithout the population balance the case does not crash.
TagsNo tags attached.

Relationships

has duplicate 0004256 closedwill Error in multiphaseEuler with massDiffusionLimitedPhaseChange and populationBalance 

Activities

otaolafr

2025-07-08 17:28

reporter  

example.tar.xz (7,100 bytes)

otaolafr

2025-07-11 12:07

reporter   ~0013601

so the issue is coming from not having a source in the f files. I solved by adding a dummy source:
```
sources
{
    phaseChange
    {
        type uniformFixedValue;
        uniformValue 0;
    }
}
```
I might be wrong, but the source term for this files are only important for dissolving or evaporating, but when we want to transfer only species from one another of the phases it is not necessary.

will

2025-07-11 16:54

manager   ~0013614

Last edited: 2025-07-11 16:58

This is by design. The error message isn't terribly helpful at present because it seems to lose which file it refers to as it gets copied from the fDefault field to the numbered f fields. But the principle is correct. You have enabled mass transfer from the liquid to the gas (or vice versa). The gas has an f field, but the liquid doesn't. So, something needs to tell the code what value of f is to be created or destroyed in the gas. It can't work it out automatically, so if the user doesn't specify it is considered an error.

In your case, setting zero isn't a good idea. Your mass transfer will be growing or shrinking the bubbles,
 or it might be nucleating new ones entirely. This source condition specifies which. So, you probably want either `interfacialGrowthSizeGroup` or `nucleationSizeGroup`. There are examples in the tutorials.

Issue History

Date Modified Username Field Change
2025-07-08 17:28 otaolafr New Issue
2025-07-08 17:28 otaolafr File Added: example.tar.xz
2025-07-11 12:07 otaolafr Note Added: 0013601
2025-07-11 16:54 will Assigned To => will
2025-07-11 16:54 will Status new => closed
2025-07-11 16:54 will Resolution open => no change required
2025-07-11 16:54 will Note Added: 0013614
2025-07-11 16:58 will Relationship added has duplicate 0004256
2025-07-11 16:58 will Note Edited: 0013614