SDT-base         Contents     Functions              PDF Index

## fe_mat

Purpose

Material / element property handling utilities.

Syntax

```  out = fe_mat('convert si ba',pl);
typ=fe_mat('m_function',UnitCode,SubType)
[m_function',UnitCode,SubType]=fe_mat('type',typ)
out = fe_mat('unit')
out = fe_mat('unitlabel',UnitSystemCode)
[o1,o2,o3]=fe_mat(ElemP,ID,pl,il)
```

Description

Material definitions can be handled graphically using the Material tab in the model editor (see section 4.5.1). For general information about material properties, you should refer to section 7.3. For information about element properties, you should refer to section 7.4. For assignment of material properties to model elements, see feutil SetGroup Mat or section 4.2.

The main user accessible commands in fe_mat are listed below

### Convert,Unit

The convert command supports conversions from unit1 to unit2 with the general syntax pl_converted = fe_mat('convert unit1 unit2',pl);.

For example convert from SI to BA and back

```% Sample unit convertion calls
mat = m_elastic('default'); % Default is in SI
% convert mat.pl from SI unit to BA unit
pl=fe_mat('convert SIBA',mat.pl)
% for section properties IL, you need to specify -il
fe_mat('convert -il MM',p_beam('dbval 1 circle .01'))
% For every system but US you don't need to specify the from
pl=fe_mat('convert BA',mat.pl)
% check that conversion is OK
pl2=fe_mat('convert BASI',pl);
fprintf('Conversion roundoff error : %g\n',norm(mat.pl-pl2(1:6))/norm(pl))
fe_mat('convertSIMM') % Lists defined units and coefficients
coef=fe_mat('convertSIMM',2.012) % conversion coefficient for force/m^2
```

Convertion coefficients can be recovered by calling the convertion token without further arguments as convert unit1 unit2. For a more exploitable version, one can recover a structure providing each convertion coefficients per labelled units.

```% recover convertion coefficients per unit label
r1=fe_mat('convertSIMM','struct')
```

Supported units are either those listed with fe_mat('convertSIMM') which shows the index of each unit in the first column or ratios of any of these units. Thus, 2.012 means the unit 2 (force) divided by unit 12 (surface), which in this case is equivalent to unit 1 pressure.

out=fe_mat('unitsystem') returns a struct containing the information characterizing standardized unit systems supported in the universal file format.

 ID Length and Force ID 1 SI Meter, Newton 7 IN Inch, Pound force 2 BG Foot, Pound f 8 GM Millimeter, kilogram force 3 MG Meter, kilogram f 9 TM Millimeter, Newton 4 BA Foot, poundal 9 MU micro-meter, kiloNewton 5 MM Millimeter, milli-newton 9 US User defined 6 CM Centimeter, centi-newton

Unit codes 1-8 are defined in the universal file format specification and thus coded in the material/element property type (column 2). Other unit systems are considered user types and are associated with unit code 9. With a unit code 9, fe_mat convert commands must give both the initial and final unit systems.

out=fe_mat('unitlabel',UnitSystemCode) returns a standardized list of unit labels corresponding in the unit system selected by the UnitSystemCode shown in the table above. To recover a descriptive label list (like density), use US as UnitSystemCode.

When defining your own properties material properties, automated unit conversion is implemented automatically through tables defined in the p_fun PropertyUnitType command.

### GetPlGetIl

pl = fe_mat('getpl',model) is used to robustly return the material property matrix pl (see section 7.3) independently of the material input format.

Similarly il = fe_mat('getil',model) returns the element property matrix il.

### Get[Mat,Pro]

r1 = fe_mat('GetMat Param',model) This command can be used to extract given parameter Param value in the model properties. For example one can retrieve density of matid 111 as following
rho=fe_mat('GetMat 111 rho',model);

### Set[Mat,Pro]

r1 = fe_mat('SetMat MatId Param=value',model)
r1 = fe_mat('SetPro ProId Param=value',model)
This command can be used to set given parameter Param at the value value in the model properties. For example one can set density of matid 111 at 5000 as following
rho=fe_mat('SetMat 111 rho=5000',model);

### Type

The type of a material or element declaration defines the function used to handle it.

typ=fe_mat('m_function',UnitCode,SubType) returns a real number which codes the material function, unit and sub-type.

• m_functions are .m or .mex files whose name starts with m_.

They are used to interpret the material properties.

See as an example the m_elastic reference.

• The UnitCode is a number between 1 and 9 (or the associated two letters labels, see table in fe_mat Convert).

It gives the unit of the material data to ensure coherent if different units are used between material properties.

• The SubType is a also a number between 1 and 9.

It allows selection of material subtypes within the same material function (for example, m_elastic supports subtypes : 1 isotropic solid, 2 fluid, 3 anisotropic solid, ...).

Note : the code type typ should be stored in column 2 of material property rows (see section 7.3).

To decode a typ number, us command

[m_function,UnitCode,SubType]=fe_mat('typem',typ)

Similarly, element properties are handled by p_ functions which also use fe_mat to code the type (see p_beam, p_shell and p_solid).

### ElemP

Calls of the form [o1,o2,o3]=fe_mat(ElemP,ID,pl,il) are used by element functions to request constitutive matrices. This call is really for developers only and you should look at the source code of each element.