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:
@ -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()),
|
||||
|
||||
@ -98,12 +98,11 @@ int main(int argc, char *argv[])
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
// Modify velocity by applying a 1/7th power law boundary-layer
|
||||
// u/U0 = (y/ybl)^(1/7)
|
||||
// assumes U0 is the same as the current cell velocity
|
||||
|
||||
Info<< "Setting boundary layer velocity" << nl << endl;
|
||||
scalar yblv = ybl.value();
|
||||
forAll(U, celli)
|
||||
{
|
||||
@ -117,9 +116,15 @@ int main(int argc, char *argv[])
|
||||
U.write();
|
||||
|
||||
// Update/re-write phi
|
||||
phi = fvc::interpolate(U) & mesh.Sf();
|
||||
#include "createPhi.H"
|
||||
phi.write();
|
||||
|
||||
singlePhaseTransportModel laminarTransport(U, phi);
|
||||
|
||||
autoPtr<incompressible::turbulenceModel> turbulence
|
||||
(
|
||||
incompressible::turbulenceModel::New(U, phi, laminarTransport)
|
||||
);
|
||||
|
||||
if (isA<incompressible::RASModel>(turbulence()))
|
||||
{
|
||||
@ -153,7 +158,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
|
||||
// Turbulence epsilon
|
||||
|
||||
tmp<volScalarField> tepsilon = turbulence->epsilon();
|
||||
volScalarField& epsilon = tepsilon();
|
||||
scalar ce0 = ::pow(Cmu, 0.75)/kappa;
|
||||
|
||||
@ -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
|
||||
@ -37,15 +37,6 @@ License
|
||||
mesh
|
||||
);
|
||||
|
||||
#include "createPhi.H"
|
||||
|
||||
singlePhaseTransportModel laminarTransport(U, phi);
|
||||
|
||||
autoPtr<incompressible::turbulenceModel> turbulence
|
||||
(
|
||||
incompressible::turbulenceModel::New(U, phi, laminarTransport)
|
||||
);
|
||||
|
||||
Info<< "Calculating wall distance field" << endl;
|
||||
volScalarField y(wallDist(mesh).y());
|
||||
|
||||
|
||||
@ -131,7 +131,7 @@ public:
|
||||
(
|
||||
const word& entryName,
|
||||
const dictionary& dict,
|
||||
const word& ext = "Ceoffs"
|
||||
const word& ext = "Coeffs"
|
||||
);
|
||||
|
||||
//- Copy constructor
|
||||
|
||||
@ -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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
@ -44,16 +44,22 @@ void Foam::Cloud<ParticleType>::checkPatches() const
|
||||
{
|
||||
if (isA<cyclicAMIPolyPatch>(pbm[patchI]))
|
||||
{
|
||||
ok = false;
|
||||
break;
|
||||
const cyclicAMIPolyPatch& cami =
|
||||
refCast<const cyclicAMIPolyPatch>(pbm[patchI]);
|
||||
|
||||
if (cami.owner())
|
||||
{
|
||||
ok = ok && (cami.AMI().singlePatchProc() != -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!ok)
|
||||
{
|
||||
WarningIn("void Foam::Cloud<ParticleType>::initCloud(const bool)")
|
||||
<< "Particle tracking across AMI patches is not currently "
|
||||
<< "supported" << endl;
|
||||
FatalErrorIn("void Foam::Cloud<ParticleType>::initCloud(const bool)")
|
||||
<< "Particle tracking across AMI patches is only currently "
|
||||
<< "supported for cases where the AMI patches reside on a "
|
||||
<< "single processor" << abort(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -257,6 +257,15 @@ protected:
|
||||
template<class TrackData>
|
||||
void hitCyclicPatch(const cyclicPolyPatch&, TrackData& td);
|
||||
|
||||
//- Overridable function to handle the particle hitting a cyclicAMIPatch
|
||||
template<class TrackData>
|
||||
void hitCyclicAMIPatch
|
||||
(
|
||||
const cyclicAMIPolyPatch&,
|
||||
TrackData& td,
|
||||
const vector& direction
|
||||
);
|
||||
|
||||
//- Overridable function to handle the particle hitting a
|
||||
// processorPatch
|
||||
template<class TrackData>
|
||||
|
||||
@ -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
|
||||
@ -26,6 +26,7 @@ License
|
||||
#include "IOPosition.H"
|
||||
|
||||
#include "cyclicPolyPatch.H"
|
||||
#include "cyclicAMIPolyPatch.H"
|
||||
#include "processorPolyPatch.H"
|
||||
#include "symmetryPolyPatch.H"
|
||||
#include "wallPolyPatch.H"
|
||||
@ -598,6 +599,15 @@ Foam::scalar Foam::particle::trackToFace
|
||||
static_cast<const cyclicPolyPatch&>(patch), td
|
||||
);
|
||||
}
|
||||
else if (isA<cyclicAMIPolyPatch>(patch))
|
||||
{
|
||||
p.hitCyclicAMIPatch
|
||||
(
|
||||
static_cast<const cyclicAMIPolyPatch&>(patch),
|
||||
td,
|
||||
endPosition - position_
|
||||
);
|
||||
}
|
||||
else if (isA<processorPolyPatch>(patch))
|
||||
{
|
||||
p.hitProcessorPatch
|
||||
@ -1010,6 +1020,78 @@ void Foam::particle::hitCyclicPatch
|
||||
}
|
||||
|
||||
|
||||
template<class TrackData>
|
||||
void Foam::particle::hitCyclicAMIPatch
|
||||
(
|
||||
const cyclicAMIPolyPatch& cpp,
|
||||
TrackData& td,
|
||||
const vector& direction
|
||||
)
|
||||
{
|
||||
const cyclicAMIPolyPatch& receiveCpp = cpp.neighbPatch();
|
||||
|
||||
// patch face index on sending side
|
||||
label patchFaceI = faceI_ - cpp.start();
|
||||
|
||||
// patch face index on receiving side - also updates position
|
||||
patchFaceI = cpp.pointFace(patchFaceI, direction, position_);
|
||||
|
||||
if (patchFaceI < 0)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"template<class TrackData>"
|
||||
"void Foam::particle::hitCyclicAMIPatch"
|
||||
"("
|
||||
"const cyclicAMIPolyPatch&, "
|
||||
"TrackData&, "
|
||||
"const vector&"
|
||||
")"
|
||||
)
|
||||
<< "Particle lost across " << cyclicAMIPolyPatch::typeName
|
||||
<< " patches " << cpp.name() << " and " << receiveCpp.name()
|
||||
<< " at position " << position_ << abort(FatalError);
|
||||
}
|
||||
|
||||
// convert face index into global numbering
|
||||
faceI_ = patchFaceI + receiveCpp.start();
|
||||
|
||||
cellI_ = mesh_.faceOwner()[faceI_];
|
||||
|
||||
tetFaceI_ = faceI_;
|
||||
|
||||
// See note in correctAfterParallelTransfer for tetPtI_ addressing.
|
||||
tetPtI_ = mesh_.faces()[tetFaceI_].size() - 1 - tetPtI_;
|
||||
|
||||
// Now the particle is on the receiving side
|
||||
|
||||
// Have patch transform the position
|
||||
receiveCpp.transformPosition(position_, patchFaceI);
|
||||
|
||||
// Transform the properties
|
||||
if (!receiveCpp.parallel())
|
||||
{
|
||||
const tensor& T =
|
||||
(
|
||||
receiveCpp.forwardT().size() == 1
|
||||
? receiveCpp.forwardT()[0]
|
||||
: receiveCpp.forwardT()[patchFaceI]
|
||||
);
|
||||
transformProperties(T);
|
||||
}
|
||||
else if (receiveCpp.separated())
|
||||
{
|
||||
const vector& s =
|
||||
(
|
||||
(receiveCpp.separation().size() == 1)
|
||||
? receiveCpp.separation()[0]
|
||||
: receiveCpp.separation()[patchFaceI]
|
||||
);
|
||||
transformProperties(-s);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class TrackData>
|
||||
void Foam::particle::hitProcessorPatch(const processorPolyPatch&, TrackData&)
|
||||
{}
|
||||
|
||||
@ -100,6 +100,8 @@ bool Foam::CollidingParcel<ParcelType>::move
|
||||
// Apply correction to position for reduced-D cases
|
||||
meshTools::constrainToMeshCentre(mesh, p.position());
|
||||
|
||||
const point start(p.position());
|
||||
|
||||
// Set the Lagrangian time-step
|
||||
scalar dt = min(dtMax, tEnd);
|
||||
|
||||
@ -145,7 +147,14 @@ bool Foam::CollidingParcel<ParcelType>::move
|
||||
|
||||
p.age() += dt;
|
||||
|
||||
td.cloud().functions().postMove(p, cellI, dt, td.keepParticle);
|
||||
td.cloud().functions().postMove
|
||||
(
|
||||
p,
|
||||
cellI,
|
||||
dt,
|
||||
start,
|
||||
td.keepParticle
|
||||
);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@ -276,6 +276,8 @@ bool Foam::KinematicParcel<ParcelType>::move
|
||||
// Apply correction to position for reduced-D cases
|
||||
meshTools::constrainToMeshCentre(mesh, p.position());
|
||||
|
||||
const point start(p.position());
|
||||
|
||||
// Set the Lagrangian time-step
|
||||
scalar dt = min(dtMax, tEnd);
|
||||
|
||||
@ -320,7 +322,7 @@ bool Foam::KinematicParcel<ParcelType>::move
|
||||
|
||||
p.age() += dt;
|
||||
|
||||
td.cloud().functions().postMove(p, cellI, dt, td.keepParticle);
|
||||
td.cloud().functions().postMove(p, cellI, dt, start, td.keepParticle);
|
||||
}
|
||||
|
||||
return td.keepParticle;
|
||||
|
||||
@ -372,7 +372,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
|
||||
td.cloud().hsTrans()[cellI] += dm*HsEff(td, pc, T0, idG, idL, idS);
|
||||
|
||||
td.cloud().phaseChange().addToPhaseChangeMass(dm);
|
||||
td.cloud().phaseChange().addToPhaseChangeMass(np0*mass1);
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
@ -530,7 +530,7 @@ void Foam::ReactingParcel<ParcelType>::calc
|
||||
}
|
||||
td.cloud().UTrans()[cellI] += dm*U0;
|
||||
|
||||
td.cloud().phaseChange().addToPhaseChangeMass(dm);
|
||||
td.cloud().phaseChange().addToPhaseChangeMass(np0*mass1);
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
@ -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
|
||||
@ -97,6 +97,7 @@ void Foam::CloudFunctionObject<CloudType>::postMove
|
||||
const typename CloudType::parcelType&,
|
||||
const label,
|
||||
const scalar,
|
||||
const point&,
|
||||
bool&
|
||||
)
|
||||
{
|
||||
|
||||
@ -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
|
||||
@ -138,6 +138,7 @@ public:
|
||||
const typename CloudType::parcelType& p,
|
||||
const label cellI,
|
||||
const scalar dt,
|
||||
const point& position0,
|
||||
bool& keepParticle
|
||||
);
|
||||
|
||||
|
||||
@ -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
|
||||
@ -133,12 +133,13 @@ void Foam::CloudFunctionObjectList<CloudType>::postMove
|
||||
const typename CloudType::parcelType& p,
|
||||
const label cellI,
|
||||
const scalar dt,
|
||||
const point& position0,
|
||||
bool& keepParticle
|
||||
)
|
||||
{
|
||||
forAll(*this, i)
|
||||
{
|
||||
this->operator[](i).postMove(p, cellI, dt, keepParticle);
|
||||
this->operator[](i).postMove(p, cellI, dt, position0, keepParticle);
|
||||
|
||||
if (!keepParticle)
|
||||
{
|
||||
|
||||
@ -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
|
||||
@ -115,6 +115,7 @@ public:
|
||||
const typename CloudType::parcelType& p,
|
||||
const label cellI,
|
||||
const scalar dt,
|
||||
const point& position0,
|
||||
bool& keepParticle
|
||||
);
|
||||
|
||||
|
||||
@ -64,13 +64,29 @@ void Foam::ParticleCollector<CloudType>::makeLogFile
|
||||
|
||||
outputFilePtr_()
|
||||
<< "# Source : " << type() << nl
|
||||
<< "# Total area : " << sum(area) << nl
|
||||
<< "# Time";
|
||||
<< "# Total area : " << sum(area) << nl;
|
||||
|
||||
outputFilePtr_() << "# Geometry :" << nl;
|
||||
forAll(faces, i)
|
||||
{
|
||||
word id = Foam::name(i);
|
||||
|
||||
outputFilePtr_()
|
||||
<< '#' << tab << "point[" << id << "] = "
|
||||
<< faces[i].centre(points) << nl;
|
||||
}
|
||||
|
||||
outputFilePtr_()<< '#' << nl << "# Time";
|
||||
|
||||
forAll(faces, i)
|
||||
{
|
||||
word id = Foam::name(i);
|
||||
|
||||
if (i != 0)
|
||||
{
|
||||
outputFilePtr_() << "#";
|
||||
}
|
||||
|
||||
outputFilePtr_()
|
||||
<< tab << "area[" << id << "]"
|
||||
<< tab << "mass[" << id << "]"
|
||||
@ -265,13 +281,10 @@ void Foam::ParticleCollector<CloudType>::initConcentricCircles()
|
||||
template<class CloudType>
|
||||
Foam::label Foam::ParticleCollector<CloudType>::collectParcelPolygon
|
||||
(
|
||||
const point& position,
|
||||
const vector& U,
|
||||
const scalar dt
|
||||
const point& p1,
|
||||
const point& p2
|
||||
) const
|
||||
{
|
||||
point end(position + dt*U);
|
||||
|
||||
label dummyNearType = -1;
|
||||
label dummyNearLabel = -1;
|
||||
|
||||
@ -279,10 +292,10 @@ Foam::label Foam::ParticleCollector<CloudType>::collectParcelPolygon
|
||||
{
|
||||
const label facePoint0 = faces_[faceI][0];
|
||||
|
||||
const point p0 = points_[facePoint0];
|
||||
const point& pf = points_[facePoint0];
|
||||
|
||||
const scalar d1 = normal_ & (position - p0);
|
||||
const scalar d2 = normal_ & (end - p0);
|
||||
const scalar d1 = normal_ & (p1 - pf);
|
||||
const scalar d2 = normal_ & (p2 - pf);
|
||||
|
||||
if (sign(d1) == sign(d2))
|
||||
{
|
||||
@ -291,7 +304,7 @@ Foam::label Foam::ParticleCollector<CloudType>::collectParcelPolygon
|
||||
}
|
||||
|
||||
// intersection point
|
||||
point pIntersect = position + (d1/(d1 - d2))*dt*U;
|
||||
const point pIntersect = p1 + (d1/(d1 - d2))*(p2 - p1);
|
||||
|
||||
const List<face>& tris = faceTris_[faceI];
|
||||
|
||||
@ -320,17 +333,14 @@ Foam::label Foam::ParticleCollector<CloudType>::collectParcelPolygon
|
||||
template<class CloudType>
|
||||
Foam::label Foam::ParticleCollector<CloudType>::collectParcelConcentricCircles
|
||||
(
|
||||
const point& position,
|
||||
const vector& U,
|
||||
const scalar dt
|
||||
const point& p1,
|
||||
const point& p2
|
||||
) const
|
||||
{
|
||||
label secI = -1;
|
||||
|
||||
point end(position + dt*U);
|
||||
|
||||
const scalar d1 = normal_ & (position - coordSys_.origin());
|
||||
const scalar d2 = normal_ & (end - coordSys_.origin());
|
||||
const scalar d1 = normal_ & (p1 - coordSys_.origin());
|
||||
const scalar d2 = normal_ & (p2 - coordSys_.origin());
|
||||
|
||||
if (sign(d1) == sign(d2))
|
||||
{
|
||||
@ -339,7 +349,7 @@ Foam::label Foam::ParticleCollector<CloudType>::collectParcelConcentricCircles
|
||||
}
|
||||
|
||||
// intersection point in cylindrical co-ordinate system
|
||||
point pCyl = coordSys_.localPosition(position + (d1/(d1 - d2))*dt*U);
|
||||
const point pCyl = coordSys_.localPosition(p1 + (d1/(d1 - d2))*(p2 - p1));
|
||||
|
||||
scalar r = pCyl[0];
|
||||
|
||||
@ -408,6 +418,9 @@ void Foam::ParticleCollector<CloudType>::write()
|
||||
Field<scalar> faceMassFlowRate(massFlowRate_.size(), 0.0);
|
||||
this->getModelProperty("massFlowRate", faceMassFlowRate);
|
||||
|
||||
|
||||
scalar sumTotalMass = 0.0;
|
||||
scalar sumAverageMFR = 0.0;
|
||||
forAll(faces_, faceI)
|
||||
{
|
||||
scalarList allProcMass(Pstream::nProcs());
|
||||
@ -420,10 +433,8 @@ void Foam::ParticleCollector<CloudType>::write()
|
||||
Pstream::gatherList(allProcMassFlowRate);
|
||||
faceMassFlowRate[faceI] += sum(allProcMassFlowRate);
|
||||
|
||||
Info<< " face " << faceI
|
||||
<< ": total mass = " << faceMassTotal[faceI]
|
||||
<< "; average mass flow rate = " << faceMassFlowRate[faceI]
|
||||
<< nl;
|
||||
sumTotalMass += faceMassTotal[faceI];
|
||||
sumAverageMFR += faceMassFlowRate[faceI];
|
||||
|
||||
if (outputFilePtr_.valid())
|
||||
{
|
||||
@ -435,7 +446,9 @@ void Foam::ParticleCollector<CloudType>::write()
|
||||
}
|
||||
}
|
||||
|
||||
Info<< endl;
|
||||
Info<< " sum(total mass) = " << sumTotalMass << nl
|
||||
<< " sum(average mass flow rate) = " << sumAverageMFR << nl
|
||||
<< endl;
|
||||
|
||||
|
||||
if (surfaceFormat_ != "none")
|
||||
@ -554,16 +567,17 @@ Foam::ParticleCollector<CloudType>::ParticleCollector
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn
|
||||
FatalIOErrorIn
|
||||
(
|
||||
"Foam::ParticleCollector<CloudType>::ParticleCollector"
|
||||
"("
|
||||
"const dictionary&,"
|
||||
"CloudType&"
|
||||
")"
|
||||
")",
|
||||
this->coeffDict()
|
||||
)
|
||||
<< "Unknown mode " << mode << ". Available options are "
|
||||
<< "polygon and concentricCircle" << exit(FatalError);
|
||||
<< "polygon and concentricCircle" << exit(FatalIOError);
|
||||
}
|
||||
|
||||
mass_.setSize(faces_.size(), 0.0);
|
||||
@ -620,6 +634,7 @@ void Foam::ParticleCollector<CloudType>::postMove
|
||||
const parcelType& p,
|
||||
const label cellI,
|
||||
const scalar dt,
|
||||
const point& position0,
|
||||
bool& keepParticle
|
||||
)
|
||||
{
|
||||
@ -630,16 +645,19 @@ void Foam::ParticleCollector<CloudType>::postMove
|
||||
|
||||
label faceI = -1;
|
||||
|
||||
// slightly extend end position to avoid falling within tracking tolerances
|
||||
const point position1 = position0 + 1.0001*(p.position() - position0);
|
||||
|
||||
switch (mode_)
|
||||
{
|
||||
case mtPolygon:
|
||||
{
|
||||
faceI = collectParcelPolygon(p.position(), p.U(), dt);
|
||||
faceI = collectParcelPolygon(position0, position1);
|
||||
break;
|
||||
}
|
||||
case mtConcentricCircle:
|
||||
{
|
||||
faceI = collectParcelConcentricCircles(p.position(), p.U(), dt);
|
||||
faceI = collectParcelConcentricCircles(position0, position1);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
@ -169,17 +169,15 @@ private:
|
||||
//- Collect parcels in polygon collectors
|
||||
label collectParcelPolygon
|
||||
(
|
||||
const point& position,
|
||||
const vector& U,
|
||||
const scalar dt
|
||||
const point& p1,
|
||||
const point& p2
|
||||
) const;
|
||||
|
||||
//- Collect parcels in concentric circle collectors
|
||||
label collectParcelConcentricCircles
|
||||
(
|
||||
const point& position,
|
||||
const vector& U,
|
||||
const scalar dt
|
||||
const point& p1,
|
||||
const point& p2
|
||||
) const;
|
||||
|
||||
|
||||
@ -235,6 +233,7 @@ public:
|
||||
const parcelType& p,
|
||||
const label cellI,
|
||||
const scalar dt,
|
||||
const point& position0,
|
||||
bool& keepParticle
|
||||
);
|
||||
};
|
||||
|
||||
@ -155,7 +155,7 @@ void Foam::LiquidEvaporation<CloudType>::calculate
|
||||
const scalarField X(liquids_.X(Yl));
|
||||
|
||||
// immediately evaporate mass that has reached critical condition
|
||||
if (mag(T - liquids_.Tc(X)) < SMALL)
|
||||
if ((liquids_.Tc(X) - T) < SMALL)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
|
||||
@ -155,7 +155,7 @@ void Foam::LiquidEvaporationBoil<CloudType>::calculate
|
||||
const scalarField X(liquids_.X(Yl));
|
||||
|
||||
// immediately evaporate mass that has reached critical condition
|
||||
if (mag(T - liquids_.Tc(X)) < SMALL)
|
||||
if ((liquids_.Tc(X) - T) < SMALL)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
|
||||
@ -1248,6 +1248,114 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToTarget
|
||||
}
|
||||
|
||||
|
||||
template<class SourcePatch, class TargetPatch>
|
||||
Foam::label Foam::AMIInterpolation<SourcePatch, TargetPatch>::srcPointFace
|
||||
(
|
||||
const SourcePatch& srcPatch,
|
||||
const TargetPatch& tgtPatch,
|
||||
const vector& n,
|
||||
const label tgtFaceI,
|
||||
point& tgtPoint
|
||||
)
|
||||
const
|
||||
{
|
||||
const pointField& srcPoints = srcPatch.points();
|
||||
|
||||
// source face addresses that intersect target face tgtFaceI
|
||||
const labelList& addr = tgtAddress_[tgtFaceI];
|
||||
|
||||
forAll(addr, i)
|
||||
{
|
||||
label srcFaceI = addr[i];
|
||||
const face& f = srcPatch[tgtFaceI];
|
||||
|
||||
pointHit ray = f.ray(tgtPoint, n, srcPoints);
|
||||
|
||||
if (ray.hit())
|
||||
{
|
||||
tgtPoint = ray.rawPoint();
|
||||
|
||||
return srcFaceI;
|
||||
}
|
||||
}
|
||||
|
||||
// no hit registered - try with face normal instead of input normal
|
||||
forAll(addr, i)
|
||||
{
|
||||
label srcFaceI = addr[i];
|
||||
const face& f = srcPatch[tgtFaceI];
|
||||
|
||||
vector nFace(-srcPatch.faceNormals()[srcFaceI]);
|
||||
nFace += tgtPatch.faceNormals()[tgtFaceI];
|
||||
|
||||
pointHit ray = f.ray(tgtPoint, nFace, srcPoints);
|
||||
|
||||
if (ray.hit())
|
||||
{
|
||||
tgtPoint = ray.rawPoint();
|
||||
|
||||
return srcFaceI;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
template<class SourcePatch, class TargetPatch>
|
||||
Foam::label Foam::AMIInterpolation<SourcePatch, TargetPatch>::tgtPointFace
|
||||
(
|
||||
const SourcePatch& srcPatch,
|
||||
const TargetPatch& tgtPatch,
|
||||
const vector& n,
|
||||
const label srcFaceI,
|
||||
point& srcPoint
|
||||
)
|
||||
const
|
||||
{
|
||||
const pointField& tgtPoints = tgtPatch.points();
|
||||
|
||||
// target face addresses that intersect source face srcFaceI
|
||||
const labelList& addr = srcAddress_[srcFaceI];
|
||||
|
||||
forAll(addr, i)
|
||||
{
|
||||
label tgtFaceI = addr[i];
|
||||
const face& f = tgtPatch[tgtFaceI];
|
||||
|
||||
pointHit ray = f.ray(srcPoint, n, tgtPoints);
|
||||
|
||||
if (ray.hit())
|
||||
{
|
||||
srcPoint = ray.rawPoint();
|
||||
|
||||
return tgtFaceI;
|
||||
}
|
||||
}
|
||||
|
||||
// no hit registered - try with face normal instead of input normal
|
||||
forAll(addr, i)
|
||||
{
|
||||
label tgtFaceI = addr[i];
|
||||
const face& f = tgtPatch[tgtFaceI];
|
||||
|
||||
vector nFace(-srcPatch.faceNormals()[srcFaceI]);
|
||||
nFace += tgtPatch.faceNormals()[tgtFaceI];
|
||||
|
||||
pointHit ray = f.ray(srcPoint, n, tgtPoints);
|
||||
|
||||
if (ray.hit())
|
||||
{
|
||||
srcPoint = ray.rawPoint();
|
||||
|
||||
return tgtFaceI;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
template<class SourcePatch, class TargetPatch>
|
||||
void Foam::AMIInterpolation<SourcePatch, TargetPatch>::writeFaceConnectivity
|
||||
(
|
||||
|
||||
@ -454,6 +454,31 @@ public:
|
||||
) const;
|
||||
|
||||
|
||||
// Point intersections
|
||||
|
||||
//- Return source patch face index of point on target patch face
|
||||
label srcPointFace
|
||||
(
|
||||
const SourcePatch& srcPatch,
|
||||
const TargetPatch& tgtPatch,
|
||||
const vector& n,
|
||||
const label tgtFaceI,
|
||||
point& tgtPoint
|
||||
)
|
||||
const;
|
||||
|
||||
//- Return target patch face index of point on source patch face
|
||||
label tgtPointFace
|
||||
(
|
||||
const SourcePatch& srcPatch,
|
||||
const TargetPatch& tgtPatch,
|
||||
const vector& n,
|
||||
const label srcFaceI,
|
||||
point& srcPoint
|
||||
)
|
||||
const;
|
||||
|
||||
|
||||
// Checks
|
||||
|
||||
//- Write face connectivity as OBJ file
|
||||
|
||||
@ -797,6 +797,38 @@ bool Foam::cyclicAMIPolyPatch::order
|
||||
}
|
||||
|
||||
|
||||
Foam::label Foam::cyclicAMIPolyPatch::pointFace
|
||||
(
|
||||
const label faceI,
|
||||
const vector& n,
|
||||
point& p
|
||||
) const
|
||||
{
|
||||
if (owner())
|
||||
{
|
||||
return AMI().tgtPointFace
|
||||
(
|
||||
*this,
|
||||
neighbPatch(),
|
||||
n,
|
||||
faceI,
|
||||
p
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
return neighbPatch().AMI().srcPointFace
|
||||
(
|
||||
neighbPatch(),
|
||||
*this,
|
||||
n,
|
||||
faceI,
|
||||
p
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::cyclicAMIPolyPatch::write(Ostream& os) const
|
||||
{
|
||||
coupledPolyPatch::write(os);
|
||||
|
||||
@ -367,6 +367,15 @@ public:
|
||||
labelList& rotation
|
||||
) const;
|
||||
|
||||
//- Return face index on neighbour patch which shares point p
|
||||
// following trajectory vector n
|
||||
label pointFace
|
||||
(
|
||||
const label faceI,
|
||||
const vector& n,
|
||||
point& p
|
||||
) const;
|
||||
|
||||
//- Write the polyPatch data as a dictionary
|
||||
virtual void write(Ostream&) const;
|
||||
};
|
||||
|
||||
@ -78,6 +78,10 @@ void Foam::removeRegisteredObject::execute()
|
||||
|
||||
if (obj.ownedByRegistry())
|
||||
{
|
||||
Info<< type() << " " << name_ << " output:" << nl
|
||||
<< " removing object " << obj.name() << nl
|
||||
<< endl;
|
||||
|
||||
const_cast<regIOobject&>(obj).release();
|
||||
delete &obj;
|
||||
}
|
||||
|
||||
@ -63,7 +63,7 @@ bool Foam::writeDictionary::tryFolder
|
||||
{
|
||||
if (firstDict)
|
||||
{
|
||||
Info<< type() << " output:" << nl << endl;
|
||||
Info<< type() << " " << name_ << " output:" << nl << endl;
|
||||
|
||||
IOobject::writeDivider(Info);
|
||||
Info<< endl;
|
||||
|
||||
@ -98,6 +98,11 @@ void Foam::writeRegisteredObject::write()
|
||||
);
|
||||
// Switch off automatic writing to prevent double write
|
||||
obj.writeOpt() = IOobject::NO_WRITE;
|
||||
|
||||
Info<< type() << " " << name_ << " output:" << nl
|
||||
<< " writing object " << obj.name() << nl
|
||||
<< endl;
|
||||
|
||||
obj.write();
|
||||
}
|
||||
else
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -52,8 +52,8 @@ void Foam::calcFvcDiv::calcDiv
|
||||
|
||||
field = fvc::div(vf);
|
||||
|
||||
Info<< type() << " output:" << nl
|
||||
<< " writing " << field.name() << " field" << nl << endl;
|
||||
Info<< type() << " " << name_ << " output:" << nl
|
||||
<< " writing field " << field.name() << nl << endl;
|
||||
|
||||
field.write();
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -120,8 +120,8 @@ void Foam::calcFvcGrad::calcGrad
|
||||
|
||||
field = fvc::grad(sf);
|
||||
|
||||
Info<< type() << " output:" << nl
|
||||
<< " writing " << field.name() << " field" << nl << endl;
|
||||
Info<< type() << " " << name_ << " output:" << nl
|
||||
<< " writing field " << field.name() << nl << endl;
|
||||
|
||||
field.write();
|
||||
|
||||
|
||||
@ -198,10 +198,11 @@ void Foam::CourantNo::write()
|
||||
|
||||
CourantNo.correctBoundaryConditions();
|
||||
|
||||
CourantNo.write();
|
||||
Info<< type() << " " << name_ << " output:" << nl
|
||||
<< " writing field " << CourantNo.name() << nl
|
||||
<< endl;
|
||||
|
||||
Info<< type() << " output:" << nl
|
||||
<< " writing " << CourantNo.name() << " field" << nl << endl;
|
||||
CourantNo.write();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -136,7 +136,7 @@ void Foam::DESModelRegions::write()
|
||||
|
||||
if (log_)
|
||||
{
|
||||
Info<< type() << " output:" << nl;
|
||||
Info<< type() << " " << name_ << " output:" << nl;
|
||||
}
|
||||
|
||||
tmp<volScalarField> tresult;
|
||||
@ -186,6 +186,7 @@ void Foam::DESModelRegions::write()
|
||||
{
|
||||
Info<< " LES = " << prc << " % (volume)" << nl
|
||||
<< " RAS = " << 100.0 - prc << " % (volume)" << nl
|
||||
<< " writing field " << result.name() << nl
|
||||
<< endl;
|
||||
}
|
||||
|
||||
|
||||
@ -157,10 +157,11 @@ void Foam::Lambda2::write()
|
||||
|
||||
Lambda2 = -eigenValues(SSplusWW)().component(vector::Y);
|
||||
|
||||
Lambda2.write();
|
||||
Info<< type() << " " << name_ << " output:" << nl
|
||||
<< " writing field " << Lambda2.name() << nl
|
||||
<< endl;
|
||||
|
||||
Info<< type() << " output:" << nl
|
||||
<< " writing " << Lambda2.name() << " field" << nl << endl;
|
||||
Lambda2.write();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -209,10 +209,11 @@ void Foam::Peclet::write()
|
||||
*fvc::interpolate(nuEff)
|
||||
);
|
||||
|
||||
Peclet.write();
|
||||
Info<< type() << " " << name_ << " output:" << nl
|
||||
<< " writing field " << Peclet.name() << nl
|
||||
<< endl;
|
||||
|
||||
Info<< type() << " output:" << nl
|
||||
<< " writing " << Peclet.name() << " field" << nl << endl;
|
||||
Peclet.write();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -150,10 +150,11 @@ void Foam::Q::write()
|
||||
|
||||
Q = 0.5*(sqr(tr(gradU)) - tr(((gradU) & (gradU))));
|
||||
|
||||
Q.write();
|
||||
Info<< type() << " " << name_ << " output:" << nl
|
||||
<< " writing field " << Q.name() << nl
|
||||
<< endl;
|
||||
|
||||
Info<< type() << " output:" << nl
|
||||
<< " writing " << Q.name() << " field" << nl << endl;
|
||||
Q.write();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -322,6 +322,10 @@ void Foam::pressureTools::write()
|
||||
|
||||
pResult == convertToCoeff(rhoScale(p)*p + pDyn(p) + pRef());
|
||||
|
||||
Info<< type() << " " << name_ << " output:" << nl
|
||||
<< " writing field " << pResult.name() << nl
|
||||
<< endl;
|
||||
|
||||
pResult.write();
|
||||
}
|
||||
}
|
||||
|
||||
@ -234,7 +234,7 @@ void Foam::wallShearStress::write()
|
||||
|
||||
if (log_)
|
||||
{
|
||||
Info<< type() << " output:" << nl;
|
||||
Info<< type() << " " << name_ << " output:" << nl;
|
||||
}
|
||||
|
||||
|
||||
@ -265,7 +265,8 @@ void Foam::wallShearStress::write()
|
||||
|
||||
if (log_)
|
||||
{
|
||||
Info<< endl;
|
||||
Info<< " writing field " << wallShearStress.name() << nl
|
||||
<< endl;
|
||||
}
|
||||
|
||||
wallShearStress.write();
|
||||
|
||||
@ -282,7 +282,7 @@ void Foam::yPlusLES::write()
|
||||
|
||||
if (log_)
|
||||
{
|
||||
Info<< type() << " output:" << nl;
|
||||
Info<< type() << " " << name_ << " output:" << nl;
|
||||
}
|
||||
|
||||
if (phi.dimensions() == dimMass/dimTime)
|
||||
@ -296,7 +296,8 @@ void Foam::yPlusLES::write()
|
||||
|
||||
if (log_)
|
||||
{
|
||||
Info<< endl;
|
||||
Info<< " writing field " << yPlusLES.name() << nl
|
||||
<< endl;
|
||||
}
|
||||
|
||||
yPlusLES.write();
|
||||
|
||||
@ -267,7 +267,7 @@ void Foam::yPlusRAS::write()
|
||||
|
||||
if (log_)
|
||||
{
|
||||
Info<< type() << " output:" << nl;
|
||||
Info<< type() << " " << name_ << " output:" << nl;
|
||||
}
|
||||
|
||||
if (phi.dimensions() == dimMass/dimTime)
|
||||
@ -281,7 +281,8 @@ void Foam::yPlusRAS::write()
|
||||
|
||||
if (log_)
|
||||
{
|
||||
Info<< endl;
|
||||
Info<< " writing field " << yPlusRAS.name() << nl
|
||||
<< endl;
|
||||
}
|
||||
|
||||
yPlusRAS.write();
|
||||
|
||||
@ -157,7 +157,7 @@ inline void Foam::constTransport<Thermo>::operator+=
|
||||
scalar molr2 = st.nMoles()/this->nMoles();
|
||||
|
||||
mu_ = molr1*mu_ + molr2*st.mu_;
|
||||
rPr_ = molr1*rPr_ + molr2*st.rPr_;
|
||||
rPr_ = 1.0/(molr1/rPr_ + molr2/st.rPr_);
|
||||
}
|
||||
|
||||
|
||||
@ -175,7 +175,7 @@ inline void Foam::constTransport<Thermo>::operator-=
|
||||
scalar molr2 = st.nMoles()/this->nMoles();
|
||||
|
||||
mu_ = molr1*mu_ - molr2*st.mu_;
|
||||
rPr_ = molr1*rPr_ - molr2*st.rPr_;
|
||||
rPr_ = 1.0/(molr1/rPr_ - molr2/st.rPr_);
|
||||
}
|
||||
|
||||
|
||||
@ -210,7 +210,7 @@ inline Foam::constTransport<Thermo> Foam::operator+
|
||||
(
|
||||
t,
|
||||
molr1*ct1.mu_ + molr2*ct2.mu_,
|
||||
molr1*ct1.rPr_ + molr2*ct2.rPr_
|
||||
1.0/(molr1/ct1.rPr_ + molr2/ct2.rPr_)
|
||||
);
|
||||
}
|
||||
|
||||
@ -234,7 +234,7 @@ inline Foam::constTransport<Thermo> Foam::operator-
|
||||
(
|
||||
t,
|
||||
molr1*ct1.mu_ - molr2*ct2.mu_,
|
||||
molr1*ct1.rPr_ - molr2*ct2.rPr_
|
||||
1.0/(molr1/ct1.rPr_ - molr2/ct2.rPr_)
|
||||
);
|
||||
}
|
||||
|
||||
@ -250,7 +250,7 @@ inline Foam::constTransport<Thermo> Foam::operator*
|
||||
(
|
||||
s*static_cast<const Thermo&>(ct),
|
||||
ct.mu_,
|
||||
ct.rPr_
|
||||
1.0/ct.rPr_
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ rm -r constant/triSurface/flange.stl.gz > /dev/null 2>&1
|
||||
rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
|
||||
rm -r constant/ccx constant/ccy constant/ccz > /dev/null 2>&1
|
||||
rm -r constant/internalDelaunayVertices constant/targetCellSize > /dev/null 2>&1
|
||||
rm -r 0/ccx 0/ccy 0/ccz > /dev/null 2>&1
|
||||
rm -r 0 > /dev/null 2>&1
|
||||
|
||||
rm -rf constant/backgroundMeshDecomposition/polyMesh/boundary > /dev/null 2>&1
|
||||
rm -rf constant/backgroundMeshDecomposition/polyMesh/faces > /dev/null 2>&1
|
||||
|
||||
@ -7,8 +7,12 @@ cd ${0%/*} || exit 1 # run from this directory
|
||||
# copy flange surface from resources folder
|
||||
cp $FOAM_TUTORIALS/resources/geometry/flange.stl.gz constant/triSurface/
|
||||
|
||||
# Create tight-fitting background mesh
|
||||
runApplication blockMesh
|
||||
cp system/controlDict system/controlDict.org
|
||||
|
||||
sed -e s/"\(endTime[ \t]*\)\([0-9]*\);"/"\1 10;"/g \
|
||||
-e s/"\(writeInterval[ \t]*\)\([0-9]*\);"/"\1 10;"/g \
|
||||
system/controlDict.org > system/controlDict
|
||||
|
||||
runApplication foamyHexMesh
|
||||
|
||||
# Change collapseEdges to only do one iteration
|
||||
@ -19,5 +23,10 @@ system/collapseDict.org > system/collapseDict
|
||||
|
||||
runApplication collapseEdges -latestTime -collapseFaces
|
||||
|
||||
cp system/controlDict.org system/controlDict
|
||||
cp system/collapseDict.org system/collapseDict
|
||||
|
||||
rm -f system/controlDict.org system/collapseDict.org
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-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
|
||||
|
||||
@ -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
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -22,8 +22,7 @@ boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
|
||||
Reference in New Issue
Block a user