readGravitationalAcceleration.H
Go to the documentation of this file.
1 Info<< "\nReading gravitationalProperties" << endl;
2 
3 IOdictionary gravitationalProperties
4 (
5  IOobject
6  (
7  "gravitationalProperties",
8  runTime.constant(),
9  mesh,
10  IOobject::MUST_READ_IF_MODIFIED,
11  IOobject::NO_WRITE
12  )
13 );
14 
15 const dimensionedVector g(gravitationalProperties.lookup("g"));
16 const Switch rotating(gravitationalProperties.lookup("rotating"));
17 const dimensionedVector Omega =
18  rotating ? gravitationalProperties.lookup("Omega")
19  : dimensionedVector("Omega", -dimTime, vector(0,0,0));
20 const dimensionedScalar magg = mag(g);
21 const dimensionedVector gHat = g/magg;
dimensioned< scalar > mag(const dimensioned< Type > &)
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
messageStream Info
dynamicFvMesh & mesh
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
const dimensionedVector & g
Vector< scalar > vector
A scalar version of the templated Vector.
Definition: vector.H:49
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.