Skip to content

Commit

Permalink
CMULES: Add optional control over support for extrema within bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry authored and Henry committed Oct 13, 2014
1 parent ccc06b4 commit f3c390a
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/finiteVolume/fvMatrices/solvers/MULES/CMULESTemplates.C
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
Expand Down Expand Up @@ -107,6 +107,7 @@ void Foam::MULES::correct
psiMax, psiMin,
nLimiterIter
);

correct(rDeltaT, rho, psi, phi, phiCorr, Sp, Su);
}

Expand Down Expand Up @@ -172,6 +173,13 @@ void Foam::MULES::limiterCorr

const fvMesh& mesh = psi.mesh();

const dictionary& MULEScontrols = mesh.solverDict(psi.name());

scalar extremaCoeff
(
MULEScontrols.lookupOrDefault<scalar>("extremaCoeff", 0.0)
);

const labelUList& owner = mesh.owner();
const labelUList& neighb = mesh.neighbour();
tmp<volScalarField::DimensionedInternalField> tVsc = mesh.Vsc();
Expand Down Expand Up @@ -283,8 +291,8 @@ void Foam::MULES::limiterCorr
}
}

psiMaxn = min(psiMaxn, psiMax);
psiMinn = max(psiMinn, psiMin);
psiMaxn = min(psiMaxn + extremaCoeff*(psiMax - psiMin), psiMax);
psiMinn = max(psiMinn - extremaCoeff*(psiMax - psiMin), psiMin);

// scalar smooth = 0.5;
// psiMaxn = min((1.0 - smooth)*psiIf + smooth*psiMaxn, psiMax);
Expand Down

0 comments on commit f3c390a

Please sign in to comment.