Commit c5e7f356 authored by Henry Weller's avatar Henry Weller
Browse files

porosityModel::powerLaw: Added groupName to rho lookup to support multiphase

parent 5f258433
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -94,14 +94,16 @@ void Foam::porosityModels::powerLaw::correct
fvVectorMatrix& UEqn
) const
{
const vectorField& U = UEqn.psi();
const volVectorField& U = UEqn.psi();
const scalarField& V = mesh_.V();
scalarField& Udiag = UEqn.diag();
if (UEqn.dimensions() == dimForce)
{
const volScalarField& rho =
mesh_.lookupObject<volScalarField>(rhoName_);
const volScalarField& rho = mesh_.lookupObject<volScalarField>
(
IOobject::groupName(rhoName_, U.group())
);
apply(Udiag, V, rho, U);
}
......@@ -122,7 +124,7 @@ void Foam::porosityModels::powerLaw::correct
const vectorField& U = UEqn.psi();
const scalarField& V = mesh_.V();
scalarField& Udiag = UEqn.diag();
apply(Udiag, V, rho, U);
}
......@@ -133,12 +135,14 @@ void Foam::porosityModels::powerLaw::correct
volTensorField& AU
) const
{
const vectorField& U = UEqn.psi();
const volVectorField& U = UEqn.psi();
if (UEqn.dimensions() == dimForce)
{
const volScalarField& rho =
mesh_.lookupObject<volScalarField>(rhoName_);
const volScalarField& rho = mesh_.lookupObject<volScalarField>
(
IOobject::groupName(rhoName_, U.group())
);
apply(AU, rho, U);
}
......
Supports Markdown
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