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/OpenFOAM-dev
This commit is contained in:
@ -655,6 +655,27 @@ Foam::scalar Foam::face::sweptVol
|
|||||||
const pointField& newPoints
|
const pointField& newPoints
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
|
if (size() == 3)
|
||||||
|
{
|
||||||
|
return
|
||||||
|
(
|
||||||
|
triPointRef
|
||||||
|
(
|
||||||
|
oldPoints[operator[](0)],
|
||||||
|
oldPoints[operator[](1)],
|
||||||
|
oldPoints[operator[](2)]
|
||||||
|
).sweptVol
|
||||||
|
(
|
||||||
|
triPointRef
|
||||||
|
(
|
||||||
|
newPoints[operator[](0)],
|
||||||
|
newPoints[operator[](1)],
|
||||||
|
newPoints[operator[](2)]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
scalar sv = 0;
|
scalar sv = 0;
|
||||||
|
|
||||||
// Calculate the swept volume by breaking the face into triangles and
|
// Calculate the swept volume by breaking the face into triangles and
|
||||||
|
|||||||
@ -280,6 +280,7 @@ $(limitedSchemes)/limitWith/limitWith.C
|
|||||||
multivariateSchemes = $(surfaceInterpolation)/multivariateSchemes
|
multivariateSchemes = $(surfaceInterpolation)/multivariateSchemes
|
||||||
$(multivariateSchemes)/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationSchemes.C
|
$(multivariateSchemes)/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationSchemes.C
|
||||||
$(multivariateSchemes)/multivariateSelectionScheme/multivariateSelectionSchemes.C
|
$(multivariateSchemes)/multivariateSelectionScheme/multivariateSelectionSchemes.C
|
||||||
|
$(multivariateSchemes)/multivariateIndependentScheme/multivariateIndependentSchemes.C
|
||||||
$(multivariateSchemes)/upwind/multivariateUpwind.C
|
$(multivariateSchemes)/upwind/multivariateUpwind.C
|
||||||
$(multivariateSchemes)/Gamma/multivariateGamma.C
|
$(multivariateSchemes)/Gamma/multivariateGamma.C
|
||||||
$(multivariateSchemes)/vanLeer/multivariateVanLeer.C
|
$(multivariateSchemes)/vanLeer/multivariateVanLeer.C
|
||||||
|
|||||||
@ -0,0 +1,57 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "multivariateIndependentScheme.H"
|
||||||
|
#include "limitedSurfaceInterpolationScheme.H"
|
||||||
|
#include "volFields.H"
|
||||||
|
#include "surfaceFields.H"
|
||||||
|
#include "upwind.H"
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Foam::multivariateIndependentScheme<Type>::multivariateIndependentScheme
|
||||||
|
(
|
||||||
|
const fvMesh& mesh,
|
||||||
|
const typename multivariateSurfaceInterpolationScheme<Type>::
|
||||||
|
fieldTable& fields,
|
||||||
|
const surfaceScalarField& faceFlux,
|
||||||
|
Istream& schemeData
|
||||||
|
)
|
||||||
|
:
|
||||||
|
multivariateSurfaceInterpolationScheme<Type>
|
||||||
|
(
|
||||||
|
mesh,
|
||||||
|
fields,
|
||||||
|
faceFlux,
|
||||||
|
schemeData
|
||||||
|
),
|
||||||
|
schemes_(schemeData),
|
||||||
|
faceFlux_(faceFlux)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,126 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::multivariateIndependentScheme
|
||||||
|
|
||||||
|
Description
|
||||||
|
Generic multi-variate discretisation scheme class for which any of the
|
||||||
|
NVD, CNVD or NVDV schemes may be selected for each variable and applied
|
||||||
|
independently.
|
||||||
|
|
||||||
|
This is equivalent to using separate "div" terms and schemes for each
|
||||||
|
variable/equation.
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
multivariateIndependentScheme.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef multivariateIndependentScheme_H
|
||||||
|
#define multivariateIndependentScheme_H
|
||||||
|
|
||||||
|
#include "multivariateSurfaceInterpolationScheme.H"
|
||||||
|
#include "limitedSurfaceInterpolationScheme.H"
|
||||||
|
#include "surfaceFields.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class multivariateIndependentScheme Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
class multivariateIndependentScheme
|
||||||
|
:
|
||||||
|
public multivariateSurfaceInterpolationScheme<Type>
|
||||||
|
{
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
dictionary schemes_;
|
||||||
|
const surfaceScalarField& faceFlux_;
|
||||||
|
|
||||||
|
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Disallow default bitwise copy construct
|
||||||
|
multivariateIndependentScheme(const multivariateIndependentScheme&);
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const multivariateIndependentScheme&);
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("multivariateIndependent");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct for field, faceFlux and Istream
|
||||||
|
multivariateIndependentScheme
|
||||||
|
(
|
||||||
|
const fvMesh& mesh,
|
||||||
|
const typename multivariateSurfaceInterpolationScheme<Type>::
|
||||||
|
fieldTable& fields,
|
||||||
|
const surfaceScalarField& faceFlux,
|
||||||
|
Istream& schemeData
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Member Operators
|
||||||
|
|
||||||
|
tmp<surfaceInterpolationScheme<Type> > operator()
|
||||||
|
(
|
||||||
|
const GeometricField<Type, fvPatchField, volMesh>& field
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
return surfaceInterpolationScheme<Type>::New
|
||||||
|
(
|
||||||
|
faceFlux_.mesh(),
|
||||||
|
faceFlux_,
|
||||||
|
schemes_.lookup(field.name())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#ifdef NoRepository
|
||||||
|
# include "multivariateIndependentScheme.C"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "multivariateIndependentScheme.H"
|
||||||
|
#include "volFields.H"
|
||||||
|
#include "surfaceFields.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
defineNamedTemplateTypeNameAndDebug(multivariateIndependentScheme<scalar>, 0);
|
||||||
|
|
||||||
|
multivariateSurfaceInterpolationScheme<scalar>::addIstreamConstructorToTable
|
||||||
|
<multivariateIndependentScheme<scalar> >
|
||||||
|
addMultivariateIndependentSchemeScalarConstructorToTable_;
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
Reference in New Issue
Block a user