50 scalar maxRatio = 1 + coeff;
60 const label own = owner[facei];
61 const label nbr = neighbour[facei];
66 changedFaces.
append(facei);
71 changedFaces.
append(facei);
85 label facei = patch.start() + patchFacei;
86 label own =
mesh.faceOwner()[facei];
88 changedFaces.
append(facei);
102 cellData[celli] =
field[celli];
119 mesh.globalData().nTotalCells(),
125 field[celli] = cellData[celli].value();
128 field.correctBoundaryConditions();
137 const scalar alphaDiff,
139 const scalar alphaMin
152 cellData[celli] =
field[celli];
163 const label own = owner[facei];
164 const label nbr = neighbour[facei];
168 changedFaces.
append(facei);
185 label facei = patch.start() + patchFacei;
186 label own =
mesh.faceOwner()[facei];
190 alpha.boundaryField()[patchi].patchNeighbourField()
193 if (
mag(
alpha[own] - alphapn[patchFacei]) > alphaDiff)
195 changedFaces.
append(facei);
203 changedFacesInfo.
shrink();
217 smoothData.setFaceInfo(changedFaces, changedFacesInfo);
223 field[celli] = cellData[celli].value();
226 field.correctBoundaryConditions();
235 const scalar alphaDiff
255 const label own = owner[facei];
256 const label nbr = neighbour[facei];
260 changedFaces.
append(facei);
277 label facei = patch.start() + patchFacei;
278 label own =
mesh.faceOwner()[facei];
282 alpha.boundaryField()[patchi].patchNeighbourField()
285 if (
mag(
alpha[own] - alphapn[patchFacei]) > alphaDiff)
287 changedFaces.
append(facei);
298 changedFacesInfo.
shrink();
308 sweepData.setFaceInfo(changedFaces, changedFacesInfo);
314 if (cellData[celli].valid(
sweepData.data()))
320 field.correctBoundaryConditions();
341 mesh.time().timeName(),
354 fvm::Sp(scalar(1), mDotSmear)
355 - fvm::laplacian(
D, mDotSmear)
372 if (
alpha1[celli] < cutoff)
374 intvDotVapor.
value() +=
375 alpha2[celli]*mDotSmear[celli]*Vol[celli];
377 else if (
alpha1[celli] > 1.0 - cutoff)
379 intvDotLiquid.
value() +=
380 alpha1[celli]*mDotSmear[celli]*Vol[celli];
393 if (intvDotVapor.
value() > VSMALL)
395 Nv = intmSource0/intvDotVapor;
397 if (intvDotLiquid.
value() > VSMALL)
399 Nl = intmSource0/intvDotLiquid;
405 if (
alpha1[celli] < cutoff)
407 mDotOut[celli] = Nv.
value()*(1 -
alpha1[celli])*mDotSmear[celli];
409 else if (
alpha1[celli] > 1.0 - cutoff)
412 mDotOut[celli] = -Nl.
value()*
alpha1[celli]*mDotSmear[celli];
reduce(hasMovingMesh, orOp< bool >())
const volScalarField & alpha1
const volScalarField & alpha2
const dimensionSet & dimensions() const
Return dimensions.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
DynamicList< T, SizeMin > & shrink()
Shrink the allocated space to the number of elements used.
void append(const T &val)
Copy append an element to the end of this list.
Wave propagation of information through grid. Every iteration information goes through one layer of c...
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void size(const label n)
Older name for setAddressableSize.
const Type & value() const
Return const reference to value.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
SolverPerformance< Type > solve(const dictionary &)
Solve returning the solution statistics.
Mesh data needed to do the Finite Volume discretisation.
A patch is a list of labels that address the faces in the global face list.
Class used to pass additional data in.
scalar maxRatio
Cut off distance.
Helper class used by the fvc::smooth and fvc::spread functions.
Helper class used by fvc::sweep function.
This boundary condition applies a zero-gradient condition from the patch internal field onto the patc...
A special matrix type and solver, designed for finite volume solutions of scalar equations.
Provides functions smooth spread and sweep which use the FaceCellWave algorithm to smooth and redistr...
Volume integrate volField creating a volField.
Calculate the matrix for the laplacian of the field.
Calculate the finiteVolume matrix for implicit and explicit sources.
void sweep(volScalarField &field, const volScalarField &alpha, const label nLayers, const scalar alphaDiff=0.2)
void spreadSource(volScalarField &mDotOut, const volScalarField &mDotIn, const volScalarField &alpha1, const volScalarField &alpha2, const dimensionedScalar &D, const scalar cutoff)
void smooth(volScalarField &field, const scalar coeff)
void spread(volScalarField &field, const volScalarField &alpha, const label nLayers, const scalar alphaDiff=0.2, const scalar alphaMax=0.99, const scalar alphaMin=0.01)
const dimensionSet dimless
Dimensionless.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
const dimensionedScalar & D
dimensionedScalar alphaMax("alphaMax", dimless/dimTime, laminarTransport)
#define forAll(list, i)
Loop across all elements in list.