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