UPLOT1.F - - User Plot: Flux vectors
User plot commands can be defined using the dummy element files in the user sub-directory.
This examples shows how one can added a plot command "vecf" that permits one to plot
heat conduction flux vectors to a plot. FEAP already has the capability to contour
the components of the flux in a heat transfer problem but lacks a feature to plot the
flux vectors themselves. This user plot command adds this feature (for 2D problems).
The main steps in creating the user
plot command are
- First select a dummy file out of the user directory, here uplot1.f.
- Under the first part of the logical block set 'uct' to the name you
want to use for the command, here 'vecf'.
-
Next we make sure that the solution values have been projected to the nodes
and if not we allocate the needed memory and project.
-
We then set up the full 3D coordinates for the problem (even though it may actually
be 2D) in hr(np(53)). FEAP treats all graphics in a 3D context. We also set up the
mask array, mr(np(111)), that indicates which nodes are actually active in the computation.
-
We then extract the projected components of the flux vector from hr(nph+...) and then pack
them into an array for easier processing.
- We then call 'pltvec' a specially written routine for placing the flux vectors on the plot. This
routine (included in the file) determines a length for the vectors and makes sure that they are within
the plotting view before adding them to the plot window via calls to plotl( ).
The uplot file can be found here. Example input file:
Rectangle with imposed corner tempertures,