## 3.6. Accessing Multiple Material Data – All IJK Solvers

Depending upon the Autodyn processor (solver) being used, it is possible for a single cell (element) to contain more than one type of material. This is primarily applicable to Euler and Euler Godunov processors. In Autodyn-2D, for multiple material cells, the standard cell values of compression, internal energy, temperature, and alpha are mass-weighted averages of multiple material values. In Autodyn-3D, plotting options allow you to plot multiple material values for a specific material or for mass-weighted values as in 2D. Normally, if you wish to access the individual cell values of these variables for each material in the cell, you must make the following subroutine call:

    CALL GETMLT(IJK,0) or GETMLT3(IJK,0)

Where IJK is the index of the cell. After the call is made, the cell variables may be accessed according to the following table:

Multi-material variable | Internal Array | ML Index
--- | --- | ---
Material volume fraction | CVF(1,matno) | NCVF*
Material mass | CMS(1,matno) | NCMS*
Material compression | CMU(1,matno) | NCMU*
Material internal energy | CEN(1,matno) | NCEN*
Material temperature | CTP(1,matno) | NCTP*
Material alpha | CAL(1,matno) | NCAL*
Material burn fraction | CBF(1,matno)* | NCBF*
Material damage | CDM(1,matno)* | NCDM*
Material plastic strain | CPS(1,matno)* | NCPS*
*Autodyn-3D only

where

`matno` is the material number for a given material. These material numbers are assigned in sequence when defining your problem, starting with 1.

You can determine what the material number is for a given material name by testing against the MATERIALS(matno)%NAME array (see the examples in User Subroutine Examples).

In Autodyn-3D, the GETV3 function provides a functional method for accessing multi-material variables without use of GETMLT3. This is discussed in Autodyn Utility Functions/Subroutines.

Note that to save updated values of multi-material variables, a call PUTMLT3(IJK,0) must be made after setting the data in the internal arrays listed above.

For Lagrange, ALE, Shell, SPH and Beam solvers of Autodyn-3D it is also possible to access and set data in the material arrays directly using the following procedure: after setting IJK for each cell, use the call

    ML => MTSUB(IJK)%V(1:NUMMLV)

This sets-up the pointer ML to look at the material data for the current cell. This data can be accessed and set directly by addressing the appropriate index of the ML pointer array. For example, to set material damage to one and internal energy to zero, we could now use

    ML(NCDM) = 1.0
    ML(NCEN) = 0.0

This direct method of access is significantly more efficient than using the GETMLT3/PUTMLT3 calls in Autodyn-3D.

Release 18.2 - © ANSYS, Inc. All rights reserved.