Solver for magnetohydrodynamics (MHD): incompressible, laminar flow of a conducting fluid under the influence of a magnetic field. More...
Go to the source code of this file.
Functions | |
int | main (int argc, char *argv[]) |
Solver for magnetohydrodynamics (MHD): incompressible, laminar flow of a conducting fluid under the influence of a magnetic field.
Original source file mhdFoam.C
An applied magnetic field H acts as a driving force, at present boundary conditions cannot be set via the electric field E or current density J. The fluid viscosity nu, conductivity sigma and permeability mu are read in as uniform constants.
A fictitious magnetic flux pressure pB is introduced in order to compensate for discretisation errors and create a magnetic face flux field which is divergence free as required by Maxwell's equations.
However, in this formulation discretisation error prevents the normal stresses in UB from cancelling with those from BU, but it is unknown whether this is a serious error. A correction could be introduced whereby the normal stresses in the discretised BU term are replaced by those from the UB term, but this would violate the boundedness constraint presently observed in the present numerics which guarantees div(U) and div(H) are zero.
Definition in file mhdFoam.C.
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 67 of file mhdFoam.C.
References fvMatrix< Type >::A(), B, bpiso(), Foam::constrainHbyA(), Foam::constrainPressure(), pisoControl::correct(), pisoControl::correctNonOrthogonal(), Foam::fvm::ddt(), Foam::fvc::ddtCorr(), Foam::fvc::div(), Foam::fvm::div(), Foam::endl(), nonOrthogonalSolutionControl::finalNonOrthogonalIter(), fvMatrix< Type >::flux(), Foam::fvc::flux(), Foam::fvc::grad(), fvMatrix< Type >::H(), HbyA, Foam::Info, Foam::fvc::interpolate(), Foam::fvm::laplacian(), Foam::magSqr(), fluidSolutionControl::momentumPredictor(), Foam::nl, p, phiB, phiHbyA(), piso(), rAU(), pressureReference::refCell(), pressureReference::refValue(), fvMatrix< Type >::setReference(), fvMatrix< Type >::solve(), Foam::solve(), U, and UEqn.