diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForce/contactAngleForce.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForce/contactAngleForce.C index 5f31601474a327835ab8b8fd2b73cf8fb7de2ede..2ceff1429f3f065fdb03962ba9291d6449f89c79 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForce/contactAngleForce.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForce/contactAngleForce.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -52,7 +52,6 @@ contactAngleForce::contactAngleForce ) : force(typeName, owner, dict), - deltaWet_(readScalar(coeffs_.lookup("deltaWet"))), Ccf_(readScalar(coeffs_.lookup("Ccf"))), rndGen_(label(0), -1), distribution_ @@ -82,7 +81,7 @@ tmp<fvVectorMatrix> contactAngleForce::correct(volVectorField& U) ( IOobject ( - "contactForce", + typeName + ".contactForce", owner_.time().timeName(), owner_.regionMesh(), IOobject::NO_READ, @@ -100,17 +99,11 @@ tmp<fvVectorMatrix> contactAngleForce::correct(volVectorField& U) const scalarField& magSf = owner_.magSf(); - const volScalarField& delta = owner_.delta(); + const volScalarField& alpha = owner_.alpha(); const volScalarField& sigma = owner_.sigma(); - volScalarField alpha - ( - "alpha", - pos(delta - dimensionedScalar("deltaWet", dimLength, deltaWet_)) - ); volVectorField gradAlpha(fvc::grad(alpha)); - scalarField nHits(owner_.regionMesh().nCells(), 0.0); forAll(nbr, faceI) @@ -119,19 +112,17 @@ tmp<fvVectorMatrix> contactAngleForce::correct(volVectorField& U) const label cellN = nbr[faceI]; label cellI = -1; - if ((delta[cellO] > deltaWet_) && (delta[cellN] < deltaWet_)) + if ((alpha[cellO] > 0.5) && (alpha[cellN] < 0.5)) { cellI = cellO; } - else if ((delta[cellO] < deltaWet_) && (delta[cellN] > deltaWet_)) + else if ((alpha[cellO] < 0.5) && (alpha[cellN] > 0.5)) { cellI = cellN; } if (cellI != -1) { -// const scalar dx = Foam::sqrt(magSf[cellI]); - // bit of a cheat, but ok for regular meshes const scalar dx = owner_.regionMesh().deltaCoeffs()[faceI]; const vector n = gradAlpha[cellI]/(mag(gradAlpha[cellI]) + ROOTVSMALL); @@ -141,17 +132,17 @@ tmp<fvVectorMatrix> contactAngleForce::correct(volVectorField& U) } } - forAll(delta.boundaryField(), patchI) + forAll(alpha.boundaryField(), patchI) { - const fvPatchField<scalar>& df = delta.boundaryField()[patchI]; - const scalarField& dx = df.patch().deltaCoeffs(); - const labelUList& faceCells = df.patch().faceCells(); + const fvPatchField<scalar>& alphaf = alpha.boundaryField()[patchI]; + const scalarField& dx = alphaf.patch().deltaCoeffs(); + const labelUList& faceCells = alphaf.patch().faceCells(); - forAll(df, faceI) + forAll(alphaf, faceI) { label cellO = faceCells[faceI]; - if ((delta[cellO] > deltaWet_) && (df[faceI] < deltaWet_)) + if ((alpha[cellO] > 0.5) && (alphaf[faceI] < 0.5)) { const vector n = gradAlpha[cellO]/(mag(gradAlpha[cellO]) + ROOTVSMALL); diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForce/contactAngleForce.H b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForce/contactAngleForce.H index 2ed08e02eeaf16e0872768d3ab6ee1c66ffec6b8..8a6dc7a8b3be713ba44e89c9746669b5deea4b1d 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForce/contactAngleForce.H +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForce/contactAngleForce.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -60,9 +60,6 @@ private: // Private Data - //- Threshold film thickness beyon which the film is 'wet' - scalar deltaWet_; - //- Coefficient applied to the contact angle force scalar Ccf_;