Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev

This commit is contained in:
mattijs
2012-05-29 10:40:45 +01:00
7 changed files with 65 additions and 84 deletions

View File

@ -661,10 +661,10 @@ void Foam::PairCollision<CloudType>::collide()
{ {
preInteraction(); preInteraction();
parcelInteraction();
wallInteraction(); wallInteraction();
parcelInteraction();
postInteraction(); postInteraction();
} }

View File

@ -411,10 +411,10 @@ void Foam::ThermoSurfaceFilm<CloudType>::splashInteraction
const scalar EKIn = 0.5*m*magSqr(Urel); const scalar EKIn = 0.5*m*magSqr(Urel);
// incident surface energy [J] // incident surface energy [J]
const scalar ESigmaIn = sigma*p.areaS(d); const scalar ESigmaIn = np*sigma*p.areaS(d);
// dissipative energy // dissipative energy
const scalar Ed = max(0.8*EKIn, Wec/12*pi*sigma*sqr(d)); const scalar Ed = max(0.8*EKIn, np*Wec/12*pi*sigma*sqr(d));
// total energy [J] // total energy [J]
const scalar EKs = EKIn + ESigmaIn - ESigmaSec - Ed; const scalar EKs = EKIn + ESigmaIn - ESigmaSec - Ed;

View File

@ -142,8 +142,8 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::writeIntersectionOBJ
template<class SourcePatch, class TargetPatch> template<class SourcePatch, class TargetPatch>
void Foam::AMIInterpolation<SourcePatch, TargetPatch>::checkPatches void Foam::AMIInterpolation<SourcePatch, TargetPatch>::checkPatches
( (
const primitivePatch& srcPatch, const SourcePatch& srcPatch,
const primitivePatch& tgtPatch const TargetPatch& tgtPatch
) const ) const
{ {
const scalar maxBoundsError = 0.05; const scalar maxBoundsError = 0.05;
@ -166,8 +166,8 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::checkPatches
( (
"AMIInterpolation<SourcePatch, TargetPatch>::checkPatches" "AMIInterpolation<SourcePatch, TargetPatch>::checkPatches"
"(" "("
"const primitivePatch&, " "const SourcePatch&, "
"const primitivePatch&" "const TargetPatch&"
")" ")"
) << "Source and target patch bounding boxes are not similar" << nl ) << "Source and target patch bounding boxes are not similar" << nl
<< " source box span : " << bbSrc.span() << nl << " source box span : " << bbSrc.span() << nl
@ -182,7 +182,7 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::checkPatches
template<class SourcePatch, class TargetPatch> template<class SourcePatch, class TargetPatch>
void Foam::AMIInterpolation<SourcePatch, TargetPatch>::resetTree void Foam::AMIInterpolation<SourcePatch, TargetPatch>::resetTree
( (
const primitivePatch& tgtPatch const TargetPatch& tgtPatch
) )
{ {
// Clear the old octree // Clear the old octree
@ -212,8 +212,8 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::resetTree
template<class SourcePatch, class TargetPatch> template<class SourcePatch, class TargetPatch>
Foam::label Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcDistribution Foam::label Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcDistribution
( (
const primitivePatch& srcPatch, const SourcePatch& srcPatch,
const primitivePatch& tgtPatch const TargetPatch& tgtPatch
) const ) const
{ {
label procI = 0; label procI = 0;
@ -297,7 +297,7 @@ template<class SourcePatch, class TargetPatch>
void Foam::AMIInterpolation<SourcePatch, TargetPatch>::distributePatches void Foam::AMIInterpolation<SourcePatch, TargetPatch>::distributePatches
( (
const mapDistribute& map, const mapDistribute& map,
const primitivePatch& pp, const TargetPatch& pp,
const globalIndex& gi, const globalIndex& gi,
List<faceList>& faces, List<faceList>& faces,
List<pointField>& points, List<pointField>& points,
@ -394,7 +394,7 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::
distributeAndMergePatches distributeAndMergePatches
( (
const mapDistribute& map, const mapDistribute& map,
const primitivePatch& tgtPatch, const TargetPatch& tgtPatch,
const globalIndex& gi, const globalIndex& gi,
faceList& tgtFaces, faceList& tgtFaces,
pointField& tgtPoints, pointField& tgtPoints,
@ -509,8 +509,8 @@ template<class SourcePatch, class TargetPatch>
Foam::autoPtr<Foam::mapDistribute> Foam::autoPtr<Foam::mapDistribute>
Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcProcMap Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcProcMap
( (
const primitivePatch& srcPatch, const SourcePatch& srcPatch,
const primitivePatch& tgtPatch const TargetPatch& tgtPatch
) const ) const
{ {
// Get decomposition of patch // Get decomposition of patch
@ -711,7 +711,7 @@ template<class SourcePatch, class TargetPatch>
Foam::label Foam::AMIInterpolation<SourcePatch, TargetPatch>::findTargetFace Foam::label Foam::AMIInterpolation<SourcePatch, TargetPatch>::findTargetFace
( (
const label srcFaceI, const label srcFaceI,
const primitivePatch& srcPatch const SourcePatch& srcPatch
) const ) const
{ {
label targetFaceI = -1; label targetFaceI = -1;
@ -745,7 +745,7 @@ template<class SourcePatch, class TargetPatch>
void Foam::AMIInterpolation<SourcePatch, TargetPatch>::appendNbrFaces void Foam::AMIInterpolation<SourcePatch, TargetPatch>::appendNbrFaces
( (
const label faceI, const label faceI,
const primitivePatch& patch, const TargetPatch& patch,
const DynamicList<label>& visitedFaces, const DynamicList<label>& visitedFaces,
DynamicList<label>& faceIDs DynamicList<label>& faceIDs
) const ) const
@ -793,8 +793,8 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::setNextFaces
label& startSeedI, label& startSeedI,
label& srcFaceI, label& srcFaceI,
label& tgtFaceI, label& tgtFaceI,
const primitivePatch& srcPatch0, const SourcePatch& srcPatch0,
const primitivePatch& tgtPatch0, const TargetPatch& tgtPatch0,
const boolList& mapFlag, const boolList& mapFlag,
labelList& seedFaces, labelList& seedFaces,
const DynamicList<label>& visitedFaces const DynamicList<label>& visitedFaces
@ -897,8 +897,8 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::setNextFaces
"label&, " "label&, "
"label&, " "label&, "
"label&, " "label&, "
"const primitivePatch&, " "const SourcePatch&, "
"const primitivePatch&, " "const TargetPatch&, "
"const boolList&, " "const boolList&, "
"labelList&, " "labelList&, "
"const DynamicList<label>&" "const DynamicList<label>&"
@ -913,8 +913,8 @@ Foam::scalar Foam::AMIInterpolation<SourcePatch, TargetPatch>::interArea
( (
const label srcFaceI, const label srcFaceI,
const label tgtFaceI, const label tgtFaceI,
const primitivePatch& srcPatch, const SourcePatch& srcPatch,
const primitivePatch& tgtPatch const TargetPatch& tgtPatch
) const ) const
{ {
const pointField& srcPoints = srcPatch.points(); const pointField& srcPoints = srcPatch.points();
@ -964,21 +964,18 @@ Foam::scalar Foam::AMIInterpolation<SourcePatch, TargetPatch>::interArea
template<class SourcePatch, class TargetPatch> template<class SourcePatch, class TargetPatch>
void Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcAddressing void Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcAddressing
( (
const primitivePatch& srcPatch, const SourcePatch& srcPatch,
const primitivePatch& tgtPatch, const TargetPatch& tgtPatch,
label srcFaceI, label srcFaceI,
label tgtFaceI label tgtFaceI
) )
{ {
if (!srcPatch.size() || !tgtPatch.size()) if (debug && (!srcPatch.size() || !tgtPatch.size()))
{
if (debug)
{ {
Pout<< "AMI: Patches not on processor: Source faces = " Pout<< "AMI: Patches not on processor: Source faces = "
<< srcPatch.size() << ", target faces = " << tgtPatch.size() << srcPatch.size() << ", target faces = " << tgtPatch.size()
<< endl; << endl;
} }
}
if (!srcPatch.size()) if (!srcPatch.size())
{ {
@ -991,8 +988,8 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcAddressing
"void Foam::AMIInterpolation<SourcePatch, TargetPatch>::" "void Foam::AMIInterpolation<SourcePatch, TargetPatch>::"
"calcAddressing" "calcAddressing"
"(" "("
"const primitivePatch&, " "const SourcePatch&, "
"const primitivePatch&, " "const TargetPatch&, "
"label, " "label, "
"label" "label"
")" ")"
@ -1036,8 +1033,8 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcAddressing
"void Foam::AMIInterpolation<SourcePatch, TargetPatch>::" "void Foam::AMIInterpolation<SourcePatch, TargetPatch>::"
"calcAddressing" "calcAddressing"
"(" "("
"const primitivePatch&, " "const SourcePatch&, "
"const primitivePatch&, " "const TargetPatch&, "
"label, " "label, "
"label" "label"
")" ")"
@ -1543,7 +1540,7 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::AMIInterpolation
{ {
// create new patches for source and target // create new patches for source and target
pointField srcPoints = srcPatch.points(); pointField srcPoints = srcPatch.points();
primitivePatch srcPatch0 SourcePatch srcPatch0
( (
SubList<face> SubList<face>
( (
@ -1564,7 +1561,7 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::AMIInterpolation
} }
pointField tgtPoints = tgtPatch.points(); pointField tgtPoints = tgtPatch.points();
primitivePatch tgtPatch0 TargetPatch tgtPatch0
( (
SubList<face> SubList<face>
( (
@ -1735,8 +1732,8 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::~AMIInterpolation()
template<class SourcePatch, class TargetPatch> template<class SourcePatch, class TargetPatch>
void Foam::AMIInterpolation<SourcePatch, TargetPatch>::update void Foam::AMIInterpolation<SourcePatch, TargetPatch>::update
( (
const primitivePatch& srcPatch, const SourcePatch& srcPatch,
const primitivePatch& tgtPatch const TargetPatch& tgtPatch
) )
{ {
// Calculate face areas // Calculate face areas
@ -1785,7 +1782,7 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::update
tgtFaceIDs tgtFaceIDs
); );
primitivePatch TargetPatch
newTgtPatch newTgtPatch
( (
SubList<face> SubList<face>
@ -2145,8 +2142,8 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToTarget
template<class SourcePatch, class TargetPatch> template<class SourcePatch, class TargetPatch>
void Foam::AMIInterpolation<SourcePatch, TargetPatch>::writeFaceConnectivity void Foam::AMIInterpolation<SourcePatch, TargetPatch>::writeFaceConnectivity
( (
const primitivePatch& srcPatch, const SourcePatch& srcPatch,
const primitivePatch& tgtPatch, const TargetPatch& tgtPatch,
const labelListList& srcAddress const labelListList& srcAddress
) )
const const

View File

@ -160,12 +160,12 @@ class AMIInterpolation
//- Check that patches are valid //- Check that patches are valid
void checkPatches void checkPatches
( (
const primitivePatch& srcPatch, const SourcePatch& srcPatch,
const primitivePatch& tgtPatch const TargetPatch& tgtPatch
) const; ) const;
//- Reset the octree for the traget patch face search //- Reset the octree for the traget patch face search
void resetTree(const primitivePatch& tgtPatch); void resetTree(const TargetPatch& tgtPatch);
@ -174,8 +174,8 @@ class AMIInterpolation
//- Calculate if patches are on multiple processors //- Calculate if patches are on multiple processors
label calcDistribution label calcDistribution
( (
const primitivePatch& srcPatch, const SourcePatch& srcPatch,
const primitivePatch& tgtPatch const TargetPatch& tgtPatch
) const; ) const;
label calcOverlappingProcs label calcOverlappingProcs
@ -188,7 +188,7 @@ class AMIInterpolation
void distributePatches void distributePatches
( (
const mapDistribute& map, const mapDistribute& map,
const primitivePatch& pp, const TargetPatch& pp,
const globalIndex& gi, const globalIndex& gi,
List<faceList>& faces, List<faceList>& faces,
List<pointField>& points, List<pointField>& points,
@ -198,7 +198,7 @@ class AMIInterpolation
void distributeAndMergePatches void distributeAndMergePatches
( (
const mapDistribute& map, const mapDistribute& map,
const primitivePatch& tgtPatch, const TargetPatch& tgtPatch,
const globalIndex& gi, const globalIndex& gi,
faceList& tgtFaces, faceList& tgtFaces,
pointField& tgtPoints, pointField& tgtPoints,
@ -207,8 +207,8 @@ class AMIInterpolation
autoPtr<mapDistribute> calcProcMap autoPtr<mapDistribute> calcProcMap
( (
const primitivePatch& srcPatch, const SourcePatch& srcPatch,
const primitivePatch& tgtPatch const TargetPatch& tgtPatch
) const; ) const;
@ -228,14 +228,14 @@ class AMIInterpolation
label findTargetFace label findTargetFace
( (
const label srcFaceI, const label srcFaceI,
const primitivePatch& srcPatch const SourcePatch& srcPatch
) const; ) const;
//- Add faces neighbouring faceI to the ID list //- Add faces neighbouring faceI to the ID list
void appendNbrFaces void appendNbrFaces
( (
const label faceI, const label faceI,
const primitivePatch& patch, const TargetPatch& patch,
const DynamicList<label>& visitedFaces, const DynamicList<label>& visitedFaces,
DynamicList<label>& faceIDs DynamicList<label>& faceIDs
) const; ) const;
@ -246,8 +246,8 @@ class AMIInterpolation
label& startSeedI, label& startSeedI,
label& srcFaceI, label& srcFaceI,
label& tgtFaceI, label& tgtFaceI,
const primitivePatch& srcPatch0, const SourcePatch& srcPatch0,
const primitivePatch& tgtPatch0, const TargetPatch& tgtPatch0,
const boolList& mapFlag, const boolList& mapFlag,
labelList& seedFaces, labelList& seedFaces,
const DynamicList<label>& visitedFaces const DynamicList<label>& visitedFaces
@ -261,15 +261,15 @@ class AMIInterpolation
( (
const label srcFaceI, const label srcFaceI,
const label tgtFaceI, const label tgtFaceI,
const primitivePatch& srcPatch, const SourcePatch& srcPatch,
const primitivePatch& tgtPatch const TargetPatch& tgtPatch
) const; ) const;
//- Calculate addressing //- Calculate addressing
void calcAddressing void calcAddressing
( (
const primitivePatch& srcPatch, const SourcePatch& srcPatch,
const primitivePatch& tgtPatch, const TargetPatch& tgtPatch,
label srcFaceI = -1, label srcFaceI = -1,
label tgtFaceI = -1 label tgtFaceI = -1
); );
@ -398,8 +398,8 @@ public:
//- Update addressing and weights //- Update addressing and weights
void update void update
( (
const primitivePatch& srcPatch, const SourcePatch& srcPatch,
const primitivePatch& tgtPatch const TargetPatch& tgtPatch
); );
@ -495,8 +495,8 @@ public:
//- Write face connectivity as OBJ file //- Write face connectivity as OBJ file
void writeFaceConnectivity void writeFaceConnectivity
( (
const primitivePatch& srcPatch, const SourcePatch& srcPatch,
const primitivePatch& tgtPatch, const TargetPatch& tgtPatch,
const labelListList& srcAddress const labelListList& srcAddress
) const; ) const;
}; };

View File

@ -78,25 +78,13 @@ void Foam::porousMedia::fixedTemperature::addEnthalpySource
} }
const fvMesh& mesh = pZone_.mesh(); const fvMesh& mesh = pZone_.mesh();
const scalarField& V = mesh.V(); const scalarField T(hEqn.diag().size(), T_);
scalarField& hDiag = hEqn.diag();
scalarField& hSource = hEqn.source();
const scalarField T(hDiag.size(), T_);
const scalar rate = 1e6;
forAll(zones, zoneI) forAll(zones, zoneI)
{ {
const labelList& cells = mesh.cellZones()[zones[zoneI]]; const labelList& cells = mesh.cellZones()[zones[zoneI]];
tmp<scalarField> h = thermo.h(T, cells); tmp<scalarField> h = thermo.h(T, cells);
hEqn.setValues(cells, h());
forAll(cells, i)
{
hDiag[cells[i]] += rate*V[cells[i]]*rho[cells[i]];
hSource[cells[i]] +=
rate*V[cells[i]]*rho[cells[i]]*h()[cells[i]];
}
} }
} }

View File

@ -87,7 +87,7 @@ externalWallHeatFluxTemperatureFvPatchScalarField
: :
mixedFvPatchScalarField(ptf, p, iF, mapper), mixedFvPatchScalarField(ptf, p, iF, mapper),
temperatureCoupledBase(patch(), ptf.KMethod(), ptf.kappaName()), temperatureCoupledBase(patch(), ptf.KMethod(), ptf.kappaName()),
oldMode_(unknown), oldMode_(ptf.oldMode_),
q_(ptf.q_, mapper), q_(ptf.q_, mapper),
h_(ptf.h_, mapper), h_(ptf.h_, mapper),
Ta_(ptf.Ta_, mapper) Ta_(ptf.Ta_, mapper)
@ -166,7 +166,7 @@ externalWallHeatFluxTemperatureFvPatchScalarField
: :
mixedFvPatchScalarField(tppsf), mixedFvPatchScalarField(tppsf),
temperatureCoupledBase(tppsf), temperatureCoupledBase(tppsf),
oldMode_(unknown), oldMode_(tppsf.oldMode_),
q_(tppsf.q_), q_(tppsf.q_),
h_(tppsf.h_), h_(tppsf.h_),
Ta_(tppsf.Ta_) Ta_(tppsf.Ta_)

View File

@ -21,8 +21,6 @@ dictionaryReplacement
AMI1 AMI1
{ {
type cyclicAMI; type cyclicAMI;
nFaces 0;
startFace 1756182;
neighbourPatch AMI2; neighbourPatch AMI2;
transform noOrdering; transform noOrdering;
surface surface
@ -32,8 +30,6 @@ dictionaryReplacement
AMI2 AMI2
{ {
type cyclicAMI; type cyclicAMI;
nFaces 0;
startFace 1756182;
neighbourPatch AMI1; neighbourPatch AMI1;
transform noOrdering; transform noOrdering;
surface surface