mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
DarcyForchheimer: add support for solvers which provide nu rather than mu
This commit is contained in:
@ -203,9 +203,21 @@ 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);
|
|
||||||
|
|
||||||
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
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user