37 void Foam::solvers::isothermalFilm::constrainFixedFlux
47 pbByAlphaGradRhof.boundaryFieldRef();
55 if (!UBf[
patchi].assignable())
58 pbByAlphaGradRhoBf[
patchi] = 0;
65 void Foam::solvers::isothermalFilm::correctAlpha()
76 constrainedField(this->pbByAlphaGradRhof()*
mesh.
magSf())
83 fvc::snGrad(pe() + pc(surfaceTension->sigma()),
"snGrad(p)")
89 constrainFixedFlux(pbByAlphaf, pbByAlphaGradRhof, phip);
115 alphaf*rhof*alpharAUf*pbByAlphaf
126 while (
pimple.correctNonOrthogonal())
132 if (
pimple.finalNonOrthogonalIter())
134 alphaRhoPhi_ = alphaEqn.flux();
143 phi_ -= alpharAUf*phiGradAlpha;
148 U_ -= nHat*(nHat &
U);
150 U_.correctBoundaryConditions();
#define forAll(list, i)
Loop across all elements in list.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
GeometricBoundaryField< Type, GeoMesh, PrimitiveField > Boundary
Type of the boundary field.
bool constrain(fvMatrix< Type > &eqn) const
Apply constraints to an equation.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
const surfaceVectorField & Sf() const
Return cell face area vectors.
const surfaceScalarField & magSf() const
Return cell face area magnitudes.
const fvMesh & mesh
Region mesh.
const volVectorField & U
Reference to the film velocity field.
tmp< fvVectorMatrix > tUEqn(fvm::div(phi, U)+MRF.DDt(rho, U)+turbulence->divDevTau(U)==fvModels.source(rho, U))
Foam::fvConstraints & fvConstraints(Foam::fvConstraints::New(mesh))
Foam::fvModels & fvModels(Foam::fvModels::New(mesh))
pimpleControl pimple(mesh)
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
Calculate the face-flux of the given field.
Reconstruct volField from a face flux field.
Calculate the snGrad of the given volField.
Calculate the matrix for the divergence of the given field and flux.
Calculate the matrix for the laplacian of the field.
volScalarField rAU(1.0/UEqn.A())
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
tmp< SurfaceField< typename innerProduct< vector, Type >::type > > flux(const VolField< Type > &vf)
Return the face-flux field obtained from the given volVectorField.
static tmp< SurfaceField< Type > > interpolate(const VolField< Type > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
tmp< VolField< typename outerProduct< vector, Type >::type > > reconstruct(const SurfaceField< Type > &ssf)
tmp< SurfaceField< Type > > snGrad(const VolField< Type > &vf, const word &name)
tmp< fvMatrix< Type > > laplacian(const VolField< Type > &vf, const word &name)
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const VolField< Type > &vf, const word &name)
tmp< fvMatrix< Type > > ddt(const VolField< Type > &vf)
VolField< vector > volVectorField
fvMatrix< scalar > fvScalarMatrix
SurfaceField< scalar > surfaceScalarField
void constrainHbyA(volVectorField &HbyA, const volVectorField &U, const volScalarField &p)
VolField< scalar > volScalarField
fvMatrix< vector > fvVectorMatrix