Difference between revisions of "Talk:Tut reactingFoam firstTutorial"

From OpenFOAMWiki
(adaption to OpenFOAM-1.6)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
== adaption to OpenFOAM-1.6 ==
 
== adaption to OpenFOAM-1.6 ==
  
It is possible to use the tutorial in OpenFOAM-1.6 with some minor changes. I will try to make a list soon, starting here:
+
It is possible to use the tutorial in OpenFOAM-1.6 with some minor changes:
  
 
* a "g"-file is needed in the /constant directory, which can be used from the new aachenBomb-tutorial
 
* a "g"-file is needed in the /constant directory, which can be used from the new aachenBomb-tutorial
 +
* file "constant/chemistryProperties"
 +
** <code>chemistrySolver</code> should be <code>ode</code> instead of <code>ODE</code>
 +
** there should be a <code>odeCoeffs</code>-dictionary instead of <code>ODECoeffs</code>
 +
** added the line <code>psyChemistryModel ODEChemistryModel<gasThermoPhysics>;</code> after the header
 +
* file "constant/thermophysicalProperties"
 +
** replace line <code>thermoType hMixtureThermo<reactingMixture>;</code> by <code>thermoType hPsiMixtureThermo<reactingMixture<gasThermoPhysics>>;</code>
 +
** check for correct places of CHEMKINFile and CHEMKINThermoFile, it works with <code>CHEMKINFile "../chemkin/chem.inp";</code> and <code>CHEMKINThermoFile "../chemkin/therm.dat";</code>
 +
* file "0/T"
 +
** in boundary condition "outlet", replace <code>type fixedValue; value uniform 800;</code> with <code>type zeroGradient;</code>
 +
* a "constant/RASProperties"-file could be needed, examples can be found e.g. in the new aachenBomb-tutorial
  
--[[User:Aortwein|Aortwein]] 14:06, 4 December 2009 (UTC)
+
 
 +
--[[User:Aortwein|Aortwein]] 14:01, 12 May 2010 (UTC)
 +
 
 +
Now: adaptation to OpenFOAM-1.7.1 --[[User:Aortwein|Aortwein]] 13:23, 14 December 2010 (CET)
  
 
== older question ==
 
== older question ==
Line 16: Line 29:
 
* a possibility could be to change the oxygen in the lowerInlet (in the the 0/O2 file) from 1.0 to (say) 0.9 or less and the nitrogen in the lowerInlet ( 0/N2) from 0.0 to 0.1 to cool down the reaction
 
* a possibility could be to change the oxygen in the lowerInlet (in the the 0/O2 file) from 1.0 to (say) 0.9 or less and the nitrogen in the lowerInlet ( 0/N2) from 0.0 to 0.1 to cool down the reaction
 
* note: my suggestion is not validated, since I did not have that problem yet, but the problem is also discussed here: [http://www.cfd-online.com/Forums/openfoam-solving/57945-reactingfoam-2.html at cfd-online.com] --[[User:Aortwein|Aortwein]] 15:29, 4 December 2009 (UTC)
 
* note: my suggestion is not validated, since I did not have that problem yet, but the problem is also discussed here: [http://www.cfd-online.com/Forums/openfoam-solving/57945-reactingfoam-2.html at cfd-online.com] --[[User:Aortwein|Aortwein]] 15:29, 4 December 2009 (UTC)
* addition: with another mesh, I got that error after a while, too. After converting the files wia foamToVTK and watching the results until the error, it looked as if a hot spot occured in a region, where it shouldn't (near the exit). That hot spot occured, after the unburnt C7H16 reached the exit. After checking the reaction in the input file, it looks as if oxygen in the inlets should be a lot higher as suggested in the tutorial case (you need 11 oxygen molecules to completely burn one C7H16 molecule), but changing this did not lead to better results. --[[User:Aortwein|Aortwein]] 10:31, 16 December 2009 (UTC)
+
* as far as I can see, the main problem lies in the "T" file in the "0"-Directory. Here, the boundary condition for "outlet" is set to "type fixedValue" with a value of 800. That should be changed to "type zeroGradient", afterwards it should work. If that change is not done, obviously that boundary condition is making problems as soon as a temperature higher than 800 K reaches the outlet. --[[User:Aortwein|Aortwein]] 10:31, 16 December 2009 (UTC)
 +
* One suggestion is to increase upper limit of the temperature in thermo.dat file. I have fixed this problem using this technique.

Latest revision as of 12:23, 14 December 2010

1 adaption to OpenFOAM-1.6

It is possible to use the tutorial in OpenFOAM-1.6 with some minor changes:

  • a "g"-file is needed in the /constant directory, which can be used from the new aachenBomb-tutorial
  • file "constant/chemistryProperties"
    • chemistrySolver should be ode instead of ODE
    • there should be a odeCoeffs-dictionary instead of ODECoeffs
    • added the line psyChemistryModel ODEChemistryModel<gasThermoPhysics>; after the header
  • file "constant/thermophysicalProperties"
    • replace line thermoType hMixtureThermo<reactingMixture>; by thermoType hPsiMixtureThermo<reactingMixture<gasThermoPhysics>>;
    • check for correct places of CHEMKINFile and CHEMKINThermoFile, it works with CHEMKINFile "../chemkin/chem.inp"; and CHEMKINThermoFile "../chemkin/therm.dat";
  • file "0/T"
    • in boundary condition "outlet", replace type fixedValue; value uniform 800; with type zeroGradient;
  • a "constant/RASProperties"-file could be needed, examples can be found e.g. in the new aachenBomb-tutorial


--Aortwein 14:01, 12 May 2010 (UTC)

Now: adaptation to OpenFOAM-1.7.1 --Aortwein 13:23, 14 December 2010 (CET)

2 older question

Thanks for the tutorial, however, I am getting the following error in the third time step, and have not been able to find the problem:

--> FOAM FATAL ERROR : attempt to use janafThermo<equationOfState> out of temperature range 200 -> 5000; T = 5000.92#0

Any suggestions or a fix would be very appreciated. Thanks again. ~E

  • a possibility could be to change the oxygen in the lowerInlet (in the the 0/O2 file) from 1.0 to (say) 0.9 or less and the nitrogen in the lowerInlet ( 0/N2) from 0.0 to 0.1 to cool down the reaction
  • note: my suggestion is not validated, since I did not have that problem yet, but the problem is also discussed here: at cfd-online.com --Aortwein 15:29, 4 December 2009 (UTC)
  • as far as I can see, the main problem lies in the "T" file in the "0"-Directory. Here, the boundary condition for "outlet" is set to "type fixedValue" with a value of 800. That should be changed to "type zeroGradient", afterwards it should work. If that change is not done, obviously that boundary condition is making problems as soon as a temperature higher than 800 K reaches the outlet. --Aortwein 10:31, 16 December 2009 (UTC)
  • One suggestion is to increase upper limit of the temperature in thermo.dat file. I have fixed this problem using this technique.