createFields.H
Go to the documentation of this file.
1 Info<< "Reading physicalProperties\n" << endl;
2 
3 IOdictionary physicalProperties
4 (
5  IOobject
6  (
7  "physicalProperties",
8  runTime.constant(),
9  mesh,
10  IOobject::MUST_READ_IF_MODIFIED,
11  IOobject::NO_WRITE
12  )
13 );
14 
16 (
17  "epsilon0",
18  dimensionSet(-1, -3, 4, 0, 0, 2, 0),
19  physicalProperties
20 );
21 
22 const dimensionedScalar k
23 (
24  "k",
25  dimensionSet(-1, 0, 2, 0, 0, 1, 0),
26  physicalProperties
27 );
28 
29 
30 Info<< "Reading field phi\n" << endl;
32 (
33  IOobject
34  (
35  "phi",
36  runTime.name(),
37  mesh,
38  IOobject::MUST_READ,
39  IOobject::AUTO_WRITE
40  ),
41  mesh
42 );
43 
44 
45 Info<< "Reading field rho\n" << endl;
47 (
48  IOobject
49  (
50  "rho",
51  runTime.name(),
52  mesh,
53  IOobject::MUST_READ,
54  IOobject::AUTO_WRITE
55  ),
56  mesh
57 );
58 
59 
60 Info<< "Calculating field rhoFlux\n" << endl;
61 surfaceScalarField rhoFlux
62 (
63  IOobject
64  (
65  "rhoFlux",
66  runTime.name(),
67  mesh,
68  IOobject::NO_READ,
69  IOobject::NO_WRITE
70  ),
71  -k*mesh.magSf()*fvc::snGrad(phi)
72 );
label k
const surfaceScalarField & magSf() const
Return cell face area magnitudes.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
const dimensionedScalar epsilon0
Electric constant: default SI units: [F/m].
tmp< SurfaceField< Type > > snGrad(const VolField< Type > &vf, const word &name)
Definition: fvcSnGrad.C:45
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:288
SurfaceField< scalar > surfaceScalarField
messageStream Info
VolField< scalar > volScalarField
Definition: volFieldsFwd.H:62
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
volScalarField rho(IOobject("rho", runTime.name(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), thermo.renameRho())