Solver Validation chemFoam using analytical Solution
the last days I investigated the chemistry functionalities of OpenFoam 2.0.x and I created a simple test case for chemFoam, computed the analytical solution and compared to another chemistry solver (A-Cell, also open).
To understand chemFoam, I implemented the reaction
the Molecular Masses to be
A-Cell and the analytical solution coincide perfectly. The Solution given by chemFoam reaches the steady state way too fast (Figure 1).
I computed results using the native foam chemistry reader using
I figuered: If I reduce k by a factor of 7:
Why do I have to reduce the rate constant k by this strange factor around 7 to achieve meaningful results? Please have a look on the figures I append.
Any ideas or comments are appreciated.
Also, I append my case, with an Allrun-script. Please have a look, it should run fully automatic and one can play easily with the value k in chemkin/chem.inp or constant/reactions
Fig 1: regular converted k
Fig 2: k / 7
Sorry for pushing this up, but I still have no new clues on my problem :(
Any suggestions how I can explain my problem better or any ideas are welcome :o
This sounds a lot like a unit conversion issue. I guess you've already done this, but just to be sure: have you checked that all units are consistent?
thank you very much for your answer.
I rechecked the Units but still I think they are correct ... :(
However, I would like to give an update on my problem:
I looked inside ODEChemistrySolver.C and I saw that the concentration Ci are calculated using the following:
I was a little bit confused how the density rhoi comes into play and I figured its and inherited property of the class
basicPsiThermo. Then rho is given by
Actually, in the program A-Cell and in the analytical solution there is no density defined.
c[i] just comes from the user and is given in [mole/m^3] but in OpenFoam density plays a major role.
The final value of rho in my simulation is 0.0075 kg/m^3 which is 7.5 g/m^3 and, voilą, I found a factor similar to the value of 7 I mentioned in my first post.
So I adapted ODEChemistryModel.C defining
solution because it is not physical (units make no sense), and there is still a
difference to analytical solution :confused:
figure 3: k divided by density given in [g/m^3]
maybe I should somehow use the density given by openFoam to convert the results given by analytical solution and A-Cell?
|All times are GMT -4. The time now is 05:30.|