Merge branch 'master' of github.com:OpenFOAM/OpenFOAM-2.3.x
This commit is contained in:
commit
6482bfa1db
5 changed files with 144 additions and 37 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
# ========= |
|
# ========= |
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
# \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
|
|
@ -108,12 +108,6 @@ cleanCase()
|
||||||
then
|
then
|
||||||
rm -f constant/polyMesh/blockMeshDict > /dev/null 2>&1
|
rm -f constant/polyMesh/blockMeshDict > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for f in `find . -name "*Dict"`
|
|
||||||
do
|
|
||||||
sed -e /arguments/d $f > temp.$$
|
|
||||||
mv temp.$$ $f
|
|
||||||
done
|
|
||||||
}
|
}
|
||||||
|
|
||||||
removeCase()
|
removeCase()
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|
@ -63,36 +63,38 @@ correction
|
||||||
w[owner[facei]]*C[owner[facei]]
|
w[owner[facei]]*C[owner[facei]]
|
||||||
+ (1.0 - w[owner[facei]])*C[neighbour[facei]];
|
+ (1.0 - w[owner[facei]])*C[neighbour[facei]];
|
||||||
|
|
||||||
|
const face& f = faces[facei];
|
||||||
|
|
||||||
scalar at = triangle<point, const point&>
|
scalar at = triangle<point, const point&>
|
||||||
(
|
(
|
||||||
pi,
|
pi,
|
||||||
points[faces[facei][0]],
|
points[f[0]],
|
||||||
points[faces[facei][faces[facei].size()-1]]
|
points[f[f.size()-1]]
|
||||||
).mag();
|
).mag();
|
||||||
|
|
||||||
scalar sumAt = at;
|
scalar sumAt = at;
|
||||||
Type sumPsip = at*(1.0/3.0)*
|
Type sumPsip = at*(1.0/3.0)*
|
||||||
(
|
(
|
||||||
sfCorr[facei]
|
sfCorr[facei]
|
||||||
+ pvf[faces[facei][0]]
|
+ pvf[f[0]]
|
||||||
+ pvf[faces[facei][faces[facei].size()-1]]
|
+ pvf[f[f.size()-1]]
|
||||||
);
|
);
|
||||||
|
|
||||||
for (label pointi=1; pointi<faces[facei].size(); pointi++)
|
for (label pointi=1; pointi<f.size(); pointi++)
|
||||||
{
|
{
|
||||||
at = triangle<point, const point&>
|
at = triangle<point, const point&>
|
||||||
(
|
(
|
||||||
pi,
|
pi,
|
||||||
points[faces[facei][pointi]],
|
points[f[pointi]],
|
||||||
points[faces[facei][pointi-1]]
|
points[f[pointi-1]]
|
||||||
).mag();
|
).mag();
|
||||||
|
|
||||||
sumAt += at;
|
sumAt += at;
|
||||||
sumPsip += at*(1.0/3.0)*
|
sumPsip += at*(1.0/3.0)*
|
||||||
(
|
(
|
||||||
sfCorr[facei]
|
sfCorr[facei]
|
||||||
+ pvf[faces[facei][pointi]]
|
+ pvf[f[pointi]]
|
||||||
+ pvf[faces[facei][pointi-1]]
|
+ pvf[f[pointi-1]]
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -100,7 +102,73 @@ correction
|
||||||
sfCorr[facei] = sumPsip/sumAt - sfCorr[facei];
|
sfCorr[facei] = sumPsip/sumAt - sfCorr[facei];
|
||||||
}
|
}
|
||||||
|
|
||||||
tsfCorr().boundaryField() = pTraits<Type>::zero;
|
|
||||||
|
typename GeometricField<Type, fvsPatchField, surfaceMesh>::
|
||||||
|
GeometricBoundaryField& bSfCorr = tsfCorr().boundaryField();
|
||||||
|
|
||||||
|
forAll(bSfCorr, patchi)
|
||||||
|
{
|
||||||
|
fvsPatchField<Type>& pSfCorr = bSfCorr[patchi];
|
||||||
|
|
||||||
|
if (pSfCorr.coupled())
|
||||||
|
{
|
||||||
|
const fvPatch& fvp = mesh.boundary()[patchi];
|
||||||
|
const scalarField& pWghts = mesh.weights().boundaryField()[patchi];
|
||||||
|
const labelUList& pOwner = fvp.faceCells();
|
||||||
|
const vectorField& pNbrC = mesh.C().boundaryField()[patchi];
|
||||||
|
|
||||||
|
forAll(pOwner, facei)
|
||||||
|
{
|
||||||
|
label own = pOwner[facei];
|
||||||
|
|
||||||
|
point pi =
|
||||||
|
pWghts[facei]*C[own]
|
||||||
|
+ (1.0 - pWghts[facei])*pNbrC[facei];
|
||||||
|
|
||||||
|
const face& f = faces[facei+fvp.start()];
|
||||||
|
|
||||||
|
scalar at = triangle<point, const point&>
|
||||||
|
(
|
||||||
|
pi,
|
||||||
|
points[f[0]],
|
||||||
|
points[f[f.size()-1]]
|
||||||
|
).mag();
|
||||||
|
|
||||||
|
scalar sumAt = at;
|
||||||
|
Type sumPsip = at*(1.0/3.0)*
|
||||||
|
(
|
||||||
|
pSfCorr[facei]
|
||||||
|
+ pvf[f[0]]
|
||||||
|
+ pvf[f[f.size()-1]]
|
||||||
|
);
|
||||||
|
|
||||||
|
for (label pointi=1; pointi<f.size(); pointi++)
|
||||||
|
{
|
||||||
|
at = triangle<point, const point&>
|
||||||
|
(
|
||||||
|
pi,
|
||||||
|
points[f[pointi]],
|
||||||
|
points[f[pointi-1]]
|
||||||
|
).mag();
|
||||||
|
|
||||||
|
sumAt += at;
|
||||||
|
sumPsip += at*(1.0/3.0)*
|
||||||
|
(
|
||||||
|
pSfCorr[facei]
|
||||||
|
+ pvf[f[pointi]]
|
||||||
|
+ pvf[f[pointi-1]]
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
pSfCorr[facei] = sumPsip/sumAt - pSfCorr[facei];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pSfCorr = pTraits<Type>::zero;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return tsfCorr;
|
return tsfCorr;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -700,11 +700,12 @@ Foam::label Foam::edgeIntersections::removeDegenerates
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::edgeIntersections::replace
|
void Foam::edgeIntersections::merge
|
||||||
(
|
(
|
||||||
const edgeIntersections& subInfo,
|
const edgeIntersections& subInfo,
|
||||||
const labelList& edgeMap,
|
const labelList& edgeMap,
|
||||||
const labelList& faceMap
|
const labelList& faceMap,
|
||||||
|
const bool merge
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
forAll(subInfo, subI)
|
forAll(subInfo, subI)
|
||||||
|
|
@ -716,19 +717,63 @@ void Foam::edgeIntersections::replace
|
||||||
List<pointIndexHit>& intersections = operator[](edgeI);
|
List<pointIndexHit>& intersections = operator[](edgeI);
|
||||||
labelList& intersectionTypes = classification_[edgeI];
|
labelList& intersectionTypes = classification_[edgeI];
|
||||||
|
|
||||||
intersections.setSize(subHits.size());
|
// Count unique hits. Assume edge can hit face only once
|
||||||
intersectionTypes.setSize(subHits.size());
|
label sz = 0;
|
||||||
|
if (merge)
|
||||||
|
{
|
||||||
|
sz = intersections.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
label nNew = 0;
|
||||||
|
forAll(subHits, i)
|
||||||
|
{
|
||||||
|
const pointIndexHit& subHit = subHits[i];
|
||||||
|
|
||||||
|
bool foundFace = false;
|
||||||
|
for (label interI = 0; interI < sz; interI++)
|
||||||
|
{
|
||||||
|
if (intersections[interI].index() == faceMap[subHit.index()])
|
||||||
|
{
|
||||||
|
foundFace = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!foundFace)
|
||||||
|
{
|
||||||
|
nNew++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
intersections.setSize(sz+nNew);
|
||||||
|
intersectionTypes.setSize(sz+nNew);
|
||||||
|
nNew = sz;
|
||||||
|
|
||||||
forAll(subHits, i)
|
forAll(subHits, i)
|
||||||
{
|
{
|
||||||
const pointIndexHit& subHit = subHits[i];
|
const pointIndexHit& subHit = subHits[i];
|
||||||
intersections[i] = pointIndexHit
|
|
||||||
(
|
bool foundFace = false;
|
||||||
subHit.hit(),
|
for (label interI = 0; interI < sz; interI++)
|
||||||
subHit.rawPoint(),
|
{
|
||||||
faceMap[subHit.index()]
|
if (intersections[interI].index() == faceMap[subHit.index()])
|
||||||
);
|
{
|
||||||
intersectionTypes[i] = subClass[i];
|
foundFace = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!foundFace)
|
||||||
|
{
|
||||||
|
intersections[nNew] = pointIndexHit
|
||||||
|
(
|
||||||
|
subHit.hit(),
|
||||||
|
subHit.rawPoint(),
|
||||||
|
faceMap[subHit.index()]
|
||||||
|
);
|
||||||
|
intersectionTypes[nNew] = subClass[i];
|
||||||
|
nNew++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -198,13 +198,15 @@ public:
|
||||||
pointField& points1
|
pointField& points1
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Replace edge intersection for a subset (given as edge map and
|
//- Merge (or override) edge intersection for a subset
|
||||||
// face map - for face indices stored in pointIndexHit.index())
|
// (given as edge map and face map - for face indices stored in
|
||||||
void replace
|
// pointIndexHit.index())
|
||||||
|
void merge
|
||||||
(
|
(
|
||||||
const edgeIntersections&,
|
const edgeIntersections&,
|
||||||
const labelList& edgeMap,
|
const labelList& edgeMap,
|
||||||
const labelList& faceMap
|
const labelList& faceMap,
|
||||||
|
const bool merge = true
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -345,10 +345,8 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::write
|
||||||
{
|
{
|
||||||
h_.writeEntry("h", os);
|
h_.writeEntry("h", os);
|
||||||
Ta_.writeEntry("Ta", os);
|
Ta_.writeEntry("Ta", os);
|
||||||
os.writeKeyword("thicknessLayers")<< thicknessLayers_
|
thicknessLayers_.writeEntry("thicknessLayers", os);
|
||||||
<< token::END_STATEMENT << nl;
|
kappaLayers_.writeEntry("kappaLayers", os);
|
||||||
os.writeKeyword("kappaLayers")<< kappaLayers_
|
|
||||||
<< token::END_STATEMENT << nl;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue