MHD_CONTROL
Control of the MHD Equations
MHD_CONTROL
is a FORTRAN90 program which
solves a control problem for a 2D time-dependent
magneto-hydrodynamic system.
Licensing:
The computer code and data files made available on this web page
are distributed under
the GNU LGPL license.
Languages:
MHD_CONTROL is available in
a FORTRAN90 version.
Related Data and Programs:
CHANNEL,
a FORTRAN90 program which
solves a simple
channel flow problem with no bump.
DIRECTION_ARROWS_GRID,
a MATLAB program which
reads files of
node and velocity data, and, using interpolation, creates a
velocity direction plot with arrows
place on a uniform grid of the user's specification.
MHD_CONTROL,
a dataset directory which
contains the velocity and
magnetic field values over 50 timesteps for a particular control
problem.
MHD_CONTROL,
MATHEMATICA programs which
animate the magnetic and velocity fields.
MHD_FLOW,
a FORTRAN90 program which
simulates the (uncontrolled) evolution of an MHD system.
NAST2D_F90,
a FORTRAN90 program which
uses the finite volume method to set up and solve
the 2D incompressible Navier Stokes equations with heat.
PLOT_POINTS,
a FORTRAN90 program which
can plot the nodes that define the region.
VECTOR_PLOT,
a FORTRAN90 program which
can be used to create a velocity field vector plot from the output data files of
the BUMP program.
VECTOR_STREAM_GRID,
a MATLAB program which
reads node and vector data from a file, computes an interpolatory function,
evaluates on a uniform grid of points specified by the user,
and displays a streamline plot of the vector field.
VELOCITY_ARROWS_GRID,
a MATLAB program which
reads files of node and velocity data, and, using interpolation, creates a
vector plot with arrows
placed on a uniform grid of the user's specification.
VELOCITY_ARROWS_GRID2,
a MATLAB program which
reads a single file of node and velocity data, and using interpolation is
able to display a velocity vector field along any uniform grid
of points specified by the user.
Reference:
-
Max Gunzburger,
Finite Element Methods for Viscous Incompressible Flows,
A Guide to Theory, Practice, and Algorithms,
Academic Press, 1989,
ISBN: 0-12-307350-2,
LC: TA357.G86.
-
Max Gunzburger, Catalin Trenchea,
Analysis and Discretization of an Optimal Control Problem
for the Time-Periodic MHD Equations,
Journal of Mathematical Analysis and Applications,
Volume 308, Number 2, 2005, pages 440-466.
Source Code:
List of Routines:
-
MAIN is the main program for MHD_CONTROL.
-
ADJOINT solves the linear adjoint equations for the control problem.
-
BANDED is the banded equation solver.
-
BASIS_LINEAR evaluates the linear basis functions associated with pressure.
-
BASIS_QUAD evaluates a quadratic basis function.
-
CH_CAP capitalizes a single character.
-
CH_IS_DIGIT returns .TRUE. if a character is a decimal digit.
-
CH_TO_DIGIT returns the integer value of a base 10 digit.
-
COST_FNL evaluates the cost functional at a given time for a specific target
-
DECOMPOSE breaks a 1-d vector into a 2-d vector by unknown and node
-
DIGIT_INC increments a decimal digit.
-
DIGIT_TO_CH returns the character representation of a decimal digit.
-
ERROR computes the L^2 error in the state and target solutions.
-
EVAL_2D evaluates vector dimensioned (nodes, 4) at the given point (x,y)
-
EVAL evaluates the velocities and the magnetic field
-
EVAL_RHS evaluates the rhs at the given point (x,y)
-
FILE_COPY makes a copy of a file.
-
FILE_DELETE deletes a named file if it exists.
-
FILE_EXIST reports whether a file exists.
-
FILE_IS_OPEN reports whether a file (specified by filename) is open.
-
FILE_NAME_INC generates the next file name in a series.
-
GEOMETRY sets up x,y coordinate arrays, node array associating local node number to
-
GET_UNIT returns a free FORTRAN unit number.
-
L2NORM calculates the L^2 norm of f.
-
MAG_NSTOKE solves the Navier Stokes equations coupled with magnetic field
-
OUTPUT outputs x, y, and velocities at each point
-
POST_PROCESS resets the pressure, by computing the mean and subtracting
-
R8UD_IO reads or writes fixed size vectors, using R8UD protocol.
-
S_EQI is a case insensitive comparison of two strings for equality.
-
SET_INITIAL sets the initial condition for the state solution.
-
TARGET sets value of target solution when it is given explicitly by a function
-
TIMESTAMP prints the current YMDHMS date as a time stamp.
-
UBDRY evaluates the velocity inlet profile.
-
XY_WRITE writes the coordinate data to a file.
You can go up one level to
the FORTRAN90 source codes.
Last revised on 26 November 2006.