staneuski / dualFuelEngine

OpenFOAM solver based on phenomenological compression model for dual-fuel marine engines
GNU Affero General Public License v3.0
13 stars 3 forks source link

Density BC has type zeroGradient for all patches #20

Closed staneuski closed 4 years ago

staneuski commented 4 years ago
Environment Parameter
Compiled using OpenFOAM dev-48a3622
Product Version v0.4.3-alpha
Commit 50de29e
Case \ File createFields.H
Comments Density constructor loop makes nothing. Also this forAll loop has no sense and any logical explanation. But without rhoBCTypes (when type calculatedis set for all density BC patches) the solution is unstable.
wordList rhoBCTypes
(
    p.boundaryField().size(),
    zeroGradientFvPatchScalarField::typeName
);

forAll(U.boundaryField(), patchi)
{
    if (U.boundaryField().types()[patchi] == zeroGradientFvPatchScalarField::typeName)
    {
        rhoBCTypes[patchi] = fixedValueFvPatchScalarField::typeName;
    }
}