27 #include "surfaceInterpolate.H" 42 namespace patchDistMethods
69 epsilon_(coeffs_.lookupOrDefault<scalar>(
"epsilon", 0.1)),
70 tolerance_(coeffs_.lookupOrDefault<scalar>(
"tolerance", 1
e-3)),
71 maxIter_(coeffs_.lookupOrDefault<
int>(
"maxIter", 10)),
92 pdmPredictor_->correct(y);
101 mesh_.time().timeName(),
109 patchTypes<vector>(mesh_, patchIDs_)
122 scalar initialResidual = 0;
127 ny /= (
mag(ny) + small);
130 nf /= (
mag(nf) + small);
144 initialResidual = yEqn.solve().initialResidual();
146 }
while (initialResidual > tolerance_ && ++iter < maxIter_);
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
static autoPtr< patchDistMethod > New(const dictionary &dict, const fvMesh &mesh, const labelHashSet &patchIDs)
A list of keyword definitions, which are a keyword followed by any number of values (e...
addToRunTimeSelectionTable(patchDistMethod, advectionDiffusion, dictionary)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
Calculate the matrix for the laplacian of the field.
const dimensionSet dimless
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
Macros for easy insertion into run-time selection tables.
advectionDiffusion(const dictionary &dict, const fvMesh &mesh, const labelHashSet &patchIDs)
Construct from coefficients dictionary, mesh.
const dictionary & optionalSubDict(const word &) const
Find and return a sub-dictionary if found.
Calculate the gradient of the given field.
Info<< "Predicted p max-min : "<< max(p).value()<< " "<< min(p).value()<< endl;rho==max(rho0+psi *p, rhoMin);# 1 "/home/ubuntu/OpenFOAM-9/applications/solvers/multiphase/cavitatingFoam/alphavPsi.H" 1{ alphav=max(min((rho - rholSat)/(rhovSat - rholSat), scalar(1)), scalar(0));alphal=1.0 - alphav;Info<< "max-min alphav: "<< max(alphav).value()<< " "<< min(alphav).value()<< endl;psiModel-> correct()
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
Calculate the divergence of the given field.
virtual bool correct(volScalarField &y)
Correct the given distance-to-patch field.
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
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.
bool notNull(const T &t)
Return true if t is not a reference to the nullObject of type T.
static const GeometricField< vector, fvPatchField, volMesh > & null()
Return a null geometric field.
Calculate the matrix for the divergence of the given field and flux.
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Mesh data needed to do the Finite Volume discretisation.
defineTypeNameAndDebug(advectionDiffusion, 0)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
dimensioned< scalar > mag(const dimensioned< Type > &)
const doubleScalar e
Elementary charge.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Specialisation of patchDist for wall distance calculation.
Calculation of approximate distance to nearest patch for all cells and boundary by solving the Eikona...
Calculate the matrix for implicit and explicit sources.