66 Time& runTime = _runTime();
67 fvMesh& mesh = _mesh();
68#include "initContinuityErrs.H"
69 volScalarField& p = _p();
70 volVectorField& U = _U();
71 surfaceScalarField& phi = _phi();
73 pimpleControl& pimple =
_pimple();
74 pimpleControl& npimple = _npimple();
75 IOMRFZoneList& MRF = _MRF();
76 singlePhaseTransportModel& laminarTransport = _laminarTransport();
77 dimensionedScalar& IV1 = _IV1();
78 dimensionedScalar& Keff = _Keff();
79 volScalarField& flux = _flux();
80 volScalarField flux_old = _flux();
81 dimensionedScalar& betaTot = _betaTot();
82 volScalarField& SP = _SP();
83 dimensionedScalar& SP1_0 = _SP1_0();
84 dimensionedScalar& alfa_SP1 = _alfa_SP1();
85 volScalarField& D = _D();
86 dimensionedScalar& D1_0 = _D1_0();
87 dimensionedScalar& alfa_D1 = _alfa_D1();
88 volScalarField& NSF = _NSF();
89 dimensionedScalar& NSF1_0 = _NSF1_0();
90 dimensionedScalar& alfa_NSF1 = _alfa_NSF1();
91 volScalarField& A = _A();
92 dimensionedScalar& A1_0 = _A1_0();
93 dimensionedScalar& alfa_A1 = _alfa_A1();
94 volScalarField& prec1 = _prec1();
95 dimensionedScalar& Sc = _Sc();
96 dimensionedScalar& Sct = _Sct();
97 dimensionedScalar& lam1 = _lam1();
98 dimensionedScalar& beta1 = _beta1();
99 volScalarField& prec2 = _prec2();
100 dimensionedScalar& lam2 = _lam2();
101 dimensionedScalar& beta2 = _beta2();
102 volScalarField& prec3 = _prec3();
103 dimensionedScalar& lam3 = _lam3();
104 dimensionedScalar& beta3 = _beta3();
105 volScalarField& prec4 = _prec4();
106 dimensionedScalar& lam4 = _lam4();
107 dimensionedScalar& beta4 = _beta4();
108 volScalarField& prec5 = _prec5();
109 dimensionedScalar& lam5 = _lam5();
110 dimensionedScalar& beta5 = _beta5();
111 volScalarField& prec6 = _prec6();
112 dimensionedScalar& lam6 = _lam6();
113 dimensionedScalar& beta6 = _beta6();
114 volScalarField& prec7 = _prec7();
115 dimensionedScalar& lam7 = _lam7();
116 dimensionedScalar& beta7 = _beta7();
117 volScalarField& prec8 = _prec8();
118 dimensionedScalar& lam8 = _lam8();
119 dimensionedScalar& beta8 = _beta8();
120 volScalarField& T = _T();
121 dimensionedScalar& Pr = _Pr();
122 dimensionedScalar& Prt = _Prt();
123 volScalarField& dec1 = _dec1();
124 dimensionedScalar& decLam1 = _decLam1();
125 dimensionedScalar& decBeta1 = _decBeta1();
126 volScalarField& dec2 = _dec2();
127 dimensionedScalar& decLam2 = _decLam2();
128 dimensionedScalar& decBeta2 = _decBeta2();
129 volScalarField& dec3 = _dec3();
130 dimensionedScalar& decLam3 = _decLam3();
131 dimensionedScalar& decBeta3 = _decBeta3();
132 dimensionedScalar& decbetaTot = _decbetaTot();
133 dimensionedScalar& rhoRef = _rhoRef();
134 dimensionedScalar& CpRef = _CpRef();
135 volScalarField v = _v();
136 volScalarField TXS = _TXS();
137 dimensionedScalar& nu = _nu();
138 dimensionedScalar& betaTE = _betaTE();
139 dimensionedScalar& Tref = _Tref();
140 dimensionedScalar& TrefXS = _TrefXS();
141 volScalarField& logT = _logT();
142 volScalarField& alphat = _alphat();
143 volScalarField& difft = _difft();
144 dimensionedScalar& tau = _tau();
145 volScalarField powerDens = ((1 - decbetaTot) * flux * SP +
146 (decLam1 * dec1 + decLam2 * dec2 + decLam3 * dec3)).ref();
147 powerDens.rename(
"powerDens");
149 startTime = para->ITHACAdict->lookupOrDefault(
"startTime", 0);
150 finalTime = para->ITHACAdict->lookupOrDefault(
"finalTime", 1);
151 timeStep = para->ITHACAdict->lookupOrDefault(
"timeStep", 0.1);
152 writeEvery = para->ITHACAdict->lookupOrDefault(
"writeEvery", 0.1);
153 instantList Times = runTime.times();
155 runTime.setTime(Times[1], 1);
158 label Ntau =
static_cast<int> (tau.value() /
timeStep);
162 label nsnapshots = 0;
164 while (runTime.run())
166#include "readTimeControls.H"
167#include "CourantNo.H"
168#include "setDeltaT.H"
170 Info <<
"Time = " << runTime.timeName() << nl << endl;
172 while (pimple.loop())
178 while (pimple.correct())
183 if (pimple.turbCorr())
185 laminarTransport.correct();
192 while (npimple.loop())
194#include "updateConsts.H"
202 Info <<
"ExecutionTime = " << runTime.elapsedCpuTime() <<
" s"
203 <<
" ClockTime = " << runTime.elapsedClockTime() <<
" s"
205 powerDens = (1 - decbetaTot) * flux * SP + (decLam1 * dec1 + decLam2 * dec2 +
227 "./ITHACAoutput/Offline/");
234 std::ofstream of(
"./ITHACAoutput/Offline/" + name(
counter) +
"/" +
236 std::ofstream ofk(
"./ITHACAoutput/Offline/" + name(
counter) +
"/" + name(
267 for (label i = 0; i < mu_now.size(); i++)
278 if (runTime.value() >= tau.value() &&
precInBool ==
true)
302 "./ITHACAoutput/Offline");
330#include "initContinuityErrs.H"
332 Time& runTime = _runTime();
333 fvMesh& mesh = _mesh();
334 volScalarField& p = _p();
335 volVectorField& U = _U();
336 surfaceScalarField& phi = _phi();
338 pimpleControl& pimple =
_pimple();
339 pimpleControl& npimple = _npimple();
340 IOMRFZoneList& MRF = _MRF();
341 singlePhaseTransportModel& laminarTransport = _laminarTransport();
342 dimensionedScalar& IV1 = _IV1();
343 dimensionedScalar& Keff = _Keff();
344 volScalarField& flux = _flux();
345 volScalarField flux_old = _flux();
346 dimensionedScalar& betaTot = _betaTot();
347 volScalarField& SP = _SP();
348 dimensionedScalar& SP1_0 = _SP1_0();
349 dimensionedScalar& alfa_SP1 = _alfa_SP1();
350 volScalarField& D = _D();
351 dimensionedScalar& D1_0 = _D1_0();
352 dimensionedScalar& alfa_D1 = _alfa_D1();
353 volScalarField& NSF = _NSF();
354 dimensionedScalar& NSF1_0 = _NSF1_0();
355 dimensionedScalar& alfa_NSF1 = _alfa_NSF1();
356 volScalarField& A = _A();
357 dimensionedScalar& A1_0 = _A1_0();
358 dimensionedScalar& alfa_A1 = _alfa_A1();
359 volScalarField& prec1 = _prec1();
360 dimensionedScalar& Sc = _Sc();
361 dimensionedScalar& Sct = _Sct();
362 dimensionedScalar& lam1 = _lam1();
363 dimensionedScalar& beta1 = _beta1();
364 volScalarField& prec2 = _prec2();
365 dimensionedScalar& lam2 = _lam2();
366 dimensionedScalar& beta2 = _beta2();
367 volScalarField& prec3 = _prec3();
368 dimensionedScalar& lam3 = _lam3();
369 dimensionedScalar& beta3 = _beta3();
370 volScalarField& prec4 = _prec4();
371 dimensionedScalar& lam4 = _lam4();
372 dimensionedScalar& beta4 = _beta4();
373 volScalarField& prec5 = _prec5();
374 dimensionedScalar& lam5 = _lam5();
375 dimensionedScalar& beta5 = _beta5();
376 volScalarField& prec6 = _prec6();
377 dimensionedScalar& lam6 = _lam6();
378 dimensionedScalar& beta6 = _beta6();
379 volScalarField& prec7 = _prec7();
380 dimensionedScalar& lam7 = _lam7();
381 dimensionedScalar& beta7 = _beta7();
382 volScalarField& prec8 = _prec8();
383 dimensionedScalar& lam8 = _lam8();
384 dimensionedScalar& beta8 = _beta8();
385 volScalarField& T = _T();
386 dimensionedScalar& Pr = _Pr();
387 dimensionedScalar& Prt = _Prt();
388 volScalarField& dec1 = _dec1();
389 dimensionedScalar& decLam1 = _decLam1();
390 dimensionedScalar& decBeta1 = _decBeta1();
391 volScalarField& dec2 = _dec2();
392 dimensionedScalar& decLam2 = _decLam2();
393 dimensionedScalar& decBeta2 = _decBeta2();
394 volScalarField& dec3 = _dec3();
395 dimensionedScalar& decLam3 = _decLam3();
396 dimensionedScalar& decBeta3 = _decBeta3();
397 dimensionedScalar& decbetaTot = _decbetaTot();
398 dimensionedScalar& rhoRef = _rhoRef();
399 dimensionedScalar& CpRef = _CpRef();
400 volScalarField v = _v();
401 volScalarField TXS = _TXS();
402 dimensionedScalar& nu = _nu();
403 dimensionedScalar& betaTE = _betaTE();
404 dimensionedScalar& Tref = _Tref();
405 dimensionedScalar& TrefXS = _TrefXS();
406 volScalarField& logT = _logT();
407 volScalarField& alphat = _alphat();
408 volScalarField& difft = _difft();
409 volScalarField powerDens = ((1 - decbetaTot) * flux * SP +
410 (decLam1 * dec1 + decLam2 * dec2 + decLam3 * dec3)).ref();
411 powerDens.rename(
"powerDens");
412 dimensionedScalar& tau = _tau();
414 startTime = para->ITHACAdict->lookupOrDefault(
"startTime", 0);
415 finalTime = para->ITHACAdict->lookupOrDefault(
"finalTime", 1);
416 timeStep = para->ITHACAdict->lookupOrDefault(
"timeStep", 0.1);
417 writeEvery = para->ITHACAdict->lookupOrDefault(
"writeEvery", 0.1);
418 instantList Times = runTime.times();
420 runTime.setTime(Times[1], 1);
423 label Ntau =
static_cast<int> (tau.value() /
timeStep);
427 label nsnapshots = 0;
429 while (runTime.run())
431#include "readTimeControls.H"
432#include "CourantNo.H"
433#include "setDeltaT.H"
435 Info <<
"Time = " << runTime.timeName() << nl << endl;
437 while (pimple.loop())
443 while (pimple.correct())
448 if (pimple.turbCorr())
450 laminarTransport.correct();
457 while (npimple.loop())
459#include "updateConsts.H"
467 Info <<
"ExecutionTime = " << runTime.elapsedCpuTime() <<
" s"
468 <<
" ClockTime = " << runTime.elapsedClockTime() <<
" s"
470 powerDens = (1 - decbetaTot) * flux * SP + (decLam1 * dec1 + decLam2 * dec2 +
498 std::ofstream of(folder +
"/" + name(
counter) +
"/" + runTime.timeName());
499 std::ofstream ofk(folder +
"/" + name(
counter) +
"/" + name(Keff.value()));
529 for (label i = 0; i < mu_now.size(); i++)
540 if (runTime.value() >= tau.value() &&
precInBool ==
true)
559 fvMesh& mesh = _mesh();
560 volScalarField& prec1 = _prec1();
561 volScalarField& prec2 = _prec2();
562 volScalarField& prec3 = _prec3();
563 volScalarField& prec4 = _prec4();
564 volScalarField& prec5 = _prec5();
565 volScalarField& prec6 = _prec6();
566 volScalarField& prec7 = _prec7();
567 volScalarField& prec8 = _prec8();
569 fvPatchField<scalar>::New(
"fixedValue", mesh.boundary()[
precinIndex], prec1));
571 fvPatchField<scalar>::New(
"fixedValue", mesh.boundary()[
precinIndex], prec2));
573 fvPatchField<scalar>::New(
"fixedValue", mesh.boundary()[
precinIndex], prec3));
575 fvPatchField<scalar>::New(
"fixedValue", mesh.boundary()[
precinIndex], prec4));
577 fvPatchField<scalar>::New(
"fixedValue", mesh.boundary()[
precinIndex], prec5));
579 fvPatchField<scalar>::New(
"fixedValue", mesh.boundary()[
precinIndex], prec6));
581 fvPatchField<scalar>::New(
"fixedValue", mesh.boundary()[
precinIndex], prec7));
583 fvPatchField<scalar>::New(
"fixedValue", mesh.boundary()[
precinIndex], prec8));
588 fvMesh& mesh = _mesh();
589 volScalarField& prec1 = _prec1();
590 volScalarField& prec2 = _prec2();
591 volScalarField& prec3 = _prec3();
592 volScalarField& prec4 = _prec4();
593 volScalarField& prec5 = _prec5();
594 volScalarField& prec6 = _prec6();
595 volScalarField& prec7 = _prec7();
596 volScalarField& prec8 = _prec8();
597 dimensionedScalar& lam1 = _lam1();
598 dimensionedScalar& lam2 = _lam2();
599 dimensionedScalar& lam3 = _lam3();
600 dimensionedScalar& lam4 = _lam4();
601 dimensionedScalar& lam5 = _lam5();
602 dimensionedScalar& lam6 = _lam6();
603 dimensionedScalar& lam7 = _lam7();
604 dimensionedScalar& lam8 = _lam8();
605 dimensionedScalar& tau = _tau();
606 bc_prec(0, call) = gSum(prec1.boundaryField()[precoutIndex] *
607 mesh.magSf().boundaryField()[precoutIndex]) / gSum(
608 mesh.magSf().boundaryField()[precoutIndex]) * std::exp(-lam1.value() *
610 bc_prec(1, call) = gSum(prec2.boundaryField()[precoutIndex] *
611 mesh.magSf().boundaryField()[precoutIndex]) / gSum(
612 mesh.magSf().boundaryField()[precoutIndex]) * std::exp(-lam2.value() *
614 bc_prec(2, call) = gSum(prec3.boundaryField()[precoutIndex] *
615 mesh.magSf().boundaryField()[precoutIndex]) / gSum(
616 mesh.magSf().boundaryField()[precoutIndex]) * std::exp(-lam3.value() *
618 bc_prec(3, call) = gSum(prec4.boundaryField()[precoutIndex] *
619 mesh.magSf().boundaryField()[precoutIndex]) / gSum(
620 mesh.magSf().boundaryField()[precoutIndex]) * std::exp(-lam4.value() *
622 bc_prec(4, call) = gSum(prec5.boundaryField()[precoutIndex] *
623 mesh.magSf().boundaryField()[precoutIndex]) / gSum(
624 mesh.magSf().boundaryField()[precoutIndex]) * std::exp(-lam5.value() *
626 bc_prec(5, call) = gSum(prec6.boundaryField()[precoutIndex] *
627 mesh.magSf().boundaryField()[precoutIndex]) / gSum(
628 mesh.magSf().boundaryField()[precoutIndex]) * std::exp(-lam6.value() *
630 bc_prec(6, call) = gSum(prec7.boundaryField()[precoutIndex] *
631 mesh.magSf().boundaryField()[precoutIndex]) / gSum(
632 mesh.magSf().boundaryField()[precoutIndex]) * std::exp(-lam7.value() *
634 bc_prec(7, call) = gSum(prec8.boundaryField()[precoutIndex] *
635 mesh.magSf().boundaryField()[precoutIndex]) / gSum(
636 mesh.magSf().boundaryField()[precoutIndex]) * std::exp(-lam8.value() *