3.6. Element Loading Routines

The following table provides available body load keys for the routines used to access element body load information (ansElemBodyLoadIqr, ansElemBodyLoadGet, ansElemBodyLoadPut, and ansElemBodyLoadDel).

Table 3.2: Element Body Load Keys

KeyInternal LabelBFE Cmd LabelMeaning
1BODYLOAD_TEMPTEMPTemperature
2BODYLOAD_FLUEFLUEFluence
3BODYLOAD_HGENHGENHeat generation
4BODYLOAD_DGENDGENDiffusing substance genereation rate
5BODYLOAD_MVDIMVDIMagnetic virtual displacement flags
6BODYLOAD_CHRGCHRDGMagnetic virtual displacement flags
7BODYLOAD_JSJSMass source/Current density
9BODYLOAD_EFEFElectric field
12BODYLOAD_FVINFVINField volume interface flag
18BODYLOAD_FSOUFSOUFluid flow source
19BODYLOAD_FORCFORCBody force density in momentum equation

The following table provides available surface load keys for the routines used to access element surface load information (ansElemSurfLoadIqr, ansElemSurfLoadGet, ansElemSurfLoadPut, and ansElemSurfLoadDel).

Table 3.3: Element Surface Load Keys

KeyInternal LabelCmd LabelSF CmdSFE CmdMeaning
LOADS
1SURFLOAD_PRESPRESxxPressure
2SURFLOAD_CONVCONVxxConvection
3SURFLOAD_IMPDIMPDxxImpedence
4SURFLOAD_DFLUDFLUxxDiffusing substance generation rate
6SURFLOAD_CHRGCHRGxxCharge density
7SURFLOAD_PORTPORTxxPort
8SURFLOAD_RADRADxxRadiation boundary
9SURFLOAD_FSINFSINxxFSI interface
10SURFLOAD_RDSFRDSFxxSurface-to-surface radiation
11SURFLOAD_SELVSELV xSubstructure
12SURFLOAD_SHLDSHLDxxSurface normal velocity or acceleration
13SURFLOAD_FFLXFFLXxxFlow flux
16SURFLOAD_HFLUHFLUxxHeat flux (film coefficient in db)
17SURFLOAD_ATTNATTNxxAttenuation coefficient
18SURFLOAD_TIMPTIMPx Thermal impedance
19SURFLOAD_VIMPVIMPx Viscous impedance
FLAGS
1SURFLOAD_MXWFMXWFxxMaxwell force
2SURFLOAD_FREEFREExxFree surface
3SURFLOAD_INFINFxxInfinite surface
4SURFLOAD_BLIBLIx Boundary layer
5SURFLOAD_FSIFSIxxFSI interface
9SURFLOAD_RIGWRIGWx Rigid wall

3.6.1. Function ansElemBodyLoadIqr (Getting Information About an Element Body Load)

*deck,ansElemBodyLoadIqr
      function ansElemBodyLoadIqr (BODYLOAD_KEY,ielem,key)
c *** primary function: get information about element loads.

c *** Notice - This file contains ANSYS Confidential information ***

c input arguments:
c  BODYLOAD_KEY (int,sc,in)     - body load key (see ansysdef.inc)
c  ielem        (int,sc,in)     - element number
c                                 Should be 0 for key=11, DB_NUMDEFINED,
c                                 DB_MAXDEFINED, and DB_MAXRECLENG
c  key          (int,sc,in)     - information flag.
c                = DB_SELECTED    - return status:
c                                   ansElemBodyLoadIqr = 0 - element has no loads
c                                                      = 1 - element has load defined
c                = DB_NUMDEFINED   - return number of loads defined for this element 
c                                    (rec length)
c                = DB_MAXDEFINED   - return number of loads defined in model
c                = DB_MAXRECLENG   - return maximum number of loads defined for
c                                    any element (max rec length)
c                = 2               - return length (dp words)
c                = 3               - return layer number (for cross reference 
c                                    files returnnumber of entities)
c                = 4               - return address of first data word
c                = 5               - return length (dp words)
c                = 6               - return compressed record number.
c                =11               - return void percent (integer)
c                =16               - return location of next record (this  
c                                    increments the next record count)
c                =18               - return type of file.
c                                   ansElemBodyLoadIqr = 0 - integer
c                                                      = 1 - double precision
c                                                      = 2 - real
c                                                      = 3 - complex
c                                                      = 4 - character*8
c                                                      = 7 - index
c               =19               - return virtual type of file.
c                                   ansElemBodyLoadIqr = 0 - fixed length (4.4 form)
c                                                      = 1 - indexed variable length
c                                                            (layer data)
c                                                      = 2 - xref data tables
c                                                      = 3 - bitmap data 
c                                                            (for 32 data item packed 
c                                                             records)
c                                                      = 4 - data tables (three dimensional 
c                                                            arrays)


c     output arguments:
c        ansElemBodyLoadIqr (int,func,out)    - the returned value of ansElemBodyLoadIqr is
c                                               based on setting of key.

3.6.2. Function ansElemBodyLoadGet (Getting an Element Body Load Value)

*deck,ansElemBodyLoadGet
      function ansElemBodyLoadGet (BODYLOAD_KEY,ielem,val)
c *** primary function:    get element loads (in raw form)

c *** Notice - This file contains ANSYS Confidential information ***

c     input arguments:
c        BODYLOAD_KEY(int,sc,in)       - body load key (see ansysdef.inc)
c        ielem       (int,sc,in)       - element number

c     output arguments:
c        ansElemBodyLoadGet (int,func,out)    - status of element.
c                                               = 0 - no element load
c                                               > 0 - number of element load 
c                                                     retrieved
c        val         (dp,ar(n,2),out)  - the element load (new,old).


3.6.3. Subroutine ansElemBodyLoadPut (Storing an Element Body Load)

*deck,ansElemBodyLoadPut
      subroutine ansElemBodyLoadPut (BODYLOAD_KEY,ielem,nVals,values)
c *** primary function:    store element loads

c *** Notice - This file contains ANSYS Confidential information ***

c     input arguments:
c        BODYLOAD_KEY(int,sc,in)       - body load key (see ansysdef.inc)
c        ielem       (int,sc,in)       - element number
c        nVals       (int,sc,in)       - number of element load values
c        values      (dp,ar(nVals),in) - element load
c
c     output arguments:  none


3.6.4. Subroutine ansElemBodyLoadDel (Deleting an Element Body Load)

*deck,ansElemBodyLoadDel
      subroutine ansElemBodyLoadDel (BODYLOAD_KEY,ielem)
c *** primary function:    delete element loads

c *** Notice - This file contains ANSYS Confidential information ***

c     input arguments:
c        BODYLOAD_KEY(int,sc,in)       - body load key (ansysdef.inc)
c        ielem       (int,sc,in)       - element number

c     output arguments:  none.


3.6.5. Function ansElemSurfLoadIqr (Getting Information About an Element Surface Load)

*deck,ansElemSurfLoadIqr
      function ansElemSurfLoadIqr (SURFLOAD_KEY,ielem,iface,key)
c *** primary function: get information about element pressure/convection

c *** Notice - This file contains ANSYS Confidential information ***

c     input arguments:
c        SURFLOAD_KEY(int,sc,in)       - surface load key
c        ielem       (int,sc,in)       - element number
c                                        should be zero for key=DB_NUMDEFINED or 
c                                        DB_MAXRECLENG
c        iface       (int,sc,in)       - face number for inquire (0-6)
c                                        face number is needed for key=5. for 
c                                        other values of key, iface has different
c                                        meaning (see below)
c        key          (int,sc,in)      - key as to the information needed
c                     = 1              - return pressure mask for element
c                     = 5              - return number of pressures for this 
c                                        element face. if face = 0,
c                                        returns max. data size
c                     = -5             - return highest face id
c                     = DB_NUMDEFINED,
c                     = DB_MAXDEFINED  - return value is based on setting of iface
c                                         NOTE: both DB_NUMDEFINED and 
c                                               DB_MAXDEFINED produce the same 
c                                               functionality
c                                 iface = 0   - return number of surface loads defined
c                                       = 1-6 - return number of pressure loads 
c                                               defined for this element.  
c                                               NOTE:  only 1-6 is valid, but this 
c                                                      routine simply checks that iface 
c                                                      is in the range.  The actual value 
c                                                      of iface does not matter in this case.
c                    = DB_MAXRECLENG  - return the maximum number of element 
c                                       pressures on any element (max record
c                                       length)

c     output arguments:
c        ansElemSurfLoadIqr(int,func,out)  - the returned value of ansElemSurfLoadIqr 
c                                            is based on setting of key.
c

3.6.6. Function ansElemSurfLoadGet (Getting an Element Surface Load Value)

*deck,ansElemSurfLoadGet
      function ansElemSurfLoadGet (SURFLOAD_KEY,elem,iface,value)
c *** primary function:    get an element face load

c *** Notice - This file contains ANSYS Confidential information ***

c     input arguments:
c        SURFLOAD_KEY        (int,sc,in)       - surface load key
c        elem                (int,sc,in)       - element number (negative value for
c                                                                no partabeval)
c        iface               (int,sc,in)       - face number (1-68)

c     output arguments:
c        ansElemSurfLoadGet  (int,func,out)    - status of element
c                                                 =-1 - element has no surface load of given type
c                                                 = 0 - element face has no surface load of given type
c                                                 > 0 - number of surface load values defined
c        value               (dp ,ar(*),out)   - the element surface load values (real,imag)
c                                                at the given face for the given type


3.6.7. Subroutine ansElemSurfLoadPut (Storing an Element Surface Load)

*deck,ansElemSurfLoadPut
      subroutine ansElemSurfLoadPut (SURFLOAD_KEY,ielem,iface,nval,
     x                               value)
c *** primary function:    store an element face loads.

c *** Notice - This file contains ANSYS Confidential information ***

c     input arguments:
c        SURFLOAD_KEY   (int,sc,in)       - surface load key
c        ielem          (int,sc,in)       - element number for operation
c        iface          (int,sc,in)       - face number (1-68)
c        nval           (int,sc,in)       - number of values to put
c        value          (dp,ar(nval),in)  - the element load (real,imag) at each
c                                           face
c
c     output arguments:  none


3.6.8. Subroutine ansElemSurfLoadDel (Deleting an Element Surface Load)

*deck,ansElemSurfLoadDel
      subroutine ansElemSurfLoadDel (SURFLOAD_KEY,ielem,iface)
c *** primary function:    delete a surface load on an element

c *** Notice - This file contains ANSYS Confidential information ***

c     input arguments:
c        SURFLOAD_KEY   (int,sc,in)     - surface load key
c        ielem          (int,sc,in)     - element number
c        iface          (int,sc,in)     - face number
c                                         = 0 - delete all pressures on this 
c                                               element
c                                         = 1-6 - delete pressure on this face
c     output arguments:  none.
c