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  (
21  combustionProperties.lookup<scalar>
22  (
23  "ignitionSphereFraction"
24  )
25  );
26 
27  Ak = sphereFraction*4.0*constant::mathematical::pi
28  *pow
29  (
30  3.0*Vk
31  /(sphereFraction*4.0*constant::mathematical::pi),
32  2.0/3.0
33  );
34  }
35  break;
36 
37  case 2:
38  {
39  // Assume it is part-circular
40  dimensionedScalar thickness
41  (
42  combustionProperties.lookup("ignitionThickness")
43  );
44 
45  scalar circleFraction
46  (
47  combustionProperties.lookup<scalar>
48  (
49  "ignitionCircleFraction"
50  )
51  );
52 
53  Ak = circleFraction*constant::mathematical::pi*thickness
54  *sqrt
55  (
56  4.0*Vk
57  /(
58  circleFraction
59  *thickness
61  )
62  );
63  }
64  break;
65 
66  case 1:
67  // Assume it is plane or two planes
69  (
70  combustionProperties.lookup("ignitionKernelArea")
71  );
72  break;
73  }
74 
75  // Calculate kernel area from b field consistent with the
76  // discretisation of the b equation.
77  const volScalarField mgb
78  (
79  fvc::div(nf, b, "div(phiSt,b)") - b*fvc::div(nf) + dMgb
80  );
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  }
dimensionedScalar StCorr("StCorr", dimless, 1.0)
volScalarField & b
Definition: createFields.H:27
const dimensionedScalar c
Speed of light in a vacuum.
tmp< VolField< Type > > div(const SurfaceField< Type > &ssf)
Definition: fvcDiv.C:47
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Type gSum(const FieldField< Field, Type > &f)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
const dimensionSet dimless
messageStream Info
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensionedScalar sqrt(const dimensionedScalar &ds)
const dimensionSet dimVolume
VolField< scalar > volScalarField
Definition: volFieldsFwd.H:61
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
const dimensionSet dimArea