40 int main(
int argc,
char *argv[])
45 #include "createFields.H"
50 scalar b1 =
j1(swirlProfile).
value();
51 scalar b2 = 2.0*b1/swirlProfile.value() -
j0(swirlProfile).
value();
53 scalar
omega = 0.125*(Vphi*bore*swirlProfile/b2).value();
55 scalar cylinderRadius = 0.5*bore.
value();
60 vector c = mesh.C()[celli] - swirlCenter;
63 if (r <= cylinderRadius)
65 scalar
b =
j1(swirlProfile*r/cylinderRadius).
value();
68 U[celli] = ((vEff/r)*(
c & yT))*xT + (-(vEff/r)*(
c & xT))*yT;
69 Umax =
max(Umax,
mag(
U[celli]));
#define forAll(list, i)
Loop across all elements in list.
const Type & value() const
Return const reference to value.
Convenience class to handle the input of constant rotational speed. Reads an omega entry with default...
int main(int argc, char *argv[])
const dimensionedScalar c
Speed of light in a vacuum.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar j1(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensioned< scalar > mag(const dimensioned< Type > &)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
dimensionedScalar j0(const dimensionedScalar &ds)