Skip to content
Snippets Groups Projects
Commit 80e13f80 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 d1c18321
No related branches found
No related tags found
No related merge requests found
...@@ -42,8 +42,7 @@ volScalarField rho ...@@ -42,8 +42,7 @@ volScalarField rho
IOobject::NO_READ, IOobject::NO_READ,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
thermo.rho(), thermo.rho()
derivedPatchFieldTypes(p)
); );
volVectorField rhoU volVectorField rhoU
...@@ -56,8 +55,7 @@ volVectorField rhoU ...@@ -56,8 +55,7 @@ volVectorField rhoU
IOobject::NO_READ, IOobject::NO_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
rho*U, rho*U
derivedPatchFieldTypes(U)
); );
volScalarField rhoE volScalarField rhoE
...@@ -70,8 +68,7 @@ volScalarField rhoE ...@@ -70,8 +68,7 @@ volScalarField rhoE
IOobject::NO_READ, IOobject::NO_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
rho*(e + 0.5*magSqr(U)), rho*(e + 0.5*magSqr(U))
derivedPatchFieldTypes(T)
); );
surfaceScalarField pos surfaceScalarField pos
...@@ -98,19 +95,7 @@ surfaceScalarField neg ...@@ -98,19 +95,7 @@ surfaceScalarField neg
dimensionedScalar("neg", dimless, -1.0) dimensionedScalar("neg", dimless, -1.0)
); );
surfaceScalarField phi("phi", mesh.Sf() & fvc::interpolate(rhoU));
surfaceScalarField phi
(
IOobject
(
"phi",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh.Sf() & fvc::interpolate(rhoU)
);
Info<< "Creating turbulence model\n" << endl; Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::turbulenceModel> turbulence autoPtr<compressible::turbulenceModel> turbulence
......
...@@ -26,47 +26,7 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > interpolate ...@@ -26,47 +26,7 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > interpolate
sf.rename(vf.name() + '_' + dir.name()); 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; 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;
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment