View Issue Details

IDProjectCategoryView StatusLast Update
0004172OpenFOAMFeaturepublic2024-11-07 16:20
ReporterLuca Cornolti Assigned Towill  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version12 
Fixed in Versiondev 
Summary0004172: Definition of mass flux in semiPermeableBaffleMassFractionFvPatchScalarField.C
DescriptionIn the Foam::semiPermeableBaffleMassFractionFvPatchScalarField boundary condition, which models the mass diffusion through a semi permeable membrane, the flux is computed as a series of 3 resistances: the diffusion resistance of the cells on the two sides of the patch and the convective term provided by the user.

        patch().magSf()
       /(1/c_ + k/alphaEffDeltap + nbrK/nbrAlphaEffDeltap)
       *(k*Yc - nbrK*nbrYc);

Currently, alphaEffDeltap and nbrAlphaEffDeltap are defined from the thermal diffusivity "kappaEff/thermo().Cp()".
This implementation is ok if the Lewis number is one, but in general is potentially not consistent with the diffusion term in the species transport equation thermophysicalTransport->divj(Yi).
Probably, "kappaEff/thermo().Cp()" should be replaced with DEff to avoid this inconsistency.
TagsNo tags attached.

Activities

will

2024-11-07 16:20

manager   ~0013456

Last edited: 2024-11-07 16:20

These boundary conditions predate DEff and solvers with anything other than a hard-coded unity Lewis assumption. So, perhaps this deficiency is not surprising.

> Probably, "kappaEff/thermo().Cp()" should be replaced with DEff to avoid this inconsistency.

Whilst this is true, the substantially more complex aspect of this is the corresponding source terms applied to the energy equation. These prevent temperature anomalies being created as a result of the differential species transport.

Whilst this was a few hours work, this code needed updating so I'm content with calling this maintenance. The only other options were to remove the conditions or start peppering them with "This only works for unity Lewis" errors. Fixed in dev here:

https://github.com/OpenFOAM/OpenFOAM-dev/commit/4d52188c942fc28fada37b5cfe1544bd752bff64

Issue History

Date Modified Username Field Change
2024-11-06 16:41 Luca Cornolti New Issue
2024-11-07 16:20 will Assigned To => will
2024-11-07 16:20 will Status new => resolved
2024-11-07 16:20 will Resolution open => fixed
2024-11-07 16:20 will Fixed in Version => dev
2024-11-07 16:20 will Note Added: 0013456
2024-11-07 16:20 will Note Edited: 0013456