MoDeNa  1.0
Software framework facilitating sequential multi-scale modelling
KineticsFields.H
Go to the documentation of this file.
1 
16 IOdictionary kineticsProperties
18 (
19  IOobject
20  (
21  "kineticsProperties",
22  runTime.constant(),
23  mesh,
24  IOobject::MUST_READ,
25  IOobject::NO_WRITE
26  )
27 );
28 
29 word KineticsModel(kineticsProperties.lookup("KineticsModel"));
30 
31 if
32 (
33  !(KineticsModel == "generic"
34  || KineticsModel == "RF-1" )
35 )
36  {
37  FatalErrorIn(args.executable())
38  << "Invalid kinetics model " << KineticsModel
39  << "\nValid kinetics models are: "
40  << "\ngeneric,"
41  << "\nRF-1,"
42  << exit(FatalError);
43  }
44 scalar AOH, EOH, COH_0, CNCO_0, CW_0, AW, EW;
45 AOH=EOH=COH_0=CNCO_0=CW_0=AW=EW=0.0;
46 
47 if (KineticsModel == "generic")
48 {
49  AOH =
50  readScalar(kineticsProperties.subDict("GellingConstants").lookup("A_OH"));
51  EOH =
52  readScalar(kineticsProperties.subDict("GellingConstants").lookup("E_OH"));
53 
54  COH_0 =
55  readScalar
56  (
57  kineticsProperties.subDict("GellingConstants").lookup("initCOH")
58  );
59  CNCO_0 =
60  readScalar
61  (
62  kineticsProperties.subDict("GellingConstants").lookup("initCNCO")
63  );
64  CW_0 =
65  readScalar
66  (
67  kineticsProperties.subDict("GellingConstants").lookup("initCW")
68  );
69  AW =
70  readScalar(kineticsProperties.subDict("BlowingConstants").lookup("A_W"));
71  EW =
72  readScalar(kineticsProperties.subDict("BlowingConstants").lookup("E_W"));
73  if (EOH < 0.0 || COH_0 < 0.0 || CNCO_0 < 0.0 || CW_0 < 0.0 )
74  {
75  FatalErrorIn(args.executable())
76  << "Invalid value for gelling constants!"
77  "\nGelling constats cannot be negative."
78  << exit(FatalError);
79  }
80  if (EW < 0.0)
81  {
82  FatalErrorIn(args.executable())
83  << "Invalid value for blowing constants!"
84  "\nActivation energy cannot be negative."
85  << exit(FatalError);
86  }
87 }
88 
89 scalar XOH_Gel =
90  readScalar
91  (
92  kineticsProperties.subDict("GellingConstants").lookup("gellingPoint")
93  );
94 if (XOH_Gel < 0.0)
95 {
96  FatalErrorIn(args.executable())
97  << "Invalid value for gelling point!"
98  "\nGelling point cannot be negative."
99  << exit(FatalError);
100 }
101 
102 
103 word blowingAgent(kineticsProperties.lookup("blowingAgent"));
104 
105 if
106 (
107  !(blowingAgent == "n-pentane"
108  || blowingAgent == "R-11"
109  || blowingAgent == "no")
110 )
111 {
112  FatalErrorIn(args.executable())
113  << blowingAgent << " Is an invalid type of physical blowing agent."
114  << "\nValid types are: "
115  << "\nn-pentane,"
116  << "\nR-11"
117  << "\nno"
118  << exit(FatalError);
119 }
120 
121 
122 scalar RR =
123  readScalar
124  (
125  kineticsProperties.subDict("GenericConstants").lookup("idealGasCons")
126  );
127 scalar rhoPoly =
128  readScalar
129  (
130  kineticsProperties.subDict("GenericConstants").lookup("rhoPolymer")
131  );
132 scalar rhoBL =
133  readScalar
134  (
135  kineticsProperties.subDict("GenericConstants").lookup("rhoBlowingAgent")
136  );
137 scalar M_CO2 =
138  readScalar
139  (
140  kineticsProperties.subDict("GenericConstants").lookup("molecularMassCO2")
141  );
142 scalar M_B =
143  readScalar
144  (
145  kineticsProperties.subDict("GenericConstants").lookup("molecularMassBlowingAgent")
146  );
147 scalar M_NCO =
148  readScalar
149  (
150  kineticsProperties.subDict("GenericConstants").lookup("molecularMassNCO")
151  );
152 scalar dxdT =
153  readScalar
154  (
155  kineticsProperties.subDict("GenericConstants").lookup("dxdTcons")
156  );
157 scalar L0 =
158  readScalar
159  (
160  kineticsProperties.subDict("GenericConstants").lookup("initBlowingAgent")
161  );
162 scalar M_liq =
163  readScalar
164  (
165  kineticsProperties.subDict("GenericConstants").lookup("molecularMassLiquidFoam")
166  );
167 scalar surfaceTension =
168  readScalar
169  (
170  kineticsProperties.subDict("GenericConstants").lookup("surfaceTension")
171  );
172 
173 if
174 (
175  RR < 0.0 || rhoPoly < 0.0 || rhoBL < 0.0
176  || M_B < 0.0 || M_CO2 < 0.0 || M_NCO < 0.0
177  || L0 < 0.0 || M_liq < 0.0 || surfaceTension < 0.0
178 )
179 {
180  FatalErrorIn(args.executable())
181  << "\nInvalid value for generic constants!"
182  << exit(FatalError);
183 }
184 
185 // Enthalpy
186 scalar DH_OH =
187  readScalar
188  (
189  kineticsProperties.subDict("EnthalpyConstants").lookup("deltaOH")
190  );
191 scalar DH_W =
192  readScalar
193  (
194  kineticsProperties.subDict("EnthalpyConstants").lookup("deltaW")
195  );
196 scalar C_Poly =
197  readScalar
198  (
199  kineticsProperties.subDict("EnthalpyConstants").lookup("PUspecificHeat")
200  );
201 scalar latenth =
202  readScalar
203  (
204  kineticsProperties.subDict("EnthalpyConstants").lookup("latentHeat")
205  );
206 // switch for the liquid mixture density
207  Switch liquidMixtureDensitySurrogate
208  (
209  kineticsProperties.lookup("liquidMixtureDensitySurrogate")
210  );
211 // Required fields for generic kinetics model
212 Info<< "Reading field XW \n" << endl;
213 volScalarField XW
214 (
215  IOobject
216  (
217  "XW",
218  runTime.timeName(),
219  mesh,
220  IOobject::MUST_READ,
221  IOobject::AUTO_WRITE
222  ),
223  mesh
224 );
225 
226 Info<< "Creating field rho_foam*alpha2\n" << endl;
227 volScalarField rhoFoamAlpha2
228 (
229  "rhoFoamAlpha2",
230  rho_foam*alpha2
231 );
232 
233 Info<< "Creating surface field of rho_foam*alpha2*U\n" << endl;
234 surfaceScalarField frhoFoamAlpha2
235 (
236  fvc::interpolate(rhoFoamAlpha2)*phi
237 );
238 
239 volScalarField::Internal XWSource
240 (
241  IOobject
242  (
243  "XWSource",
244  runTime.timeName(),
245  mesh
246  ),
247  mesh,
248  dimensionedScalar("XWSource", dimensionSet(0,0,-1,0,0,0,0), 0.0)
249 );
250 
251 volScalarField::Internal XOHSource
252 (
253  IOobject
254  (
255  "XOHSource",
256  runTime.timeName(),
257  mesh
258  ),
259  mesh,
260  dimensionedScalar("XOHSource", dimensionSet(0,0,-1,0,0,0,0), 0.0)
261 );
262 
263 Info<< "Reading field XOH \n" << endl;
264 volScalarField XOH
265 (
266  IOobject
267  (
268  "XOH",
269  runTime.timeName(),
270  mesh,
271  IOobject::MUST_READ,
272  IOobject::AUTO_WRITE
273  ),
274  mesh
275 );
276 
277 Info<< "\nCreating source fields ScNonXOH for XOH: " << endl;
278 volScalarField::Internal ScNonXOH
279 (
280  IOobject
281  (
282  "ScNonXOH",
283  runTime.timeName(),
284  mesh
285  ),
286  mesh,
287  dimensionedScalar("ScNonXOH", dimensionSet(0,0,-1,0,0,0,0), 0.0)
288 );
289 
290 Info<< "\nCreating first order coefficient for XOH source: " << endl;
291 volScalarField::Internal Coeff_1stOrd
292 (
293  IOobject
294  (
295  "Coeff_1stOrd",
296  runTime.timeName(),
297  mesh
298  ),
299  mesh,
300  dimensionedScalar("Coeff_1stOrd", dimensionSet(0,0,-1,0,0,0,0), 0.0)
301 );
302 
303 Info<< "Creating SuXOH and SpXOH for the second order term of in XOH source" << endl;
304 volScalarField::Internal SuXOH
305 (
306  IOobject
307  (
308  "SuXOH",
309  runTime.timeName(),
310  mesh
311  ),
312  mesh,
313  dimensionedScalar("SuXOH", dimensionSet(0,0,-1,0,0,0,0), 0.0)
314 );
315 volScalarField::Internal SpXOH
316 (
317  IOobject
318  (
319  "SpXOH",
320  runTime.timeName(),
321  mesh
322  ),
323  mesh,
324  dimensionedScalar("SpXOH", dimensionSet(0,0,-1,0,0,0,0), 0.0)
325 );
326 
327 volScalarField::Internal TSource
328 (
329  IOobject
330  (
331  "TSource",
332  runTime.timeName(),
333  mesh
334  ),
335  mesh,
336  dimensionedScalar("TSource", dimensionSet(1,-3,-1,1,0,0,0), 0.0)
337 );
338 
339 Info<< "Reading field wBA_g, blowing agent in gas \n" << endl;
340 volScalarField wBA_g
341 (
342  IOobject
343  (
344  "wBA_g",
345  runTime.timeName(),
346  mesh,
347  IOobject::MUST_READ,
348  IOobject::AUTO_WRITE
349  ),
350  mesh
351 );
352 volScalarField::Internal wBA_gSource
353 (
354  IOobject
355  (
356  "wBA_gSource",
357  runTime.timeName(),
358  mesh
359  ),
360  mesh,
361  dimensionedScalar("wBA_gSource", dimensionSet(0,0,-1,0,0,0,0), 0.0)
362 );
363 
364 Info<< "Reading field wBA_l, blowing agent in liquid \n" << endl;
365 volScalarField wBA_l
366 (
367  IOobject
368  (
369  "wBA_l",
370  runTime.timeName(),
371  mesh,
372  IOobject::MUST_READ,
373  IOobject::AUTO_WRITE
374  ),
375  mesh
376 );
377 
378 volScalarField::Internal wBA_lSource
379 (
380  IOobject
381  (
382  "wBA_lSource",
383  runTime.timeName(),
384  mesh
385  ),
386  mesh,
387  dimensionedScalar("wBA_lSource", dimensionSet(0,0,-1,0,0,0,0), 0.0)
388 );
389 
390 Info<< "Reading field wCO2_l, CO2 in liquid \n" << endl;
391 volScalarField wCO2_l
392 (
393  IOobject
394  (
395  "wCO2_l",
396  runTime.timeName(),
397  mesh,
398  IOobject::MUST_READ,
399  IOobject::AUTO_WRITE
400  ),
401  mesh
402 );
403 volScalarField::Internal wCO2_lSource
404 (
405  IOobject
406  (
407  "wCO2_lSource",
408  runTime.timeName(),
409  mesh
410  ),
411  mesh,
412  dimensionedScalar("wCO2_lSource", dimensionSet(0,0,-1,0,0,0,0), 0.0)
413 );
414 
415 Info<< "Reading field wCO2_g, CO2 in gas \n" << endl;
416 volScalarField wCO2_g
417 (
418  IOobject
419  (
420  "wCO2_g",
421  runTime.timeName(),
422  mesh,
423  IOobject::MUST_READ,
424  IOobject::AUTO_WRITE
425  ),
426  mesh
427 );
428 volScalarField::Internal wCO2_gSource
429 (
430  IOobject
431  (
432  "wCO2_gSource",
433  runTime.timeName(),
434  mesh
435  ),
436  mesh,
437  dimensionedScalar("wCO2_gSource", dimensionSet(0,0,-1,0,0,0,0), 0.0)
438 );
439 
440 Info<< "Reading field g1_CO2, source of mOne due to the generation of CO2\n" << endl;
441 volScalarField g1_CO2
442 (
443  IOobject
444  (
445  "g1_CO2",
446  runTime.timeName(),
447  mesh,
448  IOobject::MUST_READ,
449  IOobject::AUTO_WRITE
450  ),
451  mesh
452 );
453 Info<< "Reading field g1_BA, source of mOne due to the evaporation of blowing agent\n" << endl;
454 volScalarField g1_BA
455 (
456  IOobject
457  (
458  "g1_BA",
459  runTime.timeName(),
460  mesh,
461  IOobject::MUST_READ,
462  IOobject::AUTO_WRITE
463  ),
464  mesh
465 );
466 Info<< "Reading field cc1, a constant based on the growth rate due to blowing agent\n" << endl;
467 volScalarField cc1
468 (
469  IOobject
470  (
471  "cc1",
472  runTime.timeName(),
473  mesh,
474  IOobject::MUST_READ,
475  IOobject::AUTO_WRITE
476  ),
477  mesh
478 );
479 
480 volScalarField CO2
481 (
482  IOobject
483  (
484  "CO2",
485  runTime.timeName(),
486  mesh,
487  IOobject::READ_IF_PRESENT,
488  IOobject::AUTO_WRITE
489  ),
490  mesh,
491  dimensionedScalar("CO2", dimless, 0.0)
492 );
493 volScalarField creamT
494 (
495  IOobject
496  (
497  "creamT",
498  runTime.timeName(),
499  mesh,
500  IOobject::READ_IF_PRESENT,
501  IOobject::AUTO_WRITE
502  ),
503  mesh,
504  dimensionedScalar("creamT", dimless, 0.0)
505 );
506 volScalarField TS
507 (
508  IOobject
509  (
510  "TS",
511  runTime.timeName(),
512  mesh,
513  IOobject::READ_IF_PRESENT,
514  IOobject::AUTO_WRITE
515  ),
516  mesh,
517  dimensionedScalar("TS", dimensionSet(0,0,0,1,0,0,0), 298.0)
518 );
519 volScalarField::Internal TSSource
520 (
521  IOobject
522  (
523  "TSSource",
524  runTime.timeName(),
525  mesh
526  ),
527  mesh,
528  dimensionedScalar("TSSource", dimensionSet(0,0,-1,1,0,0,0), 0.0)
529 );
530 // Required fields for RF-1 kinetics surrogate model
531 Info<< "Reading field Catalyst_1 \n" << endl;
532  volScalarField Catalyst_1
533  (
534  IOobject
535  (
536  "Catalyst_1",
537  runTime.timeName(),
538  mesh,
539  IOobject::MUST_READ,
540  IOobject::AUTO_WRITE
541  ),
542  mesh
543  );
544 Info<< "Reading field CE_A0 \n" << endl;
545  volScalarField CE_A0
546  (
547  IOobject
548  (
549  "CE_A0",
550  runTime.timeName(),
551  mesh,
552  IOobject::MUST_READ,
553  IOobject::AUTO_WRITE
554  ),
555  mesh
556  );
557 Info<< "Reading field CE_A1 \n" << endl;
558  volScalarField CE_A1
559  (
560  IOobject
561  (
562  "CE_A1",
563  runTime.timeName(),
564  mesh,
565  IOobject::MUST_READ,
566  IOobject::AUTO_WRITE
567  ),
568  mesh
569  );
570 Info<< "Reading field CE_B \n" << endl;
571  volScalarField CE_B
572  (
573  IOobject
574  (
575  "CE_B",
576  runTime.timeName(),
577  mesh,
578  IOobject::MUST_READ,
579  IOobject::AUTO_WRITE
580  ),
581  mesh
582  );
583 Info<< "Reading field CE_B2 \n" << endl;
584  volScalarField CE_B2
585  (
586  IOobject
587  (
588  "CE_B2",
589  runTime.timeName(),
590  mesh,
591  IOobject::MUST_READ,
592  IOobject::AUTO_WRITE
593  ),
594  mesh
595  );
596 Info<< "Reading field CE_I0 \n" << endl;
597  volScalarField CE_I0
598  (
599  IOobject
600  (
601  "CE_I0",
602  runTime.timeName(),
603  mesh,
604  IOobject::MUST_READ,
605  IOobject::AUTO_WRITE
606  ),
607  mesh
608  );
609 Info<< "Reading field CE_I1 \n" << endl;
610  volScalarField CE_I1
611  (
612  IOobject
613  (
614  "CE_I1",
615  runTime.timeName(),
616  mesh,
617  IOobject::MUST_READ,
618  IOobject::AUTO_WRITE
619  ),
620  mesh
621  );
622 Info<< "Reading field CE_I2 \n" << endl;
623  volScalarField CE_I2
624  (
625  IOobject
626  (
627  "CE_I2",
628  runTime.timeName(),
629  mesh,
630  IOobject::MUST_READ,
631  IOobject::AUTO_WRITE
632  ),
633  mesh
634  );
635 Info<< "Reading field CE_PBA \n" << endl;
636  volScalarField CE_PBA
637  (
638  IOobject
639  (
640  "CE_PBA",
641  runTime.timeName(),
642  mesh,
643  IOobject::MUST_READ,
644  IOobject::AUTO_WRITE
645  ),
646  mesh
647  );
648 Info<< "Reading field CE_Breac \n" << endl;
649  volScalarField CE_Breac
650  (
651  IOobject
652  (
653  "CE_Breac",
654  runTime.timeName(),
655  mesh,
656  IOobject::MUST_READ,
657  IOobject::AUTO_WRITE
658  ),
659  mesh
660  );
661 Info<< "Reading field CE_Areac0 \n" << endl;
662  volScalarField CE_Areac0
663  (
664  IOobject
665  (
666  "CE_Areac0",
667  runTime.timeName(),
668  mesh,
669  IOobject::MUST_READ,
670  IOobject::AUTO_WRITE
671  ),
672  mesh
673  );
674 Info<< "Reading field CE_Areac1 \n" << endl;
675  volScalarField CE_Areac1
676  (
677  IOobject
678  (
679  "CE_Areac1",
680  runTime.timeName(),
681  mesh,
682  IOobject::MUST_READ,
683  IOobject::AUTO_WRITE
684  ),
685  mesh
686  );
687 Info<< "Reading field CE_Ireac0 \n" << endl;
688  volScalarField CE_Ireac0
689  (
690  IOobject
691  (
692  "CE_Ireac0",
693  runTime.timeName(),
694  mesh,
695  IOobject::MUST_READ,
696  IOobject::AUTO_WRITE
697  ),
698  mesh
699  );
700 Info<< "Reading field CE_Ireac1 \n" << endl;
701  volScalarField CE_Ireac1
702  (
703  IOobject
704  (
705  "CE_Ireac1",
706  runTime.timeName(),
707  mesh,
708  IOobject::MUST_READ,
709  IOobject::AUTO_WRITE
710  ),
711  mesh
712  );
713 Info<< "Reading field CE_Ireac2 \n" << endl;
714  volScalarField CE_Ireac2
715  (
716  IOobject
717  (
718  "CE_Ireac2",
719  runTime.timeName(),
720  mesh,
721  IOobject::MUST_READ,
722  IOobject::AUTO_WRITE
723  ),
724  mesh
725  );
726 Info<< "Reading field Bulk \n" << endl;
727  volScalarField Bulk
728  (
729  IOobject
730  (
731  "Bulk",
732  runTime.timeName(),
733  mesh,
734  IOobject::MUST_READ,
735  IOobject::AUTO_WRITE
736  ),
737  mesh
738  );
739 Info<< "Reading field R_1 \n" << endl;
740  volScalarField R_1
741  (
742  IOobject
743  (
744  "R_1",
745  runTime.timeName(),
746  mesh,
747  IOobject::MUST_READ,
748  IOobject::AUTO_WRITE
749  ),
750  mesh
751  );
752 Info<< "Reading field R_1_mass \n" << endl;
753  volScalarField R_1_mass
754  (
755  IOobject
756  (
757  "R_1_mass",
758  runTime.timeName(),
759  mesh,
760  IOobject::MUST_READ,
761  IOobject::AUTO_WRITE
762  ),
763  mesh
764  );
765 Info<< "Reading field R_1_temp_RF1 \n" << endl;
766  volScalarField R_1_temp_RF1
767  (
768  IOobject
769  (
770  "R_1_temp_RF1",
771  runTime.timeName(),
772  mesh,
773  IOobject::MUST_READ,
774  IOobject::AUTO_WRITE
775  ),
776  mesh
777  );
778 Info<< "Reading field R_1_vol_RF1 \n" << endl;
779  volScalarField R_1_vol_RF1
780  (
781  IOobject
782  (
783  "R_1_vol_RF1",
784  runTime.timeName(),
785  mesh,
786  IOobject::MUST_READ,
787  IOobject::AUTO_WRITE
788  ),
789  mesh
790  );
791 // source terms for the RF-1 kinetics surrogate models
792 Info<< "Creating source term source_Catalyst_1" << endl;
793 volScalarField source_Catalyst_1
794  (
795  IOobject
796  (
797  "source_Catalyst_1",
798  runTime.timeName(),
799  mesh
800  ),
801  mesh,
802  dimensionedScalar("source_Catalyst_1", dimensionSet(0,0,-1,0,0,0,0), 0.0)
803  );
804 Info<< "Creating source term source_CE_A0" << endl;
805 volScalarField source_CE_A0
806  (
807  IOobject
808  (
809  "source_CE_A0",
810  runTime.timeName(),
811  mesh
812  ),
813  mesh,
814  dimensionedScalar("source_CE_A0", dimensionSet(0,0,-1,0,0,0,0), 0.0)
815  );
816 Info<< "Creating source term source_CE_A1" << endl;
817 volScalarField source_CE_A1
818  (
819  IOobject
820  (
821  "source_CE_A1",
822  runTime.timeName(),
823  mesh
824  ),
825  mesh,
826  dimensionedScalar("source_CE_A1", dimensionSet(0,0,-1,0,0,0,0), 0.0)
827  );
828 Info<< "Creating source term source_CE_B" << endl;
829 volScalarField source_CE_B
830  (
831  IOobject
832  (
833  "source_CE_B",
834  runTime.timeName(),
835  mesh
836  ),
837  mesh,
838  dimensionedScalar("source_CE_B", dimensionSet(0,0,-1,0,0,0,0), 0.0)
839  );
840 Info<< "Creating source term source_CE_B2" << endl;
841 volScalarField source_CE_B2
842  (
843  IOobject
844  (
845  "source_CE_B2",
846  runTime.timeName(),
847  mesh
848  ),
849  mesh,
850  dimensionedScalar("source_CE_B2", dimensionSet(0,0,-1,0,0,0,0), 0.0)
851  );
852 Info<< "Creating source term source_CE_I0" << endl;
853 volScalarField source_CE_I0
854  (
855  IOobject
856  (
857  "source_CE_I0",
858  runTime.timeName(),
859  mesh
860  ),
861  mesh,
862  dimensionedScalar("source_CE_I0", dimensionSet(0,0,-1,0,0,0,0), 0.0)
863  );
864 Info<< "Creating source term source_CE_I1" << endl;
865 volScalarField source_CE_I1
866  (
867  IOobject
868  (
869  "source_CE_I1",
870  runTime.timeName(),
871  mesh
872  ),
873  mesh,
874  dimensionedScalar("source_CE_I1", dimensionSet(0,0,-1,0,0,0,0), 0.0)
875  );
876 Info<< "Creating source term source_CE_I2" << endl;
877 volScalarField source_CE_I2
878  (
879  IOobject
880  (
881  "source_CE_I2",
882  runTime.timeName(),
883  mesh
884  ),
885  mesh,
886  dimensionedScalar("source_CE_I2", dimensionSet(0,0,-1,0,0,0,0), 0.0)
887  );
888 Info<< "Creating source term source_CE_PBA" << endl;
889 volScalarField source_CE_PBA
890  (
891  IOobject
892  (
893  "source_CE_PBA",
894  runTime.timeName(),
895  mesh
896  ),
897  mesh,
898  dimensionedScalar("source_CE_PBA", dimensionSet(0,0,-1,0,0,0,0), 0.0)
899  );
900 Info<< "Creating source term source_CE_Breac" << endl;
901 volScalarField source_CE_Breac
902  (
903  IOobject
904  (
905  "source_CE_Breac",
906  runTime.timeName(),
907  mesh
908  ),
909  mesh,
910  dimensionedScalar("source_CE_Breac", dimensionSet(0,0,-1,0,0,0,0), 0.0)
911  );
912 Info<< "Creating source term source_CE_Areac0" << endl;
913 volScalarField source_CE_Areac0
914  (
915  IOobject
916  (
917  "source_CE_Areac0",
918  runTime.timeName(),
919  mesh
920  ),
921  mesh,
922  dimensionedScalar("source_CE_Areac0", dimensionSet(0,0,-1,0,0,0,0), 0.0)
923  );
924 Info<< "Creating source term source_CE_Areac1" << endl;
925 volScalarField source_CE_Areac1
926  (
927  IOobject
928  (
929  "source_CE_Areac1",
930  runTime.timeName(),
931  mesh
932  ),
933  mesh,
934  dimensionedScalar("source_CE_Areac1", dimensionSet(0,0,-1,0,0,0,0), 0.0)
935  );
936 Info<< "Creating source term source_CE_Ireac0" << endl;
937 volScalarField source_CE_Ireac0
938  (
939  IOobject
940  (
941  "source_CE_Ireac0",
942  runTime.timeName(),
943  mesh
944  ),
945  mesh,
946  dimensionedScalar("source_CE_Ireac0", dimensionSet(0,0,-1,0,0,0,0), 0.0)
947  );
948 Info<< "Creating source term source_CE_Ireac1" << endl;
949 volScalarField source_CE_Ireac1
950  (
951  IOobject
952  (
953  "source_CE_Ireac1",
954  runTime.timeName(),
955  mesh
956  ),
957  mesh,
958  dimensionedScalar("source_CE_Ireac1", dimensionSet(0,0,-1,0,0,0,0), 0.0)
959  );
960 Info<< "Creating source term source_CE_Ireac2" << endl;
961 volScalarField source_CE_Ireac2
962  (
963  IOobject
964  (
965  "source_CE_Ireac2",
966  runTime.timeName(),
967  mesh
968  ),
969  mesh,
970  dimensionedScalar("source_CE_Ireac2", dimensionSet(0,0,-1,0,0,0,0), 0.0)
971  );
972 Info<< "Creating source term source_Bulk" << endl;
973 volScalarField source_Bulk
974  (
975  IOobject
976  (
977  "source_Bulk",
978  runTime.timeName(),
979  mesh
980  ),
981  mesh,
982  dimensionedScalar("source_Bulk", dimensionSet(0,0,-1,0,0,0,0), 0.0)
983  );
984 Info<< "Creating source term source_R_1" << endl;
985 volScalarField source_R_1
986  (
987  IOobject
988  (
989  "source_R_1",
990  runTime.timeName(),
991  mesh
992  ),
993  mesh,
994  dimensionedScalar("source_R_1", dimensionSet(0,0,-1,0,0,0,0), 0.0)
995  );
996 Info<< "Creating source term source_R_1_mass" << endl;
997 volScalarField source_R_1_mass
998  (
999  IOobject
1000  (
1001  "source_R_1_mass",
1002  runTime.timeName(),
1003  mesh
1004  ),
1005  mesh,
1006  dimensionedScalar("source_R_1_mass", dimensionSet(0,0,-1,0,0,0,0), 0.0)
1007  );
1008 Info<< "Creating source term source_R_1_temp_RF1" << endl;
1009 volScalarField source_R_1_temp_RF1
1010  (
1011  IOobject
1012  (
1013  "source_R_1_temp_RF1",
1014  runTime.timeName(),
1015  mesh
1016  ),
1017  mesh,
1018  dimensionedScalar("sourceR_1_temp_RF1", dimensionSet(0,0,-1,0,0,0,0), 0.0)
1019  );
1020 Info<< "Creating source term source_R_1_vol_RF1" << endl;
1021 volScalarField source_R_1_vol_RF1
1022  (
1023  IOobject
1024  (
1025  "source_R_1_vol_RF1",
1026  runTime.timeName(),
1027  mesh
1028  ),
1029  mesh,
1030  dimensionedScalar("sourceR_1_vol_RF1", dimensionSet(0,0,-1,0,0,0,0), 0.0)
1031  );
1032 
1033 if (KineticsModel == "RF-1")
1034 {
1035  forAll(mesh.C(), celli)
1036  {
1037  if (alpha1[celli] == 0.0)
1038  {
1039  scalar foam_index;
1040  foam_index = celli;
1041  CW_0 = scalar(1000.0)*CE_B2[foam_index];
1042  COH_0 = scalar(1000.0)*(CE_A0[foam_index] + CE_A1[foam_index]);
1043  break;
1044  }
1045  }
1046  reduce(CW_0,maxOp<scalar>());
1047  reduce(COH_0,maxOp<scalar>());
1048 }
1049 ///@endcond
double surfaceTension
required for the computation of partial pressure
double M_CO2
Molecular mass of carbon dioxide, kg/kmol.
double M_NCO
Molecular weight of NCO, kg/kmol.
double RR
ideal gas constant, J/mol K
double DH_OH
Reaction heat for the gelling reaction, J/mol.
double rhoPoly
density of the liquid polymer, kg/m3
double rhoBL
density of the blowing agent, kg/m3
double M_B
Molecular mass of blowing agent, kg/kmol.
double L0
Initial weight fraction of blowing agent in the liquid, -.
double DH_W
Reaction heat for the blowing reaction, J/mol.