phaseSystem.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2015-2022 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "phaseSystem.H"
27 #include "surfaceTensionModel.H"
28 #include "surfaceInterpolate.H"
29 #include "fvcDdt.H"
30 #include "localEulerDdtScheme.H"
31 #include "fvcDiv.H"
32 #include "fvcGrad.H"
33 #include "fvcSnGrad.H"
34 #include "CorrectPhi.H"
35 #include "fvcMeshPhi.H"
36 #include "alphaContactAngleFvPatchScalarField.H"
37 #include "correctContactAngle.H"
38 #include "dragModel.H"
40 #include "pimpleControl.H"
41 #include "pressureReference.H"
42 
43 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47  defineTypeNameAndDebug(phaseSystem, 0);
48  defineRunTimeSelectionTable(phaseSystem, dictionary);
49 }
50 
51 const Foam::word Foam::phaseSystem::propertiesName("phaseProperties");
52 
53 
54 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
55 
57 (
58  const phaseModelList& phaseModels
59 ) const
60 {
61  tmp<surfaceScalarField> tmpPhi
62  (
64  (
65  "phi",
66  fvc::interpolate(phaseModels[0])*phaseModels[0].phi()
67  )
68  );
69 
70  for (label phasei=1; phasei<phaseModels.size(); phasei++)
71  {
72  tmpPhi.ref() +=
73  fvc::interpolate(phaseModels[phasei])*phaseModels[phasei].phi();
74  }
75 
76  return tmpPhi;
77 }
78 
79 
81 {
82  tmp<volScalarField> sumAlphaMoving
83  (
85  (
86  "sumAlphaMoving",
87  movingPhaseModels_[0],
88  calculatedFvPatchScalarField::typeName
89  )
90  );
91 
92  for
93  (
94  label movingPhasei=1;
95  movingPhasei<movingPhaseModels_.size();
96  movingPhasei++
97  )
98  {
99  sumAlphaMoving.ref() += movingPhaseModels_[movingPhasei];
100  }
101 
102  return sumAlphaMoving;
103 }
104 
105 
107 {
108  // Calculate the mean velocity difference with respect to Um0
109  // from the current velocity of the moving phases
110  volVectorField dUm(Um0);
111 
112  forAll(movingPhaseModels_, movingPhasei)
113  {
114  dUm -=
115  movingPhaseModels_[movingPhasei]
116  *movingPhaseModels_[movingPhasei].U();
117  }
118 
119  forAll(movingPhaseModels_, movingPhasei)
120  {
121  movingPhaseModels_[movingPhasei].URef() += dUm;
122  }
123 }
124 
125 
127 (
128  const PtrList<surfaceScalarField>& alphafs,
129  const surfaceScalarField& phim0
130 )
131 {
132  // Calculate the mean flux difference with respect to phim0
133  // from the current flux of the moving phases
134  surfaceScalarField dphim(phim0);
135 
136  forAll(movingPhaseModels_, movingPhasei)
137  {
138  dphim -=
139  alphafs[movingPhaseModels_[movingPhasei].index()]
140  *movingPhaseModels_[movingPhasei].phi();
141  }
142 
143  forAll(movingPhaseModels_, movingPhasei)
144  {
145  movingPhaseModels_[movingPhasei].phiRef() += dphim;
146  }
147 }
148 
149 
151 (
152  const volScalarField& alpha1,
153  const volScalarField& alpha2
154 ) const
155 {
156  /*
157  // Cell gradient of alpha
158  volVectorField gradAlpha =
159  alpha2*fvc::grad(alpha1) - alpha1*fvc::grad(alpha2);
160 
161  // Interpolated face-gradient of alpha
162  surfaceVectorField gradAlphaf = fvc::interpolate(gradAlpha);
163  */
164 
165  surfaceVectorField gradAlphaf
166  (
168  - fvc::interpolate(alpha1)*fvc::interpolate(fvc::grad(alpha2))
169  );
170 
171  // Face unit interface normal
172  return gradAlphaf/(mag(gradAlphaf) + deltaN_);
173 }
174 
175 
177 (
178  const volScalarField& alpha1,
179  const volScalarField& alpha2
180 ) const
181 {
182  // Face unit interface normal flux
183  return nHatfv(alpha1, alpha2) & mesh_.Sf();
184 }
185 
186 
188 (
189  const phaseModel& phase1,
190  const phaseModel& phase2
191 ) const
192 {
193  tmp<surfaceVectorField> tnHatfv = nHatfv(phase1, phase2);
194 
196  (
197  phase1,
198  phase2,
199  phase1.U()().boundaryField(),
200  deltaN_,
201  tnHatfv.ref().boundaryFieldRef()
202  );
203 
204  // Simple expression for curvature
205  return -fvc::div(tnHatfv & mesh_.Sf());
206 }
207 
208 
209 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
210 
212 (
213  const fvMesh& mesh
214 )
215 :
216  IOdictionary
217  (
218  IOobject
219  (
220  propertiesName,
221  mesh.time().constant(),
222  mesh,
223  IOobject::MUST_READ_IF_MODIFIED,
224  IOobject::NO_WRITE
225  )
226  ),
227 
228  mesh_(mesh),
229 
230  referencePhaseName_(lookupOrDefault("referencePhase", word::null)),
231 
232  phaseModels_
233  (
234  lookup("phases"),
235  phaseModel::iNew(*this, referencePhaseName_)
236  ),
237 
238  phi_("phi", calcPhi(phaseModels_)),
239 
240  dpdt_
241  (
242  IOobject
243  (
244  "dpdt",
245  mesh.time().timeName(),
246  mesh
247  ),
248  mesh,
250  ),
251 
252  MRF_(mesh_),
253 
254  deltaN_
255  (
256  "deltaN",
257  1e-8/pow(average(mesh_.V()), 1.0/3.0)
258  )
259 {
260  // Groupings
261  label movingPhasei = 0;
262  label stationaryPhasei = 0;
263  label anisothermalPhasei = 0;
264  label multiComponentPhasei = 0;
265  forAll(phaseModels_, phasei)
266  {
267  phaseModel& phase = phaseModels_[phasei];
268  movingPhasei += !phase.stationary();
269  stationaryPhasei += phase.stationary();
270  anisothermalPhasei += !phase.isothermal();
271  multiComponentPhasei += !phase.pure();
272  }
273  movingPhaseModels_.resize(movingPhasei);
274  stationaryPhaseModels_.resize(stationaryPhasei);
275  anisothermalPhaseModels_.resize(anisothermalPhasei);
276  multiComponentPhaseModels_.resize(multiComponentPhasei);
277 
278  movingPhasei = 0;
279  stationaryPhasei = 0;
280  anisothermalPhasei = 0;
281  multiComponentPhasei = 0;
282  forAll(phaseModels_, phasei)
283  {
284  phaseModel& phase = phaseModels_[phasei];
285  if (!phase.stationary())
286  {
287  movingPhaseModels_.set(movingPhasei++, &phase);
288  }
289  if (phase.stationary())
290  {
291  stationaryPhaseModels_.set(stationaryPhasei++, &phase);
292  }
293  if (!phase.isothermal())
294  {
295  anisothermalPhaseModels_.set(anisothermalPhasei++, &phase);
296  }
297  if (!phase.pure())
298  {
299  multiComponentPhaseModels_.set(multiComponentPhasei++, &phase);
300  }
301  }
302 
303  // Write phi
304  phi_.writeOpt() = IOobject::AUTO_WRITE;
305 
306  // Interface compression coefficients
307  if (this->found("interfaceCompression"))
308  {
309  generateInterfacialValues("interfaceCompression", cAlphas_);
310  }
311 
312  // Surface tension models
313  generateInterfacialModels(surfaceTensionModels_);
314 
315  // Update motion fields
316  correctKinematics();
317 
318  // Set the optional reference phase fraction from the other phases
319  if (referencePhaseName_ != word::null)
320  {
321  phaseModel* referencePhasePtr = &phases()[referencePhaseName_];
322  volScalarField& referenceAlpha = *referencePhasePtr;
323 
324  referenceAlpha = 1;
325 
326  forAll(phaseModels_, phasei)
327  {
328  if (&phaseModels_[phasei] != referencePhasePtr)
329  {
330  referenceAlpha -= phaseModels_[phasei];
331  }
332  }
333  }
334 
335  forAll(phases(), phasei)
336  {
337  const volScalarField& alphai = phases()[phasei];
338  mesh_.schemes().setFluxRequired(alphai.name());
339  }
340 }
341 
342 
343 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
344 
346 {}
347 
348 
349 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
350 
352 {
353  tmp<volScalarField> rho(movingPhaseModels_[0]*movingPhaseModels_[0].rho());
354 
355  for
356  (
357  label movingPhasei=1;
358  movingPhasei<movingPhaseModels_.size();
359  movingPhasei++
360  )
361  {
362  rho.ref() +=
363  movingPhaseModels_[movingPhasei]
364  *movingPhaseModels_[movingPhasei].rho();
365  }
366 
367  if (stationaryPhaseModels_.empty())
368  {
369  return rho;
370  }
371  else
372  {
373  return rho/sumAlphaMoving();
374  }
375 }
376 
377 
379 {
380  tmp<volVectorField> U(movingPhaseModels_[0]*movingPhaseModels_[0].U());
381 
382  for
383  (
384  label movingPhasei=1;
385  movingPhasei<movingPhaseModels_.size();
386  movingPhasei++
387  )
388  {
389  U.ref() +=
390  movingPhaseModels_[movingPhasei]
391  *movingPhaseModels_[movingPhasei].U();
392  }
393 
394  if (stationaryPhaseModels_.empty())
395  {
396  return U;
397  }
398  else
399  {
400  return U/sumAlphaMoving();
401  }
402 }
403 
404 
406 Foam::phaseSystem::sigma(const phaseInterfaceKey& key) const
407 {
408  if (surfaceTensionModels_.found(key))
409  {
410  return surfaceTensionModels_[key]->sigma();
411  }
412  else
413  {
414  return volScalarField::New
415  (
416  surfaceTensionModel::typeName + ":sigma",
417  mesh_,
419  );
420  }
421 }
422 
423 
425 Foam::phaseSystem::sigma(const phaseInterfaceKey& key, const label patchi) const
426 {
427  if (surfaceTensionModels_.found(key))
428  {
429  return surfaceTensionModels_[key]->sigma(patchi);
430  }
431  else
432  {
433  return tmp<scalarField>
434  (
435  new scalarField(mesh_.boundary()[patchi].size(), 0)
436  );
437  }
438 }
439 
440 
443 {
444  tmp<volScalarField> tnearInt
445  (
447  (
448  "nearInterface",
449  mesh_,
451  )
452  );
453 
454  forAll(phases(), phasei)
455  {
456  tnearInt.ref() = max
457  (
458  tnearInt(),
459  pos0(phases()[phasei] - 0.01)*pos0(0.99 - phases()[phasei])
460  );
461  }
462 
463  return tnearInt;
464 }
465 
466 
468 (
469  const phaseInterfaceKey& key
470 ) const
471 {
472  return volScalarField::New
473  (
474  IOobject::groupName("dmdtf", phaseInterface(*this, key).name()),
475  mesh(),
477  );
478 }
479 
480 
482 {
483  return PtrList<volScalarField>(phaseModels_.size());
484 }
485 
486 
488 {
489  return PtrList<volScalarField>(phaseModels_.size());
490 }
491 
492 
494 {
495  forAll(phaseModels_, phasei)
496  {
497  if (!phaseModels_[phasei].incompressible())
498  {
499  return false;
500  }
501  }
502 
503  return true;
504 }
505 
506 
507 bool Foam::phaseSystem::implicitPhasePressure(const phaseModel& phase) const
508 {
509  return false;
510 }
511 
512 
514 {
515  return false;
516 }
517 
518 
520 (
521  const phaseModel& phase1
522 ) const
523 {
524  tmp<surfaceScalarField> tSurfaceTension
525  (
527  (
528  "surfaceTension",
529  mesh_,
530  dimensionedScalar(dimensionSet(1, -2, -2, 0, 0), 0)
531  )
532  );
533 
534  forAll(phases(), phasej)
535  {
536  const phaseModel& phase2 = phases()[phasej];
537 
538  if (&phase2 != &phase1)
539  {
540  const phaseInterface interface(phase1, phase2);
541 
542  if (cAlphas_.found(interface))
543  {
544  tSurfaceTension.ref() +=
545  fvc::interpolate(sigma(interface)*K(phase1, phase2))
546  *(
547  fvc::interpolate(phase2)*fvc::snGrad(phase1)
548  - fvc::interpolate(phase1)*fvc::snGrad(phase2)
549  );
550  }
551  }
552  }
553 
554  return tSurfaceTension;
555 }
556 
557 
559 {
560  forAll(phaseModels_, phasei)
561  {
562  phaseModels_[phasei].correct();
563  }
564 }
565 
566 
568 {
569  const PtrList<volScalarField> dmdts = this->dmdts();
570 
571  forAll(movingPhaseModels_, movingPhasei)
572  {
573  phaseModel& phase = movingPhaseModels_[movingPhasei];
574  const volScalarField& alpha = phase;
575  volScalarField& rho = phase.thermoRef().rho();
576 
577  volScalarField source
578  (
580  (
581  IOobject::groupName("source", phase.name()),
582  mesh_,
584  )
585  );
586 
587  if (fvModels().addsSupToField(rho.name()))
588  {
589  source += fvModels().source(alpha, rho)&rho;
590  }
591 
592  if (dmdts.set(phase.index()))
593  {
594  source += dmdts[phase.index()];
595  }
596 
597  phase.correctContinuityError(source);
598  }
599 }
600 
601 
603 {
604  bool updateDpdt = false;
605 
606  forAll(phaseModels_, phasei)
607  {
608  phaseModels_[phasei].correctKinematics();
609 
610  updateDpdt = updateDpdt || phaseModels_[phasei].thermo().dpdt();
611  }
612 
613  // Update the pressure time-derivative if required
614  if (updateDpdt)
615  {
616  dpdt_ = fvc::ddt(phaseModels_.begin()().thermo().p());
617  }
618 }
619 
620 
622 {
623  forAll(phaseModels_, phasei)
624  {
625  phaseModels_[phasei].correctThermo();
626  }
627 }
628 
629 
631 {
632  forAll(phaseModels_, phasei)
633  {
634  phaseModels_[phasei].correctReactions();
635  }
636 }
637 
638 
640 {
641  forAll(phaseModels_, phasei)
642  {
643  phaseModels_[phasei].correctSpecies();
644  }
645 }
646 
647 
649 {
650  forAll(phaseModels_, phasei)
651  {
652  phaseModels_[phasei].correctTurbulence();
653  }
654 }
655 
656 
658 {
659  forAll(phaseModels_, phasei)
660  {
661  phaseModels_[phasei].correctEnergyTransport();
662  }
663 }
664 
665 
667 {
668  if (mesh_.changing())
669  {
670  MRF_.update();
671 
672  // forAll(phaseModels_, phasei)
673  // {
674  // phaseModels_[phasei].meshUpdate();
675  // }
676  }
677 }
678 
679 
681 {
682  forAll(movingPhases(), movingPhasei)
683  {
684  phaseModel& phase = movingPhases()[movingPhasei];
685 
686  const volVectorField::Boundary& UBf = phase.U()().boundaryField();
687 
688  FieldField<fvsPatchField, scalar> phiRelBf
689  (
690  MRF_.relative(mesh_.Sf().boundaryField() & UBf)
691  );
692 
693  surfaceScalarField::Boundary& phiBf = phase.phiRef().boundaryFieldRef();
694 
695  forAll(mesh_.boundary(), patchi)
696  {
697  if
698  (
699  isA<fixedValueFvsPatchScalarField>(phiBf[patchi])
700  && !isA<movingWallVelocityFvPatchVectorField>(UBf[patchi])
701  )
702  {
703  phiBf[patchi] == phiRelBf[patchi];
704  }
705  }
706  }
707 }
708 
709 
711 (
712  const volScalarField& p_rgh,
713  const tmp<volScalarField>& divU,
715  nonOrthogonalSolutionControl& pimple
716 )
717 {
718  forAll(movingPhases(), movingPhasei)
719  {
720  phaseModel& phase = movingPhases()[movingPhasei];
721 
722  volVectorField::Boundary& Ubf = phase.URef().boundaryFieldRef();
723  surfaceVectorField::Boundary& UfBf = phase.UfRef().boundaryFieldRef();
724 
725  forAll(Ubf, patchi)
726  {
727  if (Ubf[patchi].fixesValue())
728  {
729  Ubf[patchi].initEvaluate();
730  }
731  }
732 
733  forAll(Ubf, patchi)
734  {
735  if (Ubf[patchi].fixesValue())
736  {
737  Ubf[patchi].evaluate();
738  UfBf[patchi] = Ubf[patchi];
739  }
740  }
741  }
742 
743  // Correct fixed-flux BCs to be consistent with the velocity BCs
744  correctBoundaryFlux();
745 
746  {
747  phi_ = Zero;
748  PtrList<surfaceScalarField> alphafs(phaseModels_.size());
749  forAll(movingPhases(), movingPhasei)
750  {
751  phaseModel& phase = movingPhases()[movingPhasei];
752  const label phasei = phase.index();
753  const volScalarField& alpha = phase;
754 
755  alphafs.set(phasei, fvc::interpolate(alpha).ptr());
756 
757  // Calculate absolute flux
758  // from the mapped surface velocity
759  phi_ += alphafs[phasei]*(mesh_.Sf() & phase.Uf());
760  }
761 
762  CorrectPhi
763  (
764  phi_,
765  movingPhases()[0].U(),
766  p_rgh,
767  // surfaceScalarField("rAUf", fvc::interpolate(rAU())),
769  divU(),
770  pressureReference,
771  pimple
772  );
773 
774  // Make the flux relative to the mesh motion
775  fvc::makeRelative(phi_, movingPhases()[0].U());
776 
777  setMixturePhi(alphafs, phi_);
778  }
779 }
780 
781 
783 {
784  if (regIOobject::read())
785  {
786  bool readOK = true;
787 
788  forAll(phaseModels_, phasei)
789  {
790  readOK &= phaseModels_[phasei].read();
791  }
792 
793  // models ...
794 
795  return readOK;
796  }
797  else
798  {
799  return false;
800  }
801 }
802 
803 
805 {
806  if (fv::localEulerDdt::enabled(vf.mesh()))
807  {
808  return fv::localEulerDdt::localRDeltaT(vf.mesh())*vf;
809  }
810  else
811  {
812  return vf/vf.mesh().time().deltaT();
813  }
814 }
815 
816 
818 {
819  if (fv::localEulerDdt::enabled(sf.mesh()))
820  {
821  return fv::localEulerDdt::localRDeltaTf(sf.mesh())*sf;
822  }
823  else
824  {
825  return sf/sf.mesh().time().deltaT();
826  }
827 }
828 
829 
830 // ************************************************************************* //
static const word propertiesName
Default name of the phase properties dictionary.
Definition: phaseSystem.H:237
pressureReference & pressureReference
volScalarField & p_rgh
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcGrad.C:52
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:434
virtual void correctTurbulence()
Correct the turbulence.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
pimpleNoLoopControl & pimple
static const surfaceScalarField & localRDeltaTf(const fvMesh &mesh)
Return the reciprocal of the local face time-step.
Definition: localEulerDdt.C:58
label phasei
Definition: pEqn.H:27
tmp< surfaceScalarField > nHatf(const volScalarField &alpha1, const volScalarField &alpha2) const
Normal to interface between two phases dotted with face areas.
U
Definition: pEqn.H:72
virtual PtrList< volScalarField > d2mdtdps() const
Return the mass transfer pressure implicit coefficients.
virtual bool read()
Read object.
PtrList< surfaceScalarField > alphafs(phases.size())
void correctContactAngle(const volScalarField &alpha1, const volScalarField &alpha2, const volVectorField::Boundary &Ubf, const dimensionedScalar &deltaN, surfaceVectorField::Boundary &nHatbf)
Correct the contact angle for the two volume fraction fields.
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
const dimensionSet dimPressure
void setMixturePhi(const PtrList< surfaceScalarField > &alphafs, const surfaceScalarField &phim)
Re-normalise the flux of the phases.
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
static tmp< GeometricField< scalar, fvsPatchField, surfaceMesh > > New(const word &name, const Internal &, const PtrList< fvsPatchField< scalar >> &)
Return a temporary field constructed from name,.
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
tmp< volScalarField > K(const phaseModel &alpha1, const phaseModel &alpha2) const
Curvature of interface between two phases.
virtual bool incompressible() const
Return whether the phase is incompressible.
Calculate the snGrad of the given volField.
void correctPhi(const volScalarField &p_rgh, const tmp< volScalarField > &divU, const pressureReference &pressureReference, nonOrthogonalSolutionControl &pimple)
GeometricBoundaryField< vector, fvPatchField, volMesh > Boundary
Type of the boundary field.
const dimensionSet dimless
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:59
fvMesh & mesh
CGAL::Exact_predicates_exact_constructions_kernel K
tmp< volScalarField > nearInterface() const
Indicator of the proximity of the interface.
virtual volScalarField & p()=0
Pressure [Pa].
virtual const rhoThermo & thermo() const
Return the thermophysical model.
void correctBoundaryFlux()
Correct fixed-flux BCs to be consistent with the velocity BCs.
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
Definition: fvcDdt.C:45
tmp< surfaceScalarField > surfaceTension(const phaseModel &phase) const
Return the surface tension force.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:58
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m^2/K^4].
Calculate the first temporal derivative.
virtual void correctContinuityError()
Correct the continuity errors.
const dimensionSet dimTime
virtual void correctKinematics()
Correct the kinematics.
stressControl lookup("compactNormalStress") >> compactNormalStress
static bool enabled(const fvMesh &mesh)
Return true if LTS is enabled.
Definition: localEulerDdt.C:37
phaseSystem(const fvMesh &mesh)
Construct from fvMesh.
Calculate the gradient of the given field.
A class for handling words, derived from string.
Definition: word.H:59
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
static word groupName(Name name, const word &group)
virtual tmp< volScalarField > dmdtf(const phaseInterfaceKey &key) const
Return the mass transfer rate for an interface.
tmp< volVectorField > U() const
Return the mixture velocity.
const dimensionSet dimDensity
virtual void correctThermo()
Correct the thermodynamics.
static const word null
An empty word.
Definition: word.H:77
phi
Definition: correctPhi.H:3
word timeName
Definition: getTimeIndex.H:3
static const zero Zero
Definition: zero.H:97
static const volScalarField & localRDeltaT(const fvMesh &mesh)
Return the reciprocal of the local time-step.
Definition: localEulerDdt.C:46
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)
tmp< surfaceVectorField > nHatfv(const volScalarField &alpha1, const volScalarField &alpha2) const
Normal to interface between two phases.
Calculate the divergence of the given field.
dimensionedScalar pos0(const dimensionedScalar &ds)
virtual void correct()
Correct the fluid properties other than those listed below.
tmp< volScalarField > rho() const
Return the mixture density.
virtual PtrList< volScalarField > dmdts() const
Return the mass transfer rates for each phase.
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
tmp< volScalarField > sumAlphaMoving() const
Return the sum of the phase fractions of the moving phases.
const Mesh & mesh() const
Return mesh.
defineTypeNameAndDebug(combustionModel, 0)
tmp< volScalarField > divU
Definition: alphaSuSp.H:9
volScalarField sf(fieldObject, mesh)
bool incompressible() const
Return incompressibility.
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
tmp< volScalarField > byDt(const volScalarField &vf)
tmp< volScalarField > sigma(const phaseInterfaceKey &key) const
Return the surface tension coefficient for an interface.
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
Calculate the mesh motion flux and convert fluxes from absolute to relative and back.
virtual void correctReactions()
Correct the reactions.
Foam::fvModels & fvModels
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
virtual tmp< volScalarField > rho() const
Return the density field.
virtual void correctEnergyTransport()
Correct the energy transport e.g. alphat.
label patchi
tmp< surfaceScalarField > calcPhi(const phaseModelList &phaseModels) const
Calculate and return the mixture flux.
static const dimensionSet dimSigma
Surface tension coefficient dimensions.
virtual ~phaseSystem()
Destructor.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:70
virtual bool read()
Read base phaseProperties dictionary.
phaseSystem::phaseModelList & phases
Definition: createFields.H:12
dimensioned< scalar > mag(const dimensioned< Type > &)
void setMixtureU(const volVectorField &Um)
Re-normalise the velocity of the phases.
const doubleScalar e
Elementary charge.
Definition: doubleScalar.H:105
void CorrectPhi(surfaceScalarField &phi, const volVectorField &U, const volScalarField &p, const RAUfType &rAUf, const DivUType &divU, const pressureReference &pressureReference, nonOrthogonalSolutionControl &pcorrControl)
Definition: CorrectPhi.C:44
A class for managing temporary objects.
Definition: PtrList.H:53
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
void makeRelative(surfaceScalarField &phi, const volVectorField &U)
Make the given flux relative.
Definition: fvcMeshPhi.C:89
virtual void meshUpdate()
Update the fluid properties for mesh changes.
bool found
virtual bool implicitPhasePressure() const
Returns true if the phase pressure is treated implicitly.
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcSnGrad.C:45
virtual void correctSpecies()
Correct the species mass fractions.
Namespace for OpenFOAM.