FreeFOAM The Cross-Platform CFD Toolkit
StCorr.H
Go to the documentation of this file.
1  dimensionedScalar StCorr("StCorr", dimless, 1.0);
2 
3  if (ign.igniting())
4  {
5  // Calculate volume of ignition kernel
6  dimensionedScalar Vk("Vk", dimVolume, gSum(c*mesh.V().field()));
7  dimensionedScalar Ak("Ak", dimArea, 0.0);
8 
9  if (Vk.value() > SMALL)
10  {
11  // Calculate kernel area from its volume
12  // and the dimensionality of the case
13 
14  switch(mesh.nGeometricD())
15  {
16  case 3:
17  {
18  // Assume it is part-spherical
19  scalar sphereFraction
20  (
22  (
24  (
25  "ignitionSphereFraction"
26  )
27  )
28  );
29 
30  Ak = sphereFraction*4.0*mathematicalConstant::pi
31  *pow
32  (
33  3.0*Vk
34  /(sphereFraction*4.0*mathematicalConstant::pi),
35  2.0/3.0
36  );
37  }
38  break;
39 
40  case 2:
41  {
42  // Assume it is part-circular
43  dimensionedScalar thickness
44  (
45  combustionProperties.lookup("ignitionThickness")
46  );
47 
48  scalar circleFraction
49  (
51  (
53  (
54  "ignitionCircleFraction"
55  )
56  )
57  );
58 
59  Ak = circleFraction*mathematicalConstant::pi*thickness
60  *sqrt
61  (
62  4.0*Vk
63  /(circleFraction*thickness*mathematicalConstant::pi)
64  );
65  }
66  break;
67 
68  case 1:
69  // Assume it is plane or two planes
71  (
72  combustionProperties.lookup("ignitionKernelArea")
73  );
74  break;
75  }
76 
77  // Calculate kernel area from b field consistent with the
78  // discretisation of the b equation.
79  volScalarField mgb =
80  fvc::div(nf, b, "div(phiSt,bprog)") - b*fvc::div(nf) + dMgb;
81  dimensionedScalar AkEst = gSum(mgb*mesh.V().field());
82 
83  StCorr.value() = max(min((Ak/AkEst).value(), 10.0), 1.0);
84 
85  Info<< "StCorr = " << StCorr.value() << endl;
86  }
87  }
88 
89 // ************************ vim: set sw=4 sts=4 et: ************************ //