VUVISCOSITY

User subroutine to define the shear viscosity for equation of state models.

User subroutine VUVISCOSITY:

  • is called at all material points of elements with an equation of state for which the material definition includes user-defined viscous shear behavior;

  • can be used to define a material's isotropic viscous behavior;

  • can use and update solution-dependent state variables; and

  • can be used in conjunction with user subroutine VUSDFLD to redefine any field variables before they are passed in.

This page discusses:

User Subroutine Interface

      subroutine vuviscosity(
C Read only -
     *     nblock, 
     *     jElem, kIntPt, kLayer, kSecPt, 
     *     stepTime, totalTime, dt, cmname,
     *     nstatev, nfieldv, nprops, 
     *     props, tempOld, tempNew, fieldOld, fieldNew,
     *     stateOld,
     *     shrRate,
C Write only -
     *     viscosity,
     *     stateNew )
C
      include 'vaba_param.inc'
C
      dimension props(nprops), tempOld(nblock), tempNew(nblock),
     1   fieldOld(nblock,nfieldv), fieldNew(nblock,nfieldv),
     2   stateOld(nblock,nstatev), eqps(nblock), eqpsRate(nblock),
     3   viscosity(nblock), 
     4   stateNew(nblock,nstatev), jElem(nblock)
C
      character*80 cmname
C
      do 100 km = 1,nblock
        user coding
  100 continue
C
      return
      end

Variables to Be Defined

viscosity(nblock)

Array containing the viscosity at the material points. (Units of FL−2T.)

stateNew(nblock,nstatev)

Array containing the state variables at the material points at the end of the increment. The allocation of this array is described in Solution-Dependent State Variables.

Variables Passed in for Information

nblock

Number of material points to be processed in this call to VUVISCOSITY.

jElem(nblock)

Array of element numbers.

kIntPt

Integration point number.

kLayer

Layer number (for composite shells).

kSecPt

Section point number within the current layer.

stepTime

Value of time since the step began.

totalTime

Value of total time. The time at the beginning of the step is given by totalTime-stepTime.

dt

Time increment size.

cmname

Material name, left justified. It is passed in as an uppercase character string. Some internal material models are given names starting with the “ABQ_” character string. To avoid conflict, “ABQ_” should not be used as the leading string for cmname.

nstatev

Number of user-defined state variables that are associated with this material type (see Allocating Space for Solution-Dependent State Variables).

nfieldv

Number of user-defined external field variables.

nprops

User-specified number of user-defined material properties.

tempOld(nblock)

Temperatures at the material points at the beginning of the increment.

tempNew(nblock)

Temperatures at the material points at the end of the increment.

fieldOld(nblock,nfieldv)

Values of the user-defined field variables at the material points at the beginning of the increment.

fieldNew(nblock,nfieldv)

Values of the user-defined field variables at the material points at the end of the increment.

stateOld(nblock,nstatev)

State variables at the material points at the beginning of the increment.

shrRate(nblock)

Equivalent shear strain rate,γ˙, at the material points.

Example: Cross Viscosity Model

As a simple example of the coding of subroutine VUVISCOSITY, consider the Cross viscosity model. The Cross model is commonly used when it is necessary to describe the low shear rate behavior of the viscosity. The viscosity is expressed as

η=η01+(λγ˙)1-n,

where η0 is the Newtonian viscosity, n is the flow index in the power law regime, and λ is a constant with units of time, such that 1/λ corresponds to the critical shear rate at which the fluid changes from Newtonian to power law behavior.

The subroutine would be coded as follows:

      subroutine vuviscosity (
C Read only -
     *     nblock, 
     *     jElem, kIntPt, kLayer, kSecPt, 
     *     stepTime, totalTime, dt, cmname,
     *     nstatev, nfieldv, nprops,
     *     props, tempOld, tempNew, fieldOld, fieldNew,
     *     stateOld,
     *     shrRate,
C Write only -
     *     viscosity,
     *     stateNew )
C
      include 'vaba_param.inc'
C
      dimension props(nprops), 
     *  tempOld(nblock),
     *  fieldOld(nblock,nfieldv), 
     *  stateOld(nblock,nstatev), 
     *  shrRate(nblock), 
     *  tempNew(nblock),
     *  fieldNew(nblock,nfieldv),
     *  viscosity(nblock),
     *  stateNew(nblock,nstatev)
C
      character*80 cmname
C
	    parameter ( one = 1.d0 )
C
C     Cross viscosity 
C
      eta0    = props(1)
      rlambda = props(2)
      rn      = props(3)
C
      do k = 1, nblock
         viscosity(k) = eta0/(one+(rlambda*shrRate(k))**(one-rn))
      end do
C
      return
      end