Go to the documentation of this file.
36 Foam::label Foam::eddy::Gamma2Values[] = {1, 2, 3, 4, 5, 6, 7, 8};
42 bool Foam::eddy::setScales
53 static const scalar gamma2VsC2[8] =
54 {2, 1.875, 1.737, 1.75, 0.91, 0.825, 0.806, 1.5};
59 const scalar
c2 = gamma2VsC2[gamma2 - 1];
62 const label d1 = dir1_;
63 const label d2 = (d1 + 1) % 3;
64 const label d3 = (d1 + 2) % 3;
99 <<
", gamma2:" << gamma2
100 <<
", gamma:" <<
gamma
102 <<
", sigma2: " << sigma2
103 <<
", slos2: " << slos2
104 <<
", sigmaX:" << sigmaX
105 <<
", sigma:" <<
sigma
106 <<
", alpha:" <<
alpha
131 const label patchFaceI,
132 const point& position0,
139 patchFaceI_(patchFaceI),
140 position0_(position0),
162 Pout<<
"Rpg.T() & R & Rpg: " << (Rpg_.
T() &
R & Rpg_) <<
endl;
178 const label gamma2 = Gamma2[i];
180 if (setScales(sigmaX, gamma2,
e,
lambda, sigma_, alpha_))
204 <<
"Unable to set eddy intensity for eddy: " << *
this
217 patchFaceI_(
e.patchFaceI_),
218 position0_(
e.position0_),
235 if (
mag(r) >= scalar(1))
250 return c1_*(Rpg_ & uPrimep);
261 os <<
"v " <<
p.x() <<
" " <<
p.y() <<
" " <<
p.z() <<
nl;
267 const label pointOffset,
278 static const label nFaceAxis = 20;
279 static const label nFaceTheta = 22;
280 static const label nEddyPoints = (nFaceAxis - 1)*nFaceTheta + 2;
281 static FixedList<point, nEddyPoints>
x;
286 label pointI = pointOffset;
291 const label dir2 = (dir1_ + 1) % 3;
292 const label dir3 = (dir1_ + 2) % 3;
295 x[0] = axisDir*
s[dir1_];
296 x[nEddyPoints - 1] = - axisDir*
s[dir1_];
299 for (label axisI = 1; axisI < nFaceAxis; ++axisI)
301 const scalar z =
s[dir1_]*
cos(axisI*dPhi);
304 for (label thetaI = 0; thetaI < nFaceTheta; ++thetaI)
306 const scalar theta = thetaI*dTheta;
309 p[dir2] = r*
sin(theta);
310 p[dir3] = r*
cos(theta);
317 const point p = position(
n) + (Rpg_ &
x[i]);
318 os <<
"v " <<
p.x() <<
" " <<
p.y() <<
" " <<
p.z() <<
nl;
322 for (label faceI = 0; faceI < nFaceTheta; ++faceI)
324 const label p1 = pointI + 1;
325 const label p2 = p1 + faceI + 1;
327 if (faceI == nFaceTheta - 1) p3 -= nFaceTheta;
328 os <<
"f " << p1 <<
" " << p2 <<
" " << p3 <<
nl;
330 const label q1 = pointI + nEddyPoints;
331 const label q2 = q1 - faceI - 1;
333 if (faceI == nFaceTheta - 1) q3 += nFaceTheta;
334 os <<
"f " << q1 <<
" " << q2 <<
" " << q3 <<
nl;
338 for (label axisI = 1; axisI < nFaceAxis - 1; ++axisI)
340 for (label thetaI = 0; thetaI < nFaceTheta; ++thetaI)
342 const label p1 = pointI + 1 + (axisI - 1)*nFaceTheta + thetaI + 1;
343 const label p2 = p1 + nFaceTheta;
347 if (thetaI == nFaceTheta - 1)
352 os <<
"f " << p1 <<
" " << p2 <<
" " << p3 <<
" " << p4 <<
nl;
A templated (3 x 3) tensor of objects of <T> derived from MatrixSpace.
regionProperties rp(runTime)
Foam::UList< Foam::label > Foam::eddy::Gamma2 &[0] Gamma2Values
dimensioned< Type > T() const
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
void writeCentreOBJ(const vector &n, Ostream &os) const
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
vector epsilon(Random &rndGen) const
static constexpr const zero Zero
dimensionedVector eigenValues(const dimensionedSymmTensor &dt)
Different types of constants.
const dimensionedScalar alpha
dimensionedScalar sin(const dimensionedScalar &ds)
dimensionedTensor eigenVectors(const dimensionedSymmTensor &dt)
Cmpt cmptProduct(const VectorSpace< Form, Cmpt, Ncmpts > &vs)
void shuffle(UList< Type > &values)
Class to describe eddies for the turbulentDFSEMInletFvPatchVectorField boundary condition.
Ostream & endl(Ostream &os)
label writeSurfaceOBJ(const label pointOffset, const vector &n, Ostream &os) const
void cmptMin(FieldField< Field, typename FieldField< Field, Type >::cmptType > &cf, const FieldField< Field, Type > &f)
#define R(A, B, C, D, E, F, K, M)
dimensionedScalar beta("beta", dimless/dimTemperature, laminarTransport)
tmp< DimensionedField< typename DimensionedField< Type, GeoMesh >::cmptType, GeoMesh >> cmptAv(const DimensionedField< Type, GeoMesh > &df)
Vector< Cmpt > vectorComponent(const direction cmpt) const
constexpr scalar twoPi(2 *M_PI)
dimensionedScalar lambda("lambda", dimTime/sqr(dimLength), laminarTransport)
OBJstream os(runTime.globalPath()/outputName)
Cmpt cmptSum(const SphericalTensor< Cmpt > &st)
const dimensionedScalar c2
Vector< scalar > vector
A scalar version of the templated Vector.
dimensioned< Type > cmptDivide(const dimensioned< Type > &, const dimensioned< Type > &)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
constexpr scalar pi(M_PI)
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A 1D vector of objects of type <T> with a fixed length <N>.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
const dimensionedScalar e
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
dimensionedScalar sigma("sigma", dimMass/sqr(dimTime), transportProperties)
vector point
Point is a vector.
vector uPrime(const point &xp, const vector &n) const
#define WarningInFunction
static constexpr direction nComponents
static const Identity< scalar > I
dimensionedScalar cos(const dimensionedScalar &ds)