createFaFields.H
Go to the documentation of this file.
1 Info<< "Reading field Cs" << endl;
3 (
4  IOobject
5  (
6  "Cs",
7  runTime.timeName(),
8  aMesh.thisDb(),
9  IOobject::MUST_READ,
10  IOobject::AUTO_WRITE
11  ),
12  aMesh
13 );
14 
15 dimensionedScalar Cs0("Cs0", dimMass/dimArea, 1.0);
16 
17 const areaVectorField& R = aMesh.areaCentres();
18 
19 Cs = Cs0*(1.0 + R.component(vector::X)/mag(R));
20 
21 dimensionedScalar Ds("Ds", dimViscosity, 1.0);
22 
24 (
25  IOobject
26  (
27  "Us",
28  runTime.timeName(),
29  aMesh.thisDb(),
30  IOobject::NO_READ,
31  IOobject::NO_WRITE
32  ),
33  aMesh,
35 );
36 
37 dimensioned<scalar> Uinf("Uinf", dimVelocity, 1.0);
38 
39 forAll(Us, faceI)
40 {
41  Us[faceI].x() =
42  Uinf.value()*(0.25*(3.0 + sqr(R[faceI].x()/mag(R[faceI]))) - 1.0);
43 
44  Us[faceI].y() =
45  Uinf.value()*0.25*R[faceI].x()*R[faceI].y()/sqr(mag(R[faceI]));
46 
47  Us[faceI].z() =
48  Uinf.value()*0.25*R[faceI].x()*R[faceI].z()/sqr(mag(R[faceI]));
49 }
50 Us.boundaryFieldRef().evaluateCoupled<coupledFaPatch>();
51 
52 Us -= aMesh.faceAreaNormals()*(aMesh.faceAreaNormals() & Us);
53 
54 
56 (
57  IOobject
58  (
59  "phis",
60  runTime.timeName(),
61  aMesh.thisDb(),
62  IOobject::NO_READ,
63  IOobject::NO_WRITE
64  ),
65  linearEdgeInterpolate(Us) & aMesh.Le()
66 );
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const dimensionSet dimViscosity
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
engineTime & runTime
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:531
Info<< "Reading field Cs"<< endl;areaScalarField Cs(IOobject("Cs", runTime.timeName(), aMesh.thisDb(), IOobject::MUST_READ, IOobject::AUTO_WRITE), aMesh);dimensionedScalar Cs0("Cs0", dimMass/dimArea, 1.0);const areaVectorField &R=aMesh.areaCentres();Cs=Cs0 *(1.0+R.component(vector::X)/mag(R));dimensionedScalar Ds("Ds", dimViscosity, 1.0);areaVectorField Us(IOobject("Us", runTime.timeName(), aMesh.thisDb(), IOobject::NO_READ, IOobject::NO_WRITE), aMesh, dimensionedVector(dimVelocity, Zero));dimensioned< scalar > Uinf("Uinf", dimVelocity, 1.0)
forAll(Us, faceI)
tmp< GeometricField< Type, faePatchField, edgeMesh > > linearEdgeInterpolate(const GeometricField< Type, faPatchField, areaMesh > &vf)
Us
GeometricField< scalar, faePatchField, edgeMesh > edgeScalarField
Definition: edgeFieldsFwd.H:46
edgeScalarField phis(IOobject("phis", runTime.timeName(), aMesh.thisDb(), IOobject::NO_READ, IOobject::NO_WRITE), linearEdgeInterpolate(Us) &aMesh.Le())
#define R(A, B, C, D, E, F, K, M)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
messageStream Info
Information stream (stdout output on master, null elsewhere)
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:49
GeometricField< vector, faPatchField, areaMesh > areaVectorField
Definition: areaFieldsFwd.H:81
const scalarField & Cs
const dimensionSet dimArea(sqr(dimLength))
Definition: dimensionSets.H:57
GeometricField< scalar, faPatchField, areaMesh > areaScalarField
Definition: areaFieldsFwd.H:80
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:127
const dimensionSet dimVelocity