mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -27,6 +27,7 @@ Global
|
|||||||
Description
|
Description
|
||||||
Execute the set of functionObjects specified in the selected dictionary
|
Execute the set of functionObjects specified in the selected dictionary
|
||||||
(which defaults to system/controlDict) for the selected set of times.
|
(which defaults to system/controlDict) for the selected set of times.
|
||||||
|
Alternative dictionaries should be placed in the system/ folder.
|
||||||
|
|
||||||
The flow (p-U) and optionally turbulence fields are available for the
|
The flow (p-U) and optionally turbulence fields are available for the
|
||||||
function objects to operate on allowing forces and other related properties
|
function objects to operate on allowing forces and other related properties
|
||||||
@ -144,12 +145,12 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
|
|||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
||||||
singlePhaseTransportModel laminarTransport(U, phi);
|
|
||||||
|
|
||||||
if (RASPropertiesHeader.headerOk())
|
if (RASPropertiesHeader.headerOk())
|
||||||
{
|
{
|
||||||
IOdictionary RASProperties(RASPropertiesHeader);
|
IOdictionary RASProperties(RASPropertiesHeader);
|
||||||
|
|
||||||
|
singlePhaseTransportModel laminarTransport(U, phi);
|
||||||
|
|
||||||
autoPtr<incompressible::RASModel> RASModel
|
autoPtr<incompressible::RASModel> RASModel
|
||||||
(
|
(
|
||||||
incompressible::RASModel::New
|
incompressible::RASModel::New
|
||||||
@ -165,6 +166,8 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
|
|||||||
{
|
{
|
||||||
IOdictionary LESProperties(LESPropertiesHeader);
|
IOdictionary LESProperties(LESPropertiesHeader);
|
||||||
|
|
||||||
|
singlePhaseTransportModel laminarTransport(U, phi);
|
||||||
|
|
||||||
autoPtr<incompressible::LESModel> sgsModel
|
autoPtr<incompressible::LESModel> sgsModel
|
||||||
(
|
(
|
||||||
incompressible::LESModel::New(U, phi, laminarTransport)
|
incompressible::LESModel::New(U, phi, laminarTransport)
|
||||||
|
|||||||
@ -60,7 +60,7 @@ fields
|
|||||||
// midPoint one point per cell, inbetween two face intersections
|
// midPoint one point per cell, inbetween two face intersections
|
||||||
// midPointAndFace combination of face and midPoint
|
// midPointAndFace combination of face and midPoint
|
||||||
//
|
//
|
||||||
// curve specified points, not nessecary on line, uses
|
// polyLine specified points, not nessecary on line, uses
|
||||||
// tracking
|
// tracking
|
||||||
// cloud specified points, uses findCell
|
// cloud specified points, uses findCell
|
||||||
// triSurfaceMeshPointSet points of triSurface
|
// triSurfaceMeshPointSet points of triSurface
|
||||||
@ -75,7 +75,7 @@ fields
|
|||||||
// type specific:
|
// type specific:
|
||||||
// uniform, face, midPoint, midPointAndFace : start and end coordinate
|
// uniform, face, midPoint, midPointAndFace : start and end coordinate
|
||||||
// uniform: extra number of sampling points
|
// uniform: extra number of sampling points
|
||||||
// curve, cloud: list of coordinates
|
// polyLine, cloud: list of coordinates
|
||||||
sets
|
sets
|
||||||
(
|
(
|
||||||
lineX1
|
lineX1
|
||||||
|
|||||||
@ -107,7 +107,7 @@ public:
|
|||||||
return IOdictionary::name();
|
return IOdictionary::name();
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Read the probes
|
//- Read output filter properties
|
||||||
virtual bool read();
|
virtual bool read();
|
||||||
|
|
||||||
//- Sample and write
|
//- Sample and write
|
||||||
|
|||||||
@ -51,7 +51,7 @@ namespace Foam
|
|||||||
class Time;
|
class Time;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class functionObject Declaration
|
Class functionObject Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class functionObject
|
class functionObject
|
||||||
|
|||||||
@ -58,7 +58,7 @@ Foam::scalar Foam::ConeInjection<CloudType>::volumeToInject
|
|||||||
{
|
{
|
||||||
if ((time0 >= 0.0) && (time0 < duration_))
|
if ((time0 >= 0.0) && (time0 < duration_))
|
||||||
{
|
{
|
||||||
return volumeFlowRate_().integrate(time0, time1);
|
return flowRateProfile_().integrate(time0, time1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -85,11 +85,11 @@ Foam::ConeInjection<CloudType>::ConeInjection
|
|||||||
(
|
(
|
||||||
readScalar(this->coeffDict().lookup("parcelsPerSecond"))
|
readScalar(this->coeffDict().lookup("parcelsPerSecond"))
|
||||||
),
|
),
|
||||||
volumeFlowRate_
|
flowRateProfile_
|
||||||
(
|
(
|
||||||
DataEntry<scalar>::New
|
DataEntry<scalar>::New
|
||||||
(
|
(
|
||||||
"volumeFlowRate",
|
"flowRateProfile",
|
||||||
this->coeffDict()
|
this->coeffDict()
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
@ -147,7 +147,7 @@ Foam::ConeInjection<CloudType>::ConeInjection
|
|||||||
tanVec2_ = direction_^tanVec1_;
|
tanVec2_ = direction_^tanVec1_;
|
||||||
|
|
||||||
// Set total volume to inject
|
// Set total volume to inject
|
||||||
this->volumeTotal_ = volumeFlowRate_().integrate(0.0, duration_);
|
this->volumeTotal_ = flowRateProfile_().integrate(0.0, duration_);
|
||||||
|
|
||||||
// Set/cache the injector cell
|
// Set/cache the injector cell
|
||||||
this->findCellAtPosition(injectorCell_, position_);
|
this->findCellAtPosition(injectorCell_, position_);
|
||||||
|
|||||||
@ -83,8 +83,8 @@ class ConeInjection
|
|||||||
//- Number of parcels to introduce per second []
|
//- Number of parcels to introduce per second []
|
||||||
const label parcelsPerSecond_;
|
const label parcelsPerSecond_;
|
||||||
|
|
||||||
//- Volume flow rate of parcels to introduce relative to SOI [m^3]
|
//- Flow rate profile relative to SOI []
|
||||||
const autoPtr<DataEntry<scalar> > volumeFlowRate_;
|
const autoPtr<DataEntry<scalar> > flowRateProfile_;
|
||||||
|
|
||||||
//- Parcel velocity magnitude relative to SOI [m/s]
|
//- Parcel velocity magnitude relative to SOI [m/s]
|
||||||
const autoPtr<DataEntry<scalar> > Umag_;
|
const autoPtr<DataEntry<scalar> > Umag_;
|
||||||
|
|||||||
@ -40,7 +40,7 @@ Foam::label Foam::ConeInjectionMP<CloudType>::parcelsToInject
|
|||||||
{
|
{
|
||||||
if ((time0 >= 0.0) && (time0 < duration_))
|
if ((time0 >= 0.0) && (time0 < duration_))
|
||||||
{
|
{
|
||||||
const scalar targetVolume = volumeFlowRate_().integrate(0, time1);
|
const scalar targetVolume = flowRateProfile_().integrate(0, time1);
|
||||||
|
|
||||||
const label targetParcels =
|
const label targetParcels =
|
||||||
parcelsPerInjector_*targetVolume/this->volumeTotal_;
|
parcelsPerInjector_*targetVolume/this->volumeTotal_;
|
||||||
@ -67,7 +67,7 @@ Foam::scalar Foam::ConeInjectionMP<CloudType>::volumeToInject
|
|||||||
{
|
{
|
||||||
if ((time0 >= 0.0) && (time0 < duration_))
|
if ((time0 >= 0.0) && (time0 < duration_))
|
||||||
{
|
{
|
||||||
return volumeFlowRate_().integrate(time0, time1);
|
return flowRateProfile_().integrate(time0, time1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -116,11 +116,11 @@ Foam::ConeInjectionMP<CloudType>::ConeInjectionMP
|
|||||||
(
|
(
|
||||||
readScalar(this->coeffDict().lookup("parcelsPerInjector"))
|
readScalar(this->coeffDict().lookup("parcelsPerInjector"))
|
||||||
),
|
),
|
||||||
volumeFlowRate_
|
flowRateProfile_
|
||||||
(
|
(
|
||||||
DataEntry<scalar>::New
|
DataEntry<scalar>::New
|
||||||
(
|
(
|
||||||
"volumeFlowRate",
|
"flowRateProfile",
|
||||||
this->coeffDict()
|
this->coeffDict()
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
@ -182,7 +182,7 @@ Foam::ConeInjectionMP<CloudType>::ConeInjectionMP
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set total volume to inject
|
// Set total volume to inject
|
||||||
this->volumeTotal_ = volumeFlowRate_().integrate(0.0, duration_);
|
this->volumeTotal_ = flowRateProfile_().integrate(0.0, duration_);
|
||||||
|
|
||||||
// Set/cache the injector cells
|
// Set/cache the injector cells
|
||||||
forAll(positions_, i)
|
forAll(positions_, i)
|
||||||
|
|||||||
@ -90,8 +90,8 @@ class ConeInjectionMP
|
|||||||
//- Number of parcels to introduce per injector
|
//- Number of parcels to introduce per injector
|
||||||
const label parcelsPerInjector_;
|
const label parcelsPerInjector_;
|
||||||
|
|
||||||
//- Volume flow rate of parcels to introduce relative to SOI [m^3]
|
//- Flow rate profile relative to SOI []
|
||||||
const autoPtr<DataEntry<scalar> > volumeFlowRate_;
|
const autoPtr<DataEntry<scalar> > flowRateProfile_;
|
||||||
|
|
||||||
//- Parcel velocity magnitude relative to SOI [m/s]
|
//- Parcel velocity magnitude relative to SOI [m/s]
|
||||||
const autoPtr<DataEntry<scalar> > Umag_;
|
const autoPtr<DataEntry<scalar> > Umag_;
|
||||||
|
|||||||
@ -56,7 +56,7 @@ Foam::scalar Foam::PatchInjection<CloudType>::volumeToInject
|
|||||||
{
|
{
|
||||||
if ((time0 >= 0.0) && (time0 < duration_))
|
if ((time0 >= 0.0) && (time0 < duration_))
|
||||||
{
|
{
|
||||||
return fraction_*volumeFlowRate_().integrate(time0, time1);
|
return fraction_*flowRateProfile_().integrate(time0, time1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -82,11 +82,11 @@ Foam::PatchInjection<CloudType>::PatchInjection
|
|||||||
readScalar(this->coeffDict().lookup("parcelsPerSecond"))
|
readScalar(this->coeffDict().lookup("parcelsPerSecond"))
|
||||||
),
|
),
|
||||||
U0_(this->coeffDict().lookup("U0")),
|
U0_(this->coeffDict().lookup("U0")),
|
||||||
volumeFlowRate_
|
flowRateProfile_
|
||||||
(
|
(
|
||||||
DataEntry<scalar>::New
|
DataEntry<scalar>::New
|
||||||
(
|
(
|
||||||
"volumeFlowRate",
|
"flowRateProfile",
|
||||||
this->coeffDict()
|
this->coeffDict()
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
@ -127,7 +127,7 @@ Foam::PatchInjection<CloudType>::PatchInjection
|
|||||||
fraction_ = scalar(patchSize)/totalPatchSize;
|
fraction_ = scalar(patchSize)/totalPatchSize;
|
||||||
|
|
||||||
// Set total volume/mass to inject
|
// Set total volume/mass to inject
|
||||||
this->volumeTotal_ = fraction_*volumeFlowRate_().integrate(0.0, duration_);
|
this->volumeTotal_ = fraction_*flowRateProfile_().integrate(0.0, duration_);
|
||||||
this->massTotal_ *= fraction_;
|
this->massTotal_ *= fraction_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -79,8 +79,8 @@ class PatchInjection
|
|||||||
//- Initial parcel velocity [m/s]
|
//- Initial parcel velocity [m/s]
|
||||||
const vector U0_;
|
const vector U0_;
|
||||||
|
|
||||||
//- Volume flow rate of parcels to introduce relative to SOI [m^3/s]
|
//- Flow rate profile relative to SOI []
|
||||||
const autoPtr<DataEntry<scalar> > volumeFlowRate_;
|
const autoPtr<DataEntry<scalar> > flowRateProfile_;
|
||||||
|
|
||||||
//- Parcel size PDF model
|
//- Parcel size PDF model
|
||||||
const autoPtr<pdfs::pdf> parcelPDF_;
|
const autoPtr<pdfs::pdf> parcelPDF_;
|
||||||
|
|||||||
@ -12,6 +12,9 @@ fieldValues/faceSource/faceSourceFunctionObject.C
|
|||||||
fieldValues/cellSource/cellSource.C
|
fieldValues/cellSource/cellSource.C
|
||||||
fieldValues/cellSource/cellSourceFunctionObject.C
|
fieldValues/cellSource/cellSourceFunctionObject.C
|
||||||
|
|
||||||
|
readFields/readFields.C
|
||||||
|
readFields/readFieldsFunctionObject.C
|
||||||
|
|
||||||
streamLine/streamLine.C
|
streamLine/streamLine.C
|
||||||
streamLine/streamLineParticle.C
|
streamLine/streamLineParticle.C
|
||||||
streamLine/streamLineParticleCloud.C
|
streamLine/streamLineParticleCloud.C
|
||||||
|
|||||||
@ -0,0 +1,49 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||||
|
\\/ 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/>.
|
||||||
|
|
||||||
|
Typedef
|
||||||
|
Foam::IOreadFields
|
||||||
|
|
||||||
|
Description
|
||||||
|
Instance of the generic IOOutputFilter for readFields.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef IOreadFields_H
|
||||||
|
#define IOreadFields_H
|
||||||
|
|
||||||
|
#include "readFields.H"
|
||||||
|
#include "IOOutputFilter.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
typedef IOOutputFilter<readFields> IOreadFields;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "system";
|
||||||
|
object postProcessingDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
functions
|
||||||
|
(
|
||||||
|
readFields1
|
||||||
|
{
|
||||||
|
type readFields;
|
||||||
|
functionObjectLibs ("libfieldFunctionObjects.so");
|
||||||
|
enabled true;
|
||||||
|
outputControl timeStep;
|
||||||
|
outputInterval 1;
|
||||||
|
fields
|
||||||
|
(
|
||||||
|
interpolateU
|
||||||
|
);
|
||||||
|
}
|
||||||
|
faceObj2
|
||||||
|
{
|
||||||
|
type faceSource;
|
||||||
|
functionObjectLibs ("libfieldFunctionObjects.so");
|
||||||
|
enabled true;
|
||||||
|
outputControl timeStep;
|
||||||
|
outputInterval 1;
|
||||||
|
log true;
|
||||||
|
valueOutput true;
|
||||||
|
source faceZone;
|
||||||
|
sourceName f0;
|
||||||
|
operation areaAverage;
|
||||||
|
fields
|
||||||
|
(
|
||||||
|
interpolateU
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
116
src/postProcessing/functionObjects/field/readFields/readFields.C
Normal file
116
src/postProcessing/functionObjects/field/readFields/readFields.C
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||||
|
\\/ 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 "readFields.H"
|
||||||
|
#include "dictionary.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(readFields, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::readFields::readFields
|
||||||
|
(
|
||||||
|
const word& name,
|
||||||
|
const objectRegistry& obr,
|
||||||
|
const dictionary& dict,
|
||||||
|
const bool loadFromFiles
|
||||||
|
)
|
||||||
|
:
|
||||||
|
name_(name),
|
||||||
|
obr_(obr),
|
||||||
|
active_(true),
|
||||||
|
fieldSet_()
|
||||||
|
{
|
||||||
|
// Check if the available mesh is an fvMesh otherise deactivate
|
||||||
|
if (!isA<fvMesh>(obr_))
|
||||||
|
{
|
||||||
|
active_ = false;
|
||||||
|
WarningIn
|
||||||
|
(
|
||||||
|
"readFields::readFields"
|
||||||
|
"("
|
||||||
|
"const word&, "
|
||||||
|
"const objectRegistry&, "
|
||||||
|
"const dictionary&, "
|
||||||
|
"const bool"
|
||||||
|
")"
|
||||||
|
) << "No fvMesh available, deactivating."
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
read(dict);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::readFields::~readFields()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void Foam::readFields::read(const dictionary& dict)
|
||||||
|
{
|
||||||
|
if (active_)
|
||||||
|
{
|
||||||
|
dict.lookup("fields") >> fieldSet_;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::readFields::execute()
|
||||||
|
{
|
||||||
|
Info<< type() << " " << name_ << ":" << nl;
|
||||||
|
forAll(fieldSet_, fieldI)
|
||||||
|
{
|
||||||
|
setField<scalar>(fieldSet_[fieldI]);
|
||||||
|
setField<vector>(fieldSet_[fieldI]);
|
||||||
|
setField<sphericalTensor>(fieldSet_[fieldI]);
|
||||||
|
setField<symmTensor>(fieldSet_[fieldI]);
|
||||||
|
setField<tensor>(fieldSet_[fieldI]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::readFields::end()
|
||||||
|
{
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::readFields::write()
|
||||||
|
{
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
154
src/postProcessing/functionObjects/field/readFields/readFields.H
Normal file
154
src/postProcessing/functionObjects/field/readFields/readFields.H
Normal file
@ -0,0 +1,154 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||||
|
\\/ 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::readFields
|
||||||
|
|
||||||
|
Description
|
||||||
|
Reads fields from the time folders and adds them to the mesh database
|
||||||
|
for further post-processing.
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
readFields.C
|
||||||
|
IOreadFields.H
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef readFields_H
|
||||||
|
#define readFields_H
|
||||||
|
|
||||||
|
#include "OFstream.H"
|
||||||
|
#include "pointFieldFwd.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// Forward declaration of classes
|
||||||
|
class objectRegistry;
|
||||||
|
class dictionary;
|
||||||
|
class mapPolyMesh;
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class readFields Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class readFields
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
|
||||||
|
// Protected data
|
||||||
|
|
||||||
|
//- Name of this set of readFields object
|
||||||
|
word name_;
|
||||||
|
|
||||||
|
const objectRegistry& obr_;
|
||||||
|
|
||||||
|
//- on/off switch
|
||||||
|
bool active_;
|
||||||
|
|
||||||
|
//- Fields to assess min/max
|
||||||
|
wordList fieldSet_;
|
||||||
|
|
||||||
|
|
||||||
|
// Protected Member Functions
|
||||||
|
|
||||||
|
//- Disallow default bitwise copy construct
|
||||||
|
readFields(const readFields&);
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const readFields&);
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void setField(const word& fieldName);
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("readFields");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct for given objectRegistry and dictionary.
|
||||||
|
// Allow the possibility to load fields from files
|
||||||
|
readFields
|
||||||
|
(
|
||||||
|
const word& name,
|
||||||
|
const objectRegistry&,
|
||||||
|
const dictionary&,
|
||||||
|
const bool loadFromFiles = false
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~readFields();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
//- Return name of the readFields object
|
||||||
|
virtual const word& name() const
|
||||||
|
{
|
||||||
|
return name_;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Read the field min/max data
|
||||||
|
virtual void read(const dictionary&);
|
||||||
|
|
||||||
|
//- Execute, currently does nothing
|
||||||
|
virtual void execute();
|
||||||
|
|
||||||
|
//- Execute at the final time-loop, currently does nothing
|
||||||
|
virtual void end();
|
||||||
|
|
||||||
|
//- Write
|
||||||
|
virtual void write();
|
||||||
|
|
||||||
|
//- Update for changes of mesh
|
||||||
|
virtual void updateMesh(const mapPolyMesh&)
|
||||||
|
{}
|
||||||
|
|
||||||
|
//- Update for changes of mesh
|
||||||
|
virtual void movePoints(const pointField&)
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#ifdef NoRepository
|
||||||
|
# include "readFieldsTemplates.C"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,42 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||||
|
\\/ 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 "readFieldsFunctionObject.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
defineNamedTemplateTypeNameAndDebug(readFieldsFunctionObject, 0);
|
||||||
|
|
||||||
|
addToRunTimeSelectionTable
|
||||||
|
(
|
||||||
|
functionObject,
|
||||||
|
readFieldsFunctionObject,
|
||||||
|
dictionary
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,54 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||||
|
\\/ 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/>.
|
||||||
|
|
||||||
|
Typedef
|
||||||
|
Foam::readFieldsFunctionObject
|
||||||
|
|
||||||
|
Description
|
||||||
|
FunctionObject wrapper around readFields to allow them to be created via
|
||||||
|
the functions entry within controlDict.
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
readFieldsFunctionObject.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef readFieldsFunctionObject_H
|
||||||
|
#define readFieldsFunctionObject_H
|
||||||
|
|
||||||
|
#include "readFields.H"
|
||||||
|
#include "OutputFilterFunctionObject.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
typedef OutputFilterFunctionObject<readFields>
|
||||||
|
readFieldsFunctionObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,94 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||||
|
\\/ 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 "readFields.H"
|
||||||
|
#include "volFields.H"
|
||||||
|
#include "surfaceFields.H"
|
||||||
|
#include "Time.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void Foam::readFields::setField(const word& fieldName)
|
||||||
|
{
|
||||||
|
typedef GeometricField<Type, fvPatchField, volMesh> vfType;
|
||||||
|
typedef GeometricField<Type, fvsPatchField, surfaceMesh> sfType;
|
||||||
|
|
||||||
|
if (obr_.foundObject<vfType>(fieldName))
|
||||||
|
{
|
||||||
|
if (debug)
|
||||||
|
{
|
||||||
|
Info<< "Field " << fieldName << " already in database" << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
vfType& vf = const_cast<vfType&>(obr_.lookupObject<vfType>(fieldName));
|
||||||
|
vf.checkOut();
|
||||||
|
}
|
||||||
|
if (obr_.foundObject<sfType>(fieldName))
|
||||||
|
{
|
||||||
|
if (debug)
|
||||||
|
{
|
||||||
|
Info<< "Field " << fieldName << " already in database" << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
sfType& sf = const_cast<sfType&>(obr_.lookupObject<sfType>(fieldName));
|
||||||
|
sf.checkOut();
|
||||||
|
}
|
||||||
|
|
||||||
|
const fvMesh& mesh = refCast<const fvMesh>(obr_);
|
||||||
|
|
||||||
|
IOobject fieldHeader
|
||||||
|
(
|
||||||
|
fieldName,
|
||||||
|
mesh.time().timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
);
|
||||||
|
|
||||||
|
if
|
||||||
|
(
|
||||||
|
fieldHeader.headerOk()
|
||||||
|
&& fieldHeader.headerClassName() == vfType::typeName
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// store field on the mesh database
|
||||||
|
Info<< " Reading " << fieldName << endl;
|
||||||
|
obr_.store(new vfType(fieldHeader, mesh));
|
||||||
|
}
|
||||||
|
else if
|
||||||
|
(
|
||||||
|
fieldHeader.headerOk()
|
||||||
|
&& fieldHeader.headerClassName() == sfType::typeName
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// store field on the mesh database
|
||||||
|
Info<< " Reading " << fieldName << endl;
|
||||||
|
obr_.store(new sfType(fieldHeader, mesh));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -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) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -68,10 +68,10 @@ int main(int argc, char *argv[])
|
|||||||
"dictionary name"
|
"dictionary name"
|
||||||
);
|
);
|
||||||
|
|
||||||
# include "setRootCase.H"
|
#include "setRootCase.H"
|
||||||
# include "createTime.H"
|
#include "createTime.H"
|
||||||
Foam::instantList timeDirs = Foam::timeSelector::select0(runTime, args);
|
Foam::instantList timeDirs = Foam::timeSelector::select0(runTime, args);
|
||||||
# include "createMesh.H"
|
#include "createMesh.H"
|
||||||
|
|
||||||
forAll(timeDirs, timeI)
|
forAll(timeDirs, timeI)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -4,7 +4,7 @@ probes/probesFunctionObject/probesFunctionObject.C
|
|||||||
|
|
||||||
sampledSet/cloud/cloudSet.C
|
sampledSet/cloud/cloudSet.C
|
||||||
sampledSet/coordSet/coordSet.C
|
sampledSet/coordSet/coordSet.C
|
||||||
sampledSet/curve/curveSet.C
|
sampledSet/polyLine/polyLineSet.C
|
||||||
sampledSet/face/faceOnlySet.C
|
sampledSet/face/faceOnlySet.C
|
||||||
sampledSet/midPoint/midPointSet.C
|
sampledSet/midPoint/midPointSet.C
|
||||||
sampledSet/midPointAndFace/midPointAndFaceSet.C
|
sampledSet/midPointAndFace/midPointAndFaceSet.C
|
||||||
|
|||||||
@ -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) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -23,7 +23,7 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "curveSet.H"
|
#include "polyLineSet.H"
|
||||||
#include "meshSearch.H"
|
#include "meshSearch.H"
|
||||||
#include "DynamicList.H"
|
#include "DynamicList.H"
|
||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
@ -38,15 +38,15 @@ License
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(curveSet, 0);
|
defineTypeNameAndDebug(polyLineSet, 0);
|
||||||
addToRunTimeSelectionTable(sampledSet, curveSet, word);
|
addToRunTimeSelectionTable(sampledSet, polyLineSet, word);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
// Sample till hits boundary.
|
// Sample till hits boundary.
|
||||||
bool Foam::curveSet::trackToBoundary
|
bool Foam::polyLineSet::trackToBoundary
|
||||||
(
|
(
|
||||||
Particle<passiveParticle>& singleParticle,
|
Particle<passiveParticle>& singleParticle,
|
||||||
label& sampleI,
|
label& sampleI,
|
||||||
@ -127,7 +127,7 @@ bool Foam::curveSet::trackToBoundary
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::curveSet::calcSamples
|
void Foam::polyLineSet::calcSamples
|
||||||
(
|
(
|
||||||
DynamicList<point>& samplingPts,
|
DynamicList<point>& samplingPts,
|
||||||
DynamicList<label>& samplingCells,
|
DynamicList<label>& samplingCells,
|
||||||
@ -139,7 +139,7 @@ void Foam::curveSet::calcSamples
|
|||||||
// Check sampling points
|
// Check sampling points
|
||||||
if (sampleCoords_.size() < 2)
|
if (sampleCoords_.size() < 2)
|
||||||
{
|
{
|
||||||
FatalErrorIn("curveSet::calcSamples()")
|
FatalErrorIn("polyLineSet::calcSamples()")
|
||||||
<< "Incorrect sample specification. Too few points:"
|
<< "Incorrect sample specification. Too few points:"
|
||||||
<< sampleCoords_ << exit(FatalError);
|
<< sampleCoords_ << exit(FatalError);
|
||||||
}
|
}
|
||||||
@ -148,7 +148,7 @@ void Foam::curveSet::calcSamples
|
|||||||
{
|
{
|
||||||
if (mag(sampleCoords_[sampleI] - oldPoint) < SMALL)
|
if (mag(sampleCoords_[sampleI] - oldPoint) < SMALL)
|
||||||
{
|
{
|
||||||
FatalErrorIn("curveSet::calcSamples()")
|
FatalErrorIn("polyLineSet::calcSamples()")
|
||||||
<< "Incorrect sample specification."
|
<< "Incorrect sample specification."
|
||||||
<< " Point " << sampleCoords_[sampleI-1]
|
<< " Point " << sampleCoords_[sampleI-1]
|
||||||
<< " at position " << sampleI-1
|
<< " at position " << sampleI-1
|
||||||
@ -310,7 +310,7 @@ void Foam::curveSet::calcSamples
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::curveSet::genSamples()
|
void Foam::polyLineSet::genSamples()
|
||||||
{
|
{
|
||||||
// Storage for sample points
|
// Storage for sample points
|
||||||
DynamicList<point> samplingPts;
|
DynamicList<point> samplingPts;
|
||||||
@ -347,7 +347,7 @@ void Foam::curveSet::genSamples()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::curveSet::curveSet
|
Foam::polyLineSet::polyLineSet
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
@ -368,7 +368,7 @@ Foam::curveSet::curveSet
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::curveSet::curveSet
|
Foam::polyLineSet::polyLineSet
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
@ -390,13 +390,13 @@ Foam::curveSet::curveSet
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::curveSet::~curveSet()
|
Foam::polyLineSet::~polyLineSet()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::point Foam::curveSet::getRefPoint(const List<point>& pts) const
|
Foam::point Foam::polyLineSet::getRefPoint(const List<point>& pts) const
|
||||||
{
|
{
|
||||||
if (pts.size())
|
if (pts.size())
|
||||||
{
|
{
|
||||||
@ -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) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -22,17 +22,18 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::curveSet
|
Foam::polyLineSet
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
Sample along poly line defined by a list of points (knots)
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
curveSet.C
|
polyLineSet.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef curveSet_H
|
#ifndef polyLineSet_H
|
||||||
#define curveSet_H
|
#define polyLineSet_H
|
||||||
|
|
||||||
#include "sampledSet.H"
|
#include "sampledSet.H"
|
||||||
#include "DynamicList.H"
|
#include "DynamicList.H"
|
||||||
@ -47,10 +48,10 @@ class passiveParticle;
|
|||||||
template<class Type> class Particle;
|
template<class Type> class Particle;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class curveSet Declaration
|
Class polyLineSet Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class curveSet
|
class polyLineSet
|
||||||
:
|
:
|
||||||
public sampledSet
|
public sampledSet
|
||||||
{
|
{
|
||||||
@ -93,13 +94,13 @@ class curveSet
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("curve");
|
TypeName("polyLine");
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
curveSet
|
polyLineSet
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
@ -109,7 +110,7 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from dictionary
|
//- Construct from dictionary
|
||||||
curveSet
|
polyLineSet
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
@ -119,8 +120,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
|
virtual ~polyLineSet();
|
||||||
virtual ~curveSet();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
@ -98,7 +98,7 @@ PatchInjectionCoeffs
|
|||||||
duration 10000;
|
duration 10000;
|
||||||
parcelsPerSecond 1e5;
|
parcelsPerSecond 1e5;
|
||||||
U0 (40 0 0);
|
U0 (40 0 0);
|
||||||
volumeFlowRate constant 1;
|
flowRateProfile constant 1;
|
||||||
parcelPDF
|
parcelPDF
|
||||||
{
|
{
|
||||||
pdfType general;
|
pdfType general;
|
||||||
|
|||||||
@ -86,7 +86,7 @@ ConeInjectionCoeffs
|
|||||||
position ( 0.25 0.25 0.05 );
|
position ( 0.25 0.25 0.05 );
|
||||||
direction ( 0 -1 0 );
|
direction ( 0 -1 0 );
|
||||||
parcelsPerSecond 10000;
|
parcelsPerSecond 10000;
|
||||||
volumeFlowRate Constant 0.01;
|
flowRateProfile Constant 0.01;
|
||||||
Umag Constant 50;
|
Umag Constant 50;
|
||||||
thetaInner Constant 0;
|
thetaInner Constant 0;
|
||||||
thetaOuter Constant 30;
|
thetaOuter Constant 30;
|
||||||
|
|||||||
Reference in New Issue
Block a user