61 int main(
int argc,
char *argv[])
65 "Solver for magnetohydrodynamics (MHD):" 66 " incompressible, laminar flow of a conducting fluid" 67 " under the influence of a magnetic field." 76 #include "createControl.H" 77 #include "createFields.H" 78 #include "initContinuityErrs.H" 88 #include "CourantNo.H" 100 if (
piso.momentumPredictor())
107 while (
piso.correct())
122 while (
piso.correctNonOrthogonal())
130 pEqn.solve(
p.select(
piso.finalInnerIter()));
132 if (
piso.finalNonOrthogonalIter())
138 #include "continuityErrs.H" 141 U.correctBoundaryConditions();
146 while (
bpiso.correct())
163 while (
bpiso.correctNonOrthogonal())
170 pBEqn.solve(pB.select(
bpiso.finalInnerIter()));
172 if (
bpiso.finalNonOrthogonalIter())
174 phiB -= pBEqn.flux();
fvMatrix< scalar > fvScalarMatrix
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
static tmp< GeometricField< Type, faePatchField, edgeMesh > > interpolate(const GeometricField< Type, faPatchField, areaMesh > &tvf, const edgeScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
constexpr char nl
The newline '\n' character (0x0a)
tmp< GeometricField< typename flux< Type >::type, fvsPatchField, surfaceMesh > > ddtCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const GeometricField< Type, fvsPatchField, surfaceMesh > &Uf)
tmp< GeometricField< Type, faPatchField, areaMesh > > div(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< GeometricField< Type, faPatchField, areaMesh > > ddt(const dimensioned< Type > dt, const faMesh &mesh)
GeometricField< vector, fvPatchField, volMesh > volVectorField
tmp< volScalarField > rAU
GeometricField< scalar, fvPatchField, volMesh > volScalarField
tmp< GeometricField< Type, faPatchField, areaMesh > > laplacian(const GeometricField< Type, faPatchField, areaMesh > &vf, const word &name)
tmp< volVectorField > constrainHbyA(const tmp< volVectorField > &tHbyA, const volVectorField &U, const volScalarField &p)
pisoControl bpiso(mesh, "BPISO")
surfaceScalarField & phiB
void constrainPressure(volScalarField &p, const RhoType &rho, const volVectorField &U, const surfaceScalarField &phiHbyA, const RAUType &rhorAU, const MRFType &MRF)
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU))
fvMatrix< vector > fvVectorMatrix
messageStream Info
Information stream (stdout output on master, null elsewhere)
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Execute application functionObjects to post-process existing results.
static const Foam::dimensionedScalar B("", Foam::dimless, 18.678)
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
tmp< GeometricField< typename outerProduct< vector, Type >::type, faPatchField, areaMesh >> grad(const GeometricField< Type, faePatchField, edgeMesh > &ssf)