|Anonymous | Login | Signup for a new account||2014-12-22 09:12 UTC|
|My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0001314||OpenFOAM||[All Projects] Bug||public||2014-06-05 09:51||2014-06-06 09:23|
|Priority||normal||Severity||trivial||Reproducibility||have not tried|
|Target Version||Fixed in Version|
|Summary||0001314: sigsegv in reactingfoam for single species reaction|
|Description||computing reactions involving only two species leads to segmentation fault.|
reactants = products
|Steps To Reproduce||run reactingfoam with the following simple reaction|
reaction "rectants = products";
|Additional Information||In function omega in chemistryModel.C on lines 191 and 234 a loop over some array starts at 1. Apparently the array is shorter for such simple reactions above.|
|Tags||No tags attached.|
|Attached Files|| counterFlowFlame2D.zip [^] (11,246 bytes) 2014-06-05 12:35|
duct.zip [^] (9,968 bytes) 2014-06-05 14:18
The loops seem correct to me. The index is set to zero and then the loop starts from 1. The loop picks the index of smallest concentration involved in the reaction. If the number of reactants/products is one, the loop is never entered, and the zero index is retained by default.
I've modified the counterFlowFlame2D case to use just an "A = B" type reaction, and it runs fine. The segfault may be from somewhere else. Could you please upload a small case which fails?
OK. I've done the same thing as you did. Additionally I remove all other species.
Now I get a sigfpe from the chemistryreader.
Note that if you add N2 back into the species section of the reactions file it'll work.
Your two species are both set to zero. Multi-component thermo normalises the fractions by dividing by the total fraction. In this case, that results in a divide by zero error.
The error is a floating point error (sigFpe) and not a segfault (sigSegv).
Is this the same error as your original case? If so, there doesn't appear to be a bug here.
First of all thank you for the immediate response.
OK. I set up another test case. as simple as possible.
It runs fine with just 2 species. Please ignore any warnings from janaf thermo.
However, I get sigfpe from the chemistryReader if I use constant transport and thermo packages.
|By the way, the very same case runs fine with OF-2.1.x|
There was a bug. Reaction.C creates a thermo for RHS minus LHS of the reaction, so it can calculate changes in enthalpy/free energy/etc... It was also creating a transport model, which it doesn't need. The mixing rules for the transport models can divide by zero if the left and right hand sides are identical, as is the case with your "A = B" reaction.
Commit 645a94ec380c54329c3510083532acd73bee2381 fixes this. The reaction class now only creates the thermo, and not the transport. Thanks for the report.
|2014-06-05 09:51||sebastianb||New Issue|
|2014-06-05 11:01||will||Note Added: 0003102|
|2014-06-05 12:35||sebastianb||File Added: counterFlowFlame2D.zip|
|2014-06-05 12:37||sebastianb||Note Added: 0003104|
|2014-06-05 13:40||will||Note Added: 0003105|
|2014-06-05 14:18||sebastianb||File Added: duct.zip|
|2014-06-05 14:23||sebastianb||Note Added: 0003106|
|2014-06-05 14:34||sebastianb||Note Added: 0003107|
|2014-06-06 09:23||will||Note Added: 0003109|
|2014-06-06 09:23||will||Status||new => resolved|
|2014-06-06 09:23||will||Resolution||open => fixed|
|2014-06-06 09:23||will||Assigned To||=> will|