View Issue Details

IDProjectCategoryView StatusLast Update
0001843OpenFOAMBugpublic2015-09-02 15:36
ReporterDanielJ Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityN/A
Status resolvedResolutionfixed 
PlatformGNU/LinuxOSUbuntuOS Version14.10
Summary0001843: Chemkin Reader element balance fails because of round-off error
DescriptionFor complex reactions Chemkin Reader shows an element imbalance for a balanced reaction (I added value of the imbalance to show that it is a round-off error):

"
--> FOAM FATAL ERROR:
Elemental imbalance of 1.110223e-15 in C in reaction
"VOLATILES = 9.1H2^1 + 7.2CH4^1 + 13.6CO^1 + 1.2CO2^1";

 on line 22

    From function chemkinReader::addReaction
    in file chemistryReaders/chemkinReader/chemkinReader.C at line 758.
"

To correct this error the imbalance should probably be checked against sqrt(SMALL).

In my opinion a even better solution would be an additional, optional, input for Chemkin reader: 'imbalanceTolerance' to allow for definition of custom reactions with some imbalances.
TagsNo tags attached.

Activities

henry

2015-09-02 11:59

manager   ~0005312

> To correct this error the imbalance should probably be checked against sqrt(SMALL).

Have you tested this?

> In my opinion a even better solution would be an additional, optional, input for Chemkin reader: 'imbalanceTolerance' to allow for definition of custom reactions with some imbalances.

Can you provide a patch?

DanielJ

2015-09-02 12:34

reporter   ~0005314

The simple option works, but this is a solution for my particular case.

I will prepare a patch with the proposal.

DanielJ

2015-09-02 13:12

reporter  

DanielJ

2015-09-02 13:12

reporter  

solid-temperature-report.patch (1,696 bytes)   

DanielJ

2015-09-02 13:14

reporter   ~0005315

I uploaded the patch, it was tested and works fine.

Additionally I uploaded small patch with corrected solid temperature report in CHT solvers.

henry

2015-09-02 13:17

manager   ~0005316

Thanks for the patches. Could you also provide the complete files as I need to merge the changes into 2.4.x and dev and the patches are unlikely to apply correctly.

DanielJ

2015-09-02 13:26

reporter  

chemkinReader.zip (7,357 bytes)

DanielJ

2015-09-02 13:28

reporter  

chtMultiRegionFoam.zip (1,515 bytes)

DanielJ

2015-09-02 13:29

reporter   ~0005317

Here you are :)

henry

2015-09-02 15:36

manager   ~0005318

Resolved in OpenFOAM-2.4.x: commit 51457432eeff0028f5c97ef1fc87b87760bdb1b4
Resolved in OpenFOAM-dev: commit f00623d40a5eef1cee97314f297647774c504a8e

Issue History

Date Modified Username Field Change
2015-09-02 11:57 DanielJ New Issue
2015-09-02 11:59 henry Note Added: 0005312
2015-09-02 12:34 DanielJ Note Added: 0005314
2015-09-02 13:12 DanielJ File Added: chemkinReader-imbalance-tolerance.patch
2015-09-02 13:12 DanielJ File Added: solid-temperature-report.patch
2015-09-02 13:14 DanielJ Note Added: 0005315
2015-09-02 13:17 henry Note Added: 0005316
2015-09-02 13:26 DanielJ File Added: chemkinReader.zip
2015-09-02 13:28 DanielJ File Added: chtMultiRegionFoam.zip
2015-09-02 13:29 DanielJ Note Added: 0005317
2015-09-02 15:36 henry Note Added: 0005318
2015-09-02 15:36 henry Status new => resolved
2015-09-02 15:36 henry Resolution open => fixed
2015-09-02 15:36 henry Assigned To => henry