View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001314 | OpenFOAM | Bug | public | 2014-06-05 10:51 | 2014-06-06 10:23 |
Reporter | Assigned To | will | |||
Priority | normal | Severity | trivial | Reproducibility | have not tried |
Status | resolved | Resolution | fixed | ||
Platform | x86_64 | OS | opensuse | OS Version | 12.1 |
Summary | 0001314: sigsegv in reactingfoam for single species reaction | ||||
Description | computing reactions involving only two species leads to segmentation fault. e.g. reaction reactants = products | ||||
Steps To Reproduce | run reactingfoam with the following simple reaction reaction { type irreversibleArrheniusReaction; reaction "rectants = products"; A 1.04e5; beta 1; Ta 10800; } | ||||
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. | ||||
|
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? |
2014-06-05 13:35
|
|
|
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. |
2014-06-05 15:18
|
|
|
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. |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-06-05 10:51 |
|
New Issue | |
2014-06-05 12:01 | will | Note Added: 0003102 | |
2014-06-05 13:35 |
|
File Added: counterFlowFlame2D.zip | |
2014-06-05 13:37 |
|
Note Added: 0003104 | |
2014-06-05 14:40 | will | Note Added: 0003105 | |
2014-06-05 15:18 |
|
File Added: duct.zip | |
2014-06-05 15:23 |
|
Note Added: 0003106 | |
2014-06-05 15:34 |
|
Note Added: 0003107 | |
2014-06-06 10:23 | will | Note Added: 0003109 | |
2014-06-06 10:23 | will | Status | new => resolved |
2014-06-06 10:23 | will | Resolution | open => fixed |
2014-06-06 10:23 | will | Assigned To | => will |