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  }
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
dimensionedScalar StCorr("StCorr", dimless, 1.0)
const dimensionedScalar & c
Speed of light in a vacuum.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
const dimensionSet dimVolume(pow3(dimLength))
Definition: dimensionSets.H:58
dynamicFvMesh & mesh
Type gSum(const FieldField< Field, Type > &f)
const dimensionedScalar & b
Wien displacement law constant: default SI units: [m K].
Definition: createFields.H:27
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:47
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
messageStream Info
const dimensionSet dimArea(sqr(dimLength))
Definition: dimensionSets.H:57