The following subroutines support the user subroutines for creating a new element (using the database-access method):
- 2.2.1. Subroutine nminfo (Returning Element Reference Names)
- 2.2.2. Subroutine svgidx (Fetching the Index for Saved Variables)
- 2.2.3. Subroutine svrget (Fetching Saved Variable Data for an Element)
- 2.2.4. Subroutine svrput (Writing an Element's Saved Variable Set)
- 2.2.5. Subroutine svpidx (Writing the Saved Variable Element Index to a File)
- 2.2.6. Subroutine mreuse (Determining Which Element Matrices Can Be Reused)
- 2.2.7. Subroutine subrd (Reading Element Load Data for a Substructure Generation Run)
- 2.2.8. Subroutine subwrt (Writing an Element Load Vector to a File for a Substructure Generation Run)
- 2.2.9. Subroutine rvrget (Fetching Real Constants for an Element)
- 2.2.10. Subroutine propev (Evaluating a Group of Material Properties)
- 2.2.11. Subroutine prope1 (Evaluating One Material Property)
- 2.2.12. Subroutine pstev1 (Evaluating Material Properties for 1D Elements)
- 2.2.13. Subroutine tbuser (Retrieving User Table Data)
- 2.2.14. Subroutine plast1 (Updating an Element's Plastic History)
- 2.2.15. Subroutine plast3 (Updating an Element's Plastic History, 4 or 6 components)
- 2.2.16. Subroutine creep1 (Updating an Element's Creep History)
- 2.2.17. Subroutine creep3 (Updating an Element's Creep History, 3D Elements)
- 2.2.18. Subroutine swell1 (Updating an Element's Swelling History)
- 2.2.19. Subroutine swell3 (Updating an Element's Swelling History, 3D Elements)
- 2.2.20. Function elLenPsvrBuf (Determining Additional ESAV Record for Plasticity)
- 2.2.21. Function tbgettbtype (Retrieving the Unique Index Associated with a TB Table)
- 2.2.22. Function tbgetnumtables (Retrieving the Number of Subtables for a TB Type)
- 2.2.23. Function tbgetnumfldvars (Retrieving the Number of Field Variables for a TB Type)
- 2.2.24. Function tbgetfldvars (Retrieving Field Variable Types for a TB Type)
- 2.2.25. Function tbgetfldname (Retrieving a Field Variable Name)
- 2.2.26. Function tbgettbopt (Retrieving the TBOPT Associated with a TB Type)
- 2.2.27. Function tbgettboptname (Retrieving a String or Documented Name Associated with a TBOPT)
- 2.2.28. Function tbgetdataperfield (Retrieving the Data per Field for Each Subtable)
- 2.2.29. Function tbgetnumfldsets (Retrieving the Number of TBFIELD+TBDATA/TBOPT Sets)
- 2.2.30. Function tbgettabledata (Retrieving All Table Data and Field Variable Values)
- 2.2.31. Function tbgettabledatasz (Retrieving All Table Data and Field Variable Sizes)
- 2.2.32. Function nlget (Retrieving Material Nonlinear Property Information)
- 2.2.33. Subroutine usereo (Storing Data in the nmisc Record)
- 2.2.34. Subroutine eldwrtL (Writing Element Data to a File)
- 2.2.35. Subroutine eldwrnL (Writing Element Nonsummable Miscellaneous Data to the Results File)
- 2.2.36. Subroutine trrot (Calculating the Rotation Vector)
- 2.2.37. Subroutine rottr (Calculating the Transformation Matrix)
- 2.2.38. Subroutine xyzup3 (Updating an Element's 3D Nodal Coordinates)
- 2.2.39. Subroutine tmpget (Defining Current Temperature Loads)
- 2.2.40. Subroutine prsget (Defining Current Pressure Loads)
- 2.2.41. Subroutine cnvget (Defining Current Convection Loads)
- 2.2.42. Subroutine hgnget (Defining Current Heat Generation Loads)
- 2.2.43. Subroutine prinst (Calculating Principal Stress and Stress Intensity)
*deck,nminfo
subroutine nminfo (ielc,rname)
c *** primary function: set element reference names
c *** secondary functions: none
c -------- to get name back, use nameiq
c
c *** Notice - This file contains ANSYS Confidential information ***
c
c input arguments:
c variable (typ,siz,intent) description
c ielc (int,ar(*),inout) - element characteristic vector
c rname (chr,sc,in) - 8 character reference name
c
c output arguments:
c variable (typ,siz,intent) description
c ielc (int,ar(*),inout) - element characteristic vector with
c element name encoded
c
*deck,svgidx
subroutine svgidx (locsvr,svindx)
c *** primary function: get the index for saved variables
c *** Notice - This file contains ANSYS Confidential information ***
c input arguments:
c locsvr (LONGINT,sc,in) - pointer to location of index
c output arguments:
c svindx (int,ar(20),out) - the 20 word index of svr variables
c 1,2-starting loc of this eles svr sets
c 3- length of eles svr sets
c 4-11-relative starting loc for each set
c 4-structural svrs
c 5-thermal/electric/fluid svrs
c 6-magnetic svrs
c 7-nonlinear svrs
c 8-plasticity svrs
c 9-creep svrs
c 10-coupled svrs
c 11-user svrs
c 12-initial strain svrs
c 13-section data after FiberSIM conversion
c (shell181 only)
c 14-20 spares
*deck,svrget
subroutine svrget (svindx,nset,nsvr,svr,svrlen)
c *** primary function: get svr data set for an element
c *** Notice - This file contains ANSYS Confidential information ***
c input arguments:
c svindx (int,ar(20),in) - index for svr for this element (see svgidx)
c nset (int,sc,in) - the set number in this index
c = 1 - structural svrs
c = 2 - thermal/electric/fluid svrs
c = 3 - magnetic svrs
c = 4 - nonlinear svrs
c = 5 - plasticity svrs
c = 6 - creep svrs
c = 7 - coupled svrs
c = 8 - user svrs
c = 9 - initial stress svrs
c (2,42,82,45,92,95 only)
c = 10 - section data after FiberSIM conversion
c (shell181 only)
c = 11-17 - spares (note that the first three
c items in svindx are not available)
c nsvr (int,sc,inout) - number of dp words expected in this set
c svrlen (int,sc,in) - len of svr array
c output arguments:
c nsvr (int,sc,inout) - number of dp words in this set
c svr (dp,ar(svrlen),in) - data in this set
*deck,svrput
subroutine svrput (svindx,nset,leng,svr)
c *** primary function: write out a svr data set for an element
c *** Notice - This file contains ANSYS Confidential information ***
c input arguments:
c svindx (int,ar(20),inout)- the index for svr for this element
c (see svgidx)
c nset (int,sc,in) - the set number in this index (same as svrget)
c = 1 - structural svrs
c = 2 - thermal/electric/fluid svrs
c = 3 - magnetic svrs
c = 4 - nonlinear svrs
c = 5 - plasticity svrs
c = 6 - creep svrs
c = 7 - coupled svrs
c = 8 - user svrs
c = 9 - initial stress svrs
c (2,42,82,45,92,95 only)
c = 10 - section data after FiberSIM conversion
c (shell181 only)
c = 11-17 - spares (note that the first three
c items in svindx are not available)
c leng (int,sc,in) - number of dp words in this set
c svr (dp,ar(leng),in) - data in this set
c output arguments:
c svindx (int,ar(10,2),inout)- updated index
*deck,svpidx
subroutine svpidx (locsvr,svindx)
c *** primary function: write the svr element index onto file
c *** secondary functions: update the locsvr pointer to next element
c *** Notice - This file contains ANSYS Confidential information ***
c input arguments:
c locsvr (LONGINT,sc,inout) - pointer to start of svr for element
c svindx (int,ar(10,2),in) - index to svr for this element
c low and high parts of 64 bit address
c output arguments:
c locsvr (LONGINT,sc,inout) - pointer to start of svr for next element
*deck,mreuse
subroutine mreuse (kelrqq,kelfil,elem,ielc,kmasrt,knlmg,kconve,
x kpheno,kprop,nprop,prop,propo,krvro,rvr,rvro,amodo,asymo, kelin)
c *** primary function:
c determine which Matrices can be REUSEd and which must be recomputed
c from iteration to iteration.
c Note: a few special elements have some supplementary logic
c to adjust these results further. No attempt as been made to
c include all such logic in these routines.
c
c Second note: this logic is essentially the same as the old
c sfrm logic. Hopefully, further simplifications and enhancements
c will be made in the future. (Especially in gap elements and in
c multilayer elements)
c the whole idea of kpheno, a holdover from the sfrm routines,
c needs to be looked at and possibly eliminated.
c
c *** Notice - This file contains ANSYS Confidential information ***
c
c input arguments:
c kelrqq (int,ar(10),in) - request keys (needed for this analysis)
c kelfil (int,ar(10),in) - keys indicating matrices on the file
c elem (int,sc,in) - element number
c ielc (int,ar(IELCSZ),in) - array of element type characteristics
c kmasrt (int,sc,in) - does the mass matrix have rotational DOF?
c 0 - no 1 - yes(with nlgeom, sfrm1n)
c knlmg (int,sc,in) - nonlinear magnetic curve exists in this
c element
c 0 - no 1 - yes
c kconve (int,sc,in) - key indicating existence of convections
c in this element
c 0,1 - no 2 or more - yes
c must be input as 'i' if not used, as is
c changed in this routine(for analyzer).
c i = 0 must be used in calling routine
c if kpheno = 1.
c kpheno (int,sc,in) - key for type of phenomenon/level of check
c 0 - structural like old sfrm1n,1s,3n,3s,fl
c 1 - thermal like old sfrm1c,1t,2t,3t
c 2 - electrical/magnetic like some of old
c sfrmpo
c 3 - general like old sfrmoo
c kprop (int,sc,in) - key indicating which material properties
c in the prop vector that need to be
c checked (see below)
c nprop (int,sc,in) - number of properties
c prop (dp,ar(nprop),in) - current mat props
c propo (dp,ar(nprop),inout)- previous material properties
c krvro (int,sc,in) -
c = 0 - real constants are used by this element, and the old
c values(rvro) have been saved; or the element does not
c use real constants. Any change of real constants
c causes all matrices to be reformed.
c = 1 - real constants are used by this element and the old
c values(rvro) have been saved. However, any change
c of real constants will cause the run to terminate,
c because the results would be too unpredictable.
c (e.g. gap elements)
c = 2 - element is nonlinear, so do not bother to check
c = 3 - real constants are used by this element, and the old
c values(rvro) have been saved. However, no checking is
c done in this routine because of needed customized logic.
c = 4 - real constants are used by this element, but the old
c values(rvro) have not been saved because it was
c decided not to use this much storage. therefore, no check
c can be made to determine if matrices should be reformed.
c (e.g. 100 layer elements)
c = 5 - real constants are used by this element, but the old
c values(rvro) have not been saved because the real
c constants have no effect on matrix formulation.
c (e.g. acoustic elements)
c rvr (dp,ar(*),in) - current real constants
c rvro (dp,ar(*),inout) - previous real constants
c amodo (dp,sc,inout) - previous value of mode
c asymo (dp,sc,inout) - previous value of isym
c
c output arguments:
c propo (dp,ar(nprop),inout)- current material properties
c rvro (dp,ar(*),inout) - current real constants
c amodo (dp,sc,inout) - current value of mode
c asymo (dp,sc,inout) - current value of isym
c kelin (int,ar(10),out) - keys indicating matrices to form
c
*deck,subrd
subroutine subrd (iel,elord,key,nd,vect,ka)
c *** primary function: read element load data from file for substructure
c generation run
c *** secondary functions: none
c *** Notice - This file contains ANSYS Confidential information ***
c input arguments:
c iel (int,sc,in) - external element number
c elord (int,sc,in) - internal element number
c key (int,sc,in) - type of load data
c = 1 temperature
c = 2 fluences
c = 3 heat generation rates
c = 4 current densities
c = 9 end pressures (needed for beams/pipes)
c =10 pressures
c =11 film coefficients
c =12 bulk temperatures
c =13 extra displacement shapes
c =14 thermal strains(eptho in el42)
c =15 thermal flux (as in el55)
c =16 initial strains(epino in el01)
c =17 magnetic virtual displacements
c =18 calculated source field(hsn in el96)
c =20 element load vector
c =30 copy - do not scale(tempev in el42)
c first load step only
c nd (int,sc,in) - number of data items
c output arguments:
c vect (dp,ar(nd),out) - array of load data
c ka (int,sc,out) - load activation key
c = 0 no load for this data
c = 1 load is active
*deck,subwrt
subroutine subwrt (iel,elord,nvect,kkey,nd,vect,ref)
c *** primary function: write element load vect to file for substructure
c generation run
c *** secondary functions: none
c *** Notice - This file contains ANSYS Confidential information ***
c input arguments:
c iel (int,sc,in) - external element number
c elord (int,sc,in) - internal element number
c nvect (int,sc,in) - number of load vectors
c (current load step number)
c kkey (int,sc,in) - type of load vect
c = 1 temperature
c = 2 fluences
c = 3 heat generation rates
c = 4 current densities
c = 9 end pressures
c =10 pressures
c =11 film coefficients
c =12 bulk temperatures
c =13 extra displacement shapes
c =14 thermal strains(eptho in el42)
c =15 thermal flux (as in el55)
c =16 initial strains(epino in el01)
c =17 magnetic virtual displacements
c =18 calculated source field(hsn in el96)
c =20 element load vector
c =30 copy - do not scale(tempev in el42)
c nd (int,sc,in) - number of vect items
c vect (dp,ar(nd),in) - array of load data
c ref (dp,sc,in) - reference value for zero load
c output arguments: none
*deck,rvrget
subroutine rvrget (iel,ireal,ielc,nrvr,rvr)
c *** primary function: get the real constants for an element
c typ=int,dp,log,chr,dcp siz=sc,ar(n),func intent=in,out,inout
c variable (typ,siz,intent) description
c iel (int,sc,in) - element number
c ireal (int,sc,in) - real constant set number
c ielc (int,ar(*),in) - elment type characteristics
c output arguments:
c nrvr (int,sc,out) - number of real variables
c rvr (dp,ar(*),out) - element real constants
*deck,propev
subroutine propev (iel,mtr,lp,tem,prop,n)
c *** primary function: to evaluate a group of material properties
c propev is used to pass two or more material property numbers
c thru the lp array to determine which temperature dependent
c material properties are to be evaluated.
c thus, the 3 prope1 calls:
c call prope1 (elem,mat, 1,tem,e(1))
c call prope1 (elem,mat,10,tem,alpha)
c call prope1 (elem,mat,13,tem,dens)
c should be combined as:
c integer lp(3)
c data lp /1,10,13/
c call propev (elem,mat,lp(1),tem,prop(1),3)
c *** Notice - This file contains ANSYS Confidential information ***
c input arguments:
c iel (int,sc,in) - element number
c mtr (int,sc,in) - material number(input quantity mat, mat comma
c lp (int,ar(n),in) - keys for which specific value is requested
c each group must be in ascending
c order (ex,ey,ez, etc)
c if negative, a required property
c if zero, leave prop term unchanged
c ---- MP command labels --------
c EX = 1, EY = 2, EZ = 3, NUXY= 4, NUYZ= 5, NUXZ= 6, GXY = 7, GYZ = 8,
c GXZ = 9, ALPX=10, ALPY=11, ALPZ=12, DENS=13, MU =14, DAMP=15, KXX =16,
c KYY =17, KZZ =18, RSVX=19, RSVY=20, RSVZ=21, C =22, HF =23, VISC=24,
c EMIS=25, ENTH=26, LSST=27, PRXY=28, PRYZ=29, PRXZ=30, MURX=31, MURY=32,
c MURZ=33, PERX=34, PERY=35, PERZ=36, MGXX=37, MGYY=38, MGZZ=39, EGXX=40,
c EGYY=41, EGZZ=42, SBKX=43, SBKY=44, SBKZ=45, SONC=46, DMPS=47, ELIM=48,
c USR1=49, USR2=50, USR3=51, USR4=51, FLUI=53, ORTH=54, CABL=55, RIGI=56,
c HGLS=57, BVIS=58, QRAT=59, REFT=60, CTEX=61, CTEY=62, CTEZ=63, THSX=64,
c THSY=65, THSZ=66, DMPR=67, LSSM=68, BETD=69, ALPD=70, RH =71, DXX =72,
c DYY =73, DZZ =74, BETX=75, BETY=76, BETZ=77, CSAT=78, CREF=79, CVH =80,
c UMID=81, UVID=82
c (see mpinit for uncommented code)
c (see chapter 2 of the elements volume of the user's manual
c for a detailed description))
c tem (dp,sc,in) - temperature at which to evaluate material
c n (int,sc,in) - number of properties to be evaluated.
c (20 maximum)
c If n = 1, use prope1 instead.
c output arguments:
c prop (dp,ar(n),out) - values of material property
*deck,prope1
subroutine prope1 (iel,mtr,icon,tem,prop1)
c *** primary function: to evaluate one material property
c (if multiple material properties are to
c be evaluated, use propev)
c *** secondary functions: to ensure that certain required props are present
c *** Notice - This file contains ANSYS Confidential information ***
c input arguments:
c iel (int,sc,in) - element number
c mtr (int,sc,in) - material number
c icon (int,sc,in) - key for which specific value is requested
c (negative if property is required)
c ---- MP command labels --------
c EX = 1, EY = 2, EZ = 3, NUXY= 4, NUYZ= 5, NUXZ= 6, GXY = 7, GYZ = 8,
c GXZ = 9, ALPX=10, ALPY=11, ALPZ=12, DENS=13, MU =14, DAMP=15, KXX =16,
c KYY =17, KZZ =18, RSVX=19, RSVY=20, RSVZ=21, C =22, HF =23, VISC=24,
c EMIS=25, ENTH=26, LSST=27, PRXY=28, PRYZ=29, PRXZ=30, MURX=31, MURY=32,
c MURZ=33, PERX=34, PERY=35, PERZ=36, MGXX=37, MGYY=38, MGZZ=39, EGXX=40,
c EGYY=41, EGZZ=42, SBKX=43, SBKY=44, SBKZ=45, SONC=46, DMPS=47, ELIM=48,
c USR1=49, USR2=50, USR3=51, USR4=51, FLUI=53, ORTH=54, CABL=55, RIGI=56,
c HGLS=57, BVIS=58, QRAT=59, REFT=60, CTEX=61, CTEY=62, CTEZ=63, THSX=64,
c THSY=65, THSZ=66, DMPR=67, LSSM=68, BETD=69, ALPD=70, RH =71, DXX =72,
c DYY =73, DZZ =74, BETX=75, BETY=76, BETZ=77, CSAT=78, CREF=79, CVH =80,
c UMID=81, UVID=82
c (see mpinit for uncommented code)
c tem (dp,sc,in) - temperature at which to evaluate material
c output arguments:
c prop1 (dp,sc,out) - value of material property
*deck,pstev1
subroutine pstev1 (elem,matin,tem,prop)
c *** primary function: to evaluate material properites for 1-d elements
c
c *** Notice - This file contains ANSYS Confidential information ***
c
c input arguments:
c elem (int,sc,in) - element number (for anserr)
c matin (int,sc,in) - material reference number
c if negative, no required properties
c tem (dp,sc,in) - temperature for evaluation
c
c output arguments:
c prop (dp,ar(5),out) - material properties: ex,nuxy,gxy,alpx,dens
c
*deck,tbuser
subroutine tbuser (mat,numitm,tbprop)
c *** primary function: return the tb data for the user table
c *** Notice - This file contains ANSYS Confidential information ***
c input arguments:
c mat (int,sc,in) - material property number
c numitm (int,sc,in) - the number of data items requested
c output arguments:
c tbprop (dp,ar(numitm),out) - array of tb data
*deck,plast1
subroutine plast1 (option,elem,intpt,mat,kstartL,tem,dtem,e,
x ktform,dens,flu,dflu,epel,eppl,statev,usvr,
x epeq,plwork,sigepl,sigrat,et)
c *** primary function: to update the plastic history (for 1 component)
c used by: LINK1, LINK8, and SOLID65(reinforcing)
c *** secondary functions: to compute the material tangent matrix if requested
c *** Notice - This file contains ANSYS Confidential information ***
c input arguments:
c option (int,sc,in) - plasticity option
c elem (int,sc,in) - element number (label)
c intpt (int,sc,in) - element integration point number
c mat (int,sc,in) - material reference number
c kstartL (intL,sc,in) - virtual starting address of the data table
c tem (dp,sc,in) - temperature at the end of this substep
c dtem (dp,sc,in) - temperature increment over this substep
c e (dp,sc,in) - elastic modulus
c ktform (int,sc,in) - request key for tangent matrix formation
c dens (dp,sc,in) - material density
c flu (dp,sc,in) - fluence at the end of this substep
c dflu (dp,sc,in) - fluence increment over this substep
c epel (dp,sc,inout) - modified total strain (trial strain)
c eppl (dp,sc,inout) - plastic strain at previous substep
c statev (dp,ar(6),inout) - state variables at previous substep
c usvr (dp,ar(*),inout) - user-defined state variables (for userpl)
c epeq (dp,sc,inout) - effective plastic strain at prev substep
c plwork (dp,sc,inout) - accumulated plastic work at prev substep
c output arguments:
c epel (dp,sc,inout) - elastic strain
c eppl (dp,sc,inout) - updated plastic strain
c statev (dp,ar(6),inout) - updated state variables
c usvr (dp,ar(*),inout) - updated user-defined state variables
c epeq (dp,sc,inout) - updated effective plastic strain
c plwork (dp,sc,inout) - updated accumulated plastic work
c sigepl (dp,sc,out) - stress value on stress-strain curve
c sigrat (dp,sc,out) - ratio of trial stress to yield stress
c et (dp,sc,out) - tangent modulus
c internal variables:
c deppl (dp,sc) - equivalent plastic strain increment
*deck,plast3
subroutine plast3 (option,elem,intpt,mat,kstartL,ncomp,tem,dtem,
x prop,d,ktform,dens,flu,dflu,epel,eppl,statev,usvr,epeq,plwork,
x sigepl,sigrat,dt,kplst,dtt,cmel)
c *** primary function: to update the plastic history (for 4 or 6 components)
c used by: PLANE13, SHELL43, SOLID62, SOLID65,
c SHELL91, SHELL93, SOLID191
c and by way of plast3creep : PLANE42, SOLID45, PLANE82, SOLID92, SOLID95
c *** secondary functions: to compute the material tangent matrix if requested
c *** Notice - This file contains ANSYS Confidential information ***
c input arguments:
c option (int,sc,in) - plasticity option
c elem (int,sc,in) - element number (label)
c intpt (int,sc,in) - element integration point number
c mat (int,sc,in) - material reference number
c kstartL (intL,sc,in) - virtual starting address of the data table
c ncomp (int,sc,in) - number of stress/strain components (4 or 6)
c tem (dp,sc,in) - temperature at the end of this substep
c dtem (dp,sc,in) - temperature increment over this substep
c prop (dp,ar(9),in) - material property array (ex,ey,ez,
c gxy,gyz,gxz, uxy,uyz,uxz)
c d (dp,ar(ncomp,ncomp),in) - elastic stress-strain matrix
c ktform (int,sc,in) - request key for tangent matrix formation
c dens (dp,sc,in) - material density
c flu (dp,sc,in) - fluence at the end of this substep
c dflu (dp,sc,in) - fluence increment over this substep
c epel (dp,ar(ncomp),inout)- modified total strain (trial strain)
c eppl (dp,ar(ncomp),inout)- plastic strain at previous substep
c statev (dp,ar(ncomp,6),inout)- state variables at previous substep
c usvr (dp,ar(*),inout) - user-defined state variables (for pluser)
c epeq (dp,sc,inout) - effective plastic strain at prev substep
c plwork (dp,sc,inout) - accumulated plastic work at prev substep
c kplst (int,sc,in) - plane stress key (form dtt if kplst=1)
c output arguments:
c epel (dp,ar(ncomp),inout)- elastic strain
c eppl (dp,ar(ncomp),inout)- updated plastic strain
c statev (dp,ar(ncomp,6),inout)- updated state variables
c usvr (dp,ar(*),inout) - updated user-defined state variables
c epeq (dp,sc,inout) - updated effective plastic strain
c plwork (dp,sc,inout) - updated accumulated plastic work
c sigepl (dp,sc,out) - stress value on stress-strain curve
c sigrat (dp,sc,out) - ratio of trial stress to yield stress
c dt (dp,ar(ncomp,ncomp),out)- material modulus modified by dscpar
c dtt (dp,ar(ncomp,ncomp),out)- consistent tangent modulus
c (formed only if kplst=1)
c internal variables:
c deppl (dp,sc) - equivalent plastic strain increment
*deck,creep1
subroutine creep1 (option,elem,intpt,mat,kstartL,epel,e,epcrp,
x statev,usvr,tem,dtem,fluen,dflu,sig)
c *** primary function: to update the creep history for 1-d elements
c used by: LINK1, LINK8, and SOLID65(reinforcing)
c *** Notice - This file contains ANSYS Confidential information ***
c input arguments:
c option (int,sc,in) - creep option
c elem (int,sc,in) - element number (label)
c intpt (int,sc,in) - element integration point number
c mat (int,sc,in) - material reference number
c kstartL (intL,sc,in) - virtual starting address of the data table
c epel (dp,sc,inout) - elastic strain
c e (dp,sc,in) - elastic modulus
c epcrp (dp,sc,inout) - creep strain at previous substep
c statev (dp,ar(7),inout) - state variables at previous substep
c usvr (dp,ar(*),inout) - user-defined state variables (for usercr)
c tem (dp,sc,in) - temperature at the end of this substep
c dtem (dp,sc,in) - temperature increment over this substep
c fluen (dp,sc,in) - fluence at the end of this substep
c dflu (dp,sc,in) - fluence increment over this substep
c epel (dp,sc,inout) - elastic strain adjusted for creep increment
c sig (dp,sc,inout) - stress (not really used)
c output arguments:
c epcrp (dp,sc,inout) - updated creep strain
c statev (dp,ar(7),inout) - updated state variables
c usvr (dp,ar(*),inout) - updated user-defined state variables
c sig (dp,sc,inout) - stress (recomputed if requested)
*deck,creep3
subroutine creep3 (option,elem,intpt,mat,kstartL,ncomp,epel,e,
x posn,d,epcrp,statev,usvr,tem,dtem,fluen,dflu,kplst,sig,hsig)
c *** primary function: to update the creep history for 3-d elements
c used by: PLANE13, PLANE42, SHELL43, SOLID45,
c SOLID62, SOLID65, PLANE82, SHELL91,
c SOLID92, SHELL93, SOLID95, SOLID191
c *** Notice - This file contains ANSYS Confidential information ***
c input arguments:
c option (int,sc,in) - creep option
c elem (int,sc,in) - element number (label)
c intpt (int,sc,in) - element integration point number
c mat (int,sc,in) - material reference number
c kstartL (intL,sc,in) - virtual starting address of the data table
c ncomp (int,sc,in) - number of stress/strain components (4 or 6)
c epel (dp,ar(ncomp),inout)- elastic strain
c e (dp,sc,in) - elastic young'S MODULUS
c posn (dp,sc,in) - poisson'S RATIO
c d (dp,ar(ncomp,ncomp),in) - elastic stress-strain matrix
c epcrp (dp,ar(ncomp),inout)- creep strain at previous substep
c statev (dp,ar(ncomp*5+2),inout)- state variables at previous substep
c usvr (dp,ar(*),inout) - user-defined state variables (for usercr)
c tem (dp,sc,in) - temperature at the end of this substep
c dtem (dp,sc,in) - temperature increment over this substep
c fluen (dp,sc,in) - fluence at the end of this substep
c dflu (dp,sc,in) - fluence increment over this substep
c kplst (int,sc,in) - plane stress/plane strain key
c sig (dp,ar(ncomp),inout)- stresses (not used in input)
c hsig (dp,ar(1),inout) - hydrostatic stress (not used in input)
c output arguments:
c epel (dp,ar(ncomp),inout)- elastic strain adjusted for creep increment
c epcrp (dp,ar(ncomp),inout)- updated creep strain
c statev (dp,ar(ncomp*5+2),inout)- updated state variables
c usvr (dp,ar(*),inout) - updated user-defined state variables
c sig (dp,ar(ncomp),inout)- stresses (redefined if c13 > 0)
c hsig (dp,sc,inout) - hydrostatic stress (redefined if c13 > 0)
*deck,swell1
subroutine swell1 (option,elem,intpt,mat,kstartL,epswel,epel,e,
x fluen,dfluen,tem,dtem,usvr)
c *** primary function: to update the swelling history for 1-d elements
c used by: LINK1, LINK8
c *** Notice - This file contains ANSYS Confidential information ***
c input arguments:
c option (int,sc,in) - swelling option
c elem (int,sc,in) - element number (label)
c intpt (int,sc,in) - element integration point number
c mat (int,sc,in) - material reference number
c kstartL (intL,sc,in) - virtual starting address of the data table
c epswel (dp,sc,inout) - swell strain at previous substep
c epel (dp,sc,inout) - elastic strain
c e (dp,sc,in) - elastic young'S MODULUS
c fluen (dp,sc,in) - fluence at the end of this substep
c dfluen (dp,sc,in) - fluence increment over this substep
c tem (dp,sc,in) - temperature at the end of this substep
c dtem (dp,sc,in) - temperature increment over this substep
c usvr (dp,ar(*),inout) - user-defined state variables (for usersw)
c output arguments:
c epel (dp,sc,inout) - elastic strain adjusted for swelling inc
c epswel (dp,sc,inout) - updated swelling strain
c usvr (dp,ar(*),inout) - updated user-defined state variables
*deck,swell3
subroutine swell3 (option,elem,intpt,mat,kstartL,ncomp,epswel,
x epel,e,nuxy,fluen,dfluen,tem,dtem,usvr)
c *** primary function: to update the swelling history for 3-d elements
c used by: PLANE13, PLANE42, SHELL43, SOLID45,
c SOLID62, PLANE82, SHELL91, SOLID92,
c SHELL93, SOLID95, SOLID191
c *** Notice - This file contains ANSYS Confidential information ***
c input arguments:
c option (int,sc,in) - swelling option
c elem (int,sc,in) - element number (label)
c intpt (int,sc,in) - element integration point number
c mat (int,sc,in) - material reference number
c kstartL (intL,sc,in) - virtual starting address of the data table
c ncomp (int,sc,in) - number of stress/strain components (4 or 6)
c epswel (dp,sc,inout) - swell strain at previous substep
c epel (dp,ar(ncomp),inout)- elastic strain
c e (dp,sc,in) - elastic young'S MODULUS
c nuxy (dp,sc,in) - poisson'S RATIO
c fluen (dp,sc,in) - fluence at the end of this substep
c dfluen (dp,sc,in) - fluence increment over this substep
c tem (dp,sc,in) - temperature at the end of this substep
c dtem (dp,sc,in) - temperature increment over this substep
c usvr (dp,ar(*),inout) - user-defined state variables (for usersw)
c output arguments:
c epel (dp,ar(ncomp),inout)- elastic strain adjusted for swelling inc
c epswel (dp,sc,inout) - updated swelling strain
c usvr (dp,ar(*),inout) - updated user-defined state variables
*deck,elLenPsvrBuf
function elLenPsvrBuf (mat, plOpt, ncomp)
c************************************************************************
c *** primary function:
c determine additional esave record for plasticity
c input arguments
c ===============
c mat (int,sc,in) - material ID
c plOpt (int,sc,in) - plasticity option
c ncomp (int,sc,in) - number of strain components (1,4, or 6)
c output arguments
c ================
c elLenPsvrBuf (int,sc,out) - number of extra data items saved
c local variables
c ===============
c************************************************************************
2.2.21. Function tbgettbtype (Retrieving the Unique Index Associated with a TB Table)
*deck,tbgettbtype
function tbgettbtype(tablename)
c*************************************************************************
c
c *** primary function
c Get the tbtype number associated with a string
c
c input arguments
c ===============
c tabelename char4,sc unique table type string associated
c each type.
c output arguments
c ===============
c tbgetdataperfield tbtype unique to each type like 'user'
c 'elas', 'plas'
c
c*************************************************************************
2.2.22. Function tbgetnumtables (Retrieving the Number of Subtables for a TB Type)
*deck,tbgetnumtables
function tbgetnumtables(matid,tabtyp)
c*************************************************************************
c
c *** primary function
c Get the number of user tb commands issued for mat id.
c
c input arguments
c ===============
c matid int,sc material number
c tabtyp int,sc unique table type number associated
c each type. default is user when tabtyp
c is set to a number less than 1
c
c output arguments
c ===============
c tbgetnumtables get number of tb table tables
c
c*************************************************************************
2.2.23. Function tbgetnumfldvars (Retrieving the Number of Field Variables for a TB Type)
*deck,tbgetnumfldvars
function tbgetnumfldvars(matid,tabtyp,tbindx)
c*************************************************************************
c
c *** primary function
c Get number of field variables types
c
c input arguments
c ===============
c matid int,sc material number
c tabtyp int,sc unique table type number associated
c each type. default is user when tabtyp
c is set to a number less than 1
c tbindx int,sc table index if multiple tb commands
c for tb table were issued
c
c output arguments
c ===============
c tbgetnumfldvars get number of field variable types
c
c*************************************************************************
2.2.24. Function tbgetfldvars (Retrieving Field Variable Types for a TB Type)
*deck,tbgetfldvars
function tbgetfldvars(matid,tabtyp,tbindx,fldtyp,nfld)
c*************************************************************************
c
c *** primary function
c Get field variables types indices. FLD_FieldDefines.inc has
c the types and documentation. To see list of supported types
c see the material reference manual
c
c input arguments
c ===============
c matid int,sc material number
c tabtyp int,sc unique table type number associated
c each type. default is user when tabtyp
c is set to a number less than 1
c tbindx int,sc table index if multiple tb commands
c for tb table were issued
c
c output arguments
c ===============
c tbgetnumfldvars status 1 if success. 0 if failure
c fldtyp Types of field variables.
c nfld number of field variables.
c*************************************************************************
*deck,tbgetfldname
function tbgetfldname(fldtyp,fldstring)
c*************************************************************************
c
c *** primary function
c Get field variable name given an index or unique fld typ
c queries using the tbgetfldvars function
c
c input arguments
c ===============
c fldtyp int,sc field variable index
c
c output arguments
c ===============
c tbgetfldname status 1 if success. 0 if failure
c fldstring field variable name
c*************************************************************************
2.2.26. Function tbgettbopt (Retrieving the TBOPT Associated
with a TB Type)
*deck,tbgettbopt
function tbgettbopt(matid,tabtyp,tbindx)
c*************************************************************************
c
c *** primary function
c Get the tbopt of the subtable
c
c input arguments
c ===============
c matid int,sc material number
c tabtyp int,sc unique table type number associated
c each type. default is user when tabtyp
c is set to a number less than 1
c tbindx int,sc table index if multiple tb commands
c for tb table were issued
c
c output arguments
c ===============
c tbgettbopt tboption unique to each subtable
c
c*************************************************************************
*deck,tbgettboptname
function tbgettboptname(matid,tabtyp,tbindx,tboptstr)
c*************************************************************************
c
c *** primary function
c Get the string or documented name associated along with the
c tbopt of a tb sub table
c
c input arguments
c ===============
c matid int,sc material number
c tabtyp int,sc unique table type number associated
c each type. default is user when tabtyp
c is set to a number less than 1
c tbindx int,sc table index if multiple tb commands
c for tb table were issued
c
c output arguments
c ===============
c tbgettbopt tboption unique to each subtable
c tboptstr string associated with the tbopt
c
c*************************************************************************
*deck,tbgetdataperfield
function tbgetdataperfield(matid,tabtyp,tbindx)
c*************************************************************************
c
c *** primary function
c Get the number of table data issued per temperature
c
c input arguments
c ===============
c matid int,sc material number
c tabtyp int,sc unique table type number associated
c each type. default is user when tabtyp
c is set to a number less than 1
c tbindx int,sc table index if multiple tb commands
c for tb table were issued
c
c output arguments
c ===============
c tbgetdataperfield tboption unique to each subtable
c
c*************************************************************************
*deck,tbgetnumfldsets
c
function tbgetnumfldsets(matid,tabtyp,tbindx)
c*************************************************************************
c
c *** primary function
c Get number of temperatures defined or field variables.
c
c input arguments
c ===============
c matid int,sc material number
c tabtyp int,sc unique table type number associated
c each type. default is user when tabtyp
c is set to a number less than 1
c tbindx int,sc table index if multiple tb commands
c for tb table were issued
c
c output arguments
c ===============
c tbgetnumfldsets get number of field variables/temps
c
c*************************************************************************
*deck,tbgettabledata
function tbgettabledata(matid,tabtyp,tbindx,setid,
x udata,ndata,ufld,nufld)
c*************************************************************************
c
c *** primary function
c Get the table data and temperature/fld vars
c
c input arguments
c ===============
c matid int,sc material number
c tabtyp int,sc unique table type number associated
c each type. default is user when tabtyp
c is set to a number less than 1
c tbindx int,sc table index if multiple tb commands
c for tb table were issued
c
c output arguments
c ===============
c tbgetdataperfield tboption unique to each subtable
c
c*************************************************************************
*deck,tbgettabledatasz
function tbgettabledatasz(matid,tabtyp,tbindx,setid,
x nfld,nrow,ncol)
c*************************************************************************
c
c *** primary function
c Get the table data and temperature/fld vars sizes
c
c input arguments
c ===============
c matid int,sc material number
c tabtyp int,sc unique table type number associated
c each type. default is user when tabtyp
c is set to a number less than 1
c tbindx int,sc table index if multiple tb commands
c for tb table were issued
c
c output arguments
c ===============
c tbgettabledatasz 1 for success 0 for failure
c
c*************************************************************************
*deck,nlget
function nlget (mat,iprop,prop)
c *** primary function: get a material non-linear property (TB) table.
c *** Notice - This file contains ANSYS Confidential information ***
c input arguments:
c variable (typ,siz,intent) description
c mat (int,sc,in) - material number
c iprop (int,sc,in) - property number (tbpnum in tblecm)
c use 13 for tb,user
c use 14 for tb,nl
c output arguments:
c variable (typ,siz,intent) description
c nlget (int,sc,out) - number of property values
c prop (dp,ar(nlget),out) - vector of the property values
c (the first 15(tbhdsz) items are a header,
c given below. The terms are defined in
c tblecm.inc)
c --- terms of the descriptor record:
c header(1) = tbtyp
c header(2) = tbtems
c header(3) = temloc
c header(4) = dprtem
c header(5) = tbrow
c header(6) = tbcol
c header(7) = rowkey
c header(8) = nxtloc
c header(9) = nxttem
c header(10) = temptr
c header(11) = tbpt
c header(12) = tbsiz
c header(13) = tbopt
c header(14) = hypopt
c header(15) = tbnpts
*deck,usereo
subroutine usereo (elem,iout,nbsvr,bsvr,nnrsvr,nrsvr,npsvr,psvr,
x ncsvr,csvr,nusvr,usvr,nnode,nodes,xyz,vol,leng,time,
x timinc,nutot,utot,maxdat,numdat,udbdat)
c
c *** primary function: to call userou, which allows user to store
c data in nmisc record
c
c *** Notice - This file contains ANSYS Confidential information ***
c
c input arguments:
c variable (typ,siz,intent) description
c elem (int,sc,in) - element number
c iout (int,sc,in) - output unit number
c nbsvr (int,sc,in) - number of basic element variables
c bsvr (dp,ar(nbsvr),in) - basic element variables
c nnrsvr (int,sc,in) - number of nonlinear element variables
c nrsvr (dp,ar(nnrsvr),in) - nonlinear element variables
c npsvr (int,sc,in) - number of plasticity element variables
c psvr (dp,ar(npsvr),in) - plasticity element variables
c ncsvr (int,sc,in) - number of creep element variables
c csvr (dp,ar(ncsvr),in) - creep element variables
c nusvr (int,sc,in) - number of user-supplied element variables
c usvr (dp,ar(nusvr),in) - user-supplied element variables
c nnode (int,sc,in) - number of nodes
c nodes (int,ar(nnode),in) - node numbers
c xyz (dp,ar(6,nnode),in) - nodal coordinates and rotations (virgin)
c vol (dp,sc,in) - element volume (or area if 2-d)
c leng (dp,sc,in) - element length (beams,spars,etc)
c time (dp,sc,in) - current time
c timinc (dp,sc,in) - current sub step time increment
c nutot (int,sc,in) - length of dof solution vector utot
c utot (dp,ar(nutot),in) - solution vector
c maxdat (int,sc,in) - size of user output array (3 x nnode)
c actually, = ielc(nmnmup)
c for contact element it is equale to nusvr
c but it does not exceed 120
c
c output arguments:
c variable (typ,siz,intent) description
c numdat (int,sc,out) - number of user output items in array udbdat
c udbdat (dp,ar(maxdat),out) - user output items to be placed at the end
c of the nmisc record
c
*deck,eldwrtL
subroutine eldwrtL (ielem,elord,edtype,lcerstL,edindxL,nval,value)
c *** primary function: output element data to result file
c *** Notice - This file contains ANSYS Confidential information ***
c input arguments:
c ielem (int,sc,in) - external element number
c elord (int,sc,in) - internal element number
c edtype (int,sc,in) - element data type (see elparm)
c lcerstL (LONG,sc,inout) - pointer to results file position
c edindxL (LONG,ar(NUMELEDATASETS),inout)- index to results file data
c nval (int,sc,in) - the total number of values
c if edtype = EDEMS,
c this should -always- be ielc(nmsmis),
c unless there is a variable number, as
c in the layered shell elements.
c value (dp,ar(nval),in) - output values (real)
*deck,eldwrnL
subroutine eldwrnL (elem,ielc,lcerstL,edindxL,nudb,udbdat,
x nval,value,ndval)
c *** primary function: output element nonsummable miscellaneous data
c to result file
c *** Notice - This file contains ANSYS Confidential information ***
c input arguments:
c elem (int,sc,in) - element number
c ielc (int,ar(IELCSZ),in) - element characteristic vector
c defined in elccmt
c lcerstL (LONG,sc,inout) - pointer to results file position
c edindxL (LONG,ar(NUMELEDATASETS),inout)- index to results file data
c nudb (in,sc,inout) - size of what the user wants to add
c udbdat (dp,ar(*),in) - what the user wants to add
c nval (int,sc,in) - the total number of values to
c be output(does not include nudb)
c this should -always- be ielc(NMNMIS),
c unless there is a variable number, as
c in the layered shell elements.
c value (dp,ar(ndval),in) - output values
c ndval (int,sc,in) - dimension of value - must be no less than
c ielc(NMNMIS) + ielc(NMNMUP)
c
*deck,trrot
subroutine trrot (tr,rot)
c *** primary function: get the rotation vector from a transformation matrix
c *** Notice - This file contains ANSYS Confidential information ***
c input arguments:
c tr (dp,ar(3,3),in) - transformation matrix
c output arguments:
c rot (dp,ar(3),out) - rotation vector
*deck,rottr
subroutine rottr (rot,tr)
c primary function: compute transformation matrix from rotation vector *****
c *** Notice - This file contains ANSYS Confidential information ***
c
c ref(old): eqn. 20(transposed),rankin and brogan, jpvt,108(1986)165-174.
c ref(new): eqn. (b.4), simo and vu-quoc, cmame, 58 (1986), 79-116
c (removes singularities at pi and 2*pi)
c
c input arguments:
c variable (typ,siz,intent) description
c rot (dp,ar(4),in) - rotation parameter in radians
c
c output arguments:
c variable (typ,siz,intent) description
c tr (dp,ar(3,3),out) - transformation matrix corresponding to rot
*deck,xyzup3
subroutine xyzup3 (nnod,u,nr,xyz,nx,xyzup)
c *** primary function: update a 3-d ele nodal coords for large deformation
c
c *** Notice - This file contains ANSYS Confidential information ***
c
c input arguments:
c nnod (int,sc,in) - number of nodes
c u (dp,ar(nr),in) - displacement vector
c nr (int,sc,in) - size of the u vector
c xyz (dp,ar(nx,nnod),in) - coordinates to be updated
c nx (int,sc,in) - row size of xy
c
c output arguments:
c xyzup (dp,ar(3,nnod),out) - updated coordinates
c
*deck,tmpget
subroutine tmpget (iel,ielc,nnod,nodes,ref,ndat0,begdat,dat,
x enddat,tlvf)
c primary function: define the current temperature loads
c
c *** Notice - This file contains ANSYS Confidential information ***
c
c typ=int,dp,log,chr,dcp siz=sc,ar(n),func intent=in,out,inout
c
c input arguments:
c variable (typ,siz,intent) description
c iel (int,sc,in) - element number
c ielc (int,ar(IELCSZ),in) - array of element type characteristics
c nnod (int,sc,in) - number of nodes in the nodes array
c nodes (int,ar(nnod),in) - list of nodes
c ref (dp,sc,in) - reference temperature
c ndat (int,sc,in) - number of data items to get
c begdat (dp,ar(ndat),in) - data at the beginning of this load step
c
c output arguments:
c dat (dp,ar(ndat),out) - data at this time point
c enddat (dp,ar(ndat),out) - data at end of this load step
c tlvf (int,sc,out) - thermal load vector flag
c Should the thermal load vector be computed
c = 0 - no, temperatures match tref
c = 1 - yes, temperatures do not match tref
c =<0 - no and using table
c Note, that even if tlvf = 0, temperatures may be used to
c compute temperature-dependent material properties.
c
*deck,prsget
subroutine prsget (iel,ielc,nfac,ndat,begdat,dat,enddat,iexist)
c primary function: define the current pressure loads
c See also: PrsRIGet
c *** Notice - This file contains ANSYS Confidential information ***
c input arguments:
c iel (int,sc,in) - element number
c ielc (int,ar(IELCSZ),in) - array of element type characteristics
c nfac (int,sc,in) - number of pressure faces
c ndat (int,sc,in) - number of pressure values
c begdat (dp,ar(ndat),in) - pressure at the beginning of load step
c output arguments:
c dat (dp,ar(ndat),out) - pressures at this iteration
c enddat (dp,ar(ndat),out) - pressure at end of this load step
c iexist (int,sc,out) - flag if pressure exist
c = 0 : no pressure
c = 1 : yes pressure
c = -1 : no pressure and has table
*deck,cnvget
subroutine cnvget (iel,ielc,nr,u,nfac,ndat,beghc,begtb,
x hc,tb,endhc,endtb,iexist)
c primary function: define the current convection loads
c *** Notice - This file contains ANSYS Confidential information ***
c input arguments:
c iel (int,sc,in) - element number
c ielc (int,ar(IELCSZ),in) - array of element type characteristics
c nr (int,sc,in) - dimension of u (temperature) vector
c u (dp,ar(nr),in) - most current temperatures
c nfac (int,sc,in) - number of convection faces
c ndat (int,sc,in) - number of convection values
c beghc (dp,ar(ndat),in) - hcoef at the beginning of load step
c begtb (dp,ar(ndat),in) - tbulk at the beginning of load step
c output arguments:
c hc (dp,ar(ndat),out) - hcoef at this substep
c tb (dp,ar(ndat),out) - tbulk at this substep
c endhc (dp,ar(ndat),in) - hcoef at the end of this load step
c endtb (dp,ar(ndat),in) - tbulk at the end of this load step
c iexist (int,sc,out) - flag if convection exist
c = 0 - no convection
c = 1 - constant convection (with time)
c does not require new element matrix
c = 2 - changing convection (with time)
c or deleted convection
c requires new element matrix
*deck,hgnget
subroutine hgnget (iel,ielc,nnod,nodes,ndat,begdat,dat,enddat,
x iexist)
c primary function: define the current heat generation loads
c
c *** Notice - This file contains ANSYS Confidential information ***
c
c typ=int,dp,log,chr,dcp siz=sc,ar(n),func intent=in,out,inout
c
c input arguments:
c variable (typ,siz,intent) description
c iel (int,sc,in) - element number
c ielc (int,ar(IELCSZ),in) - array of element type characteristics
c nnod (int,sc,in) - number of nodes in the nodes array
c nodes (int,ar(nnod),in) - list of nodes
c ndat (int,sc,in) - number of data items to get
c begdat (dp,ar(ndat),in) - data at the beginning of this load step
c
c output arguments:
c dat (dp,ar(ndat),out) - data at this time point
c enddat (dp,ar(ndat),out) - data at end of this load step
c iexist (int,sc,out) - flag if heat generation exist
c = 0 - no heat generation
c = 1 - yes heat generation
c
*deck,prinst
subroutine prinst (s)
c primary function: computes principal stresses and stress intensity
c secondary functions: none
c *** Notice - This file contains ANSYS Confidential information ***
c input arguments:
c variable (typ,siz,intent) description
c s (dp,ar(11),inout) - stress vector
c s(1)=sx
c s(2)=sy
c s(3)=sz
c s(4)=sigxy
c s(5)=sigyz
c s(6)=sigzx
c
c output arguments:
c variable (typ,siz,intent) description
c s (dp,ar(11),inout) - stress vector
c s(7)=sig1
c s(8)=sig2
c s(9)=sig3
c s(10)=s.i.
c s(11)=sige
c ********* note: all changes to this routine must be made in
c post1 (paprst)
c