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

rhoCentralFoam: Reverted correction to BCs

Reverted changes proposed in
http://openfoam.org/mantisbt/view.php?id=1548 as it adversely affects
fixed-value BCs and is formulated to fix an issue with an unphysical
case.  Further analysis of the handling of fixed pressure outlet
conditions as the Mach number approaches 1 is required.
parent 0575911f
......@@ -42,8 +42,7 @@ volScalarField rho
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
thermo.rho(),
derivedPatchFieldTypes(p)
thermo.rho()
);
volVectorField rhoU
......@@ -56,8 +55,7 @@ volVectorField rhoU
IOobject::NO_READ,
IOobject::NO_WRITE
),
rho*U,
derivedPatchFieldTypes(U)
rho*U
);
volScalarField rhoE
......@@ -70,8 +68,7 @@ volScalarField rhoE
IOobject::NO_READ,
IOobject::NO_WRITE
),
rho*(e + 0.5*magSqr(U)),
derivedPatchFieldTypes(T)
rho*(e + 0.5*magSqr(U))
);
surfaceScalarField pos
......@@ -98,19 +95,7 @@ surfaceScalarField neg
dimensionedScalar("neg", dimless, -1.0)
);
surfaceScalarField phi
(
IOobject
(
"phi",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh.Sf() & fvc::interpolate(rhoU)
);
surfaceScalarField phi("phi", mesh.Sf() & fvc::interpolate(rhoU));
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::turbulenceModel> turbulence
......
......@@ -26,47 +26,7 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > interpolate
sf.rename(vf.name() + '_' + dir.name());
// Correct BCs of the positive (outgoing) fluxes
forAll(sf.boundaryField(), patchi)
{
if
(
!sf.boundaryField()[patchi].coupled()
&& sf.boundaryField()[patchi].size()
&& !vf.boundaryField()[patchi].fixesValue()
&& dir.boundaryField()[patchi][0] > 0
)
{
sf.boundaryField()[patchi] =
vf.boundaryField()[patchi].patchInternalField();
}
}
return tsf;
}
template<class Type>
wordList derivedPatchFieldTypes
(
const GeometricField<Type, fvPatchField, volMesh>& vf
)
{
wordList phiTypes
(
vf.boundaryField().size(),
calculatedFvPatchField<Type>::typeName
);
forAll(vf.boundaryField(), patchi)
{
if (vf.boundaryField()[patchi].fixesValue())
{
phiTypes[patchi] = fixedValueFvPatchField<Type>::typeName;
}
}
return phiTypes;
}
}
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