42 namespace patchDistMethods
51 Foam::patchDistMethods::advectionDiffusion::advectionDiffusion
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_)
121 scalar initialResidual = 0;
126 ny /= (
mag(ny) + SMALL);
129 nf /= (
mag(nf) + SMALL);
143 initialResidual = yEqn.solve().initialResidual();
145 }
while (initialResidual > tolerance_ && ++iter < maxIter_);
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &vf, const surfaceScalarField &faceFlux, Istream &schemeData)
Mesh data needed to do the Finite Volume discretisation.
Calculate the matrix for implicit and explicit sources.
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, 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...
dimensioned< scalar > mag(const dimensioned< Type > &)
GeometricBoundaryField & boundaryField()
Return reference to GeometricBoundaryField.
defineTypeNameAndDebug(advectionDiffusion, 0)
Info<< "Predicted p max-min : "<< max(p).value()<< " "<< min(p).value()<< endl;rho==max(psi *p+alphal *rhol0+((alphav *psiv+alphal *psil)-psi)*pSat, rhoMin);#1"/home/dm2/henry/OpenFOAM/OpenFOAM-3.0.x/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()
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Calculate the matrix for the divergence of the given field and flux.
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.
bool notNull(const T &t)
Return true if t is not a reference to the nullObject of type T.
A list of keyword definitions, which are a keyword followed by any number of values (e...
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
tmp< fvMatrix< Type > > Sp(const DimensionedField< scalar, volMesh > &, const GeometricField< Type, fvPatchField, volMesh > &)
Calculate the gradient of the given field.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
const double e
Elementary charge.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Macros for easy insertion into run-time selection tables.
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
Calculate the matrix for the laplacian of the field.
addToRunTimeSelectionTable(patchDistMethod, advectionDiffusion, dictionary)
static const GeometricField< vector, fvPatchField, volMesh > & null()
Return a null geometric field.
Calculate the divergence of the given field.
Specialisation of patchDist for wall distance calculation.
Calculation of approximate distance to nearest patch for all cells and boundary by solving the Eikona...
static autoPtr< patchDistMethod > New(const dictionary &dict, const fvMesh &mesh, const labelHashSet &patchIDs)
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
virtual bool correct(volScalarField &y)
Correct the given distance-to-patch field.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.