mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -92,6 +92,13 @@
|
||||
)
|
||||
);
|
||||
|
||||
// Ensure that the flux at inflow BCs is preserved
|
||||
alphaPhic1.boundaryField() = min
|
||||
(
|
||||
phi1.boundaryField()*alpha1.boundaryField(),
|
||||
alphaPhic1.boundaryField()
|
||||
);
|
||||
|
||||
MULES::explicitSolve
|
||||
(
|
||||
geometricOneField(),
|
||||
|
||||
@ -8,6 +8,10 @@
|
||||
surfaceScalarField rAlphaAU1f(fvc::interpolate(alpha1*rAU1));
|
||||
surfaceScalarField rAlphaAU2f(fvc::interpolate(alpha2*rAU2));
|
||||
|
||||
// Update the phi BCs from U before p BCs are updated
|
||||
phi1.boundaryField() == (mesh.Sf().boundaryField() & U1.boundaryField());
|
||||
phi2.boundaryField() == (mesh.Sf().boundaryField() & U2.boundaryField());
|
||||
|
||||
volVectorField HbyA1
|
||||
(
|
||||
IOobject::groupName("HbyA", phase1.name()),
|
||||
|
||||
@ -420,11 +420,24 @@ autoPtr<refinementSurfaces> createRefinementSurfaces
|
||||
|
||||
const refinementSurfaces& rf = surfacePtr();
|
||||
|
||||
Info<< setw(20) << "Region"
|
||||
// Determine maximum region name length
|
||||
label maxLen = 0;
|
||||
forAll(rf.surfaces(), surfI)
|
||||
{
|
||||
label geomI = rf.surfaces()[surfI];
|
||||
const wordList& regionNames = allGeometry.regionNames()[geomI];
|
||||
forAll(regionNames, regionI)
|
||||
{
|
||||
maxLen = Foam::max(maxLen, label(regionNames[regionI].size()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Info<< setw(maxLen) << "Region"
|
||||
<< setw(10) << "Min Level"
|
||||
<< setw(10) << "Max Level"
|
||||
<< setw(10) << "Gap Level" << nl
|
||||
<< setw(20) << "------"
|
||||
<< setw(maxLen) << "------"
|
||||
<< setw(10) << "---------"
|
||||
<< setw(10) << "---------"
|
||||
<< setw(10) << "---------" << endl;
|
||||
@ -441,7 +454,7 @@ autoPtr<refinementSurfaces> createRefinementSurfaces
|
||||
{
|
||||
label globalI = rf.globalRegion(surfI, regionI);
|
||||
|
||||
Info<< setw(20) << regionNames[regionI]
|
||||
Info<< setw(maxLen) << regionNames[regionI]
|
||||
<< setw(10) << rf.minLevel()[globalI]
|
||||
<< setw(10) << rf.maxLevel()[globalI]
|
||||
<< setw(10) << rf.gapLevel()[globalI] << endl;
|
||||
|
||||
@ -206,7 +206,18 @@ Foam::functionEntries::codeStream::getFunction
|
||||
off_t masterSize = mySize;
|
||||
Pstream::scatter(masterSize);
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Pout<< endl<< "on processor " << Pstream::myProcNo()
|
||||
<< " have masterSize:" << masterSize
|
||||
<< " and localSize:" << mySize
|
||||
<< endl;
|
||||
}
|
||||
|
||||
|
||||
if (mySize < masterSize)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Pout<< "Local file " << libPath
|
||||
<< " not of same size (" << mySize
|
||||
@ -214,6 +225,7 @@ Foam::functionEntries::codeStream::getFunction
|
||||
<< masterSize << "). Waiting for "
|
||||
<< regIOobject::fileModificationSkew
|
||||
<< " seconds." << endl;
|
||||
}
|
||||
Foam::sleep(regIOobject::fileModificationSkew);
|
||||
|
||||
// Recheck local size
|
||||
@ -237,6 +249,14 @@ Foam::functionEntries::codeStream::getFunction
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
}
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Pout<< endl<< "on processor " << Pstream::myProcNo()
|
||||
<< " after waiting: have masterSize:" << masterSize
|
||||
<< " and localSize:" << mySize
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
if (isA<IOdictionary>(topDict(parentDict)))
|
||||
@ -244,6 +264,12 @@ Foam::functionEntries::codeStream::getFunction
|
||||
// Cached access to dl libs. Guarantees clean up upon destruction
|
||||
// of Time.
|
||||
dlLibraryTable& dlLibs = libs(parentDict);
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Pout<< "Opening cached dictionary:" << libPath << endl;
|
||||
}
|
||||
|
||||
if (!dlLibs.open(libPath, false))
|
||||
{
|
||||
FatalIOErrorIn
|
||||
@ -261,10 +287,28 @@ Foam::functionEntries::codeStream::getFunction
|
||||
else
|
||||
{
|
||||
// Uncached opening of libPath
|
||||
if (debug)
|
||||
{
|
||||
Pout<< "Opening uncached dictionary:" << libPath << endl;
|
||||
}
|
||||
lib = dlOpen(libPath, true);
|
||||
}
|
||||
}
|
||||
|
||||
bool haveLib = lib;
|
||||
reduce(haveLib, andOp<bool>());
|
||||
|
||||
if (!haveLib)
|
||||
{
|
||||
FatalIOErrorIn
|
||||
(
|
||||
"functionEntries::codeStream::execute(..)",
|
||||
parentDict
|
||||
) << "Failed loading library " << libPath
|
||||
<< " on some processors."
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
|
||||
// Find the function handle in the library
|
||||
streamingFunctionType function =
|
||||
|
||||
@ -267,7 +267,13 @@ Foam::Tuple2<Foam::label, Foam::scalar> Foam::lduAddressing::band() const
|
||||
}
|
||||
|
||||
label bandwidth = max(cellBandwidth);
|
||||
scalar profile = sum(1.0*cellBandwidth);
|
||||
|
||||
// Do not use field algebra because of conversion label to scalar
|
||||
scalar profile = 0.0;
|
||||
forAll(cellBandwidth, cellI)
|
||||
{
|
||||
profile += 1.0*cellBandwidth[cellI];
|
||||
}
|
||||
|
||||
return Tuple2<label, scalar>(bandwidth, profile);
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -90,6 +90,11 @@ Foam::labelPairList Foam::globalPoints::addSendTransform
|
||||
const labelPairList& info
|
||||
) const
|
||||
{
|
||||
scalar tol = refCast<const coupledPolyPatch>
|
||||
(
|
||||
mesh_.boundaryMesh()[patchI]
|
||||
).matchTolerance();
|
||||
|
||||
labelPairList sendInfo(info.size());
|
||||
|
||||
forAll(info, i)
|
||||
@ -111,7 +116,8 @@ Foam::labelPairList Foam::globalPoints::addSendTransform
|
||||
(
|
||||
globalIndexAndTransform::transformIndex(info[i]),
|
||||
patchI,
|
||||
true // patchI is sending side
|
||||
true, // patchI is sending side
|
||||
tol // tolerance for comparison
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -195,7 +195,8 @@ public:
|
||||
(
|
||||
const label transformIndex,
|
||||
const label patchI,
|
||||
const bool isSendingSide = true
|
||||
const bool isSendingSide = true,
|
||||
const scalar tol = SMALL
|
||||
) const;
|
||||
|
||||
//- Combine two transformIndices
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -190,7 +190,8 @@ Foam::label Foam::globalIndexAndTransform::addToTransformIndex
|
||||
(
|
||||
const label transformIndex,
|
||||
const label patchI,
|
||||
const bool isSendingSide
|
||||
const bool isSendingSide,
|
||||
const scalar tol
|
||||
) const
|
||||
{
|
||||
const Pair<label>& transSign = patchTransformSign_[patchI];
|
||||
@ -227,6 +228,33 @@ Foam::label Foam::globalIndexAndTransform::addToTransformIndex
|
||||
<< exit(FatalError);
|
||||
}
|
||||
else if (sign == permutation[matchTransI])
|
||||
{
|
||||
// This is usually illegal. The only exception is for points
|
||||
// on the axis of a 180 degree cyclic wedge when the
|
||||
// transformation is going to be (-1 0 0 0 -1 0 0 0 +1)
|
||||
// (or a different permutation but always two times -1 and
|
||||
// once +1)
|
||||
bool antiCyclic = false;
|
||||
|
||||
const vectorTensorTransform& vt = transforms_[matchTransI];
|
||||
if (mag(vt.t()) < SMALL && vt.hasR())
|
||||
{
|
||||
const tensor& R = vt.R();
|
||||
scalar sumDiag = tr(R);
|
||||
scalar sumMagDiag = mag(R.xx())+mag(R.yy())+mag(R.zz());
|
||||
|
||||
if (mag(sumMagDiag-3) < tol && mag(sumDiag+1) < tol)
|
||||
{
|
||||
antiCyclic = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (antiCyclic)
|
||||
{
|
||||
// 180 degree rotational. Reset transformation.
|
||||
permutation[matchTransI] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
@ -244,6 +272,7 @@ Foam::label Foam::globalIndexAndTransform::addToTransformIndex
|
||||
<< " current transforms:" << permutation
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
permutation[matchTransI] = 0;
|
||||
|
||||
@ -192,6 +192,7 @@ $(derivedFvPatchFields)/variableHeightFlowRate/variableHeightFlowRateFvPatchFiel
|
||||
$(derivedFvPatchFields)/variableHeightFlowRateInletVelocity/variableHeightFlowRateInletVelocityFvPatchVectorField.C
|
||||
$(derivedFvPatchFields)/waveTransmissive/waveTransmissiveFvPatchFields.C
|
||||
$(derivedFvPatchFields)/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.C
|
||||
$(derivedFvPatchFields)/interstitialInletVelocity/interstitialInletVelocityFvPatchVectorField.C
|
||||
|
||||
fvsPatchFields = fields/fvsPatchFields
|
||||
$(fvsPatchFields)/fvsPatchField/fvsPatchFields.C
|
||||
|
||||
@ -0,0 +1,139 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "interstitialInletVelocityFvPatchVectorField.H"
|
||||
#include "volFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "surfaceFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::interstitialInletVelocityFvPatchVectorField::
|
||||
interstitialInletVelocityFvPatchVectorField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<vector, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchField<vector>(p, iF),
|
||||
inletVelocity_(p.size(), vector::zero),
|
||||
alphaName_("alpha")
|
||||
{}
|
||||
|
||||
|
||||
Foam::interstitialInletVelocityFvPatchVectorField::
|
||||
interstitialInletVelocityFvPatchVectorField
|
||||
(
|
||||
const interstitialInletVelocityFvPatchVectorField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<vector, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchField<vector>(ptf, p, iF, mapper),
|
||||
inletVelocity_(ptf.inletVelocity_),
|
||||
alphaName_(ptf.alphaName_)
|
||||
{}
|
||||
|
||||
|
||||
Foam::interstitialInletVelocityFvPatchVectorField::
|
||||
interstitialInletVelocityFvPatchVectorField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<vector, volMesh>& iF,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchField<vector>(p, iF, dict),
|
||||
inletVelocity_("inletVelocity", dict, p.size()),
|
||||
alphaName_(dict.lookupOrDefault<word>("alpha", "alpha"))
|
||||
{}
|
||||
|
||||
|
||||
Foam::interstitialInletVelocityFvPatchVectorField::
|
||||
interstitialInletVelocityFvPatchVectorField
|
||||
(
|
||||
const interstitialInletVelocityFvPatchVectorField& ptf
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchField<vector>(ptf),
|
||||
inletVelocity_(ptf.inletVelocity_),
|
||||
alphaName_(ptf.alphaName_)
|
||||
{}
|
||||
|
||||
|
||||
Foam::interstitialInletVelocityFvPatchVectorField::
|
||||
interstitialInletVelocityFvPatchVectorField
|
||||
(
|
||||
const interstitialInletVelocityFvPatchVectorField& ptf,
|
||||
const DimensionedField<vector, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchField<vector>(ptf, iF),
|
||||
inletVelocity_(ptf.inletVelocity_),
|
||||
alphaName_(ptf.alphaName_)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::interstitialInletVelocityFvPatchVectorField::updateCoeffs()
|
||||
{
|
||||
if (updated())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const fvPatchField<scalar>& alphap =
|
||||
patch().lookupPatchField<volScalarField, scalar>(alphaName_);
|
||||
|
||||
operator==(inletVelocity_/alphap);
|
||||
fixedValueFvPatchField<vector>::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
void Foam::interstitialInletVelocityFvPatchVectorField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchField<vector>::write(os);
|
||||
writeEntryIfDifferent<word>(os, "alpha", "alpha", alphaName_);
|
||||
inletVelocity_.writeEntry("inletVelocity", os);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makePatchTypeField
|
||||
(
|
||||
fvPatchVectorField,
|
||||
interstitialInletVelocityFvPatchVectorField
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,161 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::interstitialInletVelocityFvPatchVectorField
|
||||
|
||||
Description
|
||||
Inlet velocity in which the actual interstitial velocity is calculated
|
||||
by dividing the specified inletVelocity field with the local phase-fraction.
|
||||
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
inlet
|
||||
{
|
||||
type interstitialInletVelocity;
|
||||
inletVelocity uniform (0 0.2 0; // Non-interstitial inlet velocity
|
||||
alpha alpha.particles; // Name of the phase-fraction field
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
interstitialInletVelocityFvPatchVectorField.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef interstitialInletVelocityFvPatchVectorField_H
|
||||
#define interstitialInletVelocityFvPatchVectorField_H
|
||||
|
||||
#include "fixedValueFvPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class interstitialInletVelocityFvPatch Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class interstitialInletVelocityFvPatchVectorField
|
||||
:
|
||||
public fixedValueFvPatchVectorField
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Inlet velocity
|
||||
vectorField inletVelocity_;
|
||||
|
||||
//- Name of the flux transporting the field
|
||||
word alphaName_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("interstitialInletVelocity");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
interstitialInletVelocityFvPatchVectorField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<vector, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct from patch, internal field and dictionary
|
||||
interstitialInletVelocityFvPatchVectorField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<vector, volMesh>&,
|
||||
const dictionary&
|
||||
);
|
||||
|
||||
//- Construct by mapping given
|
||||
// interstitialInletVelocityFvPatchVectorField
|
||||
// onto a new patch
|
||||
interstitialInletVelocityFvPatchVectorField
|
||||
(
|
||||
const interstitialInletVelocityFvPatchVectorField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<vector, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
interstitialInletVelocityFvPatchVectorField
|
||||
(
|
||||
const interstitialInletVelocityFvPatchVectorField&
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<fvPatchVectorField> clone() const
|
||||
{
|
||||
return tmp<fvPatchVectorField>
|
||||
(
|
||||
new interstitialInletVelocityFvPatchVectorField(*this)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
interstitialInletVelocityFvPatchVectorField
|
||||
(
|
||||
const interstitialInletVelocityFvPatchVectorField&,
|
||||
const DimensionedField<vector, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<fvPatchVectorField> clone
|
||||
(
|
||||
const DimensionedField<vector, volMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<fvPatchVectorField>
|
||||
(
|
||||
new interstitialInletVelocityFvPatchVectorField(*this, iF)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Update the coefficients associated with the patch field
|
||||
virtual void updateCoeffs();
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream&) const;
|
||||
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -485,11 +485,12 @@ void Foam::MULES::limiter
|
||||
const labelList& pFaceCells =
|
||||
mesh.boundary()[patchi].faceCells();
|
||||
const scalarField& phiBDPf = phiBDBf[patchi];
|
||||
const scalarField& phiCorrPf = phiCorrBf[patchi];
|
||||
|
||||
forAll(lambdaPf, pFacei)
|
||||
{
|
||||
// Limit outlet faces only
|
||||
if (phiBDPf[pFacei] > 0)
|
||||
if ((phiBDPf[pFacei] + phiCorrPf[pFacei]) > SMALL*SMALL)
|
||||
{
|
||||
label pfCelli = pFaceCells[pFacei];
|
||||
|
||||
@ -862,7 +863,7 @@ void Foam::MULES::limiterCorr
|
||||
forAll(lambdaPf, pFacei)
|
||||
{
|
||||
// Limit outlet faces only
|
||||
if (phiCorrPf[pFacei] > 0)
|
||||
if (phiCorrPf[pFacei] > SMALL*SMALL)
|
||||
{
|
||||
label pfCelli = pFaceCells[pFacei];
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -1371,6 +1371,12 @@ void Foam::fvMeshSubset::setLargeCellSubset
|
||||
}
|
||||
|
||||
|
||||
bool Foam::fvMeshSubset::hasSubMesh() const
|
||||
{
|
||||
return fvMeshSubsetPtr_.valid();
|
||||
}
|
||||
|
||||
|
||||
const fvMesh& Foam::fvMeshSubset::subMesh() const
|
||||
{
|
||||
checkCellSubset();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -268,6 +268,9 @@ public:
|
||||
return baseMesh_;
|
||||
}
|
||||
|
||||
//- Have subMesh?
|
||||
bool hasSubMesh() const;
|
||||
|
||||
//- Return reference to subset mesh
|
||||
const fvMesh& subMesh() const;
|
||||
|
||||
|
||||
@ -201,6 +201,7 @@ void Foam::nastranSurfaceWriter::writeTemplate
|
||||
{
|
||||
v += values[f[fptI]];
|
||||
}
|
||||
v /= f.size();
|
||||
|
||||
writeFaceValue(nasFieldName, v, ++n, os);
|
||||
}
|
||||
|
||||
@ -197,7 +197,14 @@ updateCoeffs()
|
||||
|
||||
const vector& myRayId = dom.IRay(rayId).d();
|
||||
|
||||
const scalarField& Ir = dom.Qin().boundaryField()[patchI];
|
||||
// Use updated Ir while iterating over rays
|
||||
// avoids to used lagged Qin
|
||||
scalarField Ir = dom.IRay(0).Qin().boundaryField()[patchI];
|
||||
|
||||
for (label rayI=1; rayI < dom.nRay(); rayI++)
|
||||
{
|
||||
Ir += dom.IRay(rayI).Qin().boundaryField()[patchI];
|
||||
}
|
||||
|
||||
forAll(Iw, faceI)
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -187,7 +187,9 @@ updateCoeffs()
|
||||
radiativeIntensityRay& ray =
|
||||
const_cast<radiativeIntensityRay&>(dom.IRay(rayId));
|
||||
|
||||
ray.Qr().boundaryField()[patchI] += Iw*(n & ray.dAve());
|
||||
const scalarField nAve(n & ray.dAve());
|
||||
|
||||
ray.Qr().boundaryField()[patchI] += Iw*nAve;
|
||||
|
||||
const scalarField Eb
|
||||
(
|
||||
@ -196,23 +198,20 @@ updateCoeffs()
|
||||
|
||||
scalarField temissivity = emissivity();
|
||||
|
||||
scalarField& Qem = ray.Qem().boundaryField()[patchI];
|
||||
scalarField& Qin = ray.Qin().boundaryField()[patchI];
|
||||
|
||||
// Use updated Ir while iterating over rays
|
||||
// avoids to used lagged Qin
|
||||
scalarField Ir = dom.IRay(0).Qin().boundaryField()[patchI];
|
||||
|
||||
for (label rayI=1; rayI < dom.nRay(); rayI++)
|
||||
{
|
||||
Ir += dom.IRay(rayI).Qin().boundaryField()[patchI];
|
||||
}
|
||||
|
||||
forAll(Iw, faceI)
|
||||
{
|
||||
scalar Ir = 0.0;
|
||||
for (label rayI=0; rayI < dom.nRay(); rayI++)
|
||||
{
|
||||
const vector& d = dom.IRay(rayI).d();
|
||||
|
||||
const scalarField& IFace =
|
||||
dom.IRay(rayI).ILambda(lambdaId).boundaryField()[patchI];
|
||||
|
||||
if ((-n[faceI] & d) < 0.0) // qin into the wall
|
||||
{
|
||||
const vector& dAve = dom.IRay(rayI).dAve();
|
||||
Ir = Ir + IFace[faceI]*mag(n[faceI] & dAve);
|
||||
}
|
||||
}
|
||||
|
||||
const vector& d = dom.IRay(rayId).d();
|
||||
|
||||
if ((-n[faceI] & d) > 0.0)
|
||||
@ -222,9 +221,12 @@ updateCoeffs()
|
||||
valueFraction()[faceI] = 1.0;
|
||||
refValue()[faceI] =
|
||||
(
|
||||
Ir*(1.0 - temissivity[faceI])
|
||||
Ir[faceI]*(1.0 - temissivity[faceI])
|
||||
+ temissivity[faceI]*Eb[faceI]
|
||||
)/pi;
|
||||
|
||||
// Emmited heat flux from this ray direction
|
||||
Qem[faceI] = refValue()[faceI]*nAve[faceI];
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -232,6 +234,9 @@ updateCoeffs()
|
||||
valueFraction()[faceI] = 0.0;
|
||||
refGrad()[faceI] = 0.0;
|
||||
refValue()[faceI] = 0.0; //not used
|
||||
|
||||
// Incident heat flux on this ray direction
|
||||
Qin[faceI] = Iw[faceI]*nAve[faceI];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
9710
tutorials/mesh/foamyHexMesh/flange/constant/triSurface/flange.obj
Normal file
9710
tutorials/mesh/foamyHexMesh/flange/constant/triSurface/flange.obj
Normal file
File diff suppressed because it is too large
Load Diff
@ -52,5 +52,6 @@ runParallel collapseEdges $nProcs -collapseFaces -latestTime
|
||||
|
||||
runParallel checkMesh $nProcs -latestTime -allTopology -allGeometry
|
||||
|
||||
runApplication reconstructParMesh -latestTime
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -28,9 +28,8 @@ boundaryField
|
||||
|
||||
outlet
|
||||
{
|
||||
type pressureInletOutletVelocity;
|
||||
phi phi.particles;
|
||||
value $internalField;
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
walls
|
||||
|
||||
@ -6027,8 +6027,7 @@ boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
type zeroGradient;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
|
||||
@ -25,7 +25,7 @@ solvers
|
||||
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
tolerance 1e-6;
|
||||
tolerance 1e-9;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
|
||||
@ -22,16 +22,12 @@ boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value $internalField;
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
phi phi.particles;
|
||||
inletValue $internalField;
|
||||
value $internalField;
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
walls
|
||||
|
||||
@ -22,8 +22,10 @@ boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0.25 0);
|
||||
type interstitialInletVelocity;
|
||||
inletVelocity uniform (0 0.25 0);
|
||||
alpha alpha.air;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
outlet
|
||||
|
||||
@ -28,9 +28,8 @@ boundaryField
|
||||
|
||||
outlet
|
||||
{
|
||||
type pressureInletOutletVelocity;
|
||||
phi phi.particles;
|
||||
value $internalField;
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
walls
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,45 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object alpha.air;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 1;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
walls
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
frontAndBackPlanes
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -6027,8 +6027,7 @@ boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
type zeroGradient;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
|
||||
@ -22,8 +22,7 @@ boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
|
||||
@ -25,7 +25,7 @@ solvers
|
||||
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
tolerance 1e-6;
|
||||
tolerance 1e-9;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user