Skip to content
Snippets Groups Projects
Commit c47c287d authored by Henry's avatar Henry Committed by Andrew Heather
Browse files

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

parent 683cd5d7
Branches
Tags
No related merge requests found
......@@ -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
{
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment