15 Info<<
"Reading transportProperties\n" <<
endl;
21 "transportProperties",
24 IOobject::MUST_READ_IF_MODIFIED,
40 dimensionedScalar(
"one", dimless, 1.0)
43 surfaceScalarField
Mrf
52 dimensionedScalar(dimensionSet(0, 1, 0, 0, 0, 1, 0), Zero)
54 Mrf.setOriented(
true);
58 label magnetZonei =
mesh.faceZones().findZoneID(
magnets[i].name());
60 if (magnetZonei == -1)
63 <<
"Cannot find faceZone for magnet " <<
magnets[i].name()
64 << exit(FatalIOError);
67 const labelList& faces =
mesh.faceZones()[magnetZonei];
69 const scalar muri =
magnets[i].mur();
70 const scalar Mri =
magnets[i].Mr().value();
73 const surfaceVectorField& Sf =
mesh.Sf();
75 for (
const label facei : faces)
78 Mrf[facei] = Mri*(orientationi & Sf[facei]);
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
const volScalarField & psi
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
surfaceScalarField murf(IOobject("murf", runTime.timeName(), mesh), mesh, dimensionedScalar("one", dimless, 1.0))
Info<< "Reading field psi\n"<< endl;volScalarField psi(IOobject("psi", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);Info<< "Reading transportProperties\n"<< endl;IOdictionary transportProperties(IOobject("transportProperties", runTime.constant(), mesh, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE));List< magnet > magnets(transportProperties.lookup("magnets"))
surfaceScalarField Mrf(IOobject("Mrf", runTime.timeName(), mesh), mesh, dimensionedScalar(dimensionSet(0, 1, 0, 0, 0, 1, 0), Zero))
IOdictionary transportProperties(IOobject("transportProperties", runTime.constant(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
#define forAll(list, i)
Loop across all elements in list.