mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
Change field loop index from "fieldI" to "fieldi"
This commit is contained in:
@ -33,7 +33,7 @@ void Foam::addToFieldList
|
||||
(
|
||||
PtrList<GeoField>& fieldList,
|
||||
const IOobject& obj,
|
||||
const label fieldI,
|
||||
const label fieldi,
|
||||
const typename GeoField::Mesh& mesh
|
||||
)
|
||||
{
|
||||
@ -41,7 +41,7 @@ void Foam::addToFieldList
|
||||
{
|
||||
fieldList.set
|
||||
(
|
||||
fieldI,
|
||||
fieldi,
|
||||
new GeoField(obj, mesh)
|
||||
);
|
||||
Info<< " " << GeoField::typeName << tab << obj.name() << endl;
|
||||
@ -56,14 +56,14 @@ void Foam::outputFieldList
|
||||
const label patchi
|
||||
)
|
||||
{
|
||||
forAll(fieldList, fieldI)
|
||||
forAll(fieldList, fieldi)
|
||||
{
|
||||
if (fieldList.set(fieldI))
|
||||
if (fieldList.set(fieldi))
|
||||
{
|
||||
Info<< " " << pTraits<typename GeoField::value_type>::typeName
|
||||
<< tab << tab
|
||||
<< fieldList[fieldI].name() << tab << tab
|
||||
<< fieldList[fieldI].boundaryField()[patchi].type() << nl;
|
||||
<< fieldList[fieldi].name() << tab << tab
|
||||
<< fieldList[fieldi].boundaryField()[patchi].type() << nl;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -77,14 +77,14 @@ void Foam::collectFieldList
|
||||
HashTable<word>& fieldToType
|
||||
)
|
||||
{
|
||||
forAll(fieldList, fieldI)
|
||||
forAll(fieldList, fieldi)
|
||||
{
|
||||
if (fieldList.set(fieldI))
|
||||
if (fieldList.set(fieldi))
|
||||
{
|
||||
fieldToType.insert
|
||||
(
|
||||
fieldList[fieldI].name(),
|
||||
fieldList[fieldI].boundaryField()[patchi].type()
|
||||
fieldList[fieldi].name(),
|
||||
fieldList[fieldi].boundaryField()[patchi].type()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -38,7 +38,7 @@ namespace Foam
|
||||
(
|
||||
PtrList<GeoField>& fieldList,
|
||||
const IOobject& obj,
|
||||
const label fieldI,
|
||||
const label fieldi,
|
||||
const typename GeoField::Mesh& mesh
|
||||
);
|
||||
|
||||
|
||||
@ -65,9 +65,9 @@ void Foam::dimFieldDecomposer::decomposeFields
|
||||
const PtrList<GeoField>& fields
|
||||
) const
|
||||
{
|
||||
forAll(fields, fieldI)
|
||||
forAll(fields, fieldi)
|
||||
{
|
||||
decomposeField(fields[fieldI])().write();
|
||||
decomposeField(fields[fieldi])().write();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -190,9 +190,9 @@ void Foam::lagrangianFieldDecomposer::decomposeFields
|
||||
{
|
||||
if (particleIndices_.size())
|
||||
{
|
||||
forAll(fields, fieldI)
|
||||
forAll(fields, fieldi)
|
||||
{
|
||||
decomposeField(cloudName, fields[fieldI])().write();
|
||||
decomposeField(cloudName, fields[fieldi])().write();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -207,9 +207,9 @@ void Foam::lagrangianFieldDecomposer::decomposeFieldFields
|
||||
{
|
||||
if (particleIndices_.size())
|
||||
{
|
||||
forAll(fields, fieldI)
|
||||
forAll(fields, fieldi)
|
||||
{
|
||||
decomposeFieldField(cloudName, fields[fieldI])().write();
|
||||
decomposeFieldField(cloudName, fields[fieldi])().write();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -101,9 +101,9 @@ void Foam::pointFieldDecomposer::decomposeFields
|
||||
const PtrList<GeoField>& fields
|
||||
) const
|
||||
{
|
||||
forAll(fields, fieldI)
|
||||
forAll(fields, fieldi)
|
||||
{
|
||||
decomposeField(fields[fieldI])().write();
|
||||
decomposeField(fields[fieldi])().write();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -48,12 +48,12 @@ void Foam::readFields
|
||||
// Construct the fields
|
||||
fields.setSize(fieldObjects.size());
|
||||
|
||||
label fieldI = 0;
|
||||
label fieldi = 0;
|
||||
forAllIter(IOobjectList, fieldObjects, iter)
|
||||
{
|
||||
fields.set
|
||||
(
|
||||
fieldI++,
|
||||
fieldi++,
|
||||
new GeoField(*iter(), mesh)
|
||||
);
|
||||
}
|
||||
|
||||
@ -34,9 +34,9 @@ void Foam::patchWriter::write
|
||||
const PtrList<GeometricField<Type, fvPatchField, volMesh>>& flds
|
||||
)
|
||||
{
|
||||
forAll(flds, fieldI)
|
||||
forAll(flds, fieldi)
|
||||
{
|
||||
const GeometricField<Type, fvPatchField, volMesh>& fld = flds[fieldI];
|
||||
const GeometricField<Type, fvPatchField, volMesh>& fld = flds[fieldi];
|
||||
|
||||
os_ << fld.name() << ' ' << pTraits<Type>::nComponents << ' '
|
||||
<< nFaces_ << " float" << std::endl;
|
||||
@ -69,10 +69,10 @@ void Foam::patchWriter::write
|
||||
const PtrList<GeometricField<Type, pointPatchField, pointMesh>>& flds
|
||||
)
|
||||
{
|
||||
forAll(flds, fieldI)
|
||||
forAll(flds, fieldi)
|
||||
{
|
||||
const GeometricField<Type, pointPatchField, pointMesh>& fld =
|
||||
flds[fieldI];
|
||||
flds[fieldi];
|
||||
|
||||
os_ << fld.name() << ' ' << pTraits<Type>::nComponents << ' '
|
||||
<< nPoints_ << " float" << std::endl;
|
||||
@ -99,9 +99,9 @@ void Foam::patchWriter::write
|
||||
const PtrList<GeometricField<Type, fvPatchField, volMesh>>& flds
|
||||
)
|
||||
{
|
||||
forAll(flds, fieldI)
|
||||
forAll(flds, fieldi)
|
||||
{
|
||||
const GeometricField<Type, fvPatchField, volMesh>& fld = flds[fieldI];
|
||||
const GeometricField<Type, fvPatchField, volMesh>& fld = flds[fieldi];
|
||||
|
||||
os_ << fld.name() << ' ' << pTraits<Type>::nComponents << ' '
|
||||
<< nPoints_ << " float" << std::endl;
|
||||
|
||||
@ -66,10 +66,10 @@ void Foam::surfaceMeshWriter::write
|
||||
const PtrList<GeometricField<Type, fvsPatchField, surfaceMesh>>& sflds
|
||||
)
|
||||
{
|
||||
forAll(sflds, fieldI)
|
||||
forAll(sflds, fieldi)
|
||||
{
|
||||
const GeometricField<Type, fvsPatchField, surfaceMesh>& fld =
|
||||
sflds[fieldI];
|
||||
sflds[fieldi];
|
||||
|
||||
os_ << fld.name() << ' ' << pTraits<Type>::nComponents << ' '
|
||||
<< pp_.size() << " float" << std::endl;
|
||||
|
||||
@ -75,9 +75,9 @@ void writeSurfFields
|
||||
<< "FIELD attributes " << surfVectorFields.size() << std::endl;
|
||||
|
||||
// surfVectorFields
|
||||
forAll(surfVectorFields, fieldI)
|
||||
forAll(surfVectorFields, fieldi)
|
||||
{
|
||||
const surfaceVectorField& svf = surfVectorFields[fieldI];
|
||||
const surfaceVectorField& svf = surfVectorFields[fieldi];
|
||||
|
||||
str << svf.name() << " 3 "
|
||||
<< mesh.nFaces() << " float" << std::endl;
|
||||
|
||||
@ -116,17 +116,17 @@ void writeVTKFields
|
||||
{
|
||||
label step = max(floor(8/pTraits<Type>::nComponents), 1);
|
||||
|
||||
forAll(values, fieldI)
|
||||
forAll(values, fieldi)
|
||||
{
|
||||
Info<< " writing field " << fieldNames[fieldI] << endl;
|
||||
os << nl << fieldNames[fieldI] << ' ' << pTraits<Type>::nComponents
|
||||
<< ' ' << values[fieldI].size() << " float" << nl;
|
||||
Info<< " writing field " << fieldNames[fieldi] << endl;
|
||||
os << nl << fieldNames[fieldi] << ' ' << pTraits<Type>::nComponents
|
||||
<< ' ' << values[fieldi].size() << " float" << nl;
|
||||
label offset = 0;
|
||||
forAll(addr, trackI)
|
||||
{
|
||||
const List<label> ids(addr[trackI]);
|
||||
|
||||
List<Type> data(UIndirectList<Type>(values[fieldI], ids));
|
||||
List<Type> data(UIndirectList<Type>(values[fieldi], ids));
|
||||
label nData = data.size() - 1;
|
||||
forAll(data, i)
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -147,7 +147,7 @@ void ${typeName}FvOption${SourceType}::correct
|
||||
void ${typeName}FvOption${SourceType}::addSup
|
||||
(
|
||||
fvMatrix<${TemplateType}>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
if (${verbose:-false})
|
||||
@ -165,7 +165,7 @@ void ${typeName}FvOption${SourceType}::addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<${TemplateType}>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
if (${verbose:-false})
|
||||
@ -182,7 +182,7 @@ void ${typeName}FvOption${SourceType}::addSup
|
||||
void ${typeName}FvOption${SourceType}::setValue
|
||||
(
|
||||
fvMatrix<${TemplateType}>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
if (${verbose:-false})
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -33,13 +33,13 @@ Description
|
||||
codeAddSup
|
||||
(
|
||||
fvMatrix<Type}>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
|
||||
setValue
|
||||
(
|
||||
fvMatrix<Type}>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
|
||||
where :
|
||||
@ -159,7 +159,7 @@ public:
|
||||
virtual void addSup
|
||||
(
|
||||
fvMatrix<${TemplateType}>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
//- Explicit and implicit matrix contributions for compressible
|
||||
@ -168,14 +168,14 @@ public:
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<${TemplateType}>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
//- Set value
|
||||
virtual void setValue
|
||||
(
|
||||
fvMatrix<${TemplateType}>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@ -103,7 +103,7 @@ Foam::tmp<GeoField> Foam::uniformInterpolate
|
||||
(
|
||||
times[i]
|
||||
);
|
||||
const GeoField& fieldI = timeIFields.lookupObject
|
||||
const GeoField& fieldi = timeIFields.lookupObject
|
||||
<
|
||||
const GeoField
|
||||
>
|
||||
@ -111,7 +111,7 @@ Foam::tmp<GeoField> Foam::uniformInterpolate
|
||||
fieldName
|
||||
);
|
||||
|
||||
fld += weights[i]*fieldI;
|
||||
fld += weights[i]*fieldi;
|
||||
}
|
||||
|
||||
return tfld;
|
||||
|
||||
@ -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-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -45,12 +45,12 @@ void Foam::jplotGraph::write(const graph& g, Ostream& os) const
|
||||
os << "# JPlot file" << nl
|
||||
<< "# column 1: " << g.xName() << endl;
|
||||
|
||||
label fieldI = 0;
|
||||
label fieldi = 0;
|
||||
|
||||
forAllConstIter(graph, g, iter)
|
||||
{
|
||||
os << "# column " << fieldI + 2 << ": " << (*iter()).name() << endl;
|
||||
fieldI++;
|
||||
os << "# column " << fieldi + 2 << ": " << (*iter()).name() << endl;
|
||||
fieldi++;
|
||||
}
|
||||
|
||||
g.writeTable(os);
|
||||
|
||||
@ -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-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -46,20 +46,20 @@ void Foam::xmgrGraph::write(const graph& g, Ostream& os) const
|
||||
<< "@xaxis label " << g.xName() << nl
|
||||
<< "@yaxis label " << g.yName() << endl;
|
||||
|
||||
label fieldI = 0;
|
||||
label fieldi = 0;
|
||||
|
||||
forAllConstIter(graph, g, iter)
|
||||
{
|
||||
os << "@s" << fieldI << " legend "
|
||||
os << "@s" << fieldi << " legend "
|
||||
<< iter()->name() << nl
|
||||
<< "@target G0.S" << fieldI << nl
|
||||
<< "@target G0.S" << fieldi << nl
|
||||
<< "@type xy" << endl;
|
||||
|
||||
writeXY(g.x(), *iter(), os);
|
||||
|
||||
os << endl;
|
||||
|
||||
fieldI++;
|
||||
fieldi++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -108,7 +108,7 @@ void Foam::fvMeshDistribute::mapBoundaryFields
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
label fieldI = 0;
|
||||
label fieldi = 0;
|
||||
|
||||
forAllIter(typename HashTable<fldType*>, flds, iter)
|
||||
{
|
||||
@ -116,7 +116,7 @@ void Foam::fvMeshDistribute::mapBoundaryFields
|
||||
typename fldType::Boundary& bfld =
|
||||
fld.boundaryFieldRef();
|
||||
|
||||
const FieldField<fvsPatchField, T>& oldBfld = oldBflds[fieldI++];
|
||||
const FieldField<fvsPatchField, T>& oldBfld = oldBflds[fieldi++];
|
||||
|
||||
// Pull from old boundary field into bfld.
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -126,7 +126,7 @@ void Foam::fv::option::checkApplied() const
|
||||
void Foam::fv::option::addSup
|
||||
(
|
||||
fvMatrix<scalar>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{}
|
||||
|
||||
@ -134,7 +134,7 @@ void Foam::fv::option::addSup
|
||||
void Foam::fv::option::addSup
|
||||
(
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{}
|
||||
|
||||
@ -142,7 +142,7 @@ void Foam::fv::option::addSup
|
||||
void Foam::fv::option::addSup
|
||||
(
|
||||
fvMatrix<sphericalTensor>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{}
|
||||
|
||||
@ -150,7 +150,7 @@ void Foam::fv::option::addSup
|
||||
void Foam::fv::option::addSup
|
||||
(
|
||||
fvMatrix<symmTensor>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{}
|
||||
|
||||
@ -158,7 +158,7 @@ void Foam::fv::option::addSup
|
||||
void Foam::fv::option::addSup
|
||||
(
|
||||
fvMatrix<tensor>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{}
|
||||
|
||||
@ -167,7 +167,7 @@ void Foam::fv::option::addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<scalar>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{}
|
||||
|
||||
@ -176,7 +176,7 @@ void Foam::fv::option::addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{}
|
||||
|
||||
@ -185,7 +185,7 @@ void Foam::fv::option::addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<sphericalTensor>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{}
|
||||
|
||||
@ -194,7 +194,7 @@ void Foam::fv::option::addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<symmTensor>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{}
|
||||
|
||||
@ -203,7 +203,7 @@ void Foam::fv::option::addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<tensor>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{}
|
||||
|
||||
@ -213,10 +213,10 @@ void Foam::fv::option::addSup
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& rho,
|
||||
fvMatrix<scalar>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
addSup(alpha*rho, eqn, fieldI);
|
||||
addSup(alpha*rho, eqn, fieldi);
|
||||
}
|
||||
|
||||
|
||||
@ -225,10 +225,10 @@ void Foam::fv::option::addSup
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& rho,
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
addSup(alpha*rho, eqn, fieldI);
|
||||
addSup(alpha*rho, eqn, fieldi);
|
||||
}
|
||||
|
||||
|
||||
@ -237,10 +237,10 @@ void Foam::fv::option::addSup
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& rho,
|
||||
fvMatrix<sphericalTensor>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
addSup(alpha*rho, eqn, fieldI);
|
||||
addSup(alpha*rho, eqn, fieldi);
|
||||
}
|
||||
|
||||
|
||||
@ -249,10 +249,10 @@ void Foam::fv::option::addSup
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& rho,
|
||||
fvMatrix<symmTensor>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
addSup(alpha*rho, eqn, fieldI);
|
||||
addSup(alpha*rho, eqn, fieldi);
|
||||
}
|
||||
|
||||
|
||||
@ -261,25 +261,25 @@ void Foam::fv::option::addSup
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& rho,
|
||||
fvMatrix<tensor>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
addSup(alpha*rho, eqn, fieldI);
|
||||
addSup(alpha*rho, eqn, fieldi);
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::option::constrain(fvMatrix<scalar>& eqn, const label fieldI)
|
||||
void Foam::fv::option::constrain(fvMatrix<scalar>& eqn, const label fieldi)
|
||||
{}
|
||||
|
||||
|
||||
void Foam::fv::option::constrain(fvMatrix<vector>& eqn, const label fieldI)
|
||||
void Foam::fv::option::constrain(fvMatrix<vector>& eqn, const label fieldi)
|
||||
{}
|
||||
|
||||
|
||||
void Foam::fv::option::constrain
|
||||
(
|
||||
fvMatrix<sphericalTensor>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{}
|
||||
|
||||
@ -287,12 +287,12 @@ void Foam::fv::option::constrain
|
||||
void Foam::fv::option::constrain
|
||||
(
|
||||
fvMatrix<symmTensor>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
void Foam::fv::option::constrain(fvMatrix<tensor>& eqn, const label fieldI)
|
||||
void Foam::fv::option::constrain(fvMatrix<tensor>& eqn, const label fieldi)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -201,8 +201,8 @@ public:
|
||||
//- Return const access to the source active flag
|
||||
inline bool active() const;
|
||||
|
||||
//- Set the applied flag to true for field index fieldI
|
||||
inline void setApplied(const label fieldI);
|
||||
//- Set the applied flag to true for field index fieldi
|
||||
inline void setApplied(const label fieldi);
|
||||
|
||||
|
||||
// Edit
|
||||
@ -230,31 +230,31 @@ public:
|
||||
virtual void addSup
|
||||
(
|
||||
fvMatrix<scalar>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
virtual void addSup
|
||||
(
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
virtual void addSup
|
||||
(
|
||||
fvMatrix<symmTensor>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
virtual void addSup
|
||||
(
|
||||
fvMatrix<sphericalTensor>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
virtual void addSup
|
||||
(
|
||||
fvMatrix<tensor>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
|
||||
@ -264,35 +264,35 @@ public:
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<scalar>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
virtual void addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
virtual void addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<symmTensor>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
virtual void addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<sphericalTensor>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
virtual void addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<tensor>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
|
||||
@ -303,7 +303,7 @@ public:
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& rho,
|
||||
fvMatrix<scalar>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
virtual void addSup
|
||||
@ -311,7 +311,7 @@ public:
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& rho,
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
virtual void addSup
|
||||
@ -319,7 +319,7 @@ public:
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& rho,
|
||||
fvMatrix<symmTensor>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
virtual void addSup
|
||||
@ -327,7 +327,7 @@ public:
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& rho,
|
||||
fvMatrix<sphericalTensor>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
virtual void addSup
|
||||
@ -335,7 +335,7 @@ public:
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& rho,
|
||||
fvMatrix<tensor>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
|
||||
@ -344,31 +344,31 @@ public:
|
||||
virtual void constrain
|
||||
(
|
||||
fvMatrix<scalar>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
virtual void constrain
|
||||
(
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
virtual void constrain
|
||||
(
|
||||
fvMatrix<sphericalTensor>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
virtual void constrain
|
||||
(
|
||||
fvMatrix<symmTensor>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
virtual void constrain
|
||||
(
|
||||
fvMatrix<tensor>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -49,9 +49,9 @@ inline bool Foam::fv::option::active() const
|
||||
}
|
||||
|
||||
|
||||
inline void Foam::fv::option::setApplied(const label fieldI)
|
||||
inline void Foam::fv::option::setApplied(const label fieldi)
|
||||
{
|
||||
applied_[fieldI] = true;
|
||||
applied_[fieldi] = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -53,11 +53,11 @@ Foam::tmp<Foam::fvMatrix<Type>> Foam::fv::optionList::operator()
|
||||
{
|
||||
option& source = this->operator[](i);
|
||||
|
||||
label fieldI = source.applyToField(fieldName);
|
||||
label fieldi = source.applyToField(fieldName);
|
||||
|
||||
if (fieldI != -1)
|
||||
if (fieldi != -1)
|
||||
{
|
||||
source.setApplied(fieldI);
|
||||
source.setApplied(fieldi);
|
||||
|
||||
if (source.isActive())
|
||||
{
|
||||
@ -67,7 +67,7 @@ Foam::tmp<Foam::fvMatrix<Type>> Foam::fv::optionList::operator()
|
||||
<< fieldName << endl;
|
||||
}
|
||||
|
||||
source.addSup(mtx, fieldI);
|
||||
source.addSup(mtx, fieldi);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -109,11 +109,11 @@ Foam::tmp<Foam::fvMatrix<Type>> Foam::fv::optionList::operator()
|
||||
{
|
||||
option& source = this->operator[](i);
|
||||
|
||||
label fieldI = source.applyToField(fieldName);
|
||||
label fieldi = source.applyToField(fieldName);
|
||||
|
||||
if (fieldI != -1)
|
||||
if (fieldi != -1)
|
||||
{
|
||||
source.setApplied(fieldI);
|
||||
source.setApplied(fieldi);
|
||||
|
||||
if (source.isActive())
|
||||
{
|
||||
@ -123,7 +123,7 @@ Foam::tmp<Foam::fvMatrix<Type>> Foam::fv::optionList::operator()
|
||||
<< fieldName << endl;
|
||||
}
|
||||
|
||||
source.addSup(rho, mtx, fieldI);
|
||||
source.addSup(rho, mtx, fieldi);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -168,11 +168,11 @@ Foam::tmp<Foam::fvMatrix<Type>> Foam::fv::optionList::operator()
|
||||
{
|
||||
option& source = this->operator[](i);
|
||||
|
||||
label fieldI = source.applyToField(fieldName);
|
||||
label fieldi = source.applyToField(fieldName);
|
||||
|
||||
if (fieldI != -1)
|
||||
if (fieldi != -1)
|
||||
{
|
||||
source.setApplied(fieldI);
|
||||
source.setApplied(fieldi);
|
||||
|
||||
if (source.isActive())
|
||||
{
|
||||
@ -182,7 +182,7 @@ Foam::tmp<Foam::fvMatrix<Type>> Foam::fv::optionList::operator()
|
||||
<< fieldName << endl;
|
||||
}
|
||||
|
||||
source.addSup(alpha, rho, mtx, fieldI);
|
||||
source.addSup(alpha, rho, mtx, fieldi);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -251,11 +251,11 @@ void Foam::fv::optionList::constrain(fvMatrix<Type>& eqn)
|
||||
{
|
||||
option& source = this->operator[](i);
|
||||
|
||||
label fieldI = source.applyToField(eqn.psi().name());
|
||||
label fieldi = source.applyToField(eqn.psi().name());
|
||||
|
||||
if (fieldI != -1)
|
||||
if (fieldi != -1)
|
||||
{
|
||||
source.setApplied(fieldI);
|
||||
source.setApplied(fieldi);
|
||||
|
||||
if (source.isActive())
|
||||
{
|
||||
@ -265,7 +265,7 @@ void Foam::fv::optionList::constrain(fvMatrix<Type>& eqn)
|
||||
<< " to field " << eqn.psi().name() << endl;
|
||||
}
|
||||
|
||||
source.constrain(eqn, fieldI);
|
||||
source.constrain(eqn, fieldi);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -284,11 +284,11 @@ void Foam::fv::optionList::correct
|
||||
{
|
||||
option& source = this->operator[](i);
|
||||
|
||||
label fieldI = source.applyToField(fieldName);
|
||||
label fieldi = source.applyToField(fieldName);
|
||||
|
||||
if (fieldI != -1)
|
||||
if (fieldi != -1)
|
||||
{
|
||||
source.setApplied(fieldI);
|
||||
source.setApplied(fieldi);
|
||||
|
||||
if (source.isActive())
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -67,8 +67,8 @@ bool Foam::pimpleControl::criteriaSatisfied()
|
||||
forAllConstIter(dictionary, solverDict, iter)
|
||||
{
|
||||
const word& variableName = iter().keyword();
|
||||
const label fieldI = applyToField(variableName);
|
||||
if (fieldI != -1)
|
||||
const label fieldi = applyToField(variableName);
|
||||
if (fieldi != -1)
|
||||
{
|
||||
scalar residual = 0;
|
||||
const scalar firstResidual =
|
||||
@ -78,21 +78,21 @@ bool Foam::pimpleControl::criteriaSatisfied()
|
||||
|
||||
if (storeIni)
|
||||
{
|
||||
residualControl_[fieldI].initialResidual = firstResidual;
|
||||
residualControl_[fieldi].initialResidual = firstResidual;
|
||||
}
|
||||
|
||||
const bool absCheck = residual < residualControl_[fieldI].absTol;
|
||||
const bool absCheck = residual < residualControl_[fieldi].absTol;
|
||||
bool relCheck = false;
|
||||
|
||||
scalar relative = 0.0;
|
||||
if (!storeIni)
|
||||
{
|
||||
const scalar iniRes =
|
||||
residualControl_[fieldI].initialResidual
|
||||
residualControl_[fieldi].initialResidual
|
||||
+ ROOTVSMALL;
|
||||
|
||||
relative = residual/iniRes;
|
||||
relCheck = relative < residualControl_[fieldI].relTol;
|
||||
relCheck = relative < residualControl_[fieldi].relTol;
|
||||
}
|
||||
|
||||
achieved = achieved && (absCheck || relCheck);
|
||||
@ -104,11 +104,11 @@ bool Foam::pimpleControl::criteriaSatisfied()
|
||||
Info<< " " << variableName
|
||||
<< " PIMPLE iter " << corr_
|
||||
<< ": ini res = "
|
||||
<< residualControl_[fieldI].initialResidual
|
||||
<< residualControl_[fieldi].initialResidual
|
||||
<< ", abs tol = " << residual
|
||||
<< " (" << residualControl_[fieldI].absTol << ")"
|
||||
<< " (" << residualControl_[fieldi].absTol << ")"
|
||||
<< ", rel tol = " << relative
|
||||
<< " (" << residualControl_[fieldI].relTol << ")"
|
||||
<< " (" << residualControl_[fieldi].relTol << ")"
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -56,8 +56,8 @@ bool Foam::simpleControl::criteriaSatisfied()
|
||||
forAllConstIter(dictionary, solverDict, iter)
|
||||
{
|
||||
const word& variableName = iter().keyword();
|
||||
const label fieldI = applyToField(variableName);
|
||||
if (fieldI != -1)
|
||||
const label fieldi = applyToField(variableName);
|
||||
if (fieldi != -1)
|
||||
{
|
||||
scalar lastResidual = 0;
|
||||
const scalar residual =
|
||||
@ -65,7 +65,7 @@ bool Foam::simpleControl::criteriaSatisfied()
|
||||
|
||||
checked = true;
|
||||
|
||||
bool absCheck = residual < residualControl_[fieldI].absTol;
|
||||
bool absCheck = residual < residualControl_[fieldi].absTol;
|
||||
achieved = achieved && absCheck;
|
||||
|
||||
if (debug)
|
||||
@ -73,7 +73,7 @@ bool Foam::simpleControl::criteriaSatisfied()
|
||||
Info<< algorithmName_ << " solution statistics:" << endl;
|
||||
|
||||
Info<< " " << variableName << ": tolerance = " << residual
|
||||
<< " (" << residualControl_[fieldI].absTol << ")"
|
||||
<< " (" << residualControl_[fieldi].absTol << ")"
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -58,8 +58,8 @@ void Foam::solutionControl::read(const bool absTolOnly)
|
||||
forAllConstIter(dictionary, residualDict, iter)
|
||||
{
|
||||
const word& fName = iter().keyword();
|
||||
const label fieldI = applyToField(fName, false);
|
||||
if (fieldI == -1)
|
||||
const label fieldi = applyToField(fName, false);
|
||||
if (fieldi == -1)
|
||||
{
|
||||
fieldData fd;
|
||||
fd.name = fName.c_str();
|
||||
@ -92,7 +92,7 @@ void Foam::solutionControl::read(const bool absTolOnly)
|
||||
}
|
||||
else
|
||||
{
|
||||
fieldData& fd = data[fieldI];
|
||||
fieldData& fd = data[fieldi];
|
||||
if (absTolOnly)
|
||||
{
|
||||
fd.absTol = readScalar(residualDict.lookup(fName));
|
||||
|
||||
@ -137,7 +137,7 @@ public:
|
||||
// Member Functions
|
||||
|
||||
//- Constrain energy equation to fix the temperature
|
||||
virtual void constrain(fvMatrix<scalar>& eqn, const label fieldI);
|
||||
virtual void constrain(fvMatrix<scalar>& eqn, const label fieldi);
|
||||
|
||||
|
||||
// IO
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -72,7 +72,7 @@ template<class Type>
|
||||
void Foam::fv::ExplicitSetValue<Type>::constrain
|
||||
(
|
||||
fvMatrix<Type>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
if (debug)
|
||||
@ -81,7 +81,7 @@ void Foam::fv::ExplicitSetValue<Type>::constrain
|
||||
<< ">::constrain for source " << name_ << endl;
|
||||
}
|
||||
|
||||
List<Type> values(cells_.size(), injectionRate_[fieldI]);
|
||||
List<Type> values(cells_.size(), injectionRate_[fieldi]);
|
||||
|
||||
eqn.setValues(cells_, values);
|
||||
}
|
||||
|
||||
@ -108,7 +108,7 @@ public:
|
||||
// Evaluation
|
||||
|
||||
//- Set value on field
|
||||
virtual void constrain(fvMatrix<Type>& eqn, const label fieldI);
|
||||
virtual void constrain(fvMatrix<Type>& eqn, const label fieldi);
|
||||
|
||||
|
||||
// IO
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -112,7 +112,7 @@ Foam::fv::actuationDiskSource::actuationDiskSource
|
||||
void Foam::fv::actuationDiskSource::addSup
|
||||
(
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
const scalarField& cellsV = mesh_.V();
|
||||
@ -137,7 +137,7 @@ void Foam::fv::actuationDiskSource::addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
const scalarField& cellsV = mesh_.V();
|
||||
|
||||
@ -193,7 +193,7 @@ public:
|
||||
virtual void addSup
|
||||
(
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
//- Source term to compressible momentum equation
|
||||
@ -201,7 +201,7 @@ public:
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -76,7 +76,7 @@ void Foam::fv::buoyancyEnergy::addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<scalar>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
const uniformDimensionedVectorField& g =
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -105,7 +105,7 @@ public:
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<scalar>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -86,7 +86,7 @@ void Foam::fv::buoyancyForce::addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
eqn += rho*g_;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -104,7 +104,7 @@ public:
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -251,7 +251,7 @@ public:
|
||||
virtual void addSup
|
||||
(
|
||||
fvMatrix<scalar>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
NotImplemented;
|
||||
@ -265,7 +265,7 @@ public:
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<scalar>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -86,7 +86,7 @@ Foam::fv::explicitPorositySource::explicitPorositySource
|
||||
void Foam::fv::explicitPorositySource::addSup
|
||||
(
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
fvMatrix<vector> porosityEqn(eqn.psi(), eqn.dimensions());
|
||||
@ -99,7 +99,7 @@ void Foam::fv::explicitPorositySource::addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
fvMatrix<vector> porosityEqn(eqn.psi(), eqn.dimensions());
|
||||
@ -113,7 +113,7 @@ void Foam::fv::explicitPorositySource::addSup
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& rho,
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
fvMatrix<vector> porosityEqn(eqn.psi(), eqn.dimensions());
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -138,7 +138,7 @@ public:
|
||||
virtual void addSup
|
||||
(
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
//- Add implicit contribution to compressible momentum equation
|
||||
@ -146,7 +146,7 @@ public:
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
//- Add implicit contribution to phase momentum equation
|
||||
@ -155,7 +155,7 @@ public:
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& rho,
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -190,14 +190,14 @@ void Foam::fv::meanVelocityForce::correct(volVectorField& U)
|
||||
void Foam::fv::meanVelocityForce::addSup
|
||||
(
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
DimensionedField<vector, volMesh> Su
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
name_ + fieldNames_[fieldI] + "Sup",
|
||||
name_ + fieldNames_[fieldi] + "Sup",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
@ -219,10 +219,10 @@ void Foam::fv::meanVelocityForce::addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
this->addSup(eqn, fieldI);
|
||||
this->addSup(eqn, fieldi);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -148,7 +148,7 @@ public:
|
||||
virtual void addSup
|
||||
(
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
//- Add explicit contribution to compressible momentum equation
|
||||
@ -156,14 +156,14 @@ public:
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
//- Set 1/A coefficient
|
||||
virtual void constrain
|
||||
(
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -65,7 +65,7 @@ Foam::fv::radialActuationDiskSource::radialActuationDiskSource
|
||||
void Foam::fv::radialActuationDiskSource::addSup
|
||||
(
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
const scalarField& cellsV = mesh_.V();
|
||||
@ -90,7 +90,7 @@ void Foam::fv::radialActuationDiskSource::addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
const scalarField& cellsV = mesh_.V();
|
||||
|
||||
@ -149,7 +149,7 @@ public:
|
||||
virtual void addSup
|
||||
(
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
//- Source term to compressible momentum equation
|
||||
@ -157,7 +157,7 @@ public:
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -507,7 +507,7 @@ Foam::fv::rotorDiskSource::~rotorDiskSource()
|
||||
void Foam::fv::rotorDiskSource::addSup
|
||||
(
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
volVectorField force
|
||||
@ -548,7 +548,7 @@ void Foam::fv::rotorDiskSource::addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
volVectorField force
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -306,7 +306,7 @@ public:
|
||||
virtual void addSup
|
||||
(
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
//- Source term to compressible momentum equation
|
||||
@ -314,7 +314,7 @@ public:
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -252,7 +252,7 @@ Foam::fv::solidificationMeltingSource::solidificationMeltingSource
|
||||
void Foam::fv::solidificationMeltingSource::addSup
|
||||
(
|
||||
fvMatrix<scalar>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
apply(geometricOneField(), eqn);
|
||||
@ -263,7 +263,7 @@ void Foam::fv::solidificationMeltingSource::addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<scalar>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
apply(rho, eqn);
|
||||
@ -273,7 +273,7 @@ void Foam::fv::solidificationMeltingSource::addSup
|
||||
void Foam::fv::solidificationMeltingSource::addSup
|
||||
(
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
if (debug)
|
||||
@ -311,11 +311,11 @@ void Foam::fv::solidificationMeltingSource::addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
// Momentum source uses a Boussinesq approximation - redirect
|
||||
addSup(eqn, fieldI);
|
||||
addSup(eqn, fieldi);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -221,10 +221,10 @@ public:
|
||||
// Add explicit and implicit contributions
|
||||
|
||||
//- Add explicit contribution to enthalpy equation
|
||||
virtual void addSup(fvMatrix<scalar>& eqn, const label fieldI);
|
||||
virtual void addSup(fvMatrix<scalar>& eqn, const label fieldi);
|
||||
|
||||
//- Add implicit contribution to momentum equation
|
||||
virtual void addSup(fvMatrix<vector>& eqn, const label fieldI);
|
||||
virtual void addSup(fvMatrix<vector>& eqn, const label fieldi);
|
||||
|
||||
|
||||
// Add explicit and implicit contributions to compressible equation
|
||||
@ -234,7 +234,7 @@ public:
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<scalar>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
//- Add implicit contribution to compressible momentum equation
|
||||
@ -242,7 +242,7 @@ public:
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -166,7 +166,7 @@ template<class Type>
|
||||
void Foam::fv::CodedSource<Type>::addSup
|
||||
(
|
||||
fvMatrix<Type>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
if (debug)
|
||||
@ -176,7 +176,7 @@ void Foam::fv::CodedSource<Type>::addSup
|
||||
}
|
||||
|
||||
updateLibrary(redirectType_);
|
||||
redirectFvOption().addSup(eqn, fieldI);
|
||||
redirectFvOption().addSup(eqn, fieldi);
|
||||
}
|
||||
|
||||
|
||||
@ -185,7 +185,7 @@ void Foam::fv::CodedSource<Type>::addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<Type>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
if (debug)
|
||||
@ -195,7 +195,7 @@ void Foam::fv::CodedSource<Type>::addSup
|
||||
}
|
||||
|
||||
updateLibrary(redirectType_);
|
||||
redirectFvOption().addSup(rho, eqn, fieldI);
|
||||
redirectFvOption().addSup(rho, eqn, fieldi);
|
||||
}
|
||||
|
||||
|
||||
@ -203,7 +203,7 @@ template<class Type>
|
||||
void Foam::fv::CodedSource<Type>::constrain
|
||||
(
|
||||
fvMatrix<Type>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
if (debug)
|
||||
@ -213,7 +213,7 @@ void Foam::fv::CodedSource<Type>::constrain
|
||||
}
|
||||
|
||||
updateLibrary(redirectType_);
|
||||
redirectFvOption().constrain(eqn, fieldI);
|
||||
redirectFvOption().constrain(eqn, fieldi);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -37,13 +37,13 @@ Description
|
||||
codeAddSup
|
||||
(
|
||||
fvMatrix<Type}>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
|
||||
constrain
|
||||
(
|
||||
fvMatrix<Type}>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
|
||||
where :
|
||||
@ -204,7 +204,7 @@ public:
|
||||
virtual void addSup
|
||||
(
|
||||
fvMatrix<Type>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
//- Explicit and implicit matrix contributions
|
||||
@ -213,14 +213,14 @@ public:
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<Type>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
//- Set value
|
||||
virtual void constrain
|
||||
(
|
||||
fvMatrix<Type>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -131,7 +131,7 @@ template<class Type>
|
||||
void Foam::fv::SemiImplicitSource<Type>::addSup
|
||||
(
|
||||
fvMatrix<Type>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
if (debug)
|
||||
@ -146,7 +146,7 @@ void Foam::fv::SemiImplicitSource<Type>::addSup
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
name_ + fieldNames_[fieldI] + "Su",
|
||||
name_ + fieldNames_[fieldi] + "Su",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
@ -162,13 +162,13 @@ void Foam::fv::SemiImplicitSource<Type>::addSup
|
||||
false
|
||||
);
|
||||
|
||||
UIndirectList<Type>(Su, cells_) = injectionRate_[fieldI].first()/VDash_;
|
||||
UIndirectList<Type>(Su, cells_) = injectionRate_[fieldi].first()/VDash_;
|
||||
|
||||
DimensionedField<scalar, volMesh> Sp
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
name_ + fieldNames_[fieldI] + "Sp",
|
||||
name_ + fieldNames_[fieldi] + "Sp",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
@ -184,7 +184,7 @@ void Foam::fv::SemiImplicitSource<Type>::addSup
|
||||
false
|
||||
);
|
||||
|
||||
UIndirectList<scalar>(Sp, cells_) = injectionRate_[fieldI].second()/VDash_;
|
||||
UIndirectList<scalar>(Sp, cells_) = injectionRate_[fieldi].second()/VDash_;
|
||||
|
||||
eqn += Su + fvm::SuSp(Sp, psi);
|
||||
}
|
||||
@ -195,7 +195,7 @@ void Foam::fv::SemiImplicitSource<Type>::addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<Type>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
if (debug)
|
||||
@ -204,7 +204,7 @@ void Foam::fv::SemiImplicitSource<Type>::addSup
|
||||
<< ">::addSup for source " << name_ << endl;
|
||||
}
|
||||
|
||||
return this->addSup(eqn, fieldI);
|
||||
return this->addSup(eqn, fieldi);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -188,7 +188,7 @@ public:
|
||||
virtual void addSup
|
||||
(
|
||||
fvMatrix<Type>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
//- Add explicit contribution to compressible equation
|
||||
@ -196,7 +196,7 @@ public:
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<Type>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -134,7 +134,7 @@ Foam::fv::interRegionExplicitPorositySource::interRegionExplicitPorositySource
|
||||
void Foam::fv::interRegionExplicitPorositySource::addSup
|
||||
(
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
initialise();
|
||||
@ -188,7 +188,7 @@ void Foam::fv::interRegionExplicitPorositySource::addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
initialise();
|
||||
|
||||
@ -149,7 +149,7 @@ public:
|
||||
virtual void addSup
|
||||
(
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
|
||||
@ -160,7 +160,7 @@ public:
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -167,7 +167,7 @@ Foam::fv::interRegionHeatTransferModel::~interRegionHeatTransferModel()
|
||||
void Foam::fv::interRegionHeatTransferModel::addSup
|
||||
(
|
||||
fvMatrix<scalar>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
setNbrModel();
|
||||
@ -265,10 +265,10 @@ void Foam::fv::interRegionHeatTransferModel::addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<scalar>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
addSup(eqn, fieldI);
|
||||
addSup(eqn, fieldi);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -174,7 +174,7 @@ public:
|
||||
virtual void addSup
|
||||
(
|
||||
fvMatrix<scalar>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
//- Source term to compressible energy equation
|
||||
@ -182,7 +182,7 @@ public:
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<scalar>& eqn,
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
);
|
||||
|
||||
//- Calculate heat transfer coefficient
|
||||
|
||||
@ -292,10 +292,10 @@ void Foam::ReactingCloud<CloudType>::relaxSources
|
||||
|
||||
typedef DimensionedField<scalar, volMesh> dsfType;
|
||||
|
||||
forAll(rhoTrans_, fieldI)
|
||||
forAll(rhoTrans_, fieldi)
|
||||
{
|
||||
dsfType& rhoT = rhoTrans_[fieldI];
|
||||
const dsfType& rhoT0 = cloudOldTime.rhoTrans()[fieldI];
|
||||
dsfType& rhoT = rhoTrans_[fieldi];
|
||||
const dsfType& rhoT0 = cloudOldTime.rhoTrans()[fieldi];
|
||||
this->relax(rhoT, rhoT0, "rho");
|
||||
}
|
||||
}
|
||||
@ -308,9 +308,9 @@ void Foam::ReactingCloud<CloudType>::scaleSources()
|
||||
|
||||
typedef DimensionedField<scalar, volMesh> dsfType;
|
||||
|
||||
forAll(rhoTrans_, fieldI)
|
||||
forAll(rhoTrans_, fieldi)
|
||||
{
|
||||
dsfType& rhoT = rhoTrans_[fieldI];
|
||||
dsfType& rhoT = rhoTrans_[fieldi];
|
||||
this->scale(rhoT, "rho");
|
||||
}
|
||||
}
|
||||
|
||||
@ -323,9 +323,9 @@ void Foam::fvFieldDecomposer::decomposeFields
|
||||
const PtrList<GeoField>& fields
|
||||
) const
|
||||
{
|
||||
forAll(fields, fieldI)
|
||||
forAll(fields, fieldi)
|
||||
{
|
||||
decomposeField(fields[fieldI])().write();
|
||||
decomposeField(fields[fieldi])().write();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -71,20 +71,20 @@ void Foam::functionObjects::fieldAverage::initialize()
|
||||
Info<< type() << " " << name_ << ":" << nl;
|
||||
|
||||
// Add mean fields to the field lists
|
||||
forAll(faItems_, fieldI)
|
||||
forAll(faItems_, fieldi)
|
||||
{
|
||||
addMeanField<scalar>(fieldI);
|
||||
addMeanField<vector>(fieldI);
|
||||
addMeanField<sphericalTensor>(fieldI);
|
||||
addMeanField<symmTensor>(fieldI);
|
||||
addMeanField<tensor>(fieldI);
|
||||
addMeanField<scalar>(fieldi);
|
||||
addMeanField<vector>(fieldi);
|
||||
addMeanField<sphericalTensor>(fieldi);
|
||||
addMeanField<symmTensor>(fieldi);
|
||||
addMeanField<tensor>(fieldi);
|
||||
}
|
||||
|
||||
// Add prime-squared mean fields to the field lists
|
||||
forAll(faItems_, fieldI)
|
||||
forAll(faItems_, fieldi)
|
||||
{
|
||||
addPrime2MeanField<scalar, scalar>(fieldI);
|
||||
addPrime2MeanField<vector, symmTensor>(fieldI);
|
||||
addPrime2MeanField<scalar, scalar>(fieldi);
|
||||
addPrime2MeanField<vector, symmTensor>(fieldi);
|
||||
}
|
||||
|
||||
// ensure first averaging works unconditionally
|
||||
@ -152,10 +152,10 @@ void Foam::functionObjects::fieldAverage::calcAverages()
|
||||
calculatePrime2MeanFields<scalar, scalar>();
|
||||
calculatePrime2MeanFields<vector, symmTensor>();
|
||||
|
||||
forAll(faItems_, fieldI)
|
||||
forAll(faItems_, fieldi)
|
||||
{
|
||||
totalIter_[fieldI]++;
|
||||
totalTime_[fieldI] += obr_.time().deltaTValue();
|
||||
totalIter_[fieldi]++;
|
||||
totalTime_[fieldi] += obr_.time().deltaTValue();
|
||||
}
|
||||
}
|
||||
|
||||
@ -188,12 +188,12 @@ void Foam::functionObjects::fieldAverage::writeAveragingProperties() const
|
||||
)
|
||||
);
|
||||
|
||||
forAll(faItems_, fieldI)
|
||||
forAll(faItems_, fieldi)
|
||||
{
|
||||
const word& fieldName = faItems_[fieldI].fieldName();
|
||||
const word& fieldName = faItems_[fieldi].fieldName();
|
||||
propsDict.add(fieldName, dictionary());
|
||||
propsDict.subDict(fieldName).add("totalIter", totalIter_[fieldI]);
|
||||
propsDict.subDict(fieldName).add("totalTime", totalTime_[fieldI]);
|
||||
propsDict.subDict(fieldName).add("totalIter", totalIter_[fieldi]);
|
||||
propsDict.subDict(fieldName).add("totalTime", totalTime_[fieldi]);
|
||||
}
|
||||
|
||||
propsDict.regIOobject::write();
|
||||
@ -236,18 +236,18 @@ void Foam::functionObjects::fieldAverage::readAveragingProperties()
|
||||
IOdictionary propsDict(propsDictHeader);
|
||||
|
||||
Info<< " Restarting averaging for fields:" << nl;
|
||||
forAll(faItems_, fieldI)
|
||||
forAll(faItems_, fieldi)
|
||||
{
|
||||
const word& fieldName = faItems_[fieldI].fieldName();
|
||||
const word& fieldName = faItems_[fieldi].fieldName();
|
||||
if (propsDict.found(fieldName))
|
||||
{
|
||||
dictionary fieldDict(propsDict.subDict(fieldName));
|
||||
|
||||
totalIter_[fieldI] = readLabel(fieldDict.lookup("totalIter"));
|
||||
totalTime_[fieldI] = readScalar(fieldDict.lookup("totalTime"));
|
||||
totalIter_[fieldi] = readLabel(fieldDict.lookup("totalIter"));
|
||||
totalTime_[fieldi] = readScalar(fieldDict.lookup("totalTime"));
|
||||
Info<< " " << fieldName
|
||||
<< " iters = " << totalIter_[fieldI]
|
||||
<< " time = " << totalTime_[fieldI] << nl;
|
||||
<< " iters = " << totalIter_[fieldi]
|
||||
<< " time = " << totalTime_[fieldi] << nl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -211,19 +211,19 @@ protected:
|
||||
|
||||
//- Add mean average field to database
|
||||
template<class Type>
|
||||
void addMeanFieldType(const label fieldI);
|
||||
void addMeanFieldType(const label fieldi);
|
||||
|
||||
//- Add mean average field to database
|
||||
template<class Type>
|
||||
void addMeanField(const label fieldI);
|
||||
void addMeanField(const label fieldi);
|
||||
|
||||
//- Add prime-squared average field to database
|
||||
template<class Type1, class Type2>
|
||||
void addPrime2MeanFieldType(const label fieldI);
|
||||
void addPrime2MeanFieldType(const label fieldi);
|
||||
|
||||
//- Add prime-squared average field to database
|
||||
template<class Type1, class Type2>
|
||||
void addPrime2MeanField(const label fieldI);
|
||||
void addPrime2MeanField(const label fieldi);
|
||||
|
||||
|
||||
// Calculation functions
|
||||
@ -233,7 +233,7 @@ protected:
|
||||
|
||||
//- Calculate mean average fields
|
||||
template<class Type>
|
||||
void calculateMeanFieldType(const label fieldI) const;
|
||||
void calculateMeanFieldType(const label fieldi) const;
|
||||
|
||||
//- Calculate mean average fields
|
||||
template<class Type>
|
||||
@ -241,7 +241,7 @@ protected:
|
||||
|
||||
//- Calculate prime-squared average fields
|
||||
template<class Type1, class Type2>
|
||||
void calculatePrime2MeanFieldType(const label fieldI) const;
|
||||
void calculatePrime2MeanFieldType(const label fieldi) const;
|
||||
|
||||
//- Calculate prime-squared average fields
|
||||
template<class Type1, class Type2>
|
||||
@ -249,7 +249,7 @@ protected:
|
||||
|
||||
//- Add mean-squared field value to prime-squared mean field
|
||||
template<class Type1, class Type2>
|
||||
void addMeanSqrToPrime2MeanType(const label fieldI) const;
|
||||
void addMeanSqrToPrime2MeanType(const label fieldi) const;
|
||||
|
||||
//- Add mean-squared field value to prime-squared mean field
|
||||
template<class Type1, class Type2>
|
||||
|
||||
@ -31,10 +31,10 @@ License
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
void Foam::functionObjects::fieldAverage::addMeanFieldType(const label fieldI)
|
||||
void Foam::functionObjects::fieldAverage::addMeanFieldType(const label fieldi)
|
||||
{
|
||||
const word& fieldName = faItems_[fieldI].fieldName();
|
||||
const word& meanFieldName = faItems_[fieldI].meanFieldName();
|
||||
const word& fieldName = faItems_[fieldi].fieldName();
|
||||
const word& meanFieldName = faItems_[fieldi].meanFieldName();
|
||||
|
||||
Info<< " Reading/initialising field " << meanFieldName << endl;
|
||||
|
||||
@ -48,7 +48,7 @@ void Foam::functionObjects::fieldAverage::addMeanFieldType(const label fieldI)
|
||||
<< " since an object with that name already exists."
|
||||
<< " Disabling averaging for field." << endl;
|
||||
|
||||
faItems_[fieldI].mean() = false;
|
||||
faItems_[fieldi].mean() = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -77,22 +77,22 @@ void Foam::functionObjects::fieldAverage::addMeanFieldType(const label fieldI)
|
||||
|
||||
|
||||
template<class Type>
|
||||
void Foam::functionObjects::fieldAverage::addMeanField(const label fieldI)
|
||||
void Foam::functionObjects::fieldAverage::addMeanField(const label fieldi)
|
||||
{
|
||||
if (faItems_[fieldI].mean())
|
||||
if (faItems_[fieldi].mean())
|
||||
{
|
||||
typedef GeometricField<Type, fvPatchField, volMesh> volFieldType;
|
||||
typedef GeometricField<Type, fvsPatchField, surfaceMesh> surfFieldType;
|
||||
|
||||
const word& fieldName = faItems_[fieldI].fieldName();
|
||||
const word& fieldName = faItems_[fieldi].fieldName();
|
||||
|
||||
if (obr_.foundObject<volFieldType>(fieldName))
|
||||
{
|
||||
addMeanFieldType<volFieldType>(fieldI);
|
||||
addMeanFieldType<volFieldType>(fieldi);
|
||||
}
|
||||
else if (obr_.foundObject<surfFieldType>(fieldName))
|
||||
{
|
||||
addMeanFieldType<surfFieldType>(fieldI);
|
||||
addMeanFieldType<surfFieldType>(fieldi);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -101,12 +101,12 @@ void Foam::functionObjects::fieldAverage::addMeanField(const label fieldI)
|
||||
template<class Type1, class Type2>
|
||||
void Foam::functionObjects::fieldAverage::addPrime2MeanFieldType
|
||||
(
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
)
|
||||
{
|
||||
const word& fieldName = faItems_[fieldI].fieldName();
|
||||
const word& meanFieldName = faItems_[fieldI].meanFieldName();
|
||||
const word& prime2MeanFieldName = faItems_[fieldI].prime2MeanFieldName();
|
||||
const word& fieldName = faItems_[fieldi].fieldName();
|
||||
const word& meanFieldName = faItems_[fieldi].meanFieldName();
|
||||
const word& prime2MeanFieldName = faItems_[fieldi].prime2MeanFieldName();
|
||||
|
||||
Info<< " Reading/initialising field " << prime2MeanFieldName << nl;
|
||||
|
||||
@ -120,7 +120,7 @@ void Foam::functionObjects::fieldAverage::addPrime2MeanFieldType
|
||||
<< " since an object with that name already exists."
|
||||
<< " Disabling averaging for field." << nl;
|
||||
|
||||
faItems_[fieldI].prime2Mean() = false;
|
||||
faItems_[fieldi].prime2Mean() = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -150,7 +150,7 @@ void Foam::functionObjects::fieldAverage::addPrime2MeanFieldType
|
||||
|
||||
|
||||
template<class Type1, class Type2>
|
||||
void Foam::functionObjects::fieldAverage::addPrime2MeanField(const label fieldI)
|
||||
void Foam::functionObjects::fieldAverage::addPrime2MeanField(const label fieldi)
|
||||
{
|
||||
typedef GeometricField<Type1, fvPatchField, volMesh> volFieldType1;
|
||||
typedef GeometricField<Type1, fvsPatchField, surfaceMesh> surfFieldType1;
|
||||
@ -158,11 +158,11 @@ void Foam::functionObjects::fieldAverage::addPrime2MeanField(const label fieldI)
|
||||
typedef GeometricField<Type2, fvPatchField, volMesh> volFieldType2;
|
||||
typedef GeometricField<Type2, fvsPatchField, surfaceMesh> surfFieldType2;
|
||||
|
||||
if (faItems_[fieldI].prime2Mean())
|
||||
if (faItems_[fieldi].prime2Mean())
|
||||
{
|
||||
const word& fieldName = faItems_[fieldI].fieldName();
|
||||
const word& fieldName = faItems_[fieldi].fieldName();
|
||||
|
||||
if (!faItems_[fieldI].mean())
|
||||
if (!faItems_[fieldi].mean())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "To calculate the prime-squared average, the "
|
||||
@ -172,11 +172,11 @@ void Foam::functionObjects::fieldAverage::addPrime2MeanField(const label fieldI)
|
||||
|
||||
if (obr_.foundObject<volFieldType1>(fieldName))
|
||||
{
|
||||
addPrime2MeanFieldType<volFieldType1, volFieldType2>(fieldI);
|
||||
addPrime2MeanFieldType<volFieldType1, volFieldType2>(fieldi);
|
||||
}
|
||||
else if (obr_.foundObject<surfFieldType1>(fieldName))
|
||||
{
|
||||
addPrime2MeanFieldType<surfFieldType1, surfFieldType2>(fieldI);
|
||||
addPrime2MeanFieldType<surfFieldType1, surfFieldType2>(fieldi);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -185,10 +185,10 @@ void Foam::functionObjects::fieldAverage::addPrime2MeanField(const label fieldI)
|
||||
template<class Type>
|
||||
void Foam::functionObjects::fieldAverage::calculateMeanFieldType
|
||||
(
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
) const
|
||||
{
|
||||
const word& fieldName = faItems_[fieldI].fieldName();
|
||||
const word& fieldName = faItems_[fieldi].fieldName();
|
||||
|
||||
if (obr_.foundObject<Type>(fieldName))
|
||||
{
|
||||
@ -196,24 +196,24 @@ void Foam::functionObjects::fieldAverage::calculateMeanFieldType
|
||||
|
||||
Type& meanField = const_cast<Type&>
|
||||
(
|
||||
obr_.lookupObject<Type>(faItems_[fieldI].meanFieldName())
|
||||
obr_.lookupObject<Type>(faItems_[fieldi].meanFieldName())
|
||||
);
|
||||
|
||||
scalar dt = obr_.time().deltaTValue();
|
||||
scalar Dt = totalTime_[fieldI];
|
||||
scalar Dt = totalTime_[fieldi];
|
||||
|
||||
if (faItems_[fieldI].iterBase())
|
||||
if (faItems_[fieldi].iterBase())
|
||||
{
|
||||
dt = 1.0;
|
||||
Dt = scalar(totalIter_[fieldI]);
|
||||
Dt = scalar(totalIter_[fieldi]);
|
||||
}
|
||||
|
||||
scalar alpha = (Dt - dt)/Dt;
|
||||
scalar beta = dt/Dt;
|
||||
|
||||
if (faItems_[fieldI].window() > 0)
|
||||
if (faItems_[fieldi].window() > 0)
|
||||
{
|
||||
const scalar w = faItems_[fieldI].window();
|
||||
const scalar w = faItems_[fieldi].window();
|
||||
|
||||
if (Dt - dt >= w)
|
||||
{
|
||||
@ -247,37 +247,37 @@ void Foam::functionObjects::fieldAverage::calculateMeanFields() const
|
||||
template<class Type1, class Type2>
|
||||
void Foam::functionObjects::fieldAverage::calculatePrime2MeanFieldType
|
||||
(
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
) const
|
||||
{
|
||||
const word& fieldName = faItems_[fieldI].fieldName();
|
||||
const word& fieldName = faItems_[fieldi].fieldName();
|
||||
|
||||
if (obr_.foundObject<Type1>(fieldName))
|
||||
{
|
||||
const Type1& baseField = obr_.lookupObject<Type1>(fieldName);
|
||||
const Type1& meanField =
|
||||
obr_.lookupObject<Type1>(faItems_[fieldI].meanFieldName());
|
||||
obr_.lookupObject<Type1>(faItems_[fieldi].meanFieldName());
|
||||
|
||||
Type2& prime2MeanField = const_cast<Type2&>
|
||||
(
|
||||
obr_.lookupObject<Type2>(faItems_[fieldI].prime2MeanFieldName())
|
||||
obr_.lookupObject<Type2>(faItems_[fieldi].prime2MeanFieldName())
|
||||
);
|
||||
|
||||
scalar dt = obr_.time().deltaTValue();
|
||||
scalar Dt = totalTime_[fieldI];
|
||||
scalar Dt = totalTime_[fieldi];
|
||||
|
||||
if (faItems_[fieldI].iterBase())
|
||||
if (faItems_[fieldi].iterBase())
|
||||
{
|
||||
dt = 1.0;
|
||||
Dt = scalar(totalIter_[fieldI]);
|
||||
Dt = scalar(totalIter_[fieldi]);
|
||||
}
|
||||
|
||||
scalar alpha = (Dt - dt)/Dt;
|
||||
scalar beta = dt/Dt;
|
||||
|
||||
if (faItems_[fieldI].window() > 0)
|
||||
if (faItems_[fieldi].window() > 0)
|
||||
{
|
||||
const scalar w = faItems_[fieldI].window();
|
||||
const scalar w = faItems_[fieldi].window();
|
||||
|
||||
if (Dt - dt >= w)
|
||||
{
|
||||
@ -317,19 +317,19 @@ void Foam::functionObjects::fieldAverage::calculatePrime2MeanFields() const
|
||||
template<class Type1, class Type2>
|
||||
void Foam::functionObjects::fieldAverage::addMeanSqrToPrime2MeanType
|
||||
(
|
||||
const label fieldI
|
||||
const label fieldi
|
||||
) const
|
||||
{
|
||||
const word& fieldName = faItems_[fieldI].fieldName();
|
||||
const word& fieldName = faItems_[fieldi].fieldName();
|
||||
|
||||
if (obr_.foundObject<Type1>(fieldName))
|
||||
{
|
||||
const Type1& meanField =
|
||||
obr_.lookupObject<Type1>(faItems_[fieldI].meanFieldName());
|
||||
obr_.lookupObject<Type1>(faItems_[fieldi].meanFieldName());
|
||||
|
||||
Type2& prime2MeanField = const_cast<Type2&>
|
||||
(
|
||||
obr_.lookupObject<Type2>(faItems_[fieldI].prime2MeanFieldName())
|
||||
obr_.lookupObject<Type2>(faItems_[fieldi].prime2MeanFieldName())
|
||||
);
|
||||
|
||||
prime2MeanField += sqr(meanField);
|
||||
|
||||
@ -96,14 +96,14 @@ void Foam::functionObjects::fieldCoordinateSystemTransform::execute()
|
||||
{
|
||||
Info<< type() << " " << name_ << " output:" << nl;
|
||||
|
||||
forAll(fieldSet_, fieldI)
|
||||
forAll(fieldSet_, fieldi)
|
||||
{
|
||||
// If necessary load field
|
||||
transform<scalar>(fieldSet_[fieldI]);
|
||||
transform<vector>(fieldSet_[fieldI]);
|
||||
transform<sphericalTensor>(fieldSet_[fieldI]);
|
||||
transform<symmTensor>(fieldSet_[fieldI]);
|
||||
transform<tensor>(fieldSet_[fieldI]);
|
||||
transform<scalar>(fieldSet_[fieldi]);
|
||||
transform<vector>(fieldSet_[fieldi]);
|
||||
transform<sphericalTensor>(fieldSet_[fieldi]);
|
||||
transform<symmTensor>(fieldSet_[fieldi]);
|
||||
transform<tensor>(fieldSet_[fieldi]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -122,9 +122,9 @@ void Foam::functionObjects::fieldCoordinateSystemTransform::write()
|
||||
{
|
||||
Info<< type() << " " << name_ << " output:" << nl;
|
||||
|
||||
forAll(fieldSet_, fieldI)
|
||||
forAll(fieldSet_, fieldi)
|
||||
{
|
||||
const word fieldName = fieldSet_[fieldI] + ":Transformed";
|
||||
const word fieldName = fieldSet_[fieldi] + ":Transformed";
|
||||
|
||||
const regIOobject& field =
|
||||
obr_.lookupObject<regIOobject>(fieldName);
|
||||
|
||||
@ -132,10 +132,10 @@ void Foam::functionObjects::fieldMinMax::writeFileHeader(const label i)
|
||||
}
|
||||
else
|
||||
{
|
||||
forAll(fieldSet_, fieldI)
|
||||
forAll(fieldSet_, fieldi)
|
||||
{
|
||||
writeTabbed(file, "min(" + fieldSet_[fieldI] + ')');
|
||||
writeTabbed(file, "max(" + fieldSet_[fieldI] + ')');
|
||||
writeTabbed(file, "min(" + fieldSet_[fieldi] + ')');
|
||||
writeTabbed(file, "max(" + fieldSet_[fieldi] + ')');
|
||||
}
|
||||
}
|
||||
|
||||
@ -162,13 +162,13 @@ void Foam::functionObjects::fieldMinMax::write()
|
||||
if (!location_) writeTime(file());
|
||||
if (log_) Info<< type() << " " << name_ << " output:" << nl;
|
||||
|
||||
forAll(fieldSet_, fieldI)
|
||||
forAll(fieldSet_, fieldi)
|
||||
{
|
||||
calcMinMaxFields<scalar>(fieldSet_[fieldI], mdCmpt);
|
||||
calcMinMaxFields<vector>(fieldSet_[fieldI], mode_);
|
||||
calcMinMaxFields<sphericalTensor>(fieldSet_[fieldI], mode_);
|
||||
calcMinMaxFields<symmTensor>(fieldSet_[fieldI], mode_);
|
||||
calcMinMaxFields<tensor>(fieldSet_[fieldI], mode_);
|
||||
calcMinMaxFields<scalar>(fieldSet_[fieldi], mdCmpt);
|
||||
calcMinMaxFields<vector>(fieldSet_[fieldi], mode_);
|
||||
calcMinMaxFields<sphericalTensor>(fieldSet_[fieldi], mode_);
|
||||
calcMinMaxFields<symmTensor>(fieldSet_[fieldi], mode_);
|
||||
calcMinMaxFields<tensor>(fieldSet_[fieldi], mode_);
|
||||
}
|
||||
|
||||
if (!location_) file()<< endl;
|
||||
|
||||
@ -97,9 +97,9 @@ void Foam::functionObjects::readFields::execute()
|
||||
sSymmtf_.clear();
|
||||
stf_.clear();
|
||||
|
||||
forAll(fieldSet_, fieldI)
|
||||
forAll(fieldSet_, fieldi)
|
||||
{
|
||||
const word& fieldName = fieldSet_[fieldI];
|
||||
const word& fieldName = fieldSet_[fieldi];
|
||||
|
||||
// If necessary load field
|
||||
loadField<scalar>(fieldName, vsf_, ssf_);
|
||||
|
||||
@ -92,9 +92,9 @@ void Foam::functionObjects::residuals::writeFileHeader(const label i)
|
||||
writeHeader(file(), "Residuals");
|
||||
writeCommented(file(), "Time");
|
||||
|
||||
forAll(fieldSet_, fieldI)
|
||||
forAll(fieldSet_, fieldi)
|
||||
{
|
||||
const word& fieldName = fieldSet_[fieldI];
|
||||
const word& fieldName = fieldSet_[fieldi];
|
||||
|
||||
writeFileHeader<scalar>(fieldName);
|
||||
writeFileHeader<vector>(fieldName);
|
||||
@ -128,9 +128,9 @@ void Foam::functionObjects::residuals::write()
|
||||
{
|
||||
writeTime(file());
|
||||
|
||||
forAll(fieldSet_, fieldI)
|
||||
forAll(fieldSet_, fieldi)
|
||||
{
|
||||
const word& fieldName = fieldSet_[fieldI];
|
||||
const word& fieldName = fieldSet_[fieldi];
|
||||
|
||||
writeResidual<scalar>(fieldName);
|
||||
writeResidual<vector>(fieldName);
|
||||
|
||||
@ -88,7 +88,7 @@ void Foam::patchProbes::sampleAndWrite
|
||||
const fieldGroup<Type>& fields
|
||||
)
|
||||
{
|
||||
forAll(fields, fieldI)
|
||||
forAll(fields, fieldi)
|
||||
{
|
||||
if (loadFromFiles_)
|
||||
{
|
||||
@ -98,7 +98,7 @@ void Foam::patchProbes::sampleAndWrite
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
fields[fieldI],
|
||||
fields[fieldi],
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::MUST_READ,
|
||||
@ -111,7 +111,7 @@ void Foam::patchProbes::sampleAndWrite
|
||||
}
|
||||
else
|
||||
{
|
||||
objectRegistry::const_iterator iter = mesh_.find(fields[fieldI]);
|
||||
objectRegistry::const_iterator iter = mesh_.find(fields[fieldi]);
|
||||
|
||||
if
|
||||
(
|
||||
@ -125,7 +125,7 @@ void Foam::patchProbes::sampleAndWrite
|
||||
mesh_.lookupObject
|
||||
<GeometricField<Type, fvPatchField, volMesh>>
|
||||
(
|
||||
fields[fieldI]
|
||||
fields[fieldi]
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -140,7 +140,7 @@ void Foam::patchProbes::sampleAndWriteSurfaceFields
|
||||
const fieldGroup<Type>& fields
|
||||
)
|
||||
{
|
||||
forAll(fields, fieldI)
|
||||
forAll(fields, fieldi)
|
||||
{
|
||||
if (loadFromFiles_)
|
||||
{
|
||||
@ -150,7 +150,7 @@ void Foam::patchProbes::sampleAndWriteSurfaceFields
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
fields[fieldI],
|
||||
fields[fieldi],
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::MUST_READ,
|
||||
@ -163,7 +163,7 @@ void Foam::patchProbes::sampleAndWriteSurfaceFields
|
||||
}
|
||||
else
|
||||
{
|
||||
objectRegistry::const_iterator iter = mesh_.find(fields[fieldI]);
|
||||
objectRegistry::const_iterator iter = mesh_.find(fields[fieldi]);
|
||||
|
||||
if
|
||||
(
|
||||
@ -177,7 +177,7 @@ void Foam::patchProbes::sampleAndWriteSurfaceFields
|
||||
mesh_.lookupObject
|
||||
<GeometricField<Type, fvsPatchField, surfaceMesh>>
|
||||
(
|
||||
fields[fieldI]
|
||||
fields[fieldi]
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -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-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -121,9 +121,9 @@ Foam::label Foam::probes::classifyFields()
|
||||
|
||||
labelList indices = findStrings(fieldSelection_, allFields);
|
||||
|
||||
forAll(indices, fieldI)
|
||||
forAll(indices, fieldi)
|
||||
{
|
||||
const word& fieldName = allFields[indices[fieldI]];
|
||||
const word& fieldName = allFields[indices[fieldi]];
|
||||
|
||||
nFields += appendFieldGroup
|
||||
(
|
||||
@ -138,9 +138,9 @@ Foam::label Foam::probes::classifyFields()
|
||||
wordList allFields = mesh_.sortedNames();
|
||||
labelList indices = findStrings(fieldSelection_, allFields);
|
||||
|
||||
forAll(indices, fieldI)
|
||||
forAll(indices, fieldi)
|
||||
{
|
||||
const word& fieldName = allFields[indices[fieldI]];
|
||||
const word& fieldName = allFields[indices[fieldi]];
|
||||
|
||||
nFields += appendFieldGroup
|
||||
(
|
||||
|
||||
@ -114,7 +114,7 @@ void Foam::probes::sampleAndWrite
|
||||
template<class Type>
|
||||
void Foam::probes::sampleAndWrite(const fieldGroup<Type>& fields)
|
||||
{
|
||||
forAll(fields, fieldI)
|
||||
forAll(fields, fieldi)
|
||||
{
|
||||
if (loadFromFiles_)
|
||||
{
|
||||
@ -124,7 +124,7 @@ void Foam::probes::sampleAndWrite(const fieldGroup<Type>& fields)
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
fields[fieldI],
|
||||
fields[fieldi],
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::MUST_READ,
|
||||
@ -137,7 +137,7 @@ void Foam::probes::sampleAndWrite(const fieldGroup<Type>& fields)
|
||||
}
|
||||
else
|
||||
{
|
||||
objectRegistry::const_iterator iter = mesh_.find(fields[fieldI]);
|
||||
objectRegistry::const_iterator iter = mesh_.find(fields[fieldi]);
|
||||
|
||||
if
|
||||
(
|
||||
@ -151,7 +151,7 @@ void Foam::probes::sampleAndWrite(const fieldGroup<Type>& fields)
|
||||
mesh_.lookupObject
|
||||
<GeometricField<Type, fvPatchField, volMesh>>
|
||||
(
|
||||
fields[fieldI]
|
||||
fields[fieldi]
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -163,7 +163,7 @@ void Foam::probes::sampleAndWrite(const fieldGroup<Type>& fields)
|
||||
template<class Type>
|
||||
void Foam::probes::sampleAndWriteSurfaceFields(const fieldGroup<Type>& fields)
|
||||
{
|
||||
forAll(fields, fieldI)
|
||||
forAll(fields, fieldi)
|
||||
{
|
||||
if (loadFromFiles_)
|
||||
{
|
||||
@ -173,7 +173,7 @@ void Foam::probes::sampleAndWriteSurfaceFields(const fieldGroup<Type>& fields)
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
fields[fieldI],
|
||||
fields[fieldi],
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::MUST_READ,
|
||||
@ -186,7 +186,7 @@ void Foam::probes::sampleAndWriteSurfaceFields(const fieldGroup<Type>& fields)
|
||||
}
|
||||
else
|
||||
{
|
||||
objectRegistry::const_iterator iter = mesh_.find(fields[fieldI]);
|
||||
objectRegistry::const_iterator iter = mesh_.find(fields[fieldi]);
|
||||
|
||||
if
|
||||
(
|
||||
@ -200,7 +200,7 @@ void Foam::probes::sampleAndWriteSurfaceFields(const fieldGroup<Type>& fields)
|
||||
mesh_.lookupObject
|
||||
<GeometricField<Type, fvsPatchField, surfaceMesh>>
|
||||
(
|
||||
fields[fieldI]
|
||||
fields[fieldi]
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -93,9 +93,9 @@ Foam::label Foam::sampledSets::classifyFields()
|
||||
|
||||
if (indices.size())
|
||||
{
|
||||
forAll(indices, fieldI)
|
||||
forAll(indices, fieldi)
|
||||
{
|
||||
const word& fieldName = allFields[indices[fieldI]];
|
||||
const word& fieldName = allFields[indices[fieldi]];
|
||||
|
||||
nFields += appendFieldGroup
|
||||
(
|
||||
@ -124,9 +124,9 @@ Foam::label Foam::sampledSets::classifyFields()
|
||||
|
||||
if (indices.size())
|
||||
{
|
||||
forAll(indices, fieldI)
|
||||
forAll(indices, fieldi)
|
||||
{
|
||||
const word& fieldName = allFields[indices[fieldI]];
|
||||
const word& fieldName = allFields[indices[fieldi]];
|
||||
|
||||
nFields += appendFieldGroup
|
||||
(
|
||||
|
||||
@ -56,16 +56,16 @@ Foam::chemistryModel<CompType, ThermoType>::chemistryModel
|
||||
RR_(nSpecie_)
|
||||
{
|
||||
// create the fields for the chemistry sources
|
||||
forAll(RR_, fieldI)
|
||||
forAll(RR_, fieldi)
|
||||
{
|
||||
RR_.set
|
||||
(
|
||||
fieldI,
|
||||
fieldi,
|
||||
new DimensionedField<scalar, volMesh>
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"RR." + Y_[fieldI].name(),
|
||||
"RR." + Y_[fieldi].name(),
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
|
||||
@ -47,11 +47,11 @@ pyrolysisChemistryModel
|
||||
cellCounter_(0)
|
||||
{
|
||||
// create the fields for the chemistry sources
|
||||
forAll(this->RRs_, fieldI)
|
||||
forAll(this->RRs_, fieldi)
|
||||
{
|
||||
IOobject header
|
||||
(
|
||||
this->Ys_[fieldI].name() + "0",
|
||||
this->Ys_[fieldi].name() + "0",
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ
|
||||
@ -62,12 +62,12 @@ pyrolysisChemistryModel
|
||||
{
|
||||
Ys0_.set
|
||||
(
|
||||
fieldI,
|
||||
fieldi,
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
this->Ys_[fieldI].name() + "0",
|
||||
this->Ys_[fieldi].name() + "0",
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
@ -94,12 +94,12 @@ pyrolysisChemistryModel
|
||||
|
||||
Ys0_.set
|
||||
(
|
||||
fieldI,
|
||||
fieldi,
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
this->Ys_[fieldI].name() + "0",
|
||||
this->Ys_[fieldi].name() + "0",
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
@ -110,22 +110,22 @@ pyrolysisChemistryModel
|
||||
);
|
||||
|
||||
// Calculate inital values of Ysi0 = rho*delta*Yi
|
||||
Ys0_[fieldI].primitiveFieldRef() =
|
||||
Ys0_[fieldi].primitiveFieldRef() =
|
||||
this->solidThermo().rho()
|
||||
*max(this->Ys_[fieldI], scalar(0.001))*mesh.V();
|
||||
*max(this->Ys_[fieldi], scalar(0.001))*mesh.V();
|
||||
}
|
||||
}
|
||||
|
||||
forAll(RRg_, fieldI)
|
||||
forAll(RRg_, fieldi)
|
||||
{
|
||||
RRg_.set
|
||||
(
|
||||
fieldI,
|
||||
fieldi,
|
||||
new DimensionedField<scalar, volMesh>
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"RRg." + pyrolisisGases_[fieldI],
|
||||
"RRg." + pyrolisisGases_[fieldi],
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
|
||||
@ -59,16 +59,16 @@ solidChemistryModel
|
||||
reactingCells_(mesh.nCells(), true)
|
||||
{
|
||||
// create the fields for the chemistry sources
|
||||
forAll(RRs_, fieldI)
|
||||
forAll(RRs_, fieldi)
|
||||
{
|
||||
RRs_.set
|
||||
(
|
||||
fieldI,
|
||||
fieldi,
|
||||
new DimensionedField<scalar, volMesh>
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"RRs." + Ys_[fieldI].name(),
|
||||
"RRs." + Ys_[fieldi].name(),
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
|
||||
Reference in New Issue
Block a user