mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/repositories/OpenFOAM-dev
This commit is contained in:
@ -132,6 +132,11 @@ int main(int argc, char *argv[])
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Note: both IOsampledSets and IOsampledSurfaces read the
|
||||||
|
// same dictionary. Unregister one to make sure no duplicates
|
||||||
|
// trying to register
|
||||||
|
sSetsPtr().checkOut();
|
||||||
|
|
||||||
sSurfsPtr.reset
|
sSurfsPtr.reset
|
||||||
(
|
(
|
||||||
new IOsampledSurfaces
|
new IOsampledSurfaces
|
||||||
@ -160,6 +165,8 @@ int main(int argc, char *argv[])
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
sSetsPtr().checkOut();
|
||||||
|
|
||||||
sSurfsPtr.reset
|
sSurfsPtr.reset
|
||||||
(
|
(
|
||||||
new IOsampledSurfaces
|
new IOsampledSurfaces
|
||||||
|
|||||||
@ -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) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -25,6 +25,7 @@ License
|
|||||||
|
|
||||||
#include "fvSchemes.H"
|
#include "fvSchemes.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
|
#include "steadyStateDdtScheme.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -108,6 +109,11 @@ void Foam::fvSchemes::read(const dictionary& dict)
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
defaultDdtScheme_ = ddtSchemes_.lookup("default");
|
defaultDdtScheme_ = ddtSchemes_.lookup("default");
|
||||||
|
steady_ =
|
||||||
|
(
|
||||||
|
word(defaultDdtScheme_)
|
||||||
|
== fv::steadyStateDdtScheme<scalar>::typeName
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -364,7 +370,8 @@ Foam::fvSchemes::fvSchemes(const objectRegistry& obr)
|
|||||||
tokenList()
|
tokenList()
|
||||||
)()
|
)()
|
||||||
),
|
),
|
||||||
defaultFluxRequired_(false)
|
defaultFluxRequired_(false),
|
||||||
|
steady_(false)
|
||||||
{
|
{
|
||||||
// persistent settings across reads is incorrect
|
// persistent settings across reads is incorrect
|
||||||
clear();
|
clear();
|
||||||
|
|||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -78,6 +78,10 @@ class fvSchemes
|
|||||||
dictionary fluxRequired_;
|
dictionary fluxRequired_;
|
||||||
bool defaultFluxRequired_;
|
bool defaultFluxRequired_;
|
||||||
|
|
||||||
|
//- Steady-state run indicator
|
||||||
|
// Set true if the default ddtScheme is steadyState
|
||||||
|
bool steady_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
@ -128,6 +132,18 @@ public:
|
|||||||
|
|
||||||
bool fluxRequired(const word& name) const;
|
bool fluxRequired(const word& name) const;
|
||||||
|
|
||||||
|
//- Return true if the default ddtScheme is steadyState
|
||||||
|
bool steady() const
|
||||||
|
{
|
||||||
|
return steady_;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Return true if the default ddtScheme is not steadyState
|
||||||
|
bool transient() const
|
||||||
|
{
|
||||||
|
return !steady_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Read
|
// Read
|
||||||
|
|
||||||
|
|||||||
@ -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) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -2348,6 +2348,8 @@ Foam::operator&
|
|||||||
GeometricField<Type, fvPatchField, volMesh>& Mphi = tMphi();
|
GeometricField<Type, fvPatchField, volMesh>& Mphi = tMphi();
|
||||||
|
|
||||||
// Loop over field components
|
// Loop over field components
|
||||||
|
if (M.hasDiag())
|
||||||
|
{
|
||||||
for (direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
|
for (direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
|
||||||
{
|
{
|
||||||
scalarField psiCmpt(psi.field().component(cmpt));
|
scalarField psiCmpt(psi.field().component(cmpt));
|
||||||
@ -2355,6 +2357,11 @@ Foam::operator&
|
|||||||
M.addBoundaryDiag(boundaryDiagCmpt, cmpt);
|
M.addBoundaryDiag(boundaryDiagCmpt, cmpt);
|
||||||
Mphi.internalField().replace(cmpt, -boundaryDiagCmpt*psiCmpt);
|
Mphi.internalField().replace(cmpt, -boundaryDiagCmpt*psiCmpt);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Mphi.internalField() = pTraits<Type>::zero;
|
||||||
|
}
|
||||||
|
|
||||||
Mphi.internalField() += M.lduMatrix::H(psi.field()) + M.source();
|
Mphi.internalField() += M.lduMatrix::H(psi.field()) + M.source();
|
||||||
M.addBoundarySource(Mphi.internalField());
|
M.addBoundarySource(Mphi.internalField());
|
||||||
|
|||||||
Reference in New Issue
Block a user