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, Zero);
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.get<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 "ignitionThickness", dimLength, combustionProperties
43 );
44
45 scalar circleFraction
46 (
47 combustionProperties.get<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
60 *constant::mathematical::pi
61 )
62 );
63 }
64 break;
65
66 case 1:
67 // Assume it is plane or two planes
68 Ak = dimensionedScalar
69 (
70 "ignitionKernelArea", dimArea, combustionProperties
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)
Y[inertIndex] max(0.0)
dynamicFvMesh & mesh
volScalarField & b
Definition: createFields.H:27