DarcyForchheimer: add support for solvers which provide nu rather than mu

This commit is contained in:
Henry
2014-05-12 23:15:27 +01:00
committed by Andrew Heather
parent 683cd5d7da
commit c47c287d45

View File

@ -203,11 +203,23 @@ void Foam::porosityModels::DarcyForchheimer::correct
if (UEqn.dimensions() == dimForce) if (UEqn.dimensions() == dimForce)
{ {
const volScalarField& rho = mesh_.lookupObject<volScalarField>(rhoName); const volScalarField& rho = mesh_.lookupObject<volScalarField>(rhoName);
const volScalarField& mu = mesh_.lookupObject<volScalarField>(muName);
if (mesh_.foundObject<volScalarField>(muName))
{
const volScalarField& mu =
mesh_.lookupObject<volScalarField>(muName);
apply(Udiag, Usource, V, rho, mu, U); apply(Udiag, Usource, V, rho, mu, U);
} }
else else
{
const volScalarField& nu =
mesh_.lookupObject<volScalarField>(nuName);
apply(Udiag, Usource, V, rho, rho*nu, U);
}
}
else
{ {
if (mesh_.foundObject<volScalarField>(nuName)) if (mesh_.foundObject<volScalarField>(nuName))
{ {