mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
interRegionExplicitPorositySource: Corrected initialization of firstIter_
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1978
This commit is contained in:
@ -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) 2012-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -74,7 +74,7 @@ void Foam::fv::interRegionExplicitPorositySource::initialise()
|
|||||||
new cellZone
|
new cellZone
|
||||||
(
|
(
|
||||||
zoneName,
|
zoneName,
|
||||||
nbrMesh.faceNeighbour(), // neighbour internal cells
|
nbrMesh.faceNeighbour(), // Neighbour internal cells
|
||||||
zoneID,
|
zoneID,
|
||||||
cellZones
|
cellZones
|
||||||
)
|
)
|
||||||
@ -117,7 +117,7 @@ Foam::fv::interRegionExplicitPorositySource::interRegionExplicitPorositySource
|
|||||||
:
|
:
|
||||||
interRegionOption(name, modelType, dict, mesh),
|
interRegionOption(name, modelType, dict, mesh),
|
||||||
porosityPtr_(NULL),
|
porosityPtr_(NULL),
|
||||||
firstIter_(-1),
|
firstIter_(false),
|
||||||
UName_(coeffs_.lookupOrDefault<word>("UName", "U")),
|
UName_(coeffs_.lookupOrDefault<word>("UName", "U")),
|
||||||
muName_(coeffs_.lookupOrDefault<word>("muName", "thermo:mu"))
|
muName_(coeffs_.lookupOrDefault<word>("muName", "thermo:mu"))
|
||||||
{
|
{
|
||||||
@ -157,7 +157,7 @@ void Foam::fv::interRegionExplicitPorositySource::addSup
|
|||||||
dimensionedVector("zero", U.dimensions(), vector::zero)
|
dimensionedVector("zero", U.dimensions(), vector::zero)
|
||||||
);
|
);
|
||||||
|
|
||||||
// map local velocity onto neighbour region
|
// Map local velocity onto neighbour region
|
||||||
meshInterp().mapSrcToTgt
|
meshInterp().mapSrcToTgt
|
||||||
(
|
(
|
||||||
U.internalField(),
|
U.internalField(),
|
||||||
@ -169,7 +169,7 @@ void Foam::fv::interRegionExplicitPorositySource::addSup
|
|||||||
|
|
||||||
porosityPtr_->addResistance(nbrEqn);
|
porosityPtr_->addResistance(nbrEqn);
|
||||||
|
|
||||||
// convert source from neighbour to local region
|
// Convert source from neighbour to local region
|
||||||
fvMatrix<vector> porosityEqn(U, eqn.dimensions());
|
fvMatrix<vector> porosityEqn(U, eqn.dimensions());
|
||||||
scalarField& Udiag = porosityEqn.diag();
|
scalarField& Udiag = porosityEqn.diag();
|
||||||
vectorField& Usource = porosityEqn.source();
|
vectorField& Usource = porosityEqn.source();
|
||||||
@ -211,7 +211,7 @@ void Foam::fv::interRegionExplicitPorositySource::addSup
|
|||||||
dimensionedVector("zero", U.dimensions(), vector::zero)
|
dimensionedVector("zero", U.dimensions(), vector::zero)
|
||||||
);
|
);
|
||||||
|
|
||||||
// map local velocity onto neighbour region
|
// Map local velocity onto neighbour region
|
||||||
meshInterp().mapSrcToTgt
|
meshInterp().mapSrcToTgt
|
||||||
(
|
(
|
||||||
U.internalField(),
|
U.internalField(),
|
||||||
@ -252,7 +252,7 @@ void Foam::fv::interRegionExplicitPorositySource::addSup
|
|||||||
const volScalarField& mu =
|
const volScalarField& mu =
|
||||||
mesh_.lookupObject<volScalarField>(muName_);
|
mesh_.lookupObject<volScalarField>(muName_);
|
||||||
|
|
||||||
// map local rho onto neighbour region
|
// Map local rho onto neighbour region
|
||||||
meshInterp().mapSrcToTgt
|
meshInterp().mapSrcToTgt
|
||||||
(
|
(
|
||||||
rho.internalField(),
|
rho.internalField(),
|
||||||
@ -260,7 +260,7 @@ void Foam::fv::interRegionExplicitPorositySource::addSup
|
|||||||
rhoNbr.internalField()
|
rhoNbr.internalField()
|
||||||
);
|
);
|
||||||
|
|
||||||
// map local mu onto neighbour region
|
// Map local mu onto neighbour region
|
||||||
meshInterp().mapSrcToTgt
|
meshInterp().mapSrcToTgt
|
||||||
(
|
(
|
||||||
mu.internalField(),
|
mu.internalField(),
|
||||||
@ -270,7 +270,7 @@ void Foam::fv::interRegionExplicitPorositySource::addSup
|
|||||||
|
|
||||||
porosityPtr_->addResistance(nbrEqn, rhoNbr, muNbr);
|
porosityPtr_->addResistance(nbrEqn, rhoNbr, muNbr);
|
||||||
|
|
||||||
// convert source from neighbour to local region
|
// Convert source from neighbour to local region
|
||||||
fvMatrix<vector> porosityEqn(U, eqn.dimensions());
|
fvMatrix<vector> porosityEqn(U, eqn.dimensions());
|
||||||
scalarField& Udiag = porosityEqn.diag();
|
scalarField& Udiag = porosityEqn.diag();
|
||||||
vectorField& Usource = porosityEqn.source();
|
vectorField& Usource = porosityEqn.source();
|
||||||
@ -292,7 +292,7 @@ bool Foam::fv::interRegionExplicitPorositySource::read(const dictionary& dict)
|
|||||||
coeffs_.readIfPresent("UName", UName_);
|
coeffs_.readIfPresent("UName", UName_);
|
||||||
coeffs_.readIfPresent("muName", muName_);
|
coeffs_.readIfPresent("muName", muName_);
|
||||||
|
|
||||||
// reset the porosity model?
|
// Reset the porosity model?
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user