driftFluxFoam: Corrected Udm BCs
Added 'READ_IF_PRESENT' option to support overriding of the default BCs for complex problems requiring special treatment of Udm at boundaries. Resolves bug-report http://bugs.openfoam.org/view.php?id=2317
This commit is contained in:
parent
423ac54eab
commit
8e01ae0462
2 changed files with 39 additions and 3 deletions
|
|
@ -24,6 +24,9 @@ License
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "relativeVelocityModel.H"
|
#include "relativeVelocityModel.H"
|
||||||
|
#include "fixedValueFvPatchFields.H"
|
||||||
|
#include "slipFvPatchFields.H"
|
||||||
|
#include "partialSlipFvPatchFields.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|
@ -33,6 +36,34 @@ namespace Foam
|
||||||
defineRunTimeSelectionTable(relativeVelocityModel, dictionary);
|
defineRunTimeSelectionTable(relativeVelocityModel, dictionary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::wordList Foam::relativeVelocityModel::UdmPatchFieldTypes() const
|
||||||
|
{
|
||||||
|
const volVectorField& U = mixture_.U();
|
||||||
|
|
||||||
|
wordList UdmTypes
|
||||||
|
(
|
||||||
|
U.boundaryField().size(),
|
||||||
|
calculatedFvPatchScalarField::typeName
|
||||||
|
);
|
||||||
|
|
||||||
|
forAll(U.boundaryField(), i)
|
||||||
|
{
|
||||||
|
if
|
||||||
|
(
|
||||||
|
isA<fixedValueFvPatchVectorField>(U.boundaryField()[i])
|
||||||
|
|| isA<slipFvPatchVectorField>(U.boundaryField()[i])
|
||||||
|
|| isA<partialSlipFvPatchVectorField>(U.boundaryField()[i])
|
||||||
|
)
|
||||||
|
{
|
||||||
|
UdmTypes[i] = fixedValueFvPatchVectorField::typeName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return UdmTypes;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|
@ -55,11 +86,12 @@ Foam::relativeVelocityModel::relativeVelocityModel
|
||||||
"Udm",
|
"Udm",
|
||||||
alphac_.time().timeName(),
|
alphac_.time().timeName(),
|
||||||
alphac_.mesh(),
|
alphac_.mesh(),
|
||||||
IOobject::NO_READ,
|
IOobject::READ_IF_PRESENT,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
alphac_.mesh(),
|
alphac_.mesh(),
|
||||||
dimensionedVector("Udm", dimVelocity, Zero)
|
dimensionedVector("Udm", dimVelocity, Zero),
|
||||||
|
UdmPatchFieldTypes()
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|
@ -52,12 +52,16 @@ class relativeVelocityModel
|
||||||
{
|
{
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Return the list of patchFieldTypes for Udm derived from U
|
||||||
|
wordList UdmPatchFieldTypes() const;
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
//- Disallow default bitwise copy construct
|
||||||
relativeVelocityModel(const relativeVelocityModel&);
|
relativeVelocityModel(const relativeVelocityModel&);
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const relativeVelocityModel&);
|
void operator=(const relativeVelocityModel&);
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Protected data
|
// Protected data
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue