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 scalar
c2 = gamma2VsC2[gamma2 - 1];
63 label d2 = (d1 + 1) % 3;
64 label d3 = (d1 + 2) % 3;
98 <<
", gamma2:" << gamma2
99 <<
", gamma:" <<
gamma
101 <<
", sigma2: " << sigma2
102 <<
", slos2: " << slos2
103 <<
", sigmaX:" << sigmaX
104 <<
", sigma:" <<
sigma
105 <<
", alpha:" <<
alpha
130 const label patchFaceI,
131 const point& position0,
138 patchFaceI_(patchFaceI),
139 position0_(position0),
161 Pout<<
"Rpg.T() & R & Rpg: " << (Rpg_.T() &
R & Rpg_) <<
endl;
177 label g2 = Gamma2[i];
179 if (setScales(sigmaX, g2,
e,
lambda, sigma_, alpha_))
203 <<
"Unable to set eddy intensity for eddy: " << *
this
216 patchFaceI_(
e.patchFaceI_),
217 position0_(
e.position0_),
249 return c1_*(Rpg_ & uDashp);
260 os <<
"v " <<
p.x() <<
" " <<
p.y() <<
" " <<
p.z() <<
nl;
266 const label pointOffset,
277 static const label nFaceAxis = 20;
278 static const label nFaceTheta = 22;
279 static const label nEddyPoints = (nFaceAxis - 1)*nFaceTheta + 2;
285 label pointI = pointOffset;
290 const label dir2 = (dir1_ + 1) % 3;
291 const label dir3 = (dir1_ + 2) % 3;
294 x[0] = axisDir*
s[dir1_];
295 x[nEddyPoints - 1] = - axisDir*
s[dir1_];
298 for (label axisI = 1; axisI < nFaceAxis; axisI++)
300 scalar z =
s[dir1_]*
cos(axisI*dPhi);
303 for (label thetaI = 0; thetaI < nFaceTheta; thetaI++)
305 scalar theta = thetaI*dTheta;
308 p[dir2] = r*
sin(theta);
309 p[dir3] = r*
cos(theta);
316 point p = position(
n) + (Rpg_ &
x[i]);
317 os <<
"v " <<
p.x() <<
" " <<
p.y() <<
" " <<
p.z() <<
nl;
321 for (label faceI = 0; faceI < nFaceTheta; faceI++)
323 label p1 = pointI + 1;
324 label p2 = p1 + faceI + 1;
326 if (faceI == nFaceTheta - 1) p3 -= nFaceTheta;
327 os <<
"f " << p1 <<
" " << p2 <<
" " << p3 <<
nl;
329 label q1 = pointI + nEddyPoints;
330 label q2 = q1 - faceI - 1;
332 if (faceI == nFaceTheta - 1) q3 += nFaceTheta;
333 os <<
"f " << q1 <<
" " << q2 <<
" " << q3 <<
nl;
337 for (label axisI = 1; axisI < nFaceAxis - 1; axisI++)
339 for (label thetaI = 0; thetaI < nFaceTheta; thetaI++)
341 label p1 = pointI + 1 + (axisI - 1)*nFaceTheta + thetaI + 1;
342 label p2 = p1 + nFaceTheta;
346 if (thetaI == nFaceTheta - 1)
351 os <<
"f " << p1 <<
" " << p2 <<
" " << p3 <<
" " << p4 <<
nl;
int debug
Static debugging option.
static const Vector< scalar > one
Foam::UList< Foam::label > Foam::eddy::Gamma2 &[0] Gamma2Values
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
Write the eddy centre in OBJ format.
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
static constexpr const zero Zero
Global zero (0)
dimensionedVector eigenValues(const dimensionedSymmTensor &dt)
Different types of constants.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
dimensionedScalar sin(const dimensionedScalar &ds)
dimensionedTensor eigenVectors(const dimensionedSymmTensor &dt)
Cmpt cmptProduct(const VectorSpace< Form, Cmpt, Ncmpts > &vs)
void shuffle(UList< Type > &values)
Shuffle the values in the list.
Class to describe eddies for the turbulentDFSEMInletFvPatchVectorField boundary condition.
Ostream & endl(Ostream &os)
Add newline and flush stream.
prefixOSstream Pout
An Ostream wrapper for parallel output to std::cout.
dimensioned< Type > T() const
Return transpose.
#define forAll(list, i)
Loop across all elements in list.
label writeSurfaceOBJ(const label pointOffset, const vector &n, Ostream &os) const
Write the eddy surface in OBJ format.
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
Deprecated(2018-12) Return vector for given row (0,1)
constexpr scalar twoPi(2 *M_PI)
dimensionedScalar lambda("lambda", dimTime/sqr(dimLength), laminarTransport)
Cmpt cmptSum(const SphericalTensor< Cmpt > &st)
Return the sum of components of a SphericalTensor.
const dimensionedScalar c2
Second radiation constant: default SI units: [m.K].
Vector< scalar > vector
A scalar version of the templated Vector.
dimensioned< Type > cmptDivide(const dimensioned< Type > &, const dimensioned< Type > &)
vector uDash(const point &xp, const vector &n) const
Return the fluctuating velocity contribution at local point xp.
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
Elementary charge.
static const Vector< scalar > zero
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
dimensionedScalar sigma("sigma", dimMass/sqr(dimTime), transportProperties)
regionProperties rp(runTime)
#define WarningInFunction
Report a warning using Foam::Warning.
static const Identity< scalar > I
dimensionedScalar cos(const dimensionedScalar &ds)