Institute of Technology
  Technical Support
      Knowledge Base
      Product Updates
      Product Feedback
      User Forums
      My Requests
  Download Center
  Order Manuals








Subroutine Gallery


Jump To:

Note that most of these subroutines will only work with MSC.Marc versions of 2001 and earlier.

Geometry

belongTo.f

A subroutine to determine if an item belongs to a certain set.

get_geometry.f

Pick up geometry input data in any user subroutine that is called in an element loop.

ufconn_mfd.f

Read connectivity from a formatted mentat file.

ufxford_mfd.f

Read coordinates from a formatted mentat file.

variable_composite_layer_thickness.f

Let user modify the layer thickness of a composite shell.

Boundary Conditions

top

contact-pr-2d.f

Computes contact pressure. Check the subroutine for post codes. The program is set for a specific edge number. Also contains a subroutine `getdis.f' that extracts nodal displacements and deformed nodal coordinates. plotv.f, ufconn.f, ufxord.f.

contact-pr-3d.f

3D version of the above subroutine set for a specific face number.
plotv.f, ufconn.f, ufxord.f

contchk.f

Lists all the nodes that are in contact and the corresponding contact forces. Can also be used to find if the node is retained or tied.
uedinc.f

cont-flux.f

Used to apply flux on element edges that are in contact. Flux is computed based on contact pressure. Limited to 2D analysis, but can be extended to 3D. In a coupled analysis, cannot be used to apply flux on rigid heat transfer body. Uses similar logic used in pr-leak.f
flux.f, uedinc.f

forcdt_follow_for_type_1.f

Define loads between two points such that the force is always directed along the liine between the two points.

forcdt_follow_for_type2.f

Define a point load such that it is always directed towards a fixed point in space.

forcdt_switch_off_bcs.f

Subroutine to cancel kinematic boundary conditions.

forcem_angular_acceleration.f

Apply an angular acceleration as distributed load in a static analysis.

forcem_contact_edges.f

Apply a pressure on edges if they are not in contact with each other.

pr-leak.f

Forcem user subroutine set up to detect contact. When element is in contact, pressure is not applied. When element is not in contact, the pressure given by the model is applied.
This version statically allocates two storage arrays using an arbitray large number.
Only tested for 4-noded 2D continuum elements. Example file, tseal.dat
forcem.f, plotv.f

pr-leak2.f

Forcem user subroutine set up to detect contact. When element is in contact, pressure is not applied. When element is not in contact, the pressure given by the model is applied.
This version dynamically allocates two storage arrays. Only tested for 4-noded 2D continuum elements. Example files test2.mud, test2_adp.mud
ubginc.f, forcem.f, plotv.f

Materials

top

hypela-ex1.f

Example HYPELA subroutine. A sample user defined material. user subroutine to define young's modulus and poisson's ratio as function of stress in non-linear elastic small strain material.

hypela-ex2.f

Example HYPELA subroutine

hypela-ex3.f

Example HYPELA subroutine

orient.f

For input of orientation for anisotropic option.
orient.f

orient_cylindrical_2D.f

Define preferred directions in a cylindrical coordinate system in 2D analysis.

orient_cylindrical_3D.f

Define preferred directions in a cylindrical coordinate system in 3D analysis.

orient_cylindrical_3D_alpha.f

Define preferred directions in a cylindrical coordinate system with an angular offset in 3D.

orient_spherical_3D.f

Define preferred directions in a spherical coordinate system in 3D analysis.

spf.f

The following user-tailored subroutines are used in SPF:

  • forcem.f .       To control pressure based on the material law and targer edot
  • plotv.f .....        To write out the "calculated pressure" for post processing
  • uedinc.f ....    Stops the run after % nodes come in contact (user control)
  • uinstr.f ....      Pre stress the membrane for the 1st few increments
  • urpflo.f ....      Material law
  • stress1.f ...    utility routine for urpflow

upstrech.f
one.dat

Example UPSTRECH usersubroutine. This is an example upstrech usersub that does exactly what vanilla Marc does for an Ogden type material. The file one.dat can be run with and without the usersub and both runs will give the same results (uses modified call from matogde).

Postprocessing

top

cord-angle.f

User subroutine tailored to calculate the cord angle in the deformed configuration. The analysis of cord-rubber composites is carried out in the total lagrangian framework and hence only the initial cord angle info. is available. This can be used for the following products : tires, air springs, hoses, bladders, robotic pickers and grippers (in general any cord-rubber composite structure).

cyl-trans.f
pressfit.mud

Transforms a stress or strain tensor into a polar coordinate system. Also transforms current coordinates and displacements into polar coords.
plotv.f, upostv.f, icoord.f

def-nodes.f

Routine to print deformed nodal coordinates.
impd.f

electric_power.f

Computes the electric current, power, and total impedance.
plotv.f (To be used with K7)

elevar_inertia_tensor.f

Compute inertia tensor of a 3D finite element model.

elevar_momentum.f

Compute momentum a kinetic energy of two impacting bodies.

nonunif-pr.f
nonunif-pr.mud

Subroutine to apply a linearly varying pressure on the faces of selected elements.
forcem.f

pk2cauchy.f

Calculates Cauchy stresses from PK2 stresses.
plotv.f

plotv_crack_indicator.f

Raise a flag if at some integration point at least one of its layers has a crack (concrete cracking analysis).

plotv_cylindrical_stress.f

Transform stress tensor to a cylindrical system.

plotv_magnetostatic.f

Compute electromagnetic density, energy and co-energy in a magnetostatic analysis.

plotv_principal_values.f

Compute principal values of tensor qualities.

plotv_sperical_stress.f

Transform stress tensor to a spherical system.

plotv_tresca.f

Compute the Tresca equivalent stress.

plotv-visco.f

Print stresses of each Prony series term in a viscoelastic analysis.

princa.f

Computes principal quantities (stress, strain)
Computes Engineering Strain and Engineering Stress principal values.
plotv.f

pthick.f

Subroutine to get thickness contours in 2D problems.
plotv.f

res-stress.f

To read plastic strains and residual stresses from a previous post file. Needs a file by name 'form'. (Works with rezoning).
uinstr.f, initpl.f, plotv.f

rezone.f

Outputs displacements to a file.
impd.f

tot-energy-2d-2.f

Computes area of an element and total energy (= energy density*area) Assumes unit thickness. Check the subroutine for post codes.
plotv.f (uses shp003.f to compute area)

tot-energy-3d-2.f

Computes volume of an element and total energy (= energy density*volume).
Check the subroutine for post codes.
plotv.f (uses shp007.f to compute volume)

upostv.f

Extracts displacement correction (numerator of displacement residual) for post-processing in Mentat.

upostv_contact_status.f

Raise a flag if a node is contacting some other body.

upostv_tying_forces.f

Store tying interaction forces on postfile.