Commit 65833e6c authored by mattijs's avatar mattijs
Browse files

BUG: pressure: generate calculated bcs early. Fixes #685. Ep 581.

parent 08e6eca3
...@@ -70,7 +70,23 @@ Foam::tmp<Foam::volScalarField> Foam::functionObjects::pressure::rhoScale ...@@ -70,7 +70,23 @@ Foam::tmp<Foam::volScalarField> Foam::functionObjects::pressure::rhoScale
{ {
if (p.dimensions() == dimPressure) if (p.dimensions() == dimPressure)
{ {
return p; return tmp<volScalarField>
(
new volScalarField
(
IOobject
(
"rhoScale",
p.mesh().time().timeName(),
p.mesh(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
p,
fvPatchField<scalar>::calculatedType()
)
);
} }
else else
{ {
...@@ -188,8 +204,7 @@ bool Foam::functionObjects::pressure::calc() ...@@ -188,8 +204,7 @@ bool Foam::functionObjects::pressure::calc()
IOobject::NO_READ, IOobject::NO_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
coeff(pRef(pDyn(p, rhoScale(p)))), coeff(pRef(pDyn(p, rhoScale(p))))
fvPatchField<scalar>::calculatedType()
) )
); );
......
Markdown is supported
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