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
7  (
8  "Vk",
9  dimVolume,
10  gSum(c*mesh.V().primitiveField())
11  );
12  dimensionedScalar Ak("Ak", dimArea, 0.0);
13 
14  if (Vk.value() > small)
15  {
16  // Calculate kernel area from its volume
17  // and the dimensionality of the case
18 
19  switch(mesh.nGeometricD())
20  {
21  case 3:
22  {
23  // Assume it is part-spherical
24  scalar sphereFraction
25  (
26  combustionProperties.lookup<scalar>
27  (
28  "ignitionSphereFraction"
29  )
30  );
31 
32  Ak = sphereFraction*4.0*constant::mathematical::pi
33  *pow
34  (
35  3.0*Vk
36  /(sphereFraction*4.0*constant::mathematical::pi),
37  2.0/3.0
38  );
39  }
40  break;
41 
42  case 2:
43  {
44  // Assume it is part-circular
45  dimensionedScalar thickness
46  (
47  combustionProperties.lookup("ignitionThickness")
48  );
49 
50  scalar circleFraction
51  (
52  combustionProperties.lookup<scalar>
53  (
54  "ignitionCircleFraction"
55  )
56  );
57 
58  Ak = circleFraction*constant::mathematical::pi*thickness
59  *sqrt
60  (
61  4.0*Vk
62  /(
63  circleFraction
64  *thickness
66  )
67  );
68  }
69  break;
70 
71  case 1:
72  // Assume it is plane or two planes
74  (
75  combustionProperties.lookup("ignitionKernelArea")
76  );
77  break;
78  }
79 
80  // Calculate kernel area from b field consistent with the
81  // discretisation of the b equation.
82  const volScalarField mgb
83  (
84  fvc::div(nf, b, "div(phiSt,b)") - b*fvc::div(nf) + dMgb
85  );
86  dimensionedScalar AkEst = gSum(mgb*mesh.V().primitiveField());
87 
88  StCorr.value() = max(min((Ak/AkEst).value(), 10.0), 1.0);
89 
90  Info<< "StCorr = " << StCorr.value() << endl;
91  }
92  }
dimensionedScalar StCorr("StCorr", dimless, 1.0)
volScalarField & b
Definition: createFields.H:25
const dimensionedScalar c
Speed of light in a vacuum.
tmp< VolField< Type > > div(const SurfaceField< Type > &ssf)
Definition: fvcDiv.C:47
Type gSum(const FieldField< Field, Type > &f)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:257
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:64
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
const dimensionSet dimArea
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.