|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0002881||OpenFOAM||[All Projects] Bug||public||2018-03-15 08:23||2018-04-26 05:43|
|Target Version||Fixed in Version||dev|
|Summary||0002881: wideBandAbsorptionEmission coefficient bug and inconsistency with|
|Description||wideBandAbsorptionEmission::aCont attempts to use the coefficients list with inverted ordering (i.e. coeffs_[species][band] instead of coeffs_[band][species]) which results in incorrect coefficients being used and segmentation faults. I'm guessing that no-one else is currently using this model?!|
Additionally, the behaviour of wideBandAbsorptionEmission is inconsistent with greyMeanAbsorptionEmission in reading the look-up tables and using mole-fractions versus mass-fractions for solved-for species.
I've attached a patch (for 5.x) that I believe corrects the bug and makes the behaviour consistent.
|Steps To Reproduce||Run any case with wideBandAbsorpionEmission model. E.g. modify fireFoam oppositeBurningPanels tutorial case to use this model.|
|Tags||No tags attached.|
|Do you have a test case which demonstrates the need for this change?|
Using the attached radiationProperties as a replacement within the oppositeBurningPanels tutorial case provides a demonstration of the issues. It should simply replicate the results from using the greyMeanAbsorptionEmission model since it simply contains two bands with identical properties.
Attempting to run this case will exit with an error message that a string is expected under the entry lookupTableFileName, i.e. that 'none' is not accepted, unlike the greyMeanAbsorptionEmission model.
Specifying the attached "wideBandTable" dummy lookup table file allows the solver to run further, but it then halts when looking for the mixture fraction "ft" field, which isn't defined for the present combustion model (and indeed shouldn't be required since all of the required fields are being explicitly solved for).
Hacking the solver to manually add a dummy "ft" field again allows the solver to continue. However, it then generates a slew of warning messages of the form:
usinf absCoeffs out of temperature range:
0.0532686334933 -> 0.0326473267652; T = 298.15
Closer look at the code shows that this is because it is trying to use unitialised coefficients due to the described interchanged indices in accessing coeffs_ within wideBandAbsorptionEmission::aCont()
Correcting these interchanged indices allows the solver to run to completion. However, comparison of the results with those obtained using the greyMeanAbsorptionEmissionModel in the same radiationProperties shows differences. This is due to the wideBand model using the mass fraction of the species as the pre-multiplier for the absorption coefficients, while the greyMean (more sensibly) uses the partial pressure.
|Does your patch resolve all of the above issues or will some of the changes listed need to be made to reproduce your findings? If so should any further changes be committed to OpenFOAM-dev?|
|I believe the patch resolves all of the above issues. Much of the code has just been transferred from the greyMeanAbsorptionEmission class.|
Thanks for the patches and test-case. I have updated the code for consistency with the OpenFOAM style: https://openfoam.org/dev/coding-style-guide/
and committed it to OpenFOAM-dev: c677ba11856b116677253ff0575e2c0e17973233
Could you check these updates?
For future patches it would be useful if you could ensure they conform to the OpenFOAM style, in particular avoid tabs as they are difficult to remove reliably without upsetting the indentation requiring time consuming editing by hand.
|The commit seems to do the trick for OpenFOAM-dev, thanks. Sorry I forgot to "untabify" the updates before creating the patches!|
|2018-03-15 08:23||kevnor||New Issue|
|2018-03-15 08:23||kevnor||File Added: wideBandAbsorptionEmission.patch|
|2018-03-15 16:24||henry||Note Added: 0009427|
|2018-03-16 21:20||kevnor||File Added: radiationProperties|
|2018-03-16 21:20||kevnor||Note Added: 0009429|
|2018-03-16 21:21||kevnor||File Added: wideBandTable|
|2018-03-16 21:55||henry||Note Added: 0009430|
|2018-03-17 18:17||kevnor||Note Added: 0009431|
|2018-03-21 18:11||henry||Note Added: 0009436|
|2018-03-27 19:42||kevnor||Note Added: 0009452|
|2018-03-27 21:11||henry||Assigned To||=> henry|
|2018-03-27 21:11||henry||Status||new => resolved|
|2018-03-27 21:11||henry||Resolution||open => fixed|
|2018-03-27 21:11||henry||Fixed in Version||=> dev|