mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Consistency updates after Foundation merge and code tidying
This commit is contained in:
@ -2,9 +2,7 @@ rho = thermo.rho();
|
|||||||
|
|
||||||
volScalarField rAU(1.0/UEqn.A());
|
volScalarField rAU(1.0/UEqn.A());
|
||||||
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
|
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
|
||||||
|
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
|
||||||
volVectorField HbyA("HbyA", U);
|
|
||||||
HbyA = rAU*UEqn.H();
|
|
||||||
|
|
||||||
if (pimple.transonic())
|
if (pimple.transonic())
|
||||||
{
|
{
|
||||||
@ -54,6 +52,9 @@ else
|
|||||||
fvc::makeRelative(phiHbyA, rho, U);
|
fvc::makeRelative(phiHbyA, rho, U);
|
||||||
MRF.makeRelative(phiHbyA);
|
MRF.makeRelative(phiHbyA);
|
||||||
|
|
||||||
|
// Update the pressure BCs to ensure flux consistency
|
||||||
|
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
|
||||||
|
|
||||||
while (pimple.correctNonOrthogonal())
|
while (pimple.correctNonOrthogonal())
|
||||||
{
|
{
|
||||||
fvScalarMatrix pEqn
|
fvScalarMatrix pEqn
|
||||||
|
|||||||
@ -27,7 +27,7 @@
|
|||||||
IOobject::MUST_READ
|
IOobject::MUST_READ
|
||||||
);
|
);
|
||||||
|
|
||||||
if (turbulenceHeader.typeHeaderOk<IOdictionary>(true))
|
if (turbulencePropertiesHeader.typeHeaderOk<IOdictionary>(true))
|
||||||
{
|
{
|
||||||
autoPtr<compressible::turbulenceModel> turbulence
|
autoPtr<compressible::turbulenceModel> turbulence
|
||||||
(
|
(
|
||||||
|
|||||||
@ -1400,7 +1400,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (faceZoneToPatches.size())
|
if (faceZoneToPatches.size())
|
||||||
{
|
{
|
||||||
autoRefineDriver::addFaceZones
|
snappyRefineDriver::addFaceZones
|
||||||
(
|
(
|
||||||
meshRefiner,
|
meshRefiner,
|
||||||
refineParams,
|
refineParams,
|
||||||
|
|||||||
@ -263,16 +263,13 @@ Foam::parFvFieldReconstructor::reconstructFvSurfaceField
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Create flat field of internalField + all patch fields
|
// Create flat field of internalField + all patch fields
|
||||||
Field<Type> flatFld(fld.mesh().nFaces(), pTraits<Type>::zero);
|
Field<Type> flatFld(fld.mesh().nFaces(), Type(Zero));
|
||||||
SubList<Type>(flatFld, fld.internalField().size()).assign
|
SubList<Type>(flatFld, fld.internalField().size()) = fld.internalField();
|
||||||
(
|
|
||||||
fld.internalField()
|
|
||||||
);
|
|
||||||
forAll(fld.boundaryField(), patchI)
|
forAll(fld.boundaryField(), patchI)
|
||||||
{
|
{
|
||||||
const fvsPatchField<Type>& fvp = fld.boundaryField()[patchI];
|
const fvsPatchField<Type>& fvp = fld.boundaryField()[patchI];
|
||||||
|
|
||||||
SubList<Type>(flatFld, fvp.size(), fvp.patch().start()).assign(fvp);
|
SubList<Type>(flatFld, fvp.size(), fvp.patch().start()) = fvp;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Map all faces
|
// Map all faces
|
||||||
|
|||||||
@ -185,7 +185,7 @@ Foam::parLagrangianRedistributor::redistributeLagrangianPositions
|
|||||||
|
|
||||||
|
|
||||||
// Start sending. Sets number of bytes transferred
|
// Start sending. Sets number of bytes transferred
|
||||||
labelListList allNTrans(Pstream::nProcs());
|
labelList allNTrans(Pstream::nProcs());
|
||||||
pBufs.finishedSends(allNTrans);
|
pBufs.finishedSends(allNTrans);
|
||||||
|
|
||||||
|
|
||||||
@ -208,7 +208,7 @@ Foam::parLagrangianRedistributor::redistributeLagrangianPositions
|
|||||||
// Retrieve from receive buffers
|
// Retrieve from receive buffers
|
||||||
forAll(allNTrans, procI)
|
forAll(allNTrans, procI)
|
||||||
{
|
{
|
||||||
label nRec = allNTrans[procI][Pstream::myProcNo()];
|
label nRec = allNTrans[procI];
|
||||||
|
|
||||||
//Pout<< "From processor " << procI << " receiving bytes " << nRec
|
//Pout<< "From processor " << procI << " receiving bytes " << nRec
|
||||||
// << endl;
|
// << endl;
|
||||||
|
|||||||
@ -3,7 +3,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-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -93,8 +93,8 @@ volField
|
|||||||
zeroGradientFvPatchField<scalar>::typeName
|
zeroGradientFvPatchField<scalar>::typeName
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
tvf().internalField() = df;
|
tvf.ref().internalField() = df;
|
||||||
tvf().correctBoundaryConditions();
|
tvf.ref().correctBoundaryConditions();
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& vf = tvf();
|
const GeometricField<Type, fvPatchField, volMesh>& vf = tvf();
|
||||||
|
|
||||||
if (meshSubsetter.hasSubMesh())
|
if (meshSubsetter.hasSubMesh())
|
||||||
@ -103,8 +103,8 @@ volField
|
|||||||
(
|
(
|
||||||
meshSubsetter.interpolate(vf)
|
meshSubsetter.interpolate(vf)
|
||||||
);
|
);
|
||||||
tfld().checkOut();
|
tfld.ref().checkOut();
|
||||||
tfld().rename(vf.name());
|
tfld.ref().rename(vf.name());
|
||||||
return tfld;
|
return tfld;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -3,7 +3,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-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|||||||
@ -3,7 +3,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-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|||||||
@ -74,7 +74,7 @@ Foam::tmp<Foam::volVectorField> createSimplifiedU(const volVectorField& U)
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Assign the internal value to the original field
|
// Assign the internal value to the original field
|
||||||
tU() = U;
|
tU.ref() = U;
|
||||||
|
|
||||||
return tU;
|
return tU;
|
||||||
}
|
}
|
||||||
@ -128,7 +128,7 @@ void blendField
|
|||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
||||||
if (fieldHeader.headerOk())
|
if (fieldHeader.typeHeaderOk<volScalarField>(true))
|
||||||
{
|
{
|
||||||
volScalarField fld(fieldHeader, mesh);
|
volScalarField fld(fieldHeader, mesh);
|
||||||
scalarField& internalField = fld.internalField();
|
scalarField& internalField = fld.internalField();
|
||||||
@ -236,7 +236,7 @@ tmp<volScalarField> calcNut
|
|||||||
basicThermo::dictName,
|
basicThermo::dictName,
|
||||||
runTime.constant(),
|
runTime.constant(),
|
||||||
mesh
|
mesh
|
||||||
).headerOk()
|
).typeHeaderOk<IOdictionary>(true)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Compressible
|
// Compressible
|
||||||
|
|||||||
@ -413,14 +413,14 @@ int main(int argc, char *argv[])
|
|||||||
(
|
(
|
||||||
availablePoints,
|
availablePoints,
|
||||||
upp.faceCentres().size()
|
upp.faceCentres().size()
|
||||||
).assign(upp.faceCentres());
|
) = upp.faceCentres();
|
||||||
|
|
||||||
SubList<point>
|
SubList<point>
|
||||||
(
|
(
|
||||||
availablePoints,
|
availablePoints,
|
||||||
upp.localPoints().size(),
|
upp.localPoints().size(),
|
||||||
upp.faceCentres().size()
|
upp.faceCentres().size()
|
||||||
).assign(upp.localPoints());
|
) = upp.localPoints();
|
||||||
|
|
||||||
point cfo = cf;
|
point cfo = cf;
|
||||||
scalar dist = GREAT;
|
scalar dist = GREAT;
|
||||||
@ -783,19 +783,12 @@ int main(int argc, char *argv[])
|
|||||||
const labelList& agglom = finalAgglom[patchID];
|
const labelList& agglom = finalAgglom[patchID];
|
||||||
if (agglom.size() > 0)
|
if (agglom.size() > 0)
|
||||||
{
|
{
|
||||||
<<<<<<< HEAD
|
|
||||||
label nAgglom = max(agglom)+1;
|
label nAgglom = max(agglom)+1;
|
||||||
labelListList coarseToFine(invertOneToMany(nAgglom, agglom));
|
labelListList coarseToFine(invertOneToMany(nAgglom, agglom));
|
||||||
const labelList& coarsePatchFace =
|
const labelList& coarsePatchFace =
|
||||||
coarseMesh.patchFaceMap()[patchID];
|
coarseMesh.patchFaceMap()[patchID];
|
||||||
|
|
||||||
forAll(coarseToFine, coarseI)
|
forAll(coarseToFine, coarseI)
|
||||||
=======
|
|
||||||
const scalar Fij = sum(F[compactI]);
|
|
||||||
const label coarseFaceID = coarsePatchFace[coarseI];
|
|
||||||
const labelList& fineFaces = coarseToFine[coarseFaceID];
|
|
||||||
forAll(fineFaces, fineId)
|
|
||||||
>>>>>>> foundation
|
|
||||||
{
|
{
|
||||||
const scalar Fij = sum(F[compactI]);
|
const scalar Fij = sum(F[compactI]);
|
||||||
const label coarseFaceID = coarsePatchFace[coarseI];
|
const label coarseFaceID = coarsePatchFace[coarseI];
|
||||||
|
|||||||
@ -3,7 +3,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-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|||||||
@ -90,7 +90,7 @@ tmp<vectorField> calcVertexNormals(const triSurface& surf)
|
|||||||
(
|
(
|
||||||
new pointField(surf.nPoints(), vector::zero)
|
new pointField(surf.nPoints(), vector::zero)
|
||||||
);
|
);
|
||||||
vectorField& pointNormals = tpointNormals();
|
vectorField& pointNormals = tpointNormals.ref();
|
||||||
|
|
||||||
const pointField& points = surf.points();
|
const pointField& points = surf.points();
|
||||||
const labelListList& pointFaces = surf.pointFaces();
|
const labelListList& pointFaces = surf.pointFaces();
|
||||||
@ -134,7 +134,7 @@ tmp<vectorField> calcPointNormals
|
|||||||
{
|
{
|
||||||
//const pointField pointNormals(s.pointNormals());
|
//const pointField pointNormals(s.pointNormals());
|
||||||
tmp<vectorField> tpointNormals(calcVertexNormals(s));
|
tmp<vectorField> tpointNormals(calcVertexNormals(s));
|
||||||
vectorField& pointNormals = tpointNormals();
|
vectorField& pointNormals = tpointNormals.ref();
|
||||||
|
|
||||||
|
|
||||||
// feature edges: create edge normals from edgeFaces only.
|
// feature edges: create edge normals from edgeFaces only.
|
||||||
@ -356,7 +356,7 @@ tmp<scalarField> avg
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
tmp<scalarField> tres(new scalarField(s.nPoints(), 0.0));
|
tmp<scalarField> tres(new scalarField(s.nPoints(), 0.0));
|
||||||
scalarField& res = tres();
|
scalarField& res = tres.ref();
|
||||||
|
|
||||||
scalarField sumWeight(s.nPoints(), 0.0);
|
scalarField sumWeight(s.nPoints(), 0.0);
|
||||||
|
|
||||||
|
|||||||
@ -125,7 +125,7 @@ SunOS)
|
|||||||
/bin/cat <<USAGE 1>&2
|
/bin/cat <<USAGE 1>&2
|
||||||
|
|
||||||
Your "$WM_ARCH" operating system is not supported by this release
|
Your "$WM_ARCH" operating system is not supported by this release
|
||||||
of OpenFOAM. For further assistance, please contact www.OpenFOAM.org
|
of OpenFOAM. For further assistance, please contact www.OpenFOAM.com
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
;;
|
;;
|
||||||
|
|||||||
@ -44,7 +44,6 @@ Foam::UPtrList<T>::UPtrList(const label s)
|
|||||||
|
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
<<<<<<< HEAD
|
|
||||||
Foam::UPtrList<T>::UPtrList(UList<T>& lst)
|
Foam::UPtrList<T>::UPtrList(UList<T>& lst)
|
||||||
:
|
:
|
||||||
ptrs_(lst.size())
|
ptrs_(lst.size())
|
||||||
|
|||||||
@ -3,7 +3,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) 2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|||||||
@ -3,7 +3,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) 2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|||||||
@ -3,7 +3,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) 2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|||||||
@ -3,7 +3,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-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|||||||
@ -3,7 +3,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-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|||||||
@ -3,7 +3,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-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|||||||
@ -134,7 +134,7 @@ public:
|
|||||||
Type getProperty
|
Type getProperty
|
||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const Type& defaultValue = pTraits<Type>::zero
|
const Type& defaultValue = Type(Zero)
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Retrieve generic property
|
//- Retrieve generic property
|
||||||
@ -151,7 +151,7 @@ public:
|
|||||||
(
|
(
|
||||||
const word& objectName,
|
const word& objectName,
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const Type& defaultValue = pTraits<Type>::zero
|
const Type& defaultValue = Type(Zero)
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Retrieve generic property from named object
|
//- Retrieve generic property from named object
|
||||||
@ -197,7 +197,7 @@ public:
|
|||||||
Type getResult
|
Type getResult
|
||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const Type& defaultValue = pTraits<Type>::zero
|
const Type& defaultValue = Type(Zero)
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Retrieve result from named object
|
//- Retrieve result from named object
|
||||||
@ -206,7 +206,7 @@ public:
|
|||||||
(
|
(
|
||||||
const word& objectName,
|
const word& objectName,
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const Type& defaultValue = pTraits<Type>::zero
|
const Type& defaultValue = Type(Zero)
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Retrieve result from named object
|
//- Retrieve result from named object
|
||||||
|
|||||||
@ -365,6 +365,7 @@ bool Foam::regIOobject::read()
|
|||||||
{
|
{
|
||||||
// Re-watch master file
|
// Re-watch master file
|
||||||
addWatch();
|
addWatch();
|
||||||
|
}
|
||||||
|
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -129,7 +129,7 @@ public:
|
|||||||
const word&,
|
const word&,
|
||||||
const dictionary&,
|
const dictionary&,
|
||||||
const dimensionSet& dims = dimless,
|
const dimensionSet& dims = dimless,
|
||||||
const Type& defaultValue = pTraits<Type>::zero
|
const Type& defaultValue = Type(Zero)
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from dictionary dimensionless with value.
|
//- Construct from dictionary dimensionless with value.
|
||||||
@ -137,7 +137,7 @@ public:
|
|||||||
(
|
(
|
||||||
const word&,
|
const word&,
|
||||||
const dictionary&,
|
const dictionary&,
|
||||||
const Type& defaultValue = pTraits<Type>::zero
|
const Type& defaultValue = Type(Zero)
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from dictionary, with default value.
|
//- Construct from dictionary, with default value.
|
||||||
@ -147,7 +147,7 @@ public:
|
|||||||
const word&,
|
const word&,
|
||||||
dictionary&,
|
dictionary&,
|
||||||
const dimensionSet& dims = dimless,
|
const dimensionSet& dims = dimless,
|
||||||
const Type& defaultValue = pTraits<Type>::zero
|
const Type& defaultValue = Type(Zero)
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from dictionary, dimensionless with default value.
|
//- Construct from dictionary, dimensionless with default value.
|
||||||
@ -156,7 +156,7 @@ public:
|
|||||||
(
|
(
|
||||||
const word&,
|
const word&,
|
||||||
dictionary&,
|
dictionary&,
|
||||||
const Type& defaultValue = pTraits<Type>::zero
|
const Type& defaultValue = Type(Zero)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,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-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -167,14 +167,9 @@ Foam::Field<Type>::Field
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::Field<Type>::Field
|
Foam::Field<Type>::Field
|
||||||
(
|
(
|
||||||
<<<<<<< HEAD
|
|
||||||
const tmp<Field<Type>>& tmapF,
|
const tmp<Field<Type>>& tmapF,
|
||||||
const FieldMapper& mapper,
|
const FieldMapper& mapper,
|
||||||
const bool applyFlip
|
const bool applyFlip
|
||||||
=======
|
|
||||||
const tmp<Field<Type>>& tmapF,
|
|
||||||
const FieldMapper& mapper
|
|
||||||
>>>>>>> foundation
|
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
List<Type>(mapper.size())
|
List<Type>(mapper.size())
|
||||||
@ -504,14 +499,9 @@ void Foam::Field<Type>::map
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::Field<Type>::map
|
void Foam::Field<Type>::map
|
||||||
(
|
(
|
||||||
<<<<<<< HEAD
|
|
||||||
const tmp<Field<Type>>& tmapF,
|
const tmp<Field<Type>>& tmapF,
|
||||||
const FieldMapper& mapper,
|
const FieldMapper& mapper,
|
||||||
const bool applyFlip
|
const bool applyFlip
|
||||||
=======
|
|
||||||
const tmp<Field<Type>>& tmapF,
|
|
||||||
const FieldMapper& mapper
|
|
||||||
>>>>>>> foundation
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
map(tmapF(), mapper, applyFlip);
|
map(tmapF(), mapper, applyFlip);
|
||||||
|
|||||||
@ -3,7 +3,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-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -185,14 +185,9 @@ public:
|
|||||||
//- Construct by mapping from the given tmp field
|
//- Construct by mapping from the given tmp field
|
||||||
Field
|
Field
|
||||||
(
|
(
|
||||||
<<<<<<< HEAD
|
|
||||||
const tmp<Field<Type>>& tmapF,
|
const tmp<Field<Type>>& tmapF,
|
||||||
const FieldMapper& map,
|
const FieldMapper& map,
|
||||||
const bool applyFlip = true
|
const bool applyFlip = true
|
||||||
=======
|
|
||||||
const tmp<Field<Type>>& tmapF,
|
|
||||||
const FieldMapper& map
|
|
||||||
>>>>>>> foundation
|
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct by mapping from the given tmp field. Supplied uniform
|
//- Construct by mapping from the given tmp field. Supplied uniform
|
||||||
@ -290,14 +285,9 @@ public:
|
|||||||
//- Map from the given tmp field
|
//- Map from the given tmp field
|
||||||
void map
|
void map
|
||||||
(
|
(
|
||||||
<<<<<<< HEAD
|
|
||||||
const tmp<Field<Type>>& tmapF,
|
const tmp<Field<Type>>& tmapF,
|
||||||
const FieldMapper& map,
|
const FieldMapper& map,
|
||||||
const bool applyFlip = true
|
const bool applyFlip = true
|
||||||
=======
|
|
||||||
const tmp<Field<Type>>& tmapF,
|
|
||||||
const FieldMapper& map
|
|
||||||
>>>>>>> foundation
|
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Map from self
|
//- Map from self
|
||||||
|
|||||||
@ -3,7 +3,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-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|||||||
@ -78,7 +78,7 @@ uniformFixedValuePointPatchField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValuePointPatchField<Type>(ptf, p, iF, mapper),
|
fixedValuePointPatchField<Type>(ptf, p, iF, mapper),
|
||||||
uniformValue_(ptf.uniformValue_().clone().ptr())
|
uniformValue_(ptf.uniformValue_, false)
|
||||||
{
|
{
|
||||||
// For safety re-evaluate
|
// For safety re-evaluate
|
||||||
const scalar t = this->db().time().timeOutputValue();
|
const scalar t = this->db().time().timeOutputValue();
|
||||||
@ -94,7 +94,7 @@ uniformFixedValuePointPatchField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValuePointPatchField<Type>(ptf),
|
fixedValuePointPatchField<Type>(ptf),
|
||||||
uniformValue_(ptf.uniformValue_().clone().ptr())
|
uniformValue_(ptf.uniformValue_, false)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -107,7 +107,7 @@ uniformFixedValuePointPatchField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValuePointPatchField<Type>(ptf, iF),
|
fixedValuePointPatchField<Type>(ptf, iF),
|
||||||
uniformValue_(ptf.uniformValue_().clone().ptr())
|
uniformValue_(ptf.uniformValue_, false)
|
||||||
{
|
{
|
||||||
// For safety re-evaluate
|
// For safety re-evaluate
|
||||||
const scalar t = this->db().time().timeOutputValue();
|
const scalar t = this->db().time().timeOutputValue();
|
||||||
|
|||||||
@ -122,8 +122,8 @@ public:
|
|||||||
(
|
(
|
||||||
const word& solverName,
|
const word& solverName,
|
||||||
const word& fieldName,
|
const word& fieldName,
|
||||||
const Type& iRes = pTraits<Type>::zero,
|
const Type& iRes = Type(Zero),
|
||||||
const Type& fRes = pTraits<Type>::zero,
|
const Type& fRes = Type(Zero),
|
||||||
const label nIter = 0,
|
const label nIter = 0,
|
||||||
const bool converged = false,
|
const bool converged = false,
|
||||||
const bool singular = false
|
const bool singular = false
|
||||||
|
|||||||
@ -139,7 +139,7 @@ void Foam::LUBacksubstitute
|
|||||||
sum -= luMatrixi[j]*sourceSol[j];
|
sum -= luMatrixi[j]*sourceSol[j];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (sum != pTraits<Type>::zero)
|
else if (sum != Type(Zero))
|
||||||
{
|
{
|
||||||
ii = i+1;
|
ii = i+1;
|
||||||
}
|
}
|
||||||
@ -185,7 +185,7 @@ void Foam::LUBacksubstitute
|
|||||||
sum -= luMatrixi[j]*sourceSol[j];
|
sum -= luMatrixi[j]*sourceSol[j];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (sum != pTraits<Type>::zero)
|
else if (sum != Type(Zero))
|
||||||
{
|
{
|
||||||
ii = i+1;
|
ii = i+1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,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) 2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -446,12 +446,10 @@ void Foam::mapDistributeBase::exchangeAddressing
|
|||||||
}
|
}
|
||||||
|
|
||||||
subMap_.setSize(Pstream::nProcs());
|
subMap_.setSize(Pstream::nProcs());
|
||||||
labelListList sendSizes;
|
|
||||||
Pstream::exchange<labelList, label>
|
Pstream::exchange<labelList, label>
|
||||||
(
|
(
|
||||||
wantedRemoteElements,
|
wantedRemoteElements,
|
||||||
subMap_,
|
subMap_,
|
||||||
sendSizes,
|
|
||||||
tag,
|
tag,
|
||||||
Pstream::worldComm //TBD
|
Pstream::worldComm //TBD
|
||||||
);
|
);
|
||||||
@ -526,12 +524,10 @@ void Foam::mapDistributeBase::exchangeAddressing
|
|||||||
}
|
}
|
||||||
|
|
||||||
subMap_.setSize(Pstream::nProcs());
|
subMap_.setSize(Pstream::nProcs());
|
||||||
labelListList sendSizes;
|
|
||||||
Pstream::exchange<labelList, label>
|
Pstream::exchange<labelList, label>
|
||||||
(
|
(
|
||||||
wantedRemoteElements,
|
wantedRemoteElements,
|
||||||
subMap_,
|
subMap_,
|
||||||
sendSizes,
|
|
||||||
tag,
|
tag,
|
||||||
Pstream::worldComm //TBD
|
Pstream::worldComm //TBD
|
||||||
);
|
);
|
||||||
|
|||||||
@ -3,7 +3,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) 2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|||||||
@ -3,7 +3,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) 2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|||||||
@ -3,7 +3,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-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|||||||
@ -27,6 +27,18 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Foam::Function1Types::Constant<Type>::Constant
|
||||||
|
(
|
||||||
|
const word& entryName,
|
||||||
|
const Type& value
|
||||||
|
)
|
||||||
|
:
|
||||||
|
Function1<Type>(entryName),
|
||||||
|
value_(value)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::Function1Types::Constant<Type>::Constant
|
Foam::Function1Types::Constant<Type>::Constant
|
||||||
(
|
(
|
||||||
@ -44,29 +56,11 @@ Foam::Function1Types::Constant<Type>::Constant
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
<<<<<<< HEAD:src/OpenFOAM/primitives/functions/DataEntry/Constant/Constant.C
|
|
||||||
Foam::Constant<Type>::Constant
|
|
||||||
(
|
|
||||||
const word& entryName,
|
|
||||||
const Type& value,
|
|
||||||
const dimensionSet& dimensions
|
|
||||||
)
|
|
||||||
:
|
|
||||||
DataEntry<Type>(entryName),
|
|
||||||
value_(value),
|
|
||||||
dimensions_(dimensions)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
Foam::Constant<Type>::Constant(const Constant<Type>& cnst)
|
|
||||||
=======
|
|
||||||
Foam::Function1Types::Constant<Type>::Constant
|
Foam::Function1Types::Constant<Type>::Constant
|
||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
Istream& is
|
Istream& is
|
||||||
)
|
)
|
||||||
>>>>>>> foundation:src/OpenFOAM/primitives/functions/Function1/Constant/Constant.C
|
|
||||||
:
|
:
|
||||||
Function1<Type>(entryName),
|
Function1<Type>(entryName),
|
||||||
value_(pTraits<Type>(is))
|
value_(pTraits<Type>(is))
|
||||||
|
|||||||
@ -78,17 +78,13 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
<<<<<<< HEAD:src/OpenFOAM/primitives/functions/DataEntry/Constant/Constant.H
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
Constant
|
Constant
|
||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const Type& value,
|
const Type& value
|
||||||
const dimensionSet& dimensions = dimless
|
|
||||||
);
|
);
|
||||||
|
|
||||||
=======
|
|
||||||
>>>>>>> foundation:src/OpenFOAM/primitives/functions/Function1/Constant/Constant.H
|
|
||||||
//- Construct from entry name and dictionary
|
//- Construct from entry name and dictionary
|
||||||
Constant(const word& entryName, const dictionary& dict);
|
Constant(const word& entryName, const dictionary& dict);
|
||||||
|
|
||||||
|
|||||||
@ -165,7 +165,7 @@ public:
|
|||||||
Type getBaseProperty
|
Type getBaseProperty
|
||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const Type& defaultValue = pTraits<Type>::zero
|
const Type& defaultValue = Type(Zero)
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Retrieve generic property from the base model
|
//- Retrieve generic property from the base model
|
||||||
@ -188,7 +188,7 @@ public:
|
|||||||
Type getModelProperty
|
Type getModelProperty
|
||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const Type& defaultValue = pTraits<Type>::zero
|
const Type& defaultValue = Type(Zero)
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Add generic property to the sub-model
|
//- Add generic property to the sub-model
|
||||||
|
|||||||
@ -3,7 +3,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) 2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|||||||
@ -175,7 +175,7 @@ tmp<volScalarField> SpalartAllmarasDES<BasicTurbulenceModel>::psi
|
|||||||
|
|
||||||
if (lowReCorrection_)
|
if (lowReCorrection_)
|
||||||
{
|
{
|
||||||
volScalarField& psi = tpsi();
|
volScalarField& psi = tpsi.ref();
|
||||||
|
|
||||||
const volScalarField fv2(this->fv2(chi, fv1));
|
const volScalarField fv2(this->fv2(chi, fv1));
|
||||||
const volScalarField ft2(this->ft2(chi));
|
const volScalarField ft2(this->ft2(chi));
|
||||||
@ -477,7 +477,7 @@ tmp<volScalarField> SpalartAllmarasDES<BasicTurbulenceModel>::k() const
|
|||||||
zeroGradientFvPatchField<vector>::typeName
|
zeroGradientFvPatchField<vector>::typeName
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
volScalarField& dTildaF = tdTilda();
|
volScalarField& dTildaF = tdTilda.ref();
|
||||||
dTildaF = dTilda(chi, fv1, fvc::grad(this->U_));
|
dTildaF = dTilda(chi, fv1, fvc::grad(this->U_));
|
||||||
dTildaF.correctBoundaryConditions();
|
dTildaF.correctBoundaryConditions();
|
||||||
|
|
||||||
|
|||||||
@ -98,7 +98,7 @@ tmp<volScalarField> SpalartAllmarasIDDES<BasicTurbulenceModel>::rd
|
|||||||
scalar(10)
|
scalar(10)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
tr().boundaryField() == 0.0;
|
tr.ref().boundaryField() == 0.0;
|
||||||
|
|
||||||
return tr;
|
return tr;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -56,7 +56,7 @@ tmp<volScalarField> kOmegaSSTDDES<BasicTurbulenceModel>::rd
|
|||||||
scalar(10)
|
scalar(10)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
tr().boundaryField() == 0.0;
|
tr.ref().boundaryField() == 0.0;
|
||||||
|
|
||||||
return tr;
|
return tr;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,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) 2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -206,9 +206,9 @@ void kOmegaSSTDES<BasicTurbulenceModel>::correct()
|
|||||||
+ this->omegaSource()
|
+ this->omegaSource()
|
||||||
);
|
);
|
||||||
|
|
||||||
omegaEqn().relax();
|
omegaEqn.ref().relax();
|
||||||
|
|
||||||
omegaEqn().boundaryManipulate(omega.boundaryField());
|
omegaEqn.ref().boundaryManipulate(omega.boundaryField());
|
||||||
|
|
||||||
solve(omegaEqn);
|
solve(omegaEqn);
|
||||||
bound(omega, this->omegaMin_);
|
bound(omega, this->omegaMin_);
|
||||||
@ -231,7 +231,7 @@ void kOmegaSSTDES<BasicTurbulenceModel>::correct()
|
|||||||
+ this->kSource()
|
+ this->kSource()
|
||||||
);
|
);
|
||||||
|
|
||||||
kEqn().relax();
|
kEqn.ref().relax();
|
||||||
solve(kEqn);
|
solve(kEqn);
|
||||||
bound(k, this->kMin_);
|
bound(k, this->kMin_);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,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) 2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|||||||
@ -98,7 +98,7 @@ tmp<volScalarField> kOmegaSSTIDDES<BasicTurbulenceModel>::rd
|
|||||||
scalar(10)
|
scalar(10)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
tr().boundaryField() == 0.0;
|
tr.ref().boundaryField() == 0.0;
|
||||||
|
|
||||||
return tr;
|
return tr;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,6 +24,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "LESeddyViscosity.H"
|
#include "LESeddyViscosity.H"
|
||||||
|
#include "zeroGradientFvPatchField.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -107,10 +108,10 @@ tmp<volScalarField> LESeddyViscosity<BasicTurbulenceModel>::epsilon() const
|
|||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
Ce_*tk()*sqrt(tk())/this->delta(),
|
Ce_*tk()*sqrt(tk())/this->delta(),
|
||||||
zeroGradientFvPatchScalarField::typeName
|
zeroGradientFvPatchField<scalar>::typeName
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
volScalarField& epsilon = tepsilon();
|
volScalarField& epsilon = tepsilon.ref();
|
||||||
epsilon.correctBoundaryConditions();
|
epsilon.correctBoundaryConditions();
|
||||||
|
|
||||||
return tepsilon;
|
return tepsilon;
|
||||||
|
|||||||
@ -24,12 +24,6 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "kOmegaSST.H"
|
#include "kOmegaSST.H"
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
#include "fvOptions.H"
|
|
||||||
#include "bound.H"
|
|
||||||
#include "wallDist.H"
|
|
||||||
>>>>>>> foundation
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -56,8 +56,8 @@ Foam::porousBafflePressureFvPatchField::porousBafflePressureFvPatchField
|
|||||||
fixedJumpFvPatchField<scalar>(p, iF),
|
fixedJumpFvPatchField<scalar>(p, iF),
|
||||||
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
|
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
|
||||||
rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
|
rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
|
||||||
D_(DataEntry<scalar>::New("D", dict)),
|
D_(Function1<scalar>::New("D", dict)),
|
||||||
I_(DataEntry<scalar>::New("I", dict)),
|
I_(Function1<scalar>::New("I", dict)),
|
||||||
length_(readScalar(dict.lookup("length"))),
|
length_(readScalar(dict.lookup("length"))),
|
||||||
uniformJump_(dict.lookupOrDefault<bool>("uniformJump", false))
|
uniformJump_(dict.lookupOrDefault<bool>("uniformJump", false))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,7 +3,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-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -89,7 +89,7 @@ SourceFiles
|
|||||||
#define porousBafflePressureFvPatchField_H
|
#define porousBafflePressureFvPatchField_H
|
||||||
|
|
||||||
#include "fixedJumpFvPatchField.H"
|
#include "fixedJumpFvPatchField.H"
|
||||||
#include "DataEntry.H"
|
#include "Function1.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -113,10 +113,10 @@ class porousBafflePressureFvPatchField
|
|||||||
const word rhoName_;
|
const word rhoName_;
|
||||||
|
|
||||||
//- Darcy pressure loss coefficient
|
//- Darcy pressure loss coefficient
|
||||||
autoPtr<DataEntry<scalar> > D_;
|
autoPtr<Function1<scalar>> D_;
|
||||||
|
|
||||||
//- Inertia pressure lost coefficient
|
//- Inertia pressure lost coefficient
|
||||||
autoPtr<DataEntry<scalar> > I_;
|
autoPtr<Function1<scalar>> I_;
|
||||||
|
|
||||||
//- Porous media length
|
//- Porous media length
|
||||||
scalar length_;
|
scalar length_;
|
||||||
|
|||||||
@ -411,7 +411,7 @@ R(volScalarField& Y) const
|
|||||||
{
|
{
|
||||||
tmp<fvScalarMatrix> tSu(new fvScalarMatrix(Y, dimMass/dimTime));
|
tmp<fvScalarMatrix> tSu(new fvScalarMatrix(Y, dimMass/dimTime));
|
||||||
|
|
||||||
fvScalarMatrix& Su = tSu();
|
fvScalarMatrix& Su = tSu.ref();
|
||||||
|
|
||||||
if (this->active())
|
if (this->active())
|
||||||
{
|
{
|
||||||
@ -449,7 +449,7 @@ dQ() const
|
|||||||
|
|
||||||
if (this->active())
|
if (this->active())
|
||||||
{
|
{
|
||||||
volScalarField& dQ = tdQ();
|
volScalarField& dQ = tdQ.ref();
|
||||||
dQ = this->chemistryPtr_->dQ();
|
dQ = this->chemistryPtr_->dQ();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -483,7 +483,7 @@ Sh() const
|
|||||||
|
|
||||||
if (this->active())
|
if (this->active())
|
||||||
{
|
{
|
||||||
scalarField& Sh = tSh();
|
scalarField& Sh = tSh.ref();
|
||||||
Sh = this->chemistryPtr_->Sh();
|
Sh = this->chemistryPtr_->Sh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,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-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -408,7 +408,7 @@ Foam::tmp<Foam::surfaceScalarField> Foam::fvMeshDistribute::generateTestField
|
|||||||
dimensionedScalar("zero", dimless, 0.0)
|
dimensionedScalar("zero", dimless, 0.0)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
surfaceScalarField& fld = tfld();
|
surfaceScalarField& fld = tfld.ref();
|
||||||
|
|
||||||
const surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
const surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,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-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|||||||
@ -3,7 +3,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-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|||||||
@ -3,7 +3,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-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|||||||
@ -2,11 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
<<<<<<< HEAD:src/dynamicMesh/fvMeshSubset/fvMeshSubsetInterpolate.C
|
|
||||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
|
||||||
=======
|
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
>>>>>>> foundation:src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C
|
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|||||||
@ -3,7 +3,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) 2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|||||||
@ -3,7 +3,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-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|||||||
@ -39,12 +39,7 @@ Description
|
|||||||
myPatch
|
myPatch
|
||||||
{
|
{
|
||||||
type movingWallVelocity;
|
type movingWallVelocity;
|
||||||
<<<<<<< HEAD
|
|
||||||
U U;
|
|
||||||
value uniform (0 0 0); // initial value
|
|
||||||
=======
|
|
||||||
value uniform (0 0 0); // Initial value
|
value uniform (0 0 0); // Initial value
|
||||||
>>>>>>> foundation
|
|
||||||
}
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
|
|||||||
@ -44,7 +44,7 @@ void Foam::pressurePIDControlInletVelocityFvPatchVectorField::faceZoneAverage
|
|||||||
const faceZone& zone = mesh.faceZones()[name];
|
const faceZone& zone = mesh.faceZones()[name];
|
||||||
|
|
||||||
area = 0;
|
area = 0;
|
||||||
average = pTraits<Type>::zero;
|
average = Type(Zero);
|
||||||
|
|
||||||
forAll(zone, faceI)
|
forAll(zone, faceI)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -54,7 +54,7 @@ namespace fvc
|
|||||||
(
|
(
|
||||||
const GeometricField<Type, fvsPatchField, surfaceMesh>&,
|
const GeometricField<Type, fvsPatchField, surfaceMesh>&,
|
||||||
const CombineOp& cop,
|
const CombineOp& cop,
|
||||||
const Type& nullValue = pTraits<Type>::zero
|
const Type& nullValue = Type(Zero)
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class Type, class CombineOp>
|
template<class Type, class CombineOp>
|
||||||
@ -62,7 +62,7 @@ namespace fvc
|
|||||||
(
|
(
|
||||||
const tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>&,
|
const tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>&,
|
||||||
const CombineOp& cop,
|
const CombineOp& cop,
|
||||||
const Type& nullValue = pTraits<Type>::zero
|
const Type& nullValue = Type(Zero)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,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-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -186,7 +186,7 @@ void Foam::volPointInterpolation::interpolateDimensionedInternalField
|
|||||||
{
|
{
|
||||||
const labelList& ppc = pointCells[pointi];
|
const labelList& ppc = pointCells[pointi];
|
||||||
|
|
||||||
pf[pointi] = pTraits<Type>::zero;
|
pf[pointi] = Type(Zero);
|
||||||
|
|
||||||
forAll(ppc, pointCelli)
|
forAll(ppc, pointCelli)
|
||||||
{
|
{
|
||||||
@ -382,10 +382,10 @@ Foam::volPointInterpolation::interpolate
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
interpolateInternalField(vf, tpf());
|
interpolateInternalField(vf, tpf.ref());
|
||||||
|
|
||||||
// Interpolate to the patches overriding fixed value BCs
|
// Interpolate to the patches overriding fixed value BCs
|
||||||
interpolateBoundaryField(vf, tpf(), true);
|
interpolateBoundaryField(vf, tpf.ref(), true);
|
||||||
|
|
||||||
return tpf;
|
return tpf;
|
||||||
}
|
}
|
||||||
@ -518,8 +518,8 @@ Foam::volPointInterpolation::interpolate
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<DimensionedField<Type, pointMesh> >
|
Foam::tmp<Foam::DimensionedField<Type, Foam::pointMesh>>
|
||||||
volPointInterpolation::interpolate
|
Foam::volPointInterpolation::interpolate
|
||||||
(
|
(
|
||||||
const DimensionedField<Type, volMesh>& vf,
|
const DimensionedField<Type, volMesh>& vf,
|
||||||
const word& name,
|
const word& name,
|
||||||
@ -565,7 +565,7 @@ volPointInterpolation::interpolate
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
interpolateDimensionedInternalField(vf, tpf());
|
interpolateDimensionedInternalField(vf, tpf.ref());
|
||||||
|
|
||||||
return tpf;
|
return tpf;
|
||||||
}
|
}
|
||||||
@ -603,8 +603,8 @@ volPointInterpolation::interpolate
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<DimensionedField<Type, pointMesh> >
|
Foam::tmp<Foam::DimensionedField<Type, Foam::pointMesh>>
|
||||||
volPointInterpolation::interpolate
|
Foam::volPointInterpolation::interpolate
|
||||||
(
|
(
|
||||||
const DimensionedField<Type, volMesh>& vf
|
const DimensionedField<Type, volMesh>& vf
|
||||||
) const
|
) const
|
||||||
@ -614,21 +614,17 @@ volPointInterpolation::interpolate
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<DimensionedField<Type, pointMesh> >
|
Foam::tmp<Foam::DimensionedField<Type, Foam::pointMesh>>
|
||||||
volPointInterpolation::interpolate
|
Foam::volPointInterpolation::interpolate
|
||||||
(
|
(
|
||||||
const tmp<DimensionedField<Type, volMesh>>& tvf
|
const tmp<DimensionedField<Type, volMesh>>& tvf
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
// Construct tmp<pointField>
|
// Construct tmp<pointField>
|
||||||
tmp<DimensionedField<Type, pointMesh> > tpf = interpolate(tvf());
|
tmp<DimensionedField<Type, pointMesh>> tpf = interpolate(tvf.ref());
|
||||||
tvf.clear();
|
tvf.clear();
|
||||||
return tpf;
|
return tpf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -3,7 +3,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-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|||||||
@ -324,7 +324,7 @@ void Foam::surfaceAlignedSBRStressFvMotionSolver::solve()
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
volVectorField& Ud = tUd();
|
volVectorField& Ud = tUd.ref();
|
||||||
|
|
||||||
const vectorList& C = fvMesh_.C();
|
const vectorList& C = fvMesh_.C();
|
||||||
forAll(Ud, i)
|
forAll(Ud, i)
|
||||||
@ -364,7 +364,7 @@ void Foam::surfaceAlignedSBRStressFvMotionSolver::solve()
|
|||||||
dimensionedScalar("zero", dimless, 0.0)
|
dimensionedScalar("zero", dimless, 0.0)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
volScalarField& mu = tmu();
|
volScalarField& mu = tmu.ref();
|
||||||
|
|
||||||
const scalarList& V = fvMesh_.V();
|
const scalarList& V = fvMesh_.V();
|
||||||
mu.internalField() = (1.0/V);
|
mu.internalField() = (1.0/V);
|
||||||
|
|||||||
@ -3,7 +3,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) 2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -106,7 +106,7 @@ void Foam::patchCorrectedInterpolation::interpolateDataFromPatchGroups
|
|||||||
dimensionedScalar("zero", dimless, 0),
|
dimensionedScalar("zero", dimless, 0),
|
||||||
zeroGradientPointPatchField<scalar>::typeName
|
zeroGradientPointPatchField<scalar>::typeName
|
||||||
);
|
);
|
||||||
data = dimensioned<Type>("zero", data.dimensions(), pTraits<Type>::zero);
|
data = dimensioned<Type>("zero", data.dimensions(), Type(Zero));
|
||||||
|
|
||||||
forAll(patchGroups_, patchGroupI)
|
forAll(patchGroups_, patchGroupI)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,7 +3,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-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|||||||
@ -111,7 +111,7 @@ public:
|
|||||||
bool accessed,
|
bool accessed,
|
||||||
label origProcOfOther,
|
label origProcOfOther,
|
||||||
label origIdOfOther,
|
label origIdOfOther,
|
||||||
const Type& data = pTraits<Type>::zero
|
const Type& data = Type(Zero)
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from Istream
|
//- Construct from Istream
|
||||||
|
|||||||
@ -108,7 +108,7 @@ public:
|
|||||||
(
|
(
|
||||||
bool accessed,
|
bool accessed,
|
||||||
const vector& pRel,
|
const vector& pRel,
|
||||||
const Type& data = pTraits<Type>::zero
|
const Type& data = Type(Zero)
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from Istream
|
//- Construct from Istream
|
||||||
|
|||||||
@ -3,7 +3,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) 2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|||||||
@ -3,7 +3,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) 2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|||||||
@ -76,11 +76,9 @@ Foam::point Foam::bezier::position(const scalar lambda) const
|
|||||||
{
|
{
|
||||||
--nWorking;
|
--nWorking;
|
||||||
|
|
||||||
SubList<point>(working, nWorking).assign
|
SubList<point>(working, nWorking) =
|
||||||
(
|
|
||||||
(1 - lambda)*SubList<point>(working, nWorking)
|
(1 - lambda)*SubList<point>(working, nWorking)
|
||||||
+ lambda*SubList<point>(working, nWorking, 1)
|
+ lambda*SubList<point>(working, nWorking, 1);
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return working[0];
|
return working[0];
|
||||||
|
|||||||
@ -3,7 +3,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) 2013-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|||||||
@ -3,7 +3,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-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -624,18 +624,18 @@ bool Foam::medialAxisMeshMover::unmarkExtrusion
|
|||||||
(
|
(
|
||||||
const label patchPointI,
|
const label patchPointI,
|
||||||
pointField& patchDisp,
|
pointField& patchDisp,
|
||||||
List<autoLayerDriver::extrudeMode>& extrudeStatus
|
List<snappyLayerDriver::extrudeMode>& extrudeStatus
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (extrudeStatus[patchPointI] == autoLayerDriver::EXTRUDE)
|
if (extrudeStatus[patchPointI] == snappyLayerDriver::EXTRUDE)
|
||||||
{
|
{
|
||||||
extrudeStatus[patchPointI] = autoLayerDriver::NOEXTRUDE;
|
extrudeStatus[patchPointI] = snappyLayerDriver::NOEXTRUDE;
|
||||||
patchDisp[patchPointI] = vector::zero;
|
patchDisp[patchPointI] = vector::zero;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (extrudeStatus[patchPointI] == autoLayerDriver::EXTRUDEREMOVE)
|
else if (extrudeStatus[patchPointI] == snappyLayerDriver::EXTRUDEREMOVE)
|
||||||
{
|
{
|
||||||
extrudeStatus[patchPointI] = autoLayerDriver::NOEXTRUDE;
|
extrudeStatus[patchPointI] = snappyLayerDriver::NOEXTRUDE;
|
||||||
patchDisp[patchPointI] = vector::zero;
|
patchDisp[patchPointI] = vector::zero;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -650,7 +650,7 @@ void Foam::medialAxisMeshMover::syncPatchDisplacement
|
|||||||
(
|
(
|
||||||
const scalarField& minThickness,
|
const scalarField& minThickness,
|
||||||
pointField& patchDisp,
|
pointField& patchDisp,
|
||||||
List<autoLayerDriver::extrudeMode>& extrudeStatus
|
List<snappyLayerDriver::extrudeMode>& extrudeStatus
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
const indirectPrimitivePatch& pp = adaptPatchPtr_();
|
const indirectPrimitivePatch& pp = adaptPatchPtr_();
|
||||||
@ -770,7 +770,7 @@ handleFeatureAngleLayerTerminations
|
|||||||
const scalar minCos,
|
const scalar minCos,
|
||||||
const PackedBoolList& isPatchMasterPoint,
|
const PackedBoolList& isPatchMasterPoint,
|
||||||
const labelList& meshEdges,
|
const labelList& meshEdges,
|
||||||
List<autoLayerDriver::extrudeMode>& extrudeStatus,
|
List<snappyLayerDriver::extrudeMode>& extrudeStatus,
|
||||||
pointField& patchDisp,
|
pointField& patchDisp,
|
||||||
label& nPointCounter
|
label& nPointCounter
|
||||||
) const
|
) const
|
||||||
@ -788,7 +788,7 @@ handleFeatureAngleLayerTerminations
|
|||||||
|
|
||||||
forAll(f, fp)
|
forAll(f, fp)
|
||||||
{
|
{
|
||||||
if (extrudeStatus[f[fp]] == autoLayerDriver::NOEXTRUDE)
|
if (extrudeStatus[f[fp]] == snappyLayerDriver::NOEXTRUDE)
|
||||||
{
|
{
|
||||||
extrudedFaces[faceI] = false;
|
extrudedFaces[faceI] = false;
|
||||||
break;
|
break;
|
||||||
@ -857,8 +857,8 @@ handleFeatureAngleLayerTerminations
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
extrudeStatus[v0] != autoLayerDriver::NOEXTRUDE
|
extrudeStatus[v0] != snappyLayerDriver::NOEXTRUDE
|
||||||
|| extrudeStatus[v1] != autoLayerDriver::NOEXTRUDE
|
|| extrudeStatus[v1] != snappyLayerDriver::NOEXTRUDE
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (!eFaceExtrude[0] || !eFaceExtrude[1])
|
if (!eFaceExtrude[0] || !eFaceExtrude[1])
|
||||||
@ -905,7 +905,7 @@ void Foam::medialAxisMeshMover::findIsolatedRegions
|
|||||||
const PackedBoolList& isPatchMasterEdge,
|
const PackedBoolList& isPatchMasterEdge,
|
||||||
const labelList& meshEdges,
|
const labelList& meshEdges,
|
||||||
const scalarField& minThickness,
|
const scalarField& minThickness,
|
||||||
List<autoLayerDriver::extrudeMode>& extrudeStatus,
|
List<snappyLayerDriver::extrudeMode>& extrudeStatus,
|
||||||
pointField& patchDisp
|
pointField& patchDisp
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
@ -974,7 +974,7 @@ void Foam::medialAxisMeshMover::findIsolatedRegions
|
|||||||
|
|
||||||
forAll(f, fp)
|
forAll(f, fp)
|
||||||
{
|
{
|
||||||
if (extrudeStatus[f[fp]] != autoLayerDriver::NOEXTRUDE)
|
if (extrudeStatus[f[fp]] != snappyLayerDriver::NOEXTRUDE)
|
||||||
{
|
{
|
||||||
if (islandPoint[faceI] == -1)
|
if (islandPoint[faceI] == -1)
|
||||||
{
|
{
|
||||||
@ -998,7 +998,7 @@ void Foam::medialAxisMeshMover::findIsolatedRegions
|
|||||||
// Check all surrounding faces that I am the islandPoint
|
// Check all surrounding faces that I am the islandPoint
|
||||||
forAll(pointFaces, patchPointI)
|
forAll(pointFaces, patchPointI)
|
||||||
{
|
{
|
||||||
if (extrudeStatus[patchPointI] != autoLayerDriver::NOEXTRUDE)
|
if (extrudeStatus[patchPointI] != snappyLayerDriver::NOEXTRUDE)
|
||||||
{
|
{
|
||||||
const labelList& pFaces = pointFaces[patchPointI];
|
const labelList& pFaces = pointFaces[patchPointI];
|
||||||
|
|
||||||
@ -1026,7 +1026,7 @@ void Foam::medialAxisMeshMover::findIsolatedRegions
|
|||||||
const face& f = pp.localFaces()[faceI];
|
const face& f = pp.localFaces()[faceI];
|
||||||
forAll(f, fp)
|
forAll(f, fp)
|
||||||
{
|
{
|
||||||
if (extrudeStatus[f[fp]] == autoLayerDriver::NOEXTRUDE)
|
if (extrudeStatus[f[fp]] == snappyLayerDriver::NOEXTRUDE)
|
||||||
{
|
{
|
||||||
extrudedFaces[faceI] = false;
|
extrudedFaces[faceI] = false;
|
||||||
break;
|
break;
|
||||||
@ -1100,11 +1100,11 @@ void Foam::medialAxisMeshMover::findIsolatedRegions
|
|||||||
label v0 = e[0];
|
label v0 = e[0];
|
||||||
label v1 = e[1];
|
label v1 = e[1];
|
||||||
|
|
||||||
if (extrudeStatus[v1] != autoLayerDriver::NOEXTRUDE)
|
if (extrudeStatus[v1] != snappyLayerDriver::NOEXTRUDE)
|
||||||
{
|
{
|
||||||
isolatedPoint[v0] += 1;
|
isolatedPoint[v0] += 1;
|
||||||
}
|
}
|
||||||
if (extrudeStatus[v0] != autoLayerDriver::NOEXTRUDE)
|
if (extrudeStatus[v0] != snappyLayerDriver::NOEXTRUDE)
|
||||||
{
|
{
|
||||||
isolatedPoint[v1] += 1;
|
isolatedPoint[v1] += 1;
|
||||||
}
|
}
|
||||||
@ -1139,7 +1139,7 @@ void Foam::medialAxisMeshMover::findIsolatedRegions
|
|||||||
{
|
{
|
||||||
forAll(f, fp)
|
forAll(f, fp)
|
||||||
{
|
{
|
||||||
if (extrudeStatus[f[fp]] == autoLayerDriver::NOEXTRUDE)
|
if (extrudeStatus[f[fp]] == snappyLayerDriver::NOEXTRUDE)
|
||||||
{
|
{
|
||||||
allPointsExtruded = false;
|
allPointsExtruded = false;
|
||||||
break;
|
break;
|
||||||
@ -1285,7 +1285,7 @@ void Foam::medialAxisMeshMover::calculateDisplacement
|
|||||||
(
|
(
|
||||||
const dictionary& coeffDict,
|
const dictionary& coeffDict,
|
||||||
const scalarField& minThickness,
|
const scalarField& minThickness,
|
||||||
List<autoLayerDriver::extrudeMode>& extrudeStatus,
|
List<snappyLayerDriver::extrudeMode>& extrudeStatus,
|
||||||
pointField& patchDisp
|
pointField& patchDisp
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -1379,7 +1379,7 @@ void Foam::medialAxisMeshMover::calculateDisplacement
|
|||||||
|
|
||||||
forAll(thickness, patchPointI)
|
forAll(thickness, patchPointI)
|
||||||
{
|
{
|
||||||
if (extrudeStatus[patchPointI] == autoLayerDriver::NOEXTRUDE)
|
if (extrudeStatus[patchPointI] == snappyLayerDriver::NOEXTRUDE)
|
||||||
{
|
{
|
||||||
thickness[patchPointI] = 0.0;
|
thickness[patchPointI] = 0.0;
|
||||||
}
|
}
|
||||||
@ -1428,7 +1428,7 @@ void Foam::medialAxisMeshMover::calculateDisplacement
|
|||||||
|
|
||||||
forAll(meshPoints, patchPointI)
|
forAll(meshPoints, patchPointI)
|
||||||
{
|
{
|
||||||
if (extrudeStatus[patchPointI] != autoLayerDriver::NOEXTRUDE)
|
if (extrudeStatus[patchPointI] != snappyLayerDriver::NOEXTRUDE)
|
||||||
{
|
{
|
||||||
label pointI = meshPoints[patchPointI];
|
label pointI = meshPoints[patchPointI];
|
||||||
|
|
||||||
@ -1522,7 +1522,7 @@ void Foam::medialAxisMeshMover::calculateDisplacement
|
|||||||
// Update thickess for changed extrusion
|
// Update thickess for changed extrusion
|
||||||
forAll(thickness, patchPointI)
|
forAll(thickness, patchPointI)
|
||||||
{
|
{
|
||||||
if (extrudeStatus[patchPointI] == autoLayerDriver::NOEXTRUDE)
|
if (extrudeStatus[patchPointI] == snappyLayerDriver::NOEXTRUDE)
|
||||||
{
|
{
|
||||||
thickness[patchPointI] = 0.0;
|
thickness[patchPointI] = 0.0;
|
||||||
}
|
}
|
||||||
@ -1732,16 +1732,16 @@ bool Foam::medialAxisMeshMover::move
|
|||||||
pp.meshPoints()
|
pp.meshPoints()
|
||||||
);
|
);
|
||||||
|
|
||||||
List<autoLayerDriver::extrudeMode> extrudeStatus
|
List<snappyLayerDriver::extrudeMode> extrudeStatus
|
||||||
(
|
(
|
||||||
pp.nPoints(),
|
pp.nPoints(),
|
||||||
autoLayerDriver::EXTRUDE
|
snappyLayerDriver::EXTRUDE
|
||||||
);
|
);
|
||||||
forAll(extrudeStatus, pointI)
|
forAll(extrudeStatus, pointI)
|
||||||
{
|
{
|
||||||
if (mag(patchDisp[pointI]) <= minThickness[pointI]+SMALL)
|
if (mag(patchDisp[pointI]) <= minThickness[pointI]+SMALL)
|
||||||
{
|
{
|
||||||
extrudeStatus[pointI] = autoLayerDriver::NOEXTRUDE;
|
extrudeStatus[pointI] = snappyLayerDriver::NOEXTRUDE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -46,7 +46,7 @@ SourceFiles
|
|||||||
|
|
||||||
#include "externalDisplacementMeshMover.H"
|
#include "externalDisplacementMeshMover.H"
|
||||||
#include "motionSmootherAlgo.H"
|
#include "motionSmootherAlgo.H"
|
||||||
#include "autoLayerDriver.H"
|
#include "snappyLayerDriver.H"
|
||||||
#include "fieldSmoother.H"
|
#include "fieldSmoother.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -129,7 +129,7 @@ class medialAxisMeshMover
|
|||||||
(
|
(
|
||||||
const label patchPointI,
|
const label patchPointI,
|
||||||
pointField& patchDisp,
|
pointField& patchDisp,
|
||||||
List<autoLayerDriver::extrudeMode>& extrudeStatus
|
List<snappyLayerDriver::extrudeMode>& extrudeStatus
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Synchronise extrusion
|
//- Synchronise extrusion
|
||||||
@ -137,7 +137,7 @@ class medialAxisMeshMover
|
|||||||
(
|
(
|
||||||
const scalarField& minThickness,
|
const scalarField& minThickness,
|
||||||
pointField& patchDisp,
|
pointField& patchDisp,
|
||||||
List<autoLayerDriver::extrudeMode>& extrudeStatus
|
List<snappyLayerDriver::extrudeMode>& extrudeStatus
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Stop layer growth at feature edges
|
//- Stop layer growth at feature edges
|
||||||
@ -146,7 +146,7 @@ class medialAxisMeshMover
|
|||||||
const scalar minCos,
|
const scalar minCos,
|
||||||
const PackedBoolList& isMasterPoint,
|
const PackedBoolList& isMasterPoint,
|
||||||
const labelList& meshEdges,
|
const labelList& meshEdges,
|
||||||
List<autoLayerDriver::extrudeMode>& extrudeStatus,
|
List<snappyLayerDriver::extrudeMode>& extrudeStatus,
|
||||||
pointField& patchDisp,
|
pointField& patchDisp,
|
||||||
label& nPointCounter
|
label& nPointCounter
|
||||||
) const;
|
) const;
|
||||||
@ -162,7 +162,7 @@ class medialAxisMeshMover
|
|||||||
const PackedBoolList& isMasterEdge,
|
const PackedBoolList& isMasterEdge,
|
||||||
const labelList& meshEdges,
|
const labelList& meshEdges,
|
||||||
const scalarField& minThickness,
|
const scalarField& minThickness,
|
||||||
List<autoLayerDriver::extrudeMode>& extrudeStatus,
|
List<snappyLayerDriver::extrudeMode>& extrudeStatus,
|
||||||
pointField& patchDisp
|
pointField& patchDisp
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
@ -174,7 +174,7 @@ class medialAxisMeshMover
|
|||||||
(
|
(
|
||||||
const dictionary&,
|
const dictionary&,
|
||||||
const scalarField& minThickness,
|
const scalarField& minThickness,
|
||||||
List<autoLayerDriver::extrudeMode>& extrudeStatus,
|
List<snappyLayerDriver::extrudeMode>& extrudeStatus,
|
||||||
pointField& patchDisp
|
pointField& patchDisp
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -55,7 +55,7 @@ zeroFixedValuePointPatchField
|
|||||||
:
|
:
|
||||||
fixedValuePointPatchField<Type>(p, iF, dict, false)
|
fixedValuePointPatchField<Type>(p, iF, dict, false)
|
||||||
{
|
{
|
||||||
fixedValuePointPatchField<Type>::operator=(pTraits<Type>::zero);
|
fixedValuePointPatchField<Type>::operator=(Type(Zero));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ zeroFixedValuePointPatchField
|
|||||||
fixedValuePointPatchField<Type>(ptf, p, iF, mapper)
|
fixedValuePointPatchField<Type>(ptf, p, iF, mapper)
|
||||||
{
|
{
|
||||||
// For safety re-evaluate
|
// For safety re-evaluate
|
||||||
fixedValuePointPatchField<Type>::operator=(pTraits<Type>::zero);
|
fixedValuePointPatchField<Type>::operator=(Type(Zero));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ zeroFixedValuePointPatchField
|
|||||||
fixedValuePointPatchField<Type>(ptf, iF)
|
fixedValuePointPatchField<Type>(ptf, iF)
|
||||||
{
|
{
|
||||||
// For safety re-evaluate
|
// For safety re-evaluate
|
||||||
fixedValuePointPatchField<Type>::operator=(pTraits<Type>::zero);
|
fixedValuePointPatchField<Type>::operator=(Type(Zero));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,7 @@ License
|
|||||||
#include "polyMeshGeometry.H"
|
#include "polyMeshGeometry.H"
|
||||||
#include "IOmanip.H"
|
#include "IOmanip.H"
|
||||||
#include "unitConversion.H"
|
#include "unitConversion.H"
|
||||||
#include "autoSnapDriver.H"
|
#include "snappySnapDriver.H"
|
||||||
|
|
||||||
#include "snapParameters.H"
|
#include "snapParameters.H"
|
||||||
#include "motionSmoother.H"
|
#include "motionSmoother.H"
|
||||||
@ -1092,7 +1092,7 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCellsGeometric
|
|||||||
{
|
{
|
||||||
pointField oldPoints(mesh_.points());
|
pointField oldPoints(mesh_.points());
|
||||||
|
|
||||||
// Repeat (most of) autoSnapDriver::doSnap
|
// Repeat (most of) snappySnapDriver::doSnap
|
||||||
{
|
{
|
||||||
labelList adaptPatchIDs(meshedPatches());
|
labelList adaptPatchIDs(meshedPatches());
|
||||||
|
|
||||||
@ -1110,7 +1110,7 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCellsGeometric
|
|||||||
// Distance to attract to nearest feature on surface
|
// Distance to attract to nearest feature on surface
|
||||||
const scalarField snapDist
|
const scalarField snapDist
|
||||||
(
|
(
|
||||||
autoSnapDriver::calcSnapDistance(mesh_, snapParams, pp)
|
snappySnapDriver::calcSnapDistance(mesh_, snapParams, pp)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -1149,7 +1149,7 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCellsGeometric
|
|||||||
<< mesh_.time().cpuTimeIncrement() << " s\n" << nl << endl;
|
<< mesh_.time().cpuTimeIncrement() << " s\n" << nl << endl;
|
||||||
|
|
||||||
// Pre-smooth patch vertices (so before determining nearest)
|
// Pre-smooth patch vertices (so before determining nearest)
|
||||||
autoSnapDriver::preSmoothPatch
|
snappySnapDriver::preSmoothPatch
|
||||||
(
|
(
|
||||||
*this,
|
*this,
|
||||||
snapParams,
|
snapParams,
|
||||||
@ -1162,7 +1162,7 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCellsGeometric
|
|||||||
vectorField nearestNormal;
|
vectorField nearestNormal;
|
||||||
const vectorField disp
|
const vectorField disp
|
||||||
(
|
(
|
||||||
autoSnapDriver::calcNearestSurface
|
snappySnapDriver::calcNearestSurface
|
||||||
(
|
(
|
||||||
snapParams.strictRegionSnap(),
|
snapParams.strictRegionSnap(),
|
||||||
*this,
|
*this,
|
||||||
|
|||||||
@ -70,7 +70,7 @@ T Foam::meshRefinement::gAverage
|
|||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
T sum = pTraits<T>::zero;
|
T sum = T(Zero);
|
||||||
label n = 0;
|
label n = 0;
|
||||||
|
|
||||||
forAll(values, i)
|
forAll(values, i)
|
||||||
@ -305,7 +305,7 @@ void Foam::meshRefinement::weightedSum
|
|||||||
}
|
}
|
||||||
|
|
||||||
sum.setSize(meshPoints.size());
|
sum.setSize(meshPoints.size());
|
||||||
sum = pTraits<Type>::zero;
|
sum = Type(zero);
|
||||||
|
|
||||||
forAll(edges, edgeI)
|
forAll(edges, edgeI)
|
||||||
{
|
{
|
||||||
@ -329,7 +329,7 @@ void Foam::meshRefinement::weightedSum
|
|||||||
meshPoints,
|
meshPoints,
|
||||||
sum,
|
sum,
|
||||||
plusEqOp<Type>(),
|
plusEqOp<Type>(),
|
||||||
pTraits<Type>::zero // null value
|
Type(Zero) // null value
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -110,7 +110,7 @@ Foam::tmp<Foam::scalarField> Foam::snappyLayerDriver::avgPointData
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
tmp<scalarField> tfaceFld(new scalarField(pp.size(), 0.0));
|
tmp<scalarField> tfaceFld(new scalarField(pp.size(), 0.0));
|
||||||
scalarField& faceFld = tfaceFld();
|
scalarField& faceFld = tfaceFld.ref();
|
||||||
|
|
||||||
forAll(pp.localFaces(), faceI)
|
forAll(pp.localFaces(), faceI)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -43,7 +43,7 @@ void Foam::snappyLayerDriver::averageNeighbours
|
|||||||
{
|
{
|
||||||
const pointField& pts = mesh.points();
|
const pointField& pts = mesh.points();
|
||||||
|
|
||||||
average = pTraits<Type>::zero;
|
average = Type(Zero);
|
||||||
|
|
||||||
forAll(edges, edgeI)
|
forAll(edges, edgeI)
|
||||||
{
|
{
|
||||||
@ -77,7 +77,7 @@ void Foam::snappyLayerDriver::averageNeighbours
|
|||||||
meshPoints,
|
meshPoints,
|
||||||
average,
|
average,
|
||||||
plusEqOp<Type>(),
|
plusEqOp<Type>(),
|
||||||
pTraits<Type>::zero // null value
|
Type(Zero) // null value
|
||||||
);
|
);
|
||||||
|
|
||||||
average *= invSumWeight;
|
average *= invSumWeight;
|
||||||
|
|||||||
@ -277,7 +277,7 @@ Foam::tmp<Foam::pointField> Foam::snappySnapDriver::smoothInternalDisplacement
|
|||||||
);
|
);
|
||||||
|
|
||||||
tmp<pointField> tdisplacement(new pointField(mesh.nPoints(), vector::zero));
|
tmp<pointField> tdisplacement(new pointField(mesh.nPoints(), vector::zero));
|
||||||
pointField& displacement = tdisplacement();
|
pointField& displacement = tdisplacement.ref();
|
||||||
|
|
||||||
label nAdapted = 0;
|
label nAdapted = 0;
|
||||||
|
|
||||||
@ -522,7 +522,7 @@ Foam::tmp<Foam::pointField> Foam::snappySnapDriver::smoothPatchDisplacement
|
|||||||
|
|
||||||
// Displacement to calculate.
|
// Displacement to calculate.
|
||||||
tmp<pointField> tpatchDisp(new pointField(meshPoints.size(), vector::zero));
|
tmp<pointField> tpatchDisp(new pointField(meshPoints.size(), vector::zero));
|
||||||
pointField& patchDisp = tpatchDisp();
|
pointField& patchDisp = tpatchDisp.ref();
|
||||||
|
|
||||||
forAll(pointFaces, i)
|
forAll(pointFaces, i)
|
||||||
{
|
{
|
||||||
@ -685,7 +685,7 @@ Foam::tmp<Foam::scalarField> Foam::snappySnapDriver::edgePatchDist
|
|||||||
|
|
||||||
// Copy edge values into scalarField
|
// Copy edge values into scalarField
|
||||||
tmp<scalarField> tedgeDist(new scalarField(mesh.nEdges()));
|
tmp<scalarField> tedgeDist(new scalarField(mesh.nEdges()));
|
||||||
scalarField& edgeDist = tedgeDist();
|
scalarField& edgeDist = tedgeDist.ref();
|
||||||
|
|
||||||
forAll(allEdgeInfo, edgeI)
|
forAll(allEdgeInfo, edgeI)
|
||||||
{
|
{
|
||||||
@ -999,7 +999,7 @@ Foam::tmp<Foam::pointField> Foam::snappySnapDriver::avgCellCentres
|
|||||||
(
|
(
|
||||||
new pointField(pointFaces.size(), vector::zero)
|
new pointField(pointFaces.size(), vector::zero)
|
||||||
);
|
);
|
||||||
pointField& avgBoundary = tavgBoundary();
|
pointField& avgBoundary = tavgBoundary.ref();
|
||||||
labelList nBoundary(pointFaces.size(), 0);
|
labelList nBoundary(pointFaces.size(), 0);
|
||||||
|
|
||||||
forAll(pointFaces, pointI)
|
forAll(pointFaces, pointI)
|
||||||
|
|||||||
@ -344,13 +344,7 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::calcRegionSplit
|
|||||||
|
|
||||||
// Get the wanted region labels into recvNonLocal
|
// Get the wanted region labels into recvNonLocal
|
||||||
labelListList recvNonLocal(Pstream::nProcs());
|
labelListList recvNonLocal(Pstream::nProcs());
|
||||||
labelListList sizes;
|
Pstream::exchange<labelList, label>(sendNonLocal, recvNonLocal);
|
||||||
Pstream::exchange<labelList, label>
|
|
||||||
(
|
|
||||||
sendNonLocal,
|
|
||||||
recvNonLocal,
|
|
||||||
sizes
|
|
||||||
);
|
|
||||||
|
|
||||||
// Now we have the wanted compact region labels that procI wants in
|
// Now we have the wanted compact region labels that procI wants in
|
||||||
// recvNonLocal[procI]. Construct corresponding list of compact
|
// recvNonLocal[procI]. Construct corresponding list of compact
|
||||||
@ -371,14 +365,7 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::calcRegionSplit
|
|||||||
|
|
||||||
// Send back (into recvNonLocal)
|
// Send back (into recvNonLocal)
|
||||||
recvNonLocal.clear();
|
recvNonLocal.clear();
|
||||||
recvNonLocal.setSize(sendWantedLocal.size());
|
Pstream::exchange<labelList, label>(sendWantedLocal, recvNonLocal);
|
||||||
sizes.clear();
|
|
||||||
Pstream::exchange<labelList, label>
|
|
||||||
(
|
|
||||||
sendWantedLocal,
|
|
||||||
recvNonLocal,
|
|
||||||
sizes
|
|
||||||
);
|
|
||||||
sendWantedLocal.clear();
|
sendWantedLocal.clear();
|
||||||
|
|
||||||
// Now recvNonLocal contains for every element in setNonLocal the
|
// Now recvNonLocal contains for every element in setNonLocal the
|
||||||
|
|||||||
@ -30,10 +30,8 @@ License
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
defineTypeNameAndDebug(searchableCone, 0);
|
defineTypeNameAndDebug(searchableCone, 0);
|
||||||
addToRunTimeSelectionTable(searchableSurface, searchableCone, dict);
|
addToRunTimeSelectionTable(searchableSurface, searchableCone, dict);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -74,7 +72,7 @@ void Foam::searchableCone::boundingSpheres
|
|||||||
Foam::tmp<Foam::pointField> Foam::searchableCone::points() const
|
Foam::tmp<Foam::pointField> Foam::searchableCone::points() const
|
||||||
{
|
{
|
||||||
tmp<pointField> tPts(new pointField(2));
|
tmp<pointField> tPts(new pointField(2));
|
||||||
pointField& pts = tPts();
|
pointField& pts = tPts.ref();
|
||||||
|
|
||||||
pts[0] = point1_;
|
pts[0] = point1_;
|
||||||
pts[1] = point2_;
|
pts[1] = point2_;
|
||||||
|
|||||||
@ -204,7 +204,7 @@ void Foam::fieldAverage::readAveragingProperties()
|
|||||||
totalTime_.clear();
|
totalTime_.clear();
|
||||||
totalTime_.setSize(faItems_.size(), obr_.time().deltaTValue());
|
totalTime_.setSize(faItems_.size(), obr_.time().deltaTValue());
|
||||||
|
|
||||||
if (log_ && (resetOnRestart_ || resetOnOutput_))
|
if (log_ && (restartOnRestart_ || restartOnOutput_))
|
||||||
{
|
{
|
||||||
Info<< " Starting averaging at time " << obr_.time().timeName()
|
Info<< " Starting averaging at time " << obr_.time().timeName()
|
||||||
<< nl;
|
<< nl;
|
||||||
|
|||||||
@ -306,7 +306,7 @@ Foam::externalCoupledFunctionObject::gatherAndCombine
|
|||||||
|
|
||||||
|
|
||||||
tmp<Field<Type>> tresult(new Field<Type>(0));
|
tmp<Field<Type>> tresult(new Field<Type>(0));
|
||||||
Field<Type>& result = tresult();
|
Field<Type>& result = tresult.ref();
|
||||||
|
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -39,8 +39,8 @@ externalCoupledMixedFvPatchField
|
|||||||
:
|
:
|
||||||
mixedFvPatchField<Type>(p, iF)
|
mixedFvPatchField<Type>(p, iF)
|
||||||
{
|
{
|
||||||
this->refValue() = pTraits<Type>::zero;
|
this->refValue() = Type(Zero);
|
||||||
this->refGrad() = pTraits<Type>::zero;
|
this->refGrad() = Type(Zero);
|
||||||
this->valueFraction() = 0.0;
|
this->valueFraction() = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -104,7 +104,7 @@ externalCoupledTemperatureMixedFvPatchScalarField
|
|||||||
|
|
||||||
// Initialise as a fixed value
|
// Initialise as a fixed value
|
||||||
this->refValue() = *this;
|
this->refValue() = *this;
|
||||||
this->refGrad() = pTraits<scalar>::zero;
|
this->refGrad() = Zero;
|
||||||
this->valueFraction() = 1.0;
|
this->valueFraction() = 1.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -210,9 +210,6 @@ Foam::scalarTransport::~scalarTransport()
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::scalarTransport::read(const dictionary& dict)
|
void Foam::scalarTransport::read(const dictionary& dict)
|
||||||
{
|
|
||||||
<<<<<<< HEAD
|
|
||||||
if (active_)
|
|
||||||
{
|
{
|
||||||
log_.readIfPresent("log", dict);
|
log_.readIfPresent("log", dict);
|
||||||
|
|
||||||
@ -221,13 +218,7 @@ void Foam::scalarTransport::read(const dictionary& dict)
|
|||||||
dict.readIfPresent("phiName", phiName_);
|
dict.readIfPresent("phiName", phiName_);
|
||||||
dict.readIfPresent("UName", UName_);
|
dict.readIfPresent("UName", UName_);
|
||||||
dict.readIfPresent("rhoName", rhoName_);
|
dict.readIfPresent("rhoName", rhoName_);
|
||||||
=======
|
|
||||||
Info<< type() << ":" << nl;
|
|
||||||
|
|
||||||
phiName_ = dict.lookupOrDefault<word>("phiName", "phi");
|
|
||||||
UName_ = dict.lookupOrDefault<word>("UName", "U");
|
|
||||||
rhoName_ = dict.lookupOrDefault<word>("rhoName", "rho");
|
|
||||||
>>>>>>> foundation
|
|
||||||
|
|
||||||
userDT_ = false;
|
userDT_ = false;
|
||||||
if (dict.readIfPresent("DT", DT_))
|
if (dict.readIfPresent("DT", DT_))
|
||||||
@ -235,63 +226,37 @@ void Foam::scalarTransport::read(const dictionary& dict)
|
|||||||
userDT_ = true;
|
userDT_ = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
dict.readIfPresent("nCorr", nCorr_);
|
dict.readIfPresent("nCorr", nCorr_);
|
||||||
dict.lookup("resetOnStartUp") >> resetOnStartUp_;
|
dict.lookup("resetOnStartUp") >> resetOnStartUp_;
|
||||||
dict.lookup("autoSchemes") >> autoSchemes_;
|
dict.lookup("autoSchemes") >> autoSchemes_;
|
||||||
=======
|
|
||||||
dict.lookup("resetOnStartUp") >> resetOnStartUp_;
|
|
||||||
|
|
||||||
dict.readIfPresent("nCorr", nCorr_);
|
|
||||||
|
|
||||||
dict.lookup("autoSchemes") >> autoSchemes_;
|
|
||||||
>>>>>>> foundation
|
|
||||||
|
|
||||||
fvOptions_.reset(dict.subDict("fvOptions"));
|
fvOptions_.reset(dict.subDict("fvOptions"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::scalarTransport::execute()
|
void Foam::scalarTransport::execute()
|
||||||
{
|
|
||||||
<<<<<<< HEAD
|
|
||||||
if (active_)
|
|
||||||
{
|
{
|
||||||
if (log_) Info<< type() << " " << name_ << " output:" << nl;
|
if (log_) Info<< type() << " " << name_ << " output:" << nl;
|
||||||
=======
|
|
||||||
Info<< type() << " output:" << endl;
|
|
||||||
>>>>>>> foundation
|
|
||||||
|
|
||||||
const surfaceScalarField& phi =
|
const surfaceScalarField& phi =
|
||||||
mesh_.lookupObject<surfaceScalarField>(phiName_);
|
mesh_.lookupObject<surfaceScalarField>(phiName_);
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
volScalarField& T = transportedField();
|
volScalarField& T = transportedField();
|
||||||
|
|
||||||
// calculate the diffusivity
|
// Calculate the diffusivity
|
||||||
volScalarField DT(this->DT(phi));
|
volScalarField DT(this->DT(phi));
|
||||||
|
|
||||||
// set schemes
|
// Set schemes
|
||||||
word schemeVar = T.name();
|
word schemeVar = T.name();
|
||||||
if (autoSchemes_)
|
if (autoSchemes_)
|
||||||
{
|
{
|
||||||
schemeVar = UName_;
|
schemeVar = UName_;
|
||||||
}
|
}
|
||||||
=======
|
|
||||||
// calculate the diffusivity
|
|
||||||
volScalarField DT(this->DT(phi));
|
|
||||||
|
|
||||||
// set schemes
|
|
||||||
word schemeVar = T_.name();
|
|
||||||
if (autoSchemes_)
|
|
||||||
{
|
|
||||||
schemeVar = UName_;
|
|
||||||
}
|
|
||||||
>>>>>>> foundation
|
|
||||||
|
|
||||||
word divScheme("div(phi," + schemeVar + ")");
|
word divScheme("div(phi," + schemeVar + ")");
|
||||||
word laplacianScheme("laplacian(" + DT.name() + "," + schemeVar + ")");
|
word laplacianScheme("laplacian(" + DT.name() + "," + schemeVar + ")");
|
||||||
|
|
||||||
// set under-relaxation coeff
|
// Set under-relaxation coeff
|
||||||
scalar relaxCoeff = 0.0;
|
scalar relaxCoeff = 0.0;
|
||||||
if (mesh_.relaxEquation(schemeVar))
|
if (mesh_.relaxEquation(schemeVar))
|
||||||
{
|
{
|
||||||
@ -303,8 +268,7 @@ void Foam::scalarTransport::execute()
|
|||||||
const volScalarField& rho =
|
const volScalarField& rho =
|
||||||
mesh_.lookupObject<volScalarField>(rhoName_);
|
mesh_.lookupObject<volScalarField>(rhoName_);
|
||||||
|
|
||||||
<<<<<<< HEAD
|
// Solve
|
||||||
// solve
|
|
||||||
for (label i = 0; i <= nCorr_; i++)
|
for (label i = 0; i <= nCorr_; i++)
|
||||||
{
|
{
|
||||||
fvScalarMatrix TEqn
|
fvScalarMatrix TEqn
|
||||||
@ -315,19 +279,6 @@ void Foam::scalarTransport::execute()
|
|||||||
==
|
==
|
||||||
fvOptions_(rho, T)
|
fvOptions_(rho, T)
|
||||||
);
|
);
|
||||||
=======
|
|
||||||
// solve
|
|
||||||
for (label i = 0; i <= nCorr_; i++)
|
|
||||||
{
|
|
||||||
fvScalarMatrix TEqn
|
|
||||||
(
|
|
||||||
fvm::ddt(rho, T_)
|
|
||||||
+ fvm::div(phi, T_, divScheme)
|
|
||||||
- fvm::laplacian(DT, T_, laplacianScheme)
|
|
||||||
==
|
|
||||||
fvOptions_(rho, T_)
|
|
||||||
);
|
|
||||||
>>>>>>> foundation
|
|
||||||
|
|
||||||
TEqn.relax(relaxCoeff);
|
TEqn.relax(relaxCoeff);
|
||||||
|
|
||||||
@ -338,11 +289,7 @@ void Foam::scalarTransport::execute()
|
|||||||
}
|
}
|
||||||
else if (phi.dimensions() == dimVolume/dimTime)
|
else if (phi.dimensions() == dimVolume/dimTime)
|
||||||
{
|
{
|
||||||
// solve
|
// Solve
|
||||||
for (label i = 0; i <= nCorr_; i++)
|
|
||||||
{
|
|
||||||
<<<<<<< HEAD
|
|
||||||
// solve
|
|
||||||
for (label i = 0; i <= nCorr_; i++)
|
for (label i = 0; i <= nCorr_; i++)
|
||||||
{
|
{
|
||||||
fvScalarMatrix TEqn
|
fvScalarMatrix TEqn
|
||||||
@ -353,16 +300,6 @@ void Foam::scalarTransport::execute()
|
|||||||
==
|
==
|
||||||
fvOptions_(T)
|
fvOptions_(T)
|
||||||
);
|
);
|
||||||
=======
|
|
||||||
fvScalarMatrix TEqn
|
|
||||||
(
|
|
||||||
fvm::ddt(T_)
|
|
||||||
+ fvm::div(phi, T_, divScheme)
|
|
||||||
- fvm::laplacian(DT, T_, laplacianScheme)
|
|
||||||
==
|
|
||||||
fvOptions_(T_)
|
|
||||||
);
|
|
||||||
>>>>>>> foundation
|
|
||||||
|
|
||||||
TEqn.relax(relaxCoeff);
|
TEqn.relax(relaxCoeff);
|
||||||
|
|
||||||
@ -370,11 +307,6 @@ void Foam::scalarTransport::execute()
|
|||||||
|
|
||||||
TEqn.solve(mesh_.solverDict(schemeVar));
|
TEqn.solve(mesh_.solverDict(schemeVar));
|
||||||
}
|
}
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
if (log_) Info<< endl;
|
|
||||||
=======
|
|
||||||
>>>>>>> foundation
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -384,17 +316,13 @@ void Foam::scalarTransport::execute()
|
|||||||
<< dimVolume/dimTime << endl;
|
<< dimVolume/dimTime << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< endl;
|
if (log_) Info<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::scalarTransport::end()
|
void Foam::scalarTransport::end()
|
||||||
{
|
{
|
||||||
<<<<<<< HEAD
|
|
||||||
// Do nothing
|
// Do nothing
|
||||||
=======
|
|
||||||
execute();
|
|
||||||
>>>>>>> foundation
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -120,6 +120,9 @@ class scalarTransport
|
|||||||
//- Reference to the mesh database
|
//- Reference to the mesh database
|
||||||
const fvMesh& mesh_;
|
const fvMesh& mesh_;
|
||||||
|
|
||||||
|
//- On/off switch
|
||||||
|
bool active_;
|
||||||
|
|
||||||
//- Name of flux field (optional)
|
//- Name of flux field (optional)
|
||||||
word phiName_;
|
word phiName_;
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,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-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -56,9 +56,9 @@ inclinedFilmNusseltHeightFvPatchScalarField
|
|||||||
:
|
:
|
||||||
fixedValueFvPatchScalarField(ptf, p, iF, mapper),
|
fixedValueFvPatchScalarField(ptf, p, iF, mapper),
|
||||||
filmRegionName_(ptf.filmRegionName_),
|
filmRegionName_(ptf.filmRegionName_),
|
||||||
GammaMean_(ptf.GammaMean_().clone().ptr()),
|
GammaMean_(ptf.GammaMean_, false),
|
||||||
a_(ptf.a_().clone().ptr()),
|
a_(ptf.a_, false),
|
||||||
omega_(ptf.omega_().clone().ptr())
|
omega_(ptf.omega_, false)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -75,9 +75,9 @@ inclinedFilmNusseltHeightFvPatchScalarField
|
|||||||
(
|
(
|
||||||
dict.lookupOrDefault<word>("filmRegion", "surfaceFilmProperties")
|
dict.lookupOrDefault<word>("filmRegion", "surfaceFilmProperties")
|
||||||
),
|
),
|
||||||
GammaMean_(DataEntry<scalar>::New("GammaMean", dict)),
|
GammaMean_(Function1<scalar>::New("GammaMean", dict)),
|
||||||
a_(DataEntry<scalar>::New("a", dict)),
|
a_(Function1<scalar>::New("a", dict)),
|
||||||
omega_(DataEntry<scalar>::New("omega", dict))
|
omega_(Function1<scalar>::New("omega", dict))
|
||||||
{
|
{
|
||||||
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
|
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
|
||||||
}
|
}
|
||||||
@ -91,9 +91,9 @@ inclinedFilmNusseltHeightFvPatchScalarField
|
|||||||
:
|
:
|
||||||
fixedValueFvPatchScalarField(wmfrhpsf),
|
fixedValueFvPatchScalarField(wmfrhpsf),
|
||||||
filmRegionName_(wmfrhpsf.filmRegionName_),
|
filmRegionName_(wmfrhpsf.filmRegionName_),
|
||||||
GammaMean_(wmfrhpsf.GammaMean_().clone().ptr()),
|
GammaMean_(wmfrhpsf.GammaMean_, false),
|
||||||
a_(wmfrhpsf.a_().clone().ptr()),
|
a_(wmfrhpsf.a_, false),
|
||||||
omega_(wmfrhpsf.omega_().clone().ptr())
|
omega_(wmfrhpsf.omega_, false)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -106,9 +106,9 @@ inclinedFilmNusseltHeightFvPatchScalarField
|
|||||||
:
|
:
|
||||||
fixedValueFvPatchScalarField(wmfrhpsf, iF),
|
fixedValueFvPatchScalarField(wmfrhpsf, iF),
|
||||||
filmRegionName_(wmfrhpsf.filmRegionName_),
|
filmRegionName_(wmfrhpsf.filmRegionName_),
|
||||||
GammaMean_(wmfrhpsf.GammaMean_().clone().ptr()),
|
GammaMean_(wmfrhpsf.GammaMean_, false),
|
||||||
a_(wmfrhpsf.a_().clone().ptr()),
|
a_(wmfrhpsf.a_, false),
|
||||||
omega_(wmfrhpsf.omega_().clone().ptr())
|
omega_(wmfrhpsf.omega_, false)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -123,7 +123,7 @@ void Foam::inclinedFilmNusseltHeightFvPatchScalarField::updateCoeffs()
|
|||||||
|
|
||||||
const label patchI = patch().index();
|
const label patchI = patch().index();
|
||||||
|
|
||||||
// retrieve the film region from the database
|
// Retrieve the film region from the database
|
||||||
|
|
||||||
const regionModels::regionModel& region =
|
const regionModels::regionModel& region =
|
||||||
db().time().lookupObject<regionModels::regionModel>(filmRegionName_);
|
db().time().lookupObject<regionModels::regionModel>(filmRegionName_);
|
||||||
@ -134,9 +134,9 @@ void Foam::inclinedFilmNusseltHeightFvPatchScalarField::updateCoeffs()
|
|||||||
const regionModels::surfaceFilmModels::kinematicSingleLayer&
|
const regionModels::surfaceFilmModels::kinematicSingleLayer&
|
||||||
>(region);
|
>(region);
|
||||||
|
|
||||||
// calculate the vector tangential to the patch
|
// Calculate the vector tangential to the patch
|
||||||
|
|
||||||
// note: normal pointing into the domain
|
// Note: normal pointing into the domain
|
||||||
const vectorField n(-patch().nf());
|
const vectorField n(-patch().nf());
|
||||||
|
|
||||||
const scalarField gTan(film.gTan(patchI) & n);
|
const scalarField gTan(film.gTan(patchI) & n);
|
||||||
@ -156,12 +156,12 @@ void Foam::inclinedFilmNusseltHeightFvPatchScalarField::updateCoeffs()
|
|||||||
vectorField nTan(nHatp ^ n);
|
vectorField nTan(nHatp ^ n);
|
||||||
nTan /= mag(nTan) + ROOTVSMALL;
|
nTan /= mag(nTan) + ROOTVSMALL;
|
||||||
|
|
||||||
// calculate distance in patch tangential direction
|
// Calculate distance in patch tangential direction
|
||||||
|
|
||||||
const vectorField& Cf = patch().Cf();
|
const vectorField& Cf = patch().Cf();
|
||||||
scalarField d(nTan & Cf);
|
scalarField d(nTan & Cf);
|
||||||
|
|
||||||
// calculate the wavy film height
|
// Calculate the wavy film height
|
||||||
|
|
||||||
const scalar t = db().time().timeOutputValue();
|
const scalar t = db().time().timeOutputValue();
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,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-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -56,9 +56,9 @@ inclinedFilmNusseltInletVelocityFvPatchVectorField
|
|||||||
:
|
:
|
||||||
fixedValueFvPatchVectorField(ptf, p, iF, mapper),
|
fixedValueFvPatchVectorField(ptf, p, iF, mapper),
|
||||||
filmRegionName_(ptf.filmRegionName_),
|
filmRegionName_(ptf.filmRegionName_),
|
||||||
GammaMean_(ptf.GammaMean_().clone().ptr()),
|
GammaMean_(ptf.GammaMean_, false),
|
||||||
a_(ptf.a_().clone().ptr()),
|
a_(ptf.a_, false),
|
||||||
omega_(ptf.omega_().clone().ptr())
|
omega_(ptf.omega_, false)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -91,9 +91,9 @@ inclinedFilmNusseltInletVelocityFvPatchVectorField
|
|||||||
:
|
:
|
||||||
fixedValueFvPatchVectorField(fmfrpvf),
|
fixedValueFvPatchVectorField(fmfrpvf),
|
||||||
filmRegionName_(fmfrpvf.filmRegionName_),
|
filmRegionName_(fmfrpvf.filmRegionName_),
|
||||||
GammaMean_(fmfrpvf.GammaMean_().clone().ptr()),
|
GammaMean_(fmfrpvf.GammaMean_, false),
|
||||||
a_(fmfrpvf.a_().clone().ptr()),
|
a_(fmfrpvf.a_, false),
|
||||||
omega_(fmfrpvf.omega_().clone().ptr())
|
omega_(fmfrpvf.omega_, false)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -106,9 +106,9 @@ inclinedFilmNusseltInletVelocityFvPatchVectorField
|
|||||||
:
|
:
|
||||||
fixedValueFvPatchVectorField(fmfrpvf, iF),
|
fixedValueFvPatchVectorField(fmfrpvf, iF),
|
||||||
filmRegionName_(fmfrpvf.filmRegionName_),
|
filmRegionName_(fmfrpvf.filmRegionName_),
|
||||||
GammaMean_(fmfrpvf.GammaMean_().clone().ptr()),
|
GammaMean_(fmfrpvf.GammaMean_, false),
|
||||||
a_(fmfrpvf.a_().clone().ptr()),
|
a_(fmfrpvf.a_, false),
|
||||||
omega_(fmfrpvf.omega_().clone().ptr())
|
omega_(fmfrpvf.omega_, false)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -69,11 +69,7 @@ tmp<fvVectorMatrix> thermocapillaryForce::correct(volVectorField& U)
|
|||||||
tmp<fvVectorMatrix>
|
tmp<fvVectorMatrix>
|
||||||
tfvm(new fvVectorMatrix(U, dimForce/dimArea*dimVolume));
|
tfvm(new fvVectorMatrix(U, dimForce/dimArea*dimVolume));
|
||||||
|
|
||||||
<<<<<<< HEAD
|
tfvm.ref() += alpha*fvc::grad(sigma);
|
||||||
tfvm() += alpha*fvc::grad(sigma);
|
|
||||||
=======
|
|
||||||
tfvm.ref() += fvc::grad(sigma);
|
|
||||||
>>>>>>> foundation
|
|
||||||
|
|
||||||
return tfvm;
|
return tfvm;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,11 +24,11 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "thermoSingleLayer.H"
|
#include "thermoSingleLayer.H"
|
||||||
|
#include "fvcDdt.H"
|
||||||
#include "fvcDiv.H"
|
#include "fvcDiv.H"
|
||||||
#include "fvcLaplacian.H"
|
#include "fvcLaplacian.H"
|
||||||
#include "fvcFlux.H"
|
#include "fvcFlux.H"
|
||||||
#include "fvm.H"
|
#include "fvm.H"
|
||||||
#include "fvcDdt.H"
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "zeroGradientFvPatchFields.H"
|
#include "zeroGradientFvPatchFields.H"
|
||||||
#include "mappedFieldFvPatchField.H"
|
#include "mappedFieldFvPatchField.H"
|
||||||
|
|||||||
@ -3,7 +3,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) 2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -96,7 +96,7 @@ Foam::rigidBodyMeshMotion::rigidBodyMeshMotion
|
|||||||
mesh.time().timeName(),
|
mesh.time().timeName(),
|
||||||
"uniform",
|
"uniform",
|
||||||
mesh
|
mesh
|
||||||
).headerOk()
|
).typeHeaderOk<IOdictionary>(true)
|
||||||
? IOdictionary
|
? IOdictionary
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
|
|||||||
@ -533,7 +533,7 @@ void Foam::meshToMesh::mapAndOpSrcToTgt
|
|||||||
const CombineOp& cop
|
const CombineOp& cop
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
tgtField = pTraits<Type>::zero;
|
tgtField = Type(Zero);
|
||||||
|
|
||||||
AMI.interpolateToTarget
|
AMI.interpolateToTarget
|
||||||
(
|
(
|
||||||
@ -771,7 +771,7 @@ void Foam::meshToMesh::mapAndOpTgtToSrc
|
|||||||
const CombineOp& cop
|
const CombineOp& cop
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
srcField = pTraits<Type>::zero;
|
srcField = Type(Tero);
|
||||||
|
|
||||||
AMI.interpolateToSource
|
AMI.interpolateToSource
|
||||||
(
|
(
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: dev |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|||||||
@ -747,8 +747,8 @@ Foam::isoSurface::interpolate
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
// One value per point
|
// One value per point
|
||||||
tmp<Field<Type> > tvalues(new Field<Type>(nPoints, pTraits<Type>::zero));
|
tmp<Field<Type>> tvalues(new Field<Type>(nPoints, Type(Zero)));
|
||||||
Field<Type>& values = tvalues();
|
Field<Type>& values = tvalues.ref();
|
||||||
|
|
||||||
|
|
||||||
// Pass1: unweighted average of merged point values
|
// Pass1: unweighted average of merged point values
|
||||||
@ -786,7 +786,7 @@ Foam::isoSurface::interpolate
|
|||||||
|
|
||||||
// Note: zeroing should not be necessary if interpolation only done
|
// Note: zeroing should not be necessary if interpolation only done
|
||||||
// for newly introduced points (i.e. not in triPointMergeMap)
|
// for newly introduced points (i.e. not in triPointMergeMap)
|
||||||
values[pointI] = pTraits<Type>::zero;
|
values[pointI] = Type(Zero);
|
||||||
forAll(oldPoints, j)
|
forAll(oldPoints, j)
|
||||||
{
|
{
|
||||||
values[pointI] = w[j]*unmergedValues[oldPoints[j]];
|
values[pointI] = w[j]*unmergedValues[oldPoints[j]];
|
||||||
|
|||||||
@ -123,7 +123,7 @@ Foam::fileName Foam::boundaryDataSurfaceWriter::writeTemplate
|
|||||||
IOobject::NO_WRITE,
|
IOobject::NO_WRITE,
|
||||||
false
|
false
|
||||||
),
|
),
|
||||||
pTraits<Type>::zero,
|
Type(Zero),
|
||||||
values
|
values
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -47,7 +47,7 @@ namespace Foam
|
|||||||
|
|
||||||
|
|
||||||
#define defineSurfaceWriterWriteField(ThisClass, FieldType) \
|
#define defineSurfaceWriterWriteField(ThisClass, FieldType) \
|
||||||
void ThisClass::write \
|
Foam::fileName ThisClass::write \
|
||||||
( \
|
( \
|
||||||
const fileName& outputDir, \
|
const fileName& outputDir, \
|
||||||
const fileName& surfaceName, \
|
const fileName& surfaceName, \
|
||||||
@ -59,7 +59,7 @@ namespace Foam
|
|||||||
const bool verbose \
|
const bool verbose \
|
||||||
) const \
|
) const \
|
||||||
{ \
|
{ \
|
||||||
writeTemplate \
|
return writeTemplate \
|
||||||
( \
|
( \
|
||||||
outputDir, \
|
outputDir, \
|
||||||
surfaceName, \
|
surfaceName, \
|
||||||
|
|||||||
@ -151,7 +151,7 @@ greyDiffusiveViewFactorFixedValueFvPatchScalarField::Qro() const
|
|||||||
const radiationModel& radiation =
|
const radiationModel& radiation =
|
||||||
db().lookupObject<radiationModel>("radiationProperties");
|
db().lookupObject<radiationModel>("radiationProperties");
|
||||||
|
|
||||||
tQrt() += patch().lookupPatchField<volScalarField,scalar>
|
tQrt.ref() += patch().lookupPatchField<volScalarField,scalar>
|
||||||
(
|
(
|
||||||
radiation.externalRadHeatFieldName_
|
radiation.externalRadHeatFieldName_
|
||||||
);
|
);
|
||||||
|
|||||||
@ -379,7 +379,7 @@ void Foam::faceShading::calculate()
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
volScalarField& hitFaces = thitFaces();
|
volScalarField& hitFaces = thitFaces.ref();
|
||||||
|
|
||||||
hitFaces.boundaryField() = 0.0;
|
hitFaces.boundaryField() = 0.0;
|
||||||
forAll(rayStartFaces_, i)
|
forAll(rayStartFaces_, i)
|
||||||
|
|||||||
@ -489,7 +489,7 @@ void Foam::radiation::solarLoad::calculateQdiff
|
|||||||
localCoarseRave,
|
localCoarseRave,
|
||||||
Rave.size(),
|
Rave.size(),
|
||||||
startI
|
startI
|
||||||
).assign(Rave);
|
) = Rave;
|
||||||
|
|
||||||
|
|
||||||
const vectorList coarseNSf = cpp.faceNormals();
|
const vectorList coarseNSf = cpp.faceNormals();
|
||||||
@ -498,25 +498,19 @@ void Foam::radiation::solarLoad::calculateQdiff
|
|||||||
localCoarseNorm,
|
localCoarseNorm,
|
||||||
cpp.size(),
|
cpp.size(),
|
||||||
startI
|
startI
|
||||||
).assign(coarseNSf);
|
) = coarseNSf;
|
||||||
startI += cpp.size();
|
startI += cpp.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SubList<scalar>(compactCoarsePartialArea, nLocalVFCoarseFaces).assign
|
SubList<scalar>(compactCoarsePartialArea, nLocalVFCoarseFaces) =
|
||||||
(
|
localCoarsePartialArea;
|
||||||
localCoarsePartialArea
|
|
||||||
);
|
|
||||||
|
|
||||||
SubList<scalar>(compactCoarseRave, nLocalVFCoarseFaces).assign
|
SubList<scalar>(compactCoarseRave, nLocalVFCoarseFaces) =
|
||||||
(
|
localCoarseRave;
|
||||||
localCoarseRave
|
|
||||||
);
|
|
||||||
|
|
||||||
SubList<vector>(compactCoarseNorm, nLocalVFCoarseFaces).assign
|
SubList<vector>(compactCoarseNorm, nLocalVFCoarseFaces) =
|
||||||
(
|
localCoarseNorm;
|
||||||
localCoarseNorm
|
|
||||||
);
|
|
||||||
|
|
||||||
map_->distribute(compactCoarsePartialArea);
|
map_->distribute(compactCoarsePartialArea);
|
||||||
map_->distribute(compactCoarseRave);
|
map_->distribute(compactCoarseRave);
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: dev |
|
| \\ / O peration | Version: plus |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
FoamFile
|
FoamFile
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: dev |
|
| \\ / O peration | Version: plus |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
FoamFile
|
FoamFile
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user