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
where is the Newtonian viscosity, is the flow index in the power law regime, and is a constant with units of time, such that 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
|