mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use forAll macro in more places, avoid LF-CR endings
This commit is contained in:
@ -14,7 +14,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
|||||||
label inertIndex = -1;
|
label inertIndex = -1;
|
||||||
volScalarField Yt = 0.0*Y[0];
|
volScalarField Yt = 0.0*Y[0];
|
||||||
|
|
||||||
for (label i=0; i<Y.size(); i++)
|
forAll(Y, i)
|
||||||
{
|
{
|
||||||
if (Y[i].name() != inertSpecie)
|
if (Y[i].name() != inertSpecie)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -43,7 +43,7 @@ volScalarField Sevap
|
|||||||
dimensionedScalar("zero", dimensionSet(1, -3, -1, 0, 0), 0.0)
|
dimensionedScalar("zero", dimensionSet(1, -3, -1, 0, 0), 0.0)
|
||||||
);
|
);
|
||||||
|
|
||||||
for (label i=0; i<Y.size(); i++)
|
forAll(Y, i)
|
||||||
{
|
{
|
||||||
if (dieselSpray.isLiquidFuel()[i])
|
if (dieselSpray.isLiquidFuel()[i])
|
||||||
{
|
{
|
||||||
|
|||||||
@ -13,7 +13,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
|||||||
label inertIndex = -1;
|
label inertIndex = -1;
|
||||||
volScalarField Yt = 0.0*Y[0];
|
volScalarField Yt = 0.0*Y[0];
|
||||||
|
|
||||||
for (label i=0; i<Y.size(); i++)
|
forAll(Y, i)
|
||||||
{
|
{
|
||||||
if (Y[i].name() != inertSpecie)
|
if (Y[i].name() != inertSpecie)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -13,7 +13,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
|||||||
label inertIndex = -1;
|
label inertIndex = -1;
|
||||||
volScalarField Yt = 0.0*Y[0];
|
volScalarField Yt = 0.0*Y[0];
|
||||||
|
|
||||||
for (label i=0; i<Y.size(); i++)
|
forAll(Y, i)
|
||||||
{
|
{
|
||||||
if (Y[i].name() != inertSpecie)
|
if (Y[i].name() != inertSpecie)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -27,7 +27,7 @@
|
|||||||
zeroGradientFvPatchScalarField::typeName
|
zeroGradientFvPatchScalarField::typeName
|
||||||
);
|
);
|
||||||
|
|
||||||
for (label i=0; i<p.boundaryField().size(); i++)
|
forAll(p.boundaryField(), i)
|
||||||
{
|
{
|
||||||
if (p.boundaryField()[i].fixesValue())
|
if (p.boundaryField()[i].fixesValue())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -14,7 +14,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
|||||||
label inertIndex = -1;
|
label inertIndex = -1;
|
||||||
volScalarField Yt = 0.0*Y[0];
|
volScalarField Yt = 0.0*Y[0];
|
||||||
|
|
||||||
for (label i=0; i<Y.size(); i++)
|
forAll(Y, i)
|
||||||
{
|
{
|
||||||
if (Y[i].name() != inertSpecie)
|
if (Y[i].name() != inertSpecie)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
calculatedFvPatchScalarField::typeName
|
calculatedFvPatchScalarField::typeName
|
||||||
);
|
);
|
||||||
|
|
||||||
for (label i=0; i<Ua.boundaryField().size(); i++)
|
forAll(Ua.boundaryField(), i)
|
||||||
{
|
{
|
||||||
if (isA<fixedValueFvPatchVectorField>(Ua.boundaryField()[i]))
|
if (isA<fixedValueFvPatchVectorField>(Ua.boundaryField()[i]))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
calculatedFvPatchScalarField::typeName
|
calculatedFvPatchScalarField::typeName
|
||||||
);
|
);
|
||||||
|
|
||||||
for (label i=0; i<Ub.boundaryField().size(); i++)
|
forAll(Ub.boundaryField(), i)
|
||||||
{
|
{
|
||||||
if (isA<fixedValueFvPatchVectorField>(Ub.boundaryField()[i]))
|
if (isA<fixedValueFvPatchVectorField>(Ub.boundaryField()[i]))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -135,7 +135,7 @@
|
|||||||
zeroGradientFvPatchScalarField::typeName
|
zeroGradientFvPatchScalarField::typeName
|
||||||
);
|
);
|
||||||
|
|
||||||
for (label i=0; i<p.boundaryField().size(); i++)
|
forAll(p.boundaryField(), i)
|
||||||
{
|
{
|
||||||
if (p.boundaryField()[i].fixesValue())
|
if (p.boundaryField()[i].fixesValue())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -98,7 +98,7 @@
|
|||||||
zeroGradientFvPatchScalarField::typeName
|
zeroGradientFvPatchScalarField::typeName
|
||||||
);
|
);
|
||||||
|
|
||||||
for (label i=0; i<p.boundaryField().size(); i++)
|
forAll(p.boundaryField(), i)
|
||||||
{
|
{
|
||||||
if (p.boundaryField()[i].fixesValue())
|
if (p.boundaryField()[i].fixesValue())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
zeroGradientFvPatchScalarField::typeName
|
zeroGradientFvPatchScalarField::typeName
|
||||||
);
|
);
|
||||||
|
|
||||||
for (label i=0; i<p.boundaryField().size(); i++)
|
forAll(p.boundaryField(), i)
|
||||||
{
|
{
|
||||||
if (p.boundaryField()[i].fixesValue())
|
if (p.boundaryField()[i].fixesValue())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
zeroGradientFvPatchScalarField::typeName
|
zeroGradientFvPatchScalarField::typeName
|
||||||
);
|
);
|
||||||
|
|
||||||
for (label i=0; i<p.boundaryField().size(); i++)
|
forAll(p.boundaryField(), i)
|
||||||
{
|
{
|
||||||
if (p.boundaryField()[i].fixesValue())
|
if (p.boundaryField()[i].fixesValue())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -17,7 +17,7 @@ phi =
|
|||||||
surfaceScalarField phiU("phiU", phi);
|
surfaceScalarField phiU("phiU", phi);
|
||||||
phi -= ghf*fvc::snGrad(rho)*rUAf*mesh.magSf();
|
phi -= ghf*fvc::snGrad(rho)*rUAf*mesh.magSf();
|
||||||
|
|
||||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
{
|
{
|
||||||
fvScalarMatrix pmhEqn
|
fvScalarMatrix pmhEqn
|
||||||
(
|
(
|
||||||
|
|||||||
@ -106,7 +106,7 @@ Foam::phaseModel::phaseModel
|
|||||||
calculatedFvPatchScalarField::typeName
|
calculatedFvPatchScalarField::typeName
|
||||||
);
|
);
|
||||||
|
|
||||||
for (label i=0; i<U_.boundaryField().size(); i++)
|
forAll(U_.boundaryField(), i)
|
||||||
{
|
{
|
||||||
if (isA<fixedValueFvPatchVectorField>(U_.boundaryField()[i]))
|
if (isA<fixedValueFvPatchVectorField>(U_.boundaryField()[i]))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -341,9 +341,9 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
wordList fieldNames = objects.names(volFieldTypes[i]);
|
wordList fieldNames = objects.names(volFieldTypes[i]);
|
||||||
|
|
||||||
for (label j=0; j<fieldNames.size(); j++)
|
forAll(fieldNames, j)
|
||||||
{
|
{
|
||||||
word fieldName = fieldNames[j];
|
const word& fieldName = fieldNames[j];
|
||||||
|
|
||||||
# include "checkData.H"
|
# include "checkData.H"
|
||||||
|
|
||||||
|
|||||||
@ -6,10 +6,10 @@ for (label i=0; i < nTypes; i++)
|
|||||||
{
|
{
|
||||||
gmvFile << "variable" << nl;
|
gmvFile << "variable" << nl;
|
||||||
}
|
}
|
||||||
for (label j=0; j < fieldNames.size(); j++)
|
|
||||||
{
|
|
||||||
|
|
||||||
word fieldName = fieldNames[j];
|
forAll(fieldNames, j)
|
||||||
|
{
|
||||||
|
const word& fieldName = fieldNames[j];
|
||||||
|
|
||||||
IOobject fieldObject
|
IOobject fieldObject
|
||||||
(
|
(
|
||||||
|
|||||||
@ -20,7 +20,7 @@ for (label indx=0;indx<nPoints;indx++)
|
|||||||
}
|
}
|
||||||
gmvFile << nl;
|
gmvFile << nl;
|
||||||
gmvFile << "cells " << cells.size() << nl;
|
gmvFile << "cells " << cells.size() << nl;
|
||||||
for (label indx=0;indx<cells.size();indx++)
|
forAll(cells, indx)
|
||||||
{
|
{
|
||||||
label nNodes = cells[indx].size();
|
label nNodes = cells[indx].size();
|
||||||
if (nNodes == 8)
|
if (nNodes == 8)
|
||||||
|
|||||||
@ -95,7 +95,7 @@ int USERD_get_gold_variable_info
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (label n=0; n<lagrangianVectorNames.size(); n++)
|
forAll(lagrangianVectorNames, n)
|
||||||
{
|
{
|
||||||
var_type[offset + Ns + n] = Z_VECTOR;
|
var_type[offset + Ns + n] = Z_VECTOR;
|
||||||
var_classify[offset + Ns + n] = Z_PER_ELEM;
|
var_classify[offset + Ns + n] = Z_PER_ELEM;
|
||||||
|
|||||||
@ -144,7 +144,7 @@ int USERD_get_part_element_ids_by_type
|
|||||||
}
|
}
|
||||||
else if (part_number == nPatches+2)
|
else if (part_number == nPatches+2)
|
||||||
{
|
{
|
||||||
for (label n=0; n<sprayPtr->size(); n++)
|
forAll(*sprayPtr, n)
|
||||||
{
|
{
|
||||||
elemid_array[n] = n + 1;
|
elemid_array[n] = n + 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -234,7 +234,7 @@ int USERD_get_part_elements_by_type
|
|||||||
}
|
}
|
||||||
else if (part_number == nPatches+2)
|
else if (part_number == nPatches+2)
|
||||||
{
|
{
|
||||||
for (label n=0; n<sprayPtr->size(); n++)
|
forAll(*sprayPtr, n)
|
||||||
{
|
{
|
||||||
conn_array[n][0] = n + 1;
|
conn_array[n][0] = n + 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -99,7 +99,7 @@ int USERD_set_filenames
|
|||||||
label nVar = 0;
|
label nVar = 0;
|
||||||
wordList scalars = objects.names(scalarName);
|
wordList scalars = objects.names(scalarName);
|
||||||
|
|
||||||
for (label n=0; n<fieldNames.size(); n++)
|
forAll(fieldNames, n)
|
||||||
{
|
{
|
||||||
bool isitScalar = false;
|
bool isitScalar = false;
|
||||||
forAll(scalars,i)
|
forAll(scalars,i)
|
||||||
@ -115,7 +115,7 @@ int USERD_set_filenames
|
|||||||
|
|
||||||
wordList vectors = objects.names(vectorName);
|
wordList vectors = objects.names(vectorName);
|
||||||
|
|
||||||
for (label n=0; n<fieldNames.size(); n++)
|
forAll(fieldNames, n)
|
||||||
{
|
{
|
||||||
bool isitVector = false;
|
bool isitVector = false;
|
||||||
forAll(vectors,i)
|
forAll(vectors,i)
|
||||||
@ -131,7 +131,7 @@ int USERD_set_filenames
|
|||||||
|
|
||||||
wordList tensors = objects.names(tensorName);
|
wordList tensors = objects.names(tensorName);
|
||||||
|
|
||||||
for (label n=0; n<fieldNames.size(); n++)
|
forAll(fieldNames, n)
|
||||||
{
|
{
|
||||||
bool isitTensor = false;
|
bool isitTensor = false;
|
||||||
forAll(tensors,i)
|
forAll(tensors,i)
|
||||||
|
|||||||
@ -21,7 +21,7 @@ if (nVar >= 0)
|
|||||||
|
|
||||||
if (s.size())
|
if (s.size())
|
||||||
{
|
{
|
||||||
for (label n = 0; n < s.size(); n++)
|
forAll(s, n)
|
||||||
{
|
{
|
||||||
var_array[n+1] = s[n];
|
var_array[n+1] = s[n];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,7 +22,7 @@ if (nVar >= 0)
|
|||||||
|
|
||||||
if (v.size())
|
if (v.size())
|
||||||
{
|
{
|
||||||
for (label n = 0; n < v.size(); n++)
|
forAll(v, n)
|
||||||
{
|
{
|
||||||
if (component == 0)
|
if (component == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -39,7 +39,7 @@ const polyBoundaryMesh& bMesh = meshPtr->boundaryMesh();
|
|||||||
if (which_type == Z_TRI03)
|
if (which_type == Z_TRI03)
|
||||||
{
|
{
|
||||||
label counter = 1;
|
label counter = 1;
|
||||||
for (label facei=0; facei<sfb.size(); facei++)
|
forAll(sfb, facei)
|
||||||
{
|
{
|
||||||
label nPoints = bMesh[patchi][facei].size();
|
label nPoints = bMesh[patchi][facei].size();
|
||||||
if (nPoints == 3)
|
if (nPoints == 3)
|
||||||
@ -52,7 +52,7 @@ if (which_type == Z_TRI03)
|
|||||||
if (which_type == Z_QUA04)
|
if (which_type == Z_QUA04)
|
||||||
{
|
{
|
||||||
label counter = 1;
|
label counter = 1;
|
||||||
for (label facei=0; facei<sfb.size(); facei++)
|
forAll(sfb, facei)
|
||||||
{
|
{
|
||||||
label nPoints = bMesh[patchi][facei].size();
|
label nPoints = bMesh[patchi][facei].size();
|
||||||
if (nPoints == 4)
|
if (nPoints == 4)
|
||||||
@ -65,10 +65,10 @@ if (which_type == Z_QUA04)
|
|||||||
if (which_type == Z_NSIDED)
|
if (which_type == Z_NSIDED)
|
||||||
{
|
{
|
||||||
label counter = 1;
|
label counter = 1;
|
||||||
for (label facei=0; facei<sfb.size(); facei++)
|
forAll(sfb, facei)
|
||||||
{
|
{
|
||||||
label nPoints = bMesh[patchi][facei].size();
|
label nPoints = bMesh[patchi][facei].size();
|
||||||
if ((nPoints != 3) && (nPoints != 4))
|
if (nPoints != 3 && nPoints != 4)
|
||||||
{
|
{
|
||||||
var_array[counter++] = sfb[facei];
|
var_array[counter++] = sfb[facei];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,7 +39,7 @@ const polyBoundaryMesh& bMesh = meshPtr->boundaryMesh();
|
|||||||
if (which_type == Z_TRI03)
|
if (which_type == Z_TRI03)
|
||||||
{
|
{
|
||||||
label counter = 1;
|
label counter = 1;
|
||||||
for (label n=0; n<tf.size(); n++)
|
forAll(tf, n)
|
||||||
{
|
{
|
||||||
label nPoints = bMesh[patchi][n].size();
|
label nPoints = bMesh[patchi][n].size();
|
||||||
if (nPoints == 3)
|
if (nPoints == 3)
|
||||||
@ -52,7 +52,7 @@ if (which_type == Z_TRI03)
|
|||||||
if (which_type == Z_QUA04)
|
if (which_type == Z_QUA04)
|
||||||
{
|
{
|
||||||
label counter = 1;
|
label counter = 1;
|
||||||
for (label n=0; n<tf.size(); n++)
|
forAll(tf, n)
|
||||||
{
|
{
|
||||||
label nPoints = bMesh[patchi][n].size();
|
label nPoints = bMesh[patchi][n].size();
|
||||||
if (nPoints == 4)
|
if (nPoints == 4)
|
||||||
@ -65,7 +65,7 @@ if (which_type == Z_QUA04)
|
|||||||
if (which_type == Z_NSIDED)
|
if (which_type == Z_NSIDED)
|
||||||
{
|
{
|
||||||
label counter = 1;
|
label counter = 1;
|
||||||
for (label n=0; n<tf.size(); n++)
|
forAll(tf, n)
|
||||||
{
|
{
|
||||||
label nPoints = bMesh[patchi][n].size();
|
label nPoints = bMesh[patchi][n].size();
|
||||||
if ((nPoints != 3) && (nPoints != 4))
|
if ((nPoints != 3) && (nPoints != 4))
|
||||||
|
|||||||
@ -39,7 +39,7 @@ const polyBoundaryMesh& bMesh = meshPtr->boundaryMesh();
|
|||||||
if (which_type == Z_TRI03)
|
if (which_type == Z_TRI03)
|
||||||
{
|
{
|
||||||
label counter = 1;
|
label counter = 1;
|
||||||
for (label facei=0; facei<sfb.size(); facei++)
|
forAll(sfb, facei)
|
||||||
{
|
{
|
||||||
label nPoints = bMesh[patchi][facei].size();
|
label nPoints = bMesh[patchi][facei].size();
|
||||||
if (nPoints == 3)
|
if (nPoints == 3)
|
||||||
@ -52,7 +52,7 @@ if (which_type == Z_TRI03)
|
|||||||
if (which_type == Z_QUA04)
|
if (which_type == Z_QUA04)
|
||||||
{
|
{
|
||||||
label counter = 1;
|
label counter = 1;
|
||||||
for (label facei=0; facei<sfb.size(); facei++)
|
forAll(sfb, facei)
|
||||||
{
|
{
|
||||||
label nPoints = bMesh[patchi][facei].size();
|
label nPoints = bMesh[patchi][facei].size();
|
||||||
if (nPoints == 4)
|
if (nPoints == 4)
|
||||||
@ -65,7 +65,7 @@ if (which_type == Z_QUA04)
|
|||||||
if (which_type == Z_NSIDED)
|
if (which_type == Z_NSIDED)
|
||||||
{
|
{
|
||||||
label counter = 1;
|
label counter = 1;
|
||||||
for (label facei=0; facei<sfb.size(); facei++)
|
forAll(sfb, facei)
|
||||||
{
|
{
|
||||||
label nPoints = bMesh[patchi][facei].size();
|
label nPoints = bMesh[patchi][facei].size();
|
||||||
if ((nPoints != 3) && (nPoints != 4))
|
if ((nPoints != 3) && (nPoints != 4))
|
||||||
|
|||||||
@ -57,7 +57,7 @@ void Foam::tabulatedWallFunctions::SpaldingsLaw::invertFunction()
|
|||||||
scalar uPlus = 1;
|
scalar uPlus = 1;
|
||||||
|
|
||||||
// Populate the table
|
// Populate the table
|
||||||
for (label i=0; i<invertedTable_.size(); i++)
|
forAll(invertedTable_, i)
|
||||||
{
|
{
|
||||||
if (invertedTable_.log10())
|
if (invertedTable_.log10())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -213,7 +213,7 @@ void Foam::primitiveEntry::write(Ostream& os) const
|
|||||||
{
|
{
|
||||||
os.writeKeyword(keyword());
|
os.writeKeyword(keyword());
|
||||||
|
|
||||||
for (label i=0; i<size(); i++)
|
for (label i=0; i<size(); ++i)
|
||||||
{
|
{
|
||||||
os << operator[](i);
|
os << operator[](i);
|
||||||
|
|
||||||
|
|||||||
@ -125,7 +125,7 @@ void PrimitivePatchInterpolation<Patch>::makeFaceToEdgeWeights() const
|
|||||||
faceToEdgeWeightsPtr_ = new scalarList(patch_.nInternalEdges());
|
faceToEdgeWeightsPtr_ = new scalarList(patch_.nInternalEdges());
|
||||||
scalarList& weights = *faceToEdgeWeightsPtr_;
|
scalarList& weights = *faceToEdgeWeightsPtr_;
|
||||||
|
|
||||||
for (label edgei = 0; edgei < weights.size(); edgei++)
|
forAll(weights, edgei)
|
||||||
{
|
{
|
||||||
vector P = faces[edgeFaces[edgei][0]].centre(points);
|
vector P = faces[edgeFaces[edgei][0]].centre(points);
|
||||||
vector N = faces[edgeFaces[edgei][1]].centre(points);
|
vector N = faces[edgeFaces[edgei][1]].centre(points);
|
||||||
|
|||||||
@ -363,7 +363,7 @@ Foam::SVD::SVD(const scalarRectangularMatrix& A, const scalar minCondition)
|
|||||||
|
|
||||||
// zero singular values that are less than minCondition*maxS
|
// zero singular values that are less than minCondition*maxS
|
||||||
const scalar minS = minCondition*S_[findMax(S_)];
|
const scalar minS = minCondition*S_[findMax(S_)];
|
||||||
for (label i = 0; i < S_.size(); i++)
|
forAll(S_, i)
|
||||||
{
|
{
|
||||||
if (S_[i] <= minS)
|
if (S_[i] <= minS)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -153,7 +153,7 @@ void Foam::walkPatch::faceToFace
|
|||||||
indexInFace_.append(fp);
|
indexInFace_.append(fp);
|
||||||
|
|
||||||
// Visit neighbouring faces in order, starting at fp.
|
// Visit neighbouring faces in order, starting at fp.
|
||||||
for (label i = 0; i < f.size(); i++)
|
forAll(f, i)
|
||||||
{
|
{
|
||||||
label fp1 = reverse_ ? f.rcIndex(fp) : f.fcIndex(fp);
|
label fp1 = reverse_ ? f.rcIndex(fp) : f.fcIndex(fp);
|
||||||
label nbr = getNeighbour(faceI, fp, f[fp], f[fp1]);
|
label nbr = getNeighbour(faceI, fp, f[fp], f[fp1]);
|
||||||
|
|||||||
@ -88,7 +88,7 @@ void Foam::attachDetach::attachInterface
|
|||||||
|
|
||||||
// Pout << "Points to be mapped: " << removedPoints << endl;
|
// Pout << "Points to be mapped: " << removedPoints << endl;
|
||||||
// Remove all faces from the slave patch
|
// Remove all faces from the slave patch
|
||||||
for (label i = 0; i < slavePatch.size(); i++)
|
forAll(slavePatch, i)
|
||||||
{
|
{
|
||||||
ref.setAction(polyRemoveFace(i + slavePatchStart));
|
ref.setAction(polyRemoveFace(i + slavePatchStart));
|
||||||
// Pout << "Removing face " << i + slavePatchStart << endl;
|
// Pout << "Removing face " << i + slavePatchStart << endl;
|
||||||
|
|||||||
@ -265,7 +265,7 @@ Foam::List<Foam::polyPatch*> Foam::polyMeshAdder::combinePatches
|
|||||||
|
|
||||||
// Copy patches0 with new sizes. First patches always come from
|
// Copy patches0 with new sizes. First patches always come from
|
||||||
// mesh0 and will always be present.
|
// mesh0 and will always be present.
|
||||||
for (label patchI = 0; patchI < patches0.size(); patchI++)
|
forAll(patches0, patchI)
|
||||||
{
|
{
|
||||||
// Originates from mesh0. Clone with new size & filter out empty
|
// Originates from mesh0. Clone with new size & filter out empty
|
||||||
// patch.
|
// patch.
|
||||||
@ -363,7 +363,7 @@ Foam::labelList Foam::polyMeshAdder::getFaceOrder
|
|||||||
labelList oldToNew(owner.size(), -1);
|
labelList oldToNew(owner.size(), -1);
|
||||||
|
|
||||||
// Leave boundary faces in order
|
// Leave boundary faces in order
|
||||||
for (label faceI = nInternalFaces; faceI < owner.size(); faceI++)
|
for (label faceI = nInternalFaces; faceI < owner.size(); ++faceI)
|
||||||
{
|
{
|
||||||
oldToNew[faceI] = faceI;
|
oldToNew[faceI] = faceI;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -915,7 +915,7 @@ void Foam::addPatchCellLayer::setRefinement
|
|||||||
|
|
||||||
vector disp = firstLayerDisp[patchPointI];
|
vector disp = firstLayerDisp[patchPointI];
|
||||||
|
|
||||||
for (label i = 0; i < addedPoints_[patchPointI].size(); i++)
|
forAll(addedPoints_[patchPointI], i)
|
||||||
{
|
{
|
||||||
pt += disp;
|
pt += disp;
|
||||||
|
|
||||||
@ -1000,7 +1000,7 @@ void Foam::addPatchCellLayer::setRefinement
|
|||||||
|
|
||||||
face newFace(f.size());
|
face newFace(f.size());
|
||||||
|
|
||||||
for (label i = 0; i < addedCells[patchFaceI].size(); i++)
|
forAll(addedCells[patchFaceI], i)
|
||||||
{
|
{
|
||||||
forAll(f, fp)
|
forAll(f, fp)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -262,7 +262,7 @@ void Foam::repatchPolyTopoChanger::changeAnchorPoint
|
|||||||
|
|
||||||
label fVert = fp;
|
label fVert = fp;
|
||||||
|
|
||||||
for (label i = 0; i < f.size(); i++)
|
forAll(f, i)
|
||||||
{
|
{
|
||||||
newFace[i] = f[fVert++];
|
newFace[i] = f[fVert++];
|
||||||
|
|
||||||
|
|||||||
@ -200,7 +200,7 @@ void Foam::enrichedPatch::calcEnrichedFaces
|
|||||||
// Go through the points and collect them based on
|
// Go through the points and collect them based on
|
||||||
// weights from lower to higher. This gives the
|
// weights from lower to higher. This gives the
|
||||||
// correct order of points along the edge.
|
// correct order of points along the edge.
|
||||||
for (label passI = 0; passI < edgePointWeights.size(); passI++)
|
forAll(edgePointWeights, passI)
|
||||||
{
|
{
|
||||||
// Max weight can only be one, so the sorting is
|
// Max weight can only be one, so the sorting is
|
||||||
// done by elimination.
|
// done by elimination.
|
||||||
@ -351,7 +351,7 @@ void Foam::enrichedPatch::calcEnrichedFaces
|
|||||||
// Go through the points and collect them based on
|
// Go through the points and collect them based on
|
||||||
// weights from lower to higher. This gives the
|
// weights from lower to higher. This gives the
|
||||||
// correct order of points along the edge.
|
// correct order of points along the edge.
|
||||||
for (label pass = 0; pass < edgePointWeights.size(); pass++)
|
forAll(edgePointWeights, passI)
|
||||||
{
|
{
|
||||||
// Max weight can only be one, so the sorting is
|
// Max weight can only be one, so the sorting is
|
||||||
// done by elimination.
|
// done by elimination.
|
||||||
|
|||||||
@ -31,10 +31,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
defineTypeNameAndDebug(Foam::quadraticFitSnGradData, 0);
|
||||||
{
|
|
||||||
defineTypeNameAndDebug(quadraticFitSnGradData, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
@ -205,7 +202,7 @@ Foam::label Foam::quadraticFitSnGradData::calcFit
|
|||||||
// calculate the matrix of the polynomial components
|
// calculate the matrix of the polynomial components
|
||||||
scalarRectangularMatrix B(C.size(), minSize_, scalar(0));
|
scalarRectangularMatrix B(C.size(), minSize_, scalar(0));
|
||||||
|
|
||||||
for (label ip = 0; ip < C.size(); ip++)
|
forAll(C, ip)
|
||||||
{
|
{
|
||||||
const point& p = C[ip];
|
const point& p = C[ip];
|
||||||
|
|
||||||
|
|||||||
@ -164,7 +164,7 @@ void Foam::FitData<FitDataType, ExtendedStencil, Polynomial>::calcFit
|
|||||||
// Matrix of the polynomial components
|
// Matrix of the polynomial components
|
||||||
scalarRectangularMatrix B(C.size(), minSize_, scalar(0));
|
scalarRectangularMatrix B(C.size(), minSize_, scalar(0));
|
||||||
|
|
||||||
for (label ip = 0; ip < C.size(); ip++)
|
forAll(C, ip)
|
||||||
{
|
{
|
||||||
const point& p = C[ip];
|
const point& p = C[ip];
|
||||||
|
|
||||||
|
|||||||
@ -258,7 +258,7 @@ void parcel::setRelaxationTimes
|
|||||||
scalar vapourSurfaceEnthalpy = 0.0;
|
scalar vapourSurfaceEnthalpy = 0.0;
|
||||||
scalar vapourFarEnthalpy = 0.0;
|
scalar vapourFarEnthalpy = 0.0;
|
||||||
|
|
||||||
for (label k = 0; k < sDB.gasProperties().size(); k++)
|
forAll(sDB.gasProperties(), k)
|
||||||
{
|
{
|
||||||
vapourSurfaceEnthalpy += sDB.composition().Y()[k][celli]*sDB.gasProperties()[k].H(tBoilingSurface);
|
vapourSurfaceEnthalpy += sDB.composition().Y()[k][celli]*sDB.gasProperties()[k].H(tBoilingSurface);
|
||||||
vapourFarEnthalpy += sDB.composition().Y()[k][celli]*sDB.gasProperties()[k].H(temperature);
|
vapourFarEnthalpy += sDB.composition().Y()[k][celli]*sDB.gasProperties()[k].H(temperature);
|
||||||
|
|||||||
@ -177,7 +177,7 @@ void Foam::shellSurfaces::orient()
|
|||||||
|
|
||||||
boundBox shellBb(points[0], points[0]);
|
boundBox shellBb(points[0], points[0]);
|
||||||
// Assume surface is compact!
|
// Assume surface is compact!
|
||||||
for (label i = 0; i < points.size(); i++)
|
forAll(points, i)
|
||||||
{
|
{
|
||||||
const point& pt = points[i];
|
const point& pt = points[i];
|
||||||
shellBb.min() = min(shellBb.min(), pt);
|
shellBb.min() = min(shellBb.min(), pt);
|
||||||
|
|||||||
@ -453,7 +453,7 @@ Foam::Ostream& Foam::operator<< (Ostream& os, const treeLeaf<Type>& leaf)
|
|||||||
{
|
{
|
||||||
// Storage not trimmed
|
// Storage not trimmed
|
||||||
os << token::SPACE << leaf.size() << token::SPACE << token::BEGIN_LIST;
|
os << token::SPACE << leaf.size() << token::SPACE << token::BEGIN_LIST;
|
||||||
for (label i = 0; i < leaf.size(); i++)
|
forAll(leaf, i)
|
||||||
{
|
{
|
||||||
os << token::SPACE << leaf.indices()[i];
|
os << token::SPACE << leaf.indices()[i];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -115,7 +115,7 @@ void fftRenumber
|
|||||||
List<complex> renumData(data);
|
List<complex> renumData(data);
|
||||||
|
|
||||||
label nnprod(1);
|
label nnprod(1);
|
||||||
for (label i=0; i<nn.size(); i++)
|
forAll(nn, i)
|
||||||
{
|
{
|
||||||
nnprod *= nn[i];
|
nnprod *= nn[i];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -229,7 +229,7 @@ void Foam::faceOnlySet::calcSamples
|
|||||||
);
|
);
|
||||||
|
|
||||||
// fill sampleSegments
|
// fill sampleSegments
|
||||||
for(label i = samplingPts.size() - 1; i >= startSegmentI; --i)
|
for (label i = samplingPts.size() - 1; i >= startSegmentI; --i)
|
||||||
{
|
{
|
||||||
samplingSegments.append(segmentI);
|
samplingSegments.append(segmentI);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -64,7 +64,7 @@ bool Foam::uniformSet::nextSample
|
|||||||
samplePt += offset;
|
samplePt += offset;
|
||||||
sampleI++;
|
sampleI++;
|
||||||
|
|
||||||
for(; sampleI < nPoints_; sampleI++)
|
for (; sampleI < nPoints_; sampleI++)
|
||||||
{
|
{
|
||||||
scalar s = (samplePt - currentPt) & normOffset;
|
scalar s = (samplePt - currentPt) & normOffset;
|
||||||
|
|
||||||
@ -328,7 +328,7 @@ void Foam::uniformSet::calcSamples
|
|||||||
);
|
);
|
||||||
|
|
||||||
// fill sampleSegments
|
// fill sampleSegments
|
||||||
for(label i = samplingPts.size() - 1; i >= startSegmentI; --i)
|
for (label i = samplingPts.size() - 1; i >= startSegmentI; --i)
|
||||||
{
|
{
|
||||||
samplingSegments.append(segmentI);
|
samplingSegments.append(segmentI);
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1,482 +1,482 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public 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::kinematicSingleLayer
|
Foam::kinematicSingleLayer
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Kinematic form of single-cell layer surface film model
|
Kinematic form of single-cell layer surface film model
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
kinematicSingleLayer.C
|
kinematicSingleLayer.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef kinematicSingleLayer_H
|
#ifndef kinematicSingleLayer_H
|
||||||
#define kinematicSingleLayer_H
|
#define kinematicSingleLayer_H
|
||||||
|
|
||||||
#include "surfaceFilmModel.H"
|
#include "surfaceFilmModel.H"
|
||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "surfaceFields.H"
|
#include "surfaceFields.H"
|
||||||
#include "fvMatrices.H"
|
#include "fvMatrices.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
namespace surfaceFilmModels
|
namespace surfaceFilmModels
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
// Forward declaration of classes
|
||||||
class injectionModel;
|
class injectionModel;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class kinematicSingleLayer Declaration
|
Class kinematicSingleLayer Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class kinematicSingleLayer
|
class kinematicSingleLayer
|
||||||
:
|
:
|
||||||
public surfaceFilmModel
|
public surfaceFilmModel
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// Private member functions
|
// Private member functions
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
//- Disallow default bitwise copy construct
|
||||||
kinematicSingleLayer(const kinematicSingleLayer&);
|
kinematicSingleLayer(const kinematicSingleLayer&);
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const kinematicSingleLayer&);
|
void operator=(const kinematicSingleLayer&);
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Protected data
|
// Protected data
|
||||||
|
|
||||||
// Mesh databases
|
// Mesh databases
|
||||||
|
|
||||||
//- Film region mesh database
|
//- Film region mesh database
|
||||||
fvMesh filmRegion_;
|
fvMesh filmRegion_;
|
||||||
|
|
||||||
//- Patch normal vectors
|
//- Patch normal vectors
|
||||||
volVectorField nHat_;
|
volVectorField nHat_;
|
||||||
|
|
||||||
//- Face area magnitudes / [m2]
|
//- Face area magnitudes / [m2]
|
||||||
volScalarField magSf_;
|
volScalarField magSf_;
|
||||||
|
|
||||||
//- List of patch IDs on the primary region coupled with the film
|
//- List of patch IDs on the primary region coupled with the film
|
||||||
// region
|
// region
|
||||||
labelList primaryPatchIDs_;
|
labelList primaryPatchIDs_;
|
||||||
|
|
||||||
//- List of patch IDs on oppositte side of the film region
|
//- List of patch IDs on oppositte side of the film region
|
||||||
labelList filmTopPatchIDs_;
|
labelList filmTopPatchIDs_;
|
||||||
|
|
||||||
//- List of patch IDs on the film region coupled with the primary
|
//- List of patch IDs on the film region coupled with the primary
|
||||||
// region
|
// region
|
||||||
labelList filmBottomPatchIDs_;
|
labelList filmBottomPatchIDs_;
|
||||||
|
|
||||||
|
|
||||||
// Solution parameters
|
// Solution parameters
|
||||||
|
|
||||||
//- Momentum predictor
|
//- Momentum predictor
|
||||||
Switch momentumPredictor_;
|
Switch momentumPredictor_;
|
||||||
|
|
||||||
//- Number of outer correctors
|
//- Number of outer correctors
|
||||||
label nOuterCorr_;
|
label nOuterCorr_;
|
||||||
|
|
||||||
//- Number of PISO-like correctors
|
//- Number of PISO-like correctors
|
||||||
label nCorr_;
|
label nCorr_;
|
||||||
|
|
||||||
//- Number of non-orthogonal correctors
|
//- Number of non-orthogonal correctors
|
||||||
label nNonOrthCorr_;
|
label nNonOrthCorr_;
|
||||||
|
|
||||||
//- Cumulative continuity error
|
//- Cumulative continuity error
|
||||||
scalar cumulativeContErr_;
|
scalar cumulativeContErr_;
|
||||||
|
|
||||||
|
|
||||||
// Model parameters
|
// Model parameters
|
||||||
|
|
||||||
//- Skin frition coefficient for film/main region interface
|
//- Skin frition coefficient for film/main region interface
|
||||||
scalar Cf_;
|
scalar Cf_;
|
||||||
|
|
||||||
//- Stable film thickness - film cannot detach until this is reached
|
//- Stable film thickness - film cannot detach until this is reached
|
||||||
dimensionedScalar deltaStable_;
|
dimensionedScalar deltaStable_;
|
||||||
|
|
||||||
|
|
||||||
// Thermo properties
|
// Thermo properties
|
||||||
|
|
||||||
//- Density / [kg/m3]
|
//- Density / [kg/m3]
|
||||||
volScalarField rho_;
|
volScalarField rho_;
|
||||||
|
|
||||||
//- Dynamic viscosity / [Pa.s]
|
//- Dynamic viscosity / [Pa.s]
|
||||||
volScalarField mu_;
|
volScalarField mu_;
|
||||||
|
|
||||||
//- Surface tension / [m/s2]
|
//- Surface tension / [m/s2]
|
||||||
volScalarField sigma_;
|
volScalarField sigma_;
|
||||||
|
|
||||||
|
|
||||||
// Fields
|
// Fields
|
||||||
|
|
||||||
//- Film thickness / [m]
|
//- Film thickness / [m]
|
||||||
volScalarField delta_;
|
volScalarField delta_;
|
||||||
|
|
||||||
//- Velocity / [m/s]
|
//- Velocity / [m/s]
|
||||||
volVectorField U_;
|
volVectorField U_;
|
||||||
|
|
||||||
//- Film thickness*density (helper field) / [kg/m2]
|
//- Film thickness*density (helper field) / [kg/m2]
|
||||||
volScalarField deltaRho_;
|
volScalarField deltaRho_;
|
||||||
|
|
||||||
//- Mass flux (includes film thickness) / [kg.m/s]
|
//- Mass flux (includes film thickness) / [kg.m/s]
|
||||||
surfaceScalarField phi_;
|
surfaceScalarField phi_;
|
||||||
|
|
||||||
|
|
||||||
// Transfer fields - to the primary region
|
// Transfer fields - to the primary region
|
||||||
|
|
||||||
//- Return the film mass available for transfer
|
//- Return the film mass available for transfer
|
||||||
volScalarField massForPrimary_;
|
volScalarField massForPrimary_;
|
||||||
|
|
||||||
//- Return the parcel diameters originating from film
|
//- Return the parcel diameters originating from film
|
||||||
volScalarField diametersForPrimary_;
|
volScalarField diametersForPrimary_;
|
||||||
|
|
||||||
|
|
||||||
// Source term fields
|
// Source term fields
|
||||||
|
|
||||||
// Film region - registered to the film region mesh
|
// Film region - registered to the film region mesh
|
||||||
// Note: need boundary value mapped from primary region, and then
|
// Note: need boundary value mapped from primary region, and then
|
||||||
// pushed into the patch internal field
|
// pushed into the patch internal field
|
||||||
|
|
||||||
//- Momementum / [kg/m/s2]
|
//- Momementum / [kg/m/s2]
|
||||||
volVectorField USp_;
|
volVectorField USp_;
|
||||||
|
|
||||||
//- Pressure / [Pa]
|
//- Pressure / [Pa]
|
||||||
volScalarField pSp_;
|
volScalarField pSp_;
|
||||||
|
|
||||||
//- Mass / [kg/m2/s]
|
//- Mass / [kg/m2/s]
|
||||||
volScalarField rhoSp_;
|
volScalarField rhoSp_;
|
||||||
|
|
||||||
|
|
||||||
// Primary region - registered to the primary region mesh
|
// Primary region - registered to the primary region mesh
|
||||||
// Internal use only - not read-in
|
// Internal use only - not read-in
|
||||||
|
|
||||||
//- Momementum / [kg/m/s2]
|
//- Momementum / [kg/m/s2]
|
||||||
volVectorField USpPrimary_;
|
volVectorField USpPrimary_;
|
||||||
|
|
||||||
//- Pressure / [Pa]
|
//- Pressure / [Pa]
|
||||||
volScalarField pSpPrimary_;
|
volScalarField pSpPrimary_;
|
||||||
|
|
||||||
//- Mass / [kg/m2/s]
|
//- Mass / [kg/m2/s]
|
||||||
volScalarField rhoSpPrimary_;
|
volScalarField rhoSpPrimary_;
|
||||||
|
|
||||||
|
|
||||||
// Fields mapped from primary region - registered to the film region
|
// Fields mapped from primary region - registered to the film region
|
||||||
// Note: need both boundary AND patch internal fields to be mapped
|
// Note: need both boundary AND patch internal fields to be mapped
|
||||||
|
|
||||||
//- Velocity / [m/s]
|
//- Velocity / [m/s]
|
||||||
volVectorField UPrimary_;
|
volVectorField UPrimary_;
|
||||||
|
|
||||||
//- Pressure / [Pa]
|
//- Pressure / [Pa]
|
||||||
volScalarField pPrimary_;
|
volScalarField pPrimary_;
|
||||||
|
|
||||||
|
|
||||||
// Sub-models
|
// Sub-models
|
||||||
|
|
||||||
//- Injection
|
//- Injection
|
||||||
autoPtr<injectionModel> injection_;
|
autoPtr<injectionModel> injection_;
|
||||||
|
|
||||||
|
|
||||||
// Checks
|
// Checks
|
||||||
|
|
||||||
//- Cumulative mass added via sources [kg]
|
//- Cumulative mass added via sources [kg]
|
||||||
scalar addedMass_;
|
scalar addedMass_;
|
||||||
|
|
||||||
|
|
||||||
// Detached surface properties
|
// Detached surface properties
|
||||||
|
|
||||||
//- Cumulative mass detached [kg]
|
//- Cumulative mass detached [kg]
|
||||||
scalar detachedMass_;
|
scalar detachedMass_;
|
||||||
|
|
||||||
|
|
||||||
// Protected member functions
|
// Protected member functions
|
||||||
|
|
||||||
//- Initialise the film model - called on construction
|
//- Initialise the film model - called on construction
|
||||||
void initialise();
|
void initialise();
|
||||||
|
|
||||||
//- Read control parameters from dictionary
|
//- Read control parameters from dictionary
|
||||||
virtual bool read();
|
virtual bool read();
|
||||||
|
|
||||||
//- Reset source term fields
|
//- Reset source term fields
|
||||||
virtual void resetPrimaryRegionSourceTerms();
|
virtual void resetPrimaryRegionSourceTerms();
|
||||||
|
|
||||||
//- Transfer fields from the primary region to the film region
|
//- Transfer fields from the primary region to the film region
|
||||||
virtual void transferPrimaryRegionFields();
|
virtual void transferPrimaryRegionFields();
|
||||||
|
|
||||||
//- Correct the source terms for film that detaches from film region
|
//- Correct the source terms for film that detaches from film region
|
||||||
virtual void correctDetachedFilm();
|
virtual void correctDetachedFilm();
|
||||||
|
|
||||||
// Explicit pressure source contribution
|
// Explicit pressure source contribution
|
||||||
virtual tmp<volScalarField> pu();
|
virtual tmp<volScalarField> pu();
|
||||||
|
|
||||||
// Implicit pressure source coefficient
|
// Implicit pressure source coefficient
|
||||||
virtual tmp<volScalarField> pp();
|
virtual tmp<volScalarField> pp();
|
||||||
|
|
||||||
//- Update the film sub-models
|
//- Update the film sub-models
|
||||||
virtual void updateSubmodels();
|
virtual void updateSubmodels();
|
||||||
|
|
||||||
//- Courant number evaluation
|
//- Courant number evaluation
|
||||||
virtual scalar CourantNumber() const;
|
virtual scalar CourantNumber() const;
|
||||||
|
|
||||||
//- Continuity check
|
//- Continuity check
|
||||||
virtual void continuityCheck();
|
virtual void continuityCheck();
|
||||||
|
|
||||||
//- Return the stress term for the momentum equation
|
//- Return the stress term for the momentum equation
|
||||||
virtual tmp<fvVectorMatrix> tau(volVectorField& dU) const;
|
virtual tmp<fvVectorMatrix> tau(volVectorField& dU) const;
|
||||||
|
|
||||||
//- Constrain a film region master/slave boundaries of a field to a
|
//- Constrain a film region master/slave boundaries of a field to a
|
||||||
// given value
|
// given value
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void constrainFilmField
|
void constrainFilmField
|
||||||
(
|
(
|
||||||
Type& field,
|
Type& field,
|
||||||
const typename Type::cmptType& value
|
const typename Type::cmptType& value
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Equations
|
// Equations
|
||||||
|
|
||||||
//- Solve continuity equation
|
//- Solve continuity equation
|
||||||
virtual void solveContinuity();
|
virtual void solveContinuity();
|
||||||
|
|
||||||
//- Solve for film velocity
|
//- Solve for film velocity
|
||||||
virtual tmp<fvVectorMatrix> solveMomentum
|
virtual tmp<fvVectorMatrix> solveMomentum
|
||||||
(
|
(
|
||||||
const volScalarField& pu,
|
const volScalarField& pu,
|
||||||
const volScalarField& pp
|
const volScalarField& pp
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Solve coupled velocity-thickness equations
|
//- Solve coupled velocity-thickness equations
|
||||||
virtual void solveThickness
|
virtual void solveThickness
|
||||||
(
|
(
|
||||||
const volScalarField& pu,
|
const volScalarField& pu,
|
||||||
const volScalarField& pp,
|
const volScalarField& pp,
|
||||||
const fvVectorMatrix& UEqn
|
const fvVectorMatrix& UEqn
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("kinematicSingleLayer");
|
TypeName("kinematicSingleLayer");
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
kinematicSingleLayer
|
kinematicSingleLayer
|
||||||
(
|
(
|
||||||
const word& modelType,
|
const word& modelType,
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
const dimensionedVector& g
|
const dimensionedVector& g
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~kinematicSingleLayer();
|
virtual ~kinematicSingleLayer();
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
// Access
|
// Access
|
||||||
|
|
||||||
//- Return the film mesh database
|
//- Return the film mesh database
|
||||||
virtual const fvMesh& film() const;
|
virtual const fvMesh& film() const;
|
||||||
|
|
||||||
//- Return the patch normal vectors
|
//- Return the patch normal vectors
|
||||||
inline const volVectorField& nHat() const;
|
inline const volVectorField& nHat() const;
|
||||||
|
|
||||||
//- Return the face area magnitudes / [m2]
|
//- Return the face area magnitudes / [m2]
|
||||||
inline const volScalarField& magSf() const;
|
inline const volScalarField& magSf() const;
|
||||||
|
|
||||||
//- Return the list of coupled patches on the film region
|
//- Return the list of coupled patches on the film region
|
||||||
virtual const labelList& filmBottomPatchIDs() const;
|
virtual const labelList& filmBottomPatchIDs() const;
|
||||||
|
|
||||||
//- Return the list of patches oppositte coupled patches
|
//- Return the list of patches oppositte coupled patches
|
||||||
virtual const labelList& filmTopPatchIDs() const;
|
virtual const labelList& filmTopPatchIDs() const;
|
||||||
|
|
||||||
//- Return the list of coupled patches on the primary region
|
//- Return the list of coupled patches on the primary region
|
||||||
virtual const labelList& primaryPatchIDs() const;
|
virtual const labelList& primaryPatchIDs() const;
|
||||||
|
|
||||||
|
|
||||||
// Solution parameters
|
// Solution parameters
|
||||||
|
|
||||||
//- Return the momentum predictor
|
//- Return the momentum predictor
|
||||||
inline const Switch& momentumPredictor() const;
|
inline const Switch& momentumPredictor() const;
|
||||||
|
|
||||||
//- Return the number of outer correctors
|
//- Return the number of outer correctors
|
||||||
inline label nOuterCorr() const;
|
inline label nOuterCorr() const;
|
||||||
|
|
||||||
//- Return the number of PISO correctors
|
//- Return the number of PISO correctors
|
||||||
inline label nCorr() const;
|
inline label nCorr() const;
|
||||||
|
|
||||||
//- Return the number of non-orthogonal correctors
|
//- Return the number of non-orthogonal correctors
|
||||||
inline label nNonOrthCorr() const;
|
inline label nNonOrthCorr() const;
|
||||||
|
|
||||||
|
|
||||||
// Model parameters
|
// Model parameters
|
||||||
|
|
||||||
//- Return the skin friction coefficient
|
//- Return the skin friction coefficient
|
||||||
inline scalar Cf() const;
|
inline scalar Cf() const;
|
||||||
|
|
||||||
|
|
||||||
// Thermo properties
|
// Thermo properties
|
||||||
|
|
||||||
//- Return const access to the dynamic viscosity / [Pa.s]
|
//- Return const access to the dynamic viscosity / [Pa.s]
|
||||||
inline const volScalarField& mu() const;
|
inline const volScalarField& mu() const;
|
||||||
|
|
||||||
//- Return const access to the surface tension / [m/s2]
|
//- Return const access to the surface tension / [m/s2]
|
||||||
inline const volScalarField& sigma() const;
|
inline const volScalarField& sigma() const;
|
||||||
|
|
||||||
|
|
||||||
// Fields
|
// Fields
|
||||||
|
|
||||||
//- Return const access to the film thickness / [m]
|
//- Return const access to the film thickness / [m]
|
||||||
inline const volScalarField& delta() const;
|
inline const volScalarField& delta() const;
|
||||||
|
|
||||||
//- Return the film velocity [m/s]
|
//- Return the film velocity [m/s]
|
||||||
virtual const volVectorField& U() const;
|
virtual const volVectorField& U() const;
|
||||||
|
|
||||||
//- Return the film density [kg/m3]
|
//- Return the film density [kg/m3]
|
||||||
virtual const volScalarField& rho() const;
|
virtual const volScalarField& rho() const;
|
||||||
|
|
||||||
//- Return the film temperature [K]
|
//- Return the film temperature [K]
|
||||||
virtual const volScalarField& T() const;
|
virtual const volScalarField& T() const;
|
||||||
|
|
||||||
//- Return the film specific heat capacity [J/kg/K]
|
//- Return the film specific heat capacity [J/kg/K]
|
||||||
virtual const volScalarField& cp() const;
|
virtual const volScalarField& cp() const;
|
||||||
|
|
||||||
|
|
||||||
// Transfer fields - to the primary region
|
// Transfer fields - to the primary region
|
||||||
|
|
||||||
//- Return the film mass available for transfer
|
//- Return the film mass available for transfer
|
||||||
virtual const volScalarField& massForPrimary() const;
|
virtual const volScalarField& massForPrimary() const;
|
||||||
|
|
||||||
//- Return the parcel diameters originating from film
|
//- Return the parcel diameters originating from film
|
||||||
virtual const volScalarField& diametersForPrimary() const;
|
virtual const volScalarField& diametersForPrimary() const;
|
||||||
|
|
||||||
|
|
||||||
// External helper functions
|
// External helper functions
|
||||||
|
|
||||||
//- Return true if patchI on the primary region is a coupled patch
|
//- Return true if patchI on the primary region is a coupled patch
|
||||||
// to the film region
|
// to the film region
|
||||||
virtual bool isFilmPatch(const label patchI) const;
|
virtual bool isFilmPatch(const label patchI) const;
|
||||||
|
|
||||||
//- External hook to add sources to the film
|
//- External hook to add sources to the film
|
||||||
virtual void addSources
|
virtual void addSources
|
||||||
(
|
(
|
||||||
const label patchI, // patchI on primary region
|
const label patchI, // patchI on primary region
|
||||||
const label faceI, // faceI of patchI
|
const label faceI, // faceI of patchI
|
||||||
const scalar massSource, // [kg]
|
const scalar massSource, // [kg]
|
||||||
const vector& momentumSource, // [kg.m/s] (tangential momentum)
|
const vector& momentumSource, // [kg.m/s] (tangential momentum)
|
||||||
const scalar pressureSource, // [kg.m/s] (normal momentum)
|
const scalar pressureSource, // [kg.m/s] (normal momentum)
|
||||||
const scalar energySource = 0 // [J]
|
const scalar energySource = 0 // [J]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Source fields (read/write access)
|
// Source fields (read/write access)
|
||||||
|
|
||||||
// Primary region
|
// Primary region
|
||||||
|
|
||||||
//- Momementum / [kg/m/s2]
|
//- Momementum / [kg/m/s2]
|
||||||
inline volVectorField& USpPrimary();
|
inline volVectorField& USpPrimary();
|
||||||
|
|
||||||
//- Pressure / [Pa]
|
//- Pressure / [Pa]
|
||||||
inline volScalarField& pSpPrimary();
|
inline volScalarField& pSpPrimary();
|
||||||
|
|
||||||
//- Mass / [kg/m2/s]
|
//- Mass / [kg/m2/s]
|
||||||
inline volScalarField& rhoSpPrimary();
|
inline volScalarField& rhoSpPrimary();
|
||||||
|
|
||||||
|
|
||||||
// Film region
|
// Film region
|
||||||
|
|
||||||
//- Momementum / [kg/m/s2]
|
//- Momementum / [kg/m/s2]
|
||||||
inline volVectorField& USp();
|
inline volVectorField& USp();
|
||||||
|
|
||||||
//- Pressure / [Pa]
|
//- Pressure / [Pa]
|
||||||
inline volScalarField& pSp();
|
inline volScalarField& pSp();
|
||||||
|
|
||||||
//- Mass / [kg/m2/s]
|
//- Mass / [kg/m2/s]
|
||||||
inline volScalarField& rhoSp();
|
inline volScalarField& rhoSp();
|
||||||
|
|
||||||
|
|
||||||
// Sub-models
|
// Sub-models
|
||||||
|
|
||||||
//- Injection
|
//- Injection
|
||||||
inline injectionModel& injection();
|
inline injectionModel& injection();
|
||||||
|
|
||||||
|
|
||||||
// Helper functions
|
// Helper functions
|
||||||
|
|
||||||
//- Return the gravity tangential component contributions
|
//- Return the gravity tangential component contributions
|
||||||
inline tmp<volVectorField> gTan() const;
|
inline tmp<volVectorField> gTan() const;
|
||||||
|
|
||||||
//- Return the gravity normal-to-patch component contribution
|
//- Return the gravity normal-to-patch component contribution
|
||||||
inline tmp<volScalarField> gNorm() const;
|
inline tmp<volScalarField> gNorm() const;
|
||||||
|
|
||||||
//- Return the gravity normal-to-patch component contribution
|
//- Return the gravity normal-to-patch component contribution
|
||||||
// Clipped so that only non-zero if g & nHat_ < 0
|
// Clipped so that only non-zero if g & nHat_ < 0
|
||||||
inline tmp<volScalarField> gNormClipped() const;
|
inline tmp<volScalarField> gNormClipped() const;
|
||||||
|
|
||||||
|
|
||||||
// Evolution
|
// Evolution
|
||||||
|
|
||||||
//- Evolve the film equations
|
//- Evolve the film equations
|
||||||
virtual void evolveFilm();
|
virtual void evolveFilm();
|
||||||
|
|
||||||
|
|
||||||
// I-O
|
// I-O
|
||||||
|
|
||||||
//- Provide some feedback
|
//- Provide some feedback
|
||||||
virtual void info() const;
|
virtual void info() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace surfaceFilmModels
|
} // End namespace surfaceFilmModels
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#ifdef NoRepository
|
#ifdef NoRepository
|
||||||
# include "kinematicSingleLayerTemplates.C"
|
# include "kinematicSingleLayerTemplates.C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "kinematicSingleLayerI.H"
|
#include "kinematicSingleLayerI.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -1,62 +1,62 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "kinematicSingleLayer.H"
|
#include "kinematicSingleLayer.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::surfaceFilmModels::kinematicSingleLayer::constrainFilmField
|
void Foam::surfaceFilmModels::kinematicSingleLayer::constrainFilmField
|
||||||
(
|
(
|
||||||
Type& field,
|
Type& field,
|
||||||
const typename Type::cmptType& value
|
const typename Type::cmptType& value
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
forAll(filmBottomPatchIDs_, i)
|
forAll(filmBottomPatchIDs_, i)
|
||||||
{
|
{
|
||||||
label patchI = filmBottomPatchIDs_[i];
|
label patchI = filmBottomPatchIDs_[i];
|
||||||
field.boundaryField()[patchI] = value;
|
field.boundaryField()[patchI] = value;
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "Constraining " << field.name()
|
Info<< "Constraining " << field.name()
|
||||||
<< " boundary " << field.boundaryField()[patchI].patch().name()
|
<< " boundary " << field.boundaryField()[patchI].patch().name()
|
||||||
<< " to " << value << endl;
|
<< " to " << value << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
forAll(filmTopPatchIDs_, i)
|
forAll(filmTopPatchIDs_, i)
|
||||||
{
|
{
|
||||||
label patchI = filmTopPatchIDs_[i];
|
label patchI = filmTopPatchIDs_[i];
|
||||||
field.boundaryField()[patchI] = value;
|
field.boundaryField()[patchI] = value;
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "Constraining " << field.name()
|
Info<< "Constraining " << field.name()
|
||||||
<< " boundary " << field.boundaryField()[patchI].patch().name()
|
<< " boundary " << field.boundaryField()[patchI].patch().name()
|
||||||
<< " to " << value << endl;
|
<< " to " << value << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -137,7 +137,7 @@ Foam::tmp<Foam::fvScalarMatrix> Foam::surfaceFilmModels::thermoSingleLayer::q
|
|||||||
dimensionedScalar("zero", dimTemperature, 0.0)
|
dimensionedScalar("zero", dimTemperature, 0.0)
|
||||||
);
|
);
|
||||||
|
|
||||||
for (label i=0; i<filmBottomPatchIDs_.size(); i++)
|
forAll(filmBottomPatchIDs_, i)
|
||||||
{
|
{
|
||||||
label patchI = filmBottomPatchIDs_[i];
|
label patchI = filmBottomPatchIDs_[i];
|
||||||
const polyPatch& pp = filmRegion_.boundaryMesh()[patchI];
|
const polyPatch& pp = filmRegion_.boundaryMesh()[patchI];
|
||||||
|
|||||||
@ -160,8 +160,8 @@ Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::omega
|
|||||||
pf = 1.0;
|
pf = 1.0;
|
||||||
pr = 1.0;
|
pr = 1.0;
|
||||||
|
|
||||||
label Nl = R.lhs().size();
|
const label Nl = R.lhs().size();
|
||||||
label Nr = R.rhs().size();
|
const label Nr = R.rhs().size();
|
||||||
|
|
||||||
label slRef = 0;
|
label slRef = 0;
|
||||||
lRef = R.lhs()[slRef].index;
|
lRef = R.lhs()[slRef].index;
|
||||||
@ -331,7 +331,7 @@ void Foam::ODEChemistryModel<CompType, ThermoType>::jacobian
|
|||||||
// length of the first argument must be nSpecie()
|
// length of the first argument must be nSpecie()
|
||||||
dcdt = omega(c2, T, p);
|
dcdt = omega(c2, T, p);
|
||||||
|
|
||||||
for (label ri=0; ri<reactions_.size(); ri++)
|
forAll(reactions_, ri)
|
||||||
{
|
{
|
||||||
const Reaction<ThermoType>& R = reactions_[ri];
|
const Reaction<ThermoType>& R = reactions_[ri];
|
||||||
|
|
||||||
|
|||||||
@ -75,7 +75,7 @@ Foam::scalar Foam::EulerImplicit<CompType, ThermoType>::solve
|
|||||||
RR.source()[i] = c[i]/dt;
|
RR.source()[i] = c[i]/dt;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (label i=0; i<this->model_.reactions().size(); i++)
|
forAll(this->model_.reactions(), i)
|
||||||
{
|
{
|
||||||
const Reaction<ThermoType>& R = this->model_.reactions()[i];
|
const Reaction<ThermoType>& R = this->model_.reactions()[i];
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ Foam::scalar Foam::EulerImplicit<CompType, ThermoType>::solve
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (label s=0; s<R.lhs().size(); s++)
|
forAll(R.lhs(), s)
|
||||||
{
|
{
|
||||||
label si = R.lhs()[s].index;
|
label si = R.lhs()[s].index;
|
||||||
scalar sl = R.lhs()[s].stoichCoeff;
|
scalar sl = R.lhs()[s].stoichCoeff;
|
||||||
@ -108,7 +108,7 @@ Foam::scalar Foam::EulerImplicit<CompType, ThermoType>::solve
|
|||||||
RR[si][lRef] += sl*pf*corr;
|
RR[si][lRef] += sl*pf*corr;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (label s=0; s<R.rhs().size(); s++)
|
forAll(R.rhs(), s)
|
||||||
{
|
{
|
||||||
label si = R.rhs()[s].index;
|
label si = R.rhs()[s].index;
|
||||||
scalar sr = R.rhs()[s].stoichCoeff;
|
scalar sr = R.rhs()[s].stoichCoeff;
|
||||||
|
|||||||
@ -86,7 +86,7 @@ Foam::scalar Foam::ode<CompType, ThermoType>::solve
|
|||||||
dtEst
|
dtEst
|
||||||
);
|
);
|
||||||
|
|
||||||
for (label i=0; i<c.size(); i++)
|
forAll(c, i)
|
||||||
{
|
{
|
||||||
c[i] = max(0.0, c1[i]);
|
c[i] = max(0.0, c1[i]);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -66,7 +66,7 @@ Foam::scalar Foam::sequential<CompType, ThermoType>::solve
|
|||||||
scalar pf, cf, pb, cb;
|
scalar pf, cf, pb, cb;
|
||||||
label lRef, rRef;
|
label lRef, rRef;
|
||||||
|
|
||||||
for (label i=0; i<this->model_.reactions().size(); i++)
|
forAll(this->model_.reactions(), i)
|
||||||
{
|
{
|
||||||
const Reaction<ThermoType>& R = this->model_.reactions()[i];
|
const Reaction<ThermoType>& R = this->model_.reactions()[i];
|
||||||
|
|
||||||
@ -95,7 +95,7 @@ Foam::scalar Foam::sequential<CompType, ThermoType>::solve
|
|||||||
|
|
||||||
|
|
||||||
// update species
|
// update species
|
||||||
for (label s=0; s<R.lhs().size(); s++)
|
forAll(R.lhs(), s)
|
||||||
{
|
{
|
||||||
label si = R.lhs()[s].index;
|
label si = R.lhs()[s].index;
|
||||||
scalar sl = R.lhs()[s].stoichCoeff;
|
scalar sl = R.lhs()[s].stoichCoeff;
|
||||||
@ -103,7 +103,7 @@ Foam::scalar Foam::sequential<CompType, ThermoType>::solve
|
|||||||
c[si] = max(0.0, c[si]);
|
c[si] = max(0.0, c[si]);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (label s=0; s<R.rhs().size(); s++)
|
forAll(R.rhs(), s)
|
||||||
{
|
{
|
||||||
label si = R.rhs()[s].index;
|
label si = R.rhs()[s].index;
|
||||||
scalar sr = R.rhs()[s].stoichCoeff;
|
scalar sr = R.rhs()[s].stoichCoeff;
|
||||||
|
|||||||
@ -47,7 +47,7 @@ void Foam::Reaction<ReactionThermo>::setThermo
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (label i=0; i<lhs_.size(); i++)
|
forAll(lhs_, i)
|
||||||
{
|
{
|
||||||
operator-=
|
operator-=
|
||||||
(
|
(
|
||||||
|
|||||||
@ -450,7 +450,7 @@ bool Foam::faceTriangulation::split
|
|||||||
label index1 = -1;
|
label index1 = -1;
|
||||||
label index2 = -1;
|
label index2 = -1;
|
||||||
|
|
||||||
for (label iter = 0; iter < f.size(); iter++)
|
forAll(f, iter)
|
||||||
{
|
{
|
||||||
findDiagonal
|
findDiagonal
|
||||||
(
|
(
|
||||||
|
|||||||
@ -33,10 +33,8 @@ License
|
|||||||
#include "PackedBoolList.H"
|
#include "PackedBoolList.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
namespace Foam
|
|
||||||
{
|
defineTypeNameAndDebug(Foam::triSurface, 0);
|
||||||
defineTypeNameAndDebug(Foam::triSurface, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::fileName Foam::triSurface::triSurfInstance(const Time& d)
|
Foam::fileName Foam::triSurface::triSurfInstance(const Time& d)
|
||||||
|
|||||||
@ -12,105 +12,105 @@ FoamFile
|
|||||||
class dictionary;
|
class dictionary;
|
||||||
object blockMeshDict;
|
object blockMeshDict;
|
||||||
}
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
convertToMeters 0.1;
|
convertToMeters 0.1;
|
||||||
|
|
||||||
vertices
|
vertices
|
||||||
(
|
(
|
||||||
( 0.500 0.000 0.000)
|
( 0.500 0.000 0.000)
|
||||||
( 0.369 0.338 0.000)
|
( 0.369 0.338 0.000)
|
||||||
( 0.338 0.369 0.000)
|
( 0.338 0.369 0.000)
|
||||||
( 0.000 0.500 0.000)
|
( 0.000 0.500 0.000)
|
||||||
( 0.737 0.676 0.000)
|
( 0.737 0.676 0.000)
|
||||||
( 0.074 0.068 0.000)
|
( 0.074 0.068 0.000)
|
||||||
( 0.676 0.737 0.000)
|
( 0.676 0.737 0.000)
|
||||||
( 0.068 0.074 0.000)
|
( 0.068 0.074 0.000)
|
||||||
( 0.000 1.000 0.000)
|
( 0.000 1.000 0.000)
|
||||||
( 1.000 0.000 0.000)
|
( 1.000 0.000 0.000)
|
||||||
( 0.100 0.000 0.000)
|
( 0.100 0.000 0.000)
|
||||||
( 0.000 0.100 0.000)
|
( 0.000 0.100 0.000)
|
||||||
( 0.500 0.000 2.000)
|
( 0.500 0.000 2.000)
|
||||||
( 0.369 0.338 2.000)
|
( 0.369 0.338 2.000)
|
||||||
( 0.338 0.369 2.000)
|
( 0.338 0.369 2.000)
|
||||||
( 0.000 0.500 2.000)
|
( 0.000 0.500 2.000)
|
||||||
( 0.737 0.676 2.000)
|
( 0.737 0.676 2.000)
|
||||||
( 0.074 0.068 2.000)
|
( 0.074 0.068 2.000)
|
||||||
( 0.676 0.737 2.000)
|
( 0.676 0.737 2.000)
|
||||||
( 0.068 0.074 2.000)
|
( 0.068 0.074 2.000)
|
||||||
( 0.000 1.000 2.000)
|
( 0.000 1.000 2.000)
|
||||||
( 1.000 0.000 2.000)
|
( 1.000 0.000 2.000)
|
||||||
( 0.100 0.000 2.000)
|
( 0.100 0.000 2.000)
|
||||||
( 0.000 0.100 2.000)
|
( 0.000 0.100 2.000)
|
||||||
);
|
);
|
||||||
|
|
||||||
blocks
|
blocks
|
||||||
(
|
(
|
||||||
hex (1 0 9 4 13 12 21 16) (10 20 40) simpleGrading (1 1 1)
|
hex (1 0 9 4 13 12 21 16) (10 20 40) simpleGrading (1 1 1)
|
||||||
hex (2 1 4 6 14 13 16 18) (2 20 40) simpleGrading (1 1 1)
|
hex (2 1 4 6 14 13 16 18) (2 20 40) simpleGrading (1 1 1)
|
||||||
hex (3 2 6 8 15 14 18 20) (10 20 40) simpleGrading (1 1 1)
|
hex (3 2 6 8 15 14 18 20) (10 20 40) simpleGrading (1 1 1)
|
||||||
hex (5 10 0 1 17 22 12 13) (10 20 40) simpleGrading (1 1 1)
|
hex (5 10 0 1 17 22 12 13) (10 20 40) simpleGrading (1 1 1)
|
||||||
hex (11 7 2 3 23 19 14 15) (10 20 40) simpleGrading (1 1 1)
|
hex (11 7 2 3 23 19 14 15) (10 20 40) simpleGrading (1 1 1)
|
||||||
);
|
);
|
||||||
|
|
||||||
edges
|
edges
|
||||||
(
|
(
|
||||||
arc 0 1 ( 0.470 0.171 0.000 )
|
arc 0 1 ( 0.470 0.171 0.000 )
|
||||||
arc 12 13 ( 0.470 0.171 2.000 )
|
arc 12 13 ( 0.470 0.171 2.000 )
|
||||||
arc 2 3 ( 0.171 0.470 0.000 )
|
arc 2 3 ( 0.171 0.470 0.000 )
|
||||||
arc 14 15 ( 0.171 0.470 2.000 )
|
arc 14 15 ( 0.171 0.470 2.000 )
|
||||||
arc 9 4 ( 0.940 0.342 0.000 )
|
arc 9 4 ( 0.940 0.342 0.000 )
|
||||||
arc 21 16 ( 0.940 0.342 2.000 )
|
arc 21 16 ( 0.940 0.342 2.000 )
|
||||||
arc 5 10 ( 0.094 0.034 0.000 )
|
arc 5 10 ( 0.094 0.034 0.000 )
|
||||||
arc 17 22 ( 0.094 0.034 2.000 )
|
arc 17 22 ( 0.094 0.034 2.000 )
|
||||||
arc 6 8 ( 0.342 0.940 0.000 )
|
arc 6 8 ( 0.342 0.940 0.000 )
|
||||||
arc 18 20 ( 0.342 0.940 2.000 )
|
arc 18 20 ( 0.342 0.940 2.000 )
|
||||||
arc 11 7 ( 0.034 0.094 0.000 )
|
arc 11 7 ( 0.034 0.094 0.000 )
|
||||||
arc 23 19 ( 0.034 0.094 2.000 )
|
arc 23 19 ( 0.034 0.094 2.000 )
|
||||||
);
|
);
|
||||||
|
|
||||||
patches
|
patches
|
||||||
(
|
(
|
||||||
patch inlet
|
patch inlet
|
||||||
(
|
(
|
||||||
(13 12 21 16)
|
(13 12 21 16)
|
||||||
(14 13 16 18)
|
(14 13 16 18)
|
||||||
(15 14 18 20)
|
(15 14 18 20)
|
||||||
(17 22 12 13)
|
(17 22 12 13)
|
||||||
(23 19 14 15)
|
(23 19 14 15)
|
||||||
)
|
)
|
||||||
patch outlet
|
patch outlet
|
||||||
(
|
(
|
||||||
(1 4 9 0)
|
(1 4 9 0)
|
||||||
(2 6 4 1)
|
(2 6 4 1)
|
||||||
(3 8 6 2)
|
(3 8 6 2)
|
||||||
(5 1 0 10)
|
(5 1 0 10)
|
||||||
(11 3 2 7)
|
(11 3 2 7)
|
||||||
)
|
)
|
||||||
wall innerWall
|
wall innerWall
|
||||||
(
|
(
|
||||||
(2 1 13 14)
|
(2 1 13 14)
|
||||||
(5 10 22 17)
|
(5 10 22 17)
|
||||||
(5 17 13 1)
|
(5 17 13 1)
|
||||||
(11 7 19 23)
|
(11 7 19 23)
|
||||||
(7 2 14 19)
|
(7 2 14 19)
|
||||||
)
|
)
|
||||||
wall outerWall
|
wall outerWall
|
||||||
(
|
(
|
||||||
(4 16 21 9)
|
(4 16 21 9)
|
||||||
(6 18 16 4)
|
(6 18 16 4)
|
||||||
(8 20 18 6)
|
(8 20 18 6)
|
||||||
)
|
)
|
||||||
cyclic cyclic
|
cyclic cyclic
|
||||||
(
|
(
|
||||||
(0 9 21 12)
|
(0 9 21 12)
|
||||||
(10 0 12 22)
|
(10 0 12 22)
|
||||||
(3 15 20 8)
|
(3 15 20 8)
|
||||||
(11 23 15 3)
|
(11 23 15 3)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
mergeMatchPairs
|
mergeMatchPairs
|
||||||
(
|
(
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user