Tutorial Toolkit Function Descriptions > Materials > Database
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
Database
 
db_bulk_get_possible_cond_opts1
(etid, atid, acid, nbr, coc)
Description:
 
 
Retrieves all possible values of the condense option for the specified input options.
Input:
INTEGER
etid
The ID of the element type selected by the user.
INTEGER
atid
The ID of the analysis type currently selected.
INTEGER
acid
The ID of the analysis code currently selected.
Output:
INTEGER
nbr
The number of condense option codes that were found for the above specified set of parameters.
INTEGER
coc()
The unique condense option code values that were found for the above specified set of values.
INTEGER
<Return Value>
Returns the success or failure of the routine
Error Conditions:
13000002
Unrecoverable database error
13000007
An unspecified database error occurred
Remarks:
Fetches all condense option codes for the input set of parameters.
Example:
Please see db_bulk_get_possible_cond_opts1 (p. 988) in the MSC Acumen Toolkit - Code Example.
 
db_bulk_get_possible_cond_opts2
(etid, atid, acid, goc, nbr, coc)
Description:
Retrieves all possible values of the condense option for the specified input options.
Input:
INTEGER
etid
The ID of the element type selected by the user.
INTEGER
atid
The ID of the analysis type currently selected.
INTEGER
acid
The ID of the analysis code currently selected.
INTEGER
goc
The ID of the geometric option code selected.
Output:
INTEGER
nbr
The number of condense option codes that were found for the above specified set of parameters.
INTEGER
coc()
The unique condense option code values that were found for the above specified set of values.
INTEGER
<Return Value>
Returns the success or failure of the routine
Error Conditions:
13000002
Unrecoverable database error
13000007
An unspecified database error occurred
Remarks:
Fetches all condense option codes for the input set of parameters.
Example:
Please see db_bulk_get_possible_cond_opts2 (p. 989) in the MSC Acumen Toolkit - Code Example.
 
db_bulk_get_possible_dof_sets
(etid, atid, acid, coc, goc, foc, loc, mlc, mdc, nbr, dsid)
Description:
Retrieves all possible values of the condensation option for the specified input options. If an input option is 0, it does not have a uniquely assigned value yet. The first three parameters may not be zero.
Input:
INTEGER
etid
The ID of the element type selected by the user.
INTEGER
atid
The ID of the analysis type currently selected.
INTEGER
acid
The ID of the analysis code currently selected.
INTEGER
coc
The ID for the condense option if it has been uniquely determined at point. otherwise, zero.
INTEGER
goc
The code for the geometric option if it has been uniquely determined at point. otherwise, zero.
INTEGER
foc
The code for the formulation option if it has been uniquely determined at point. otherwise, zero.
INTEGER
loc
The code for the laminate option if it has been uniquely determined at point. otherwise, zero.
INTEGER
mlc
The code for the formulation option if it has been uniquely determined at point. otherwise, zero.
INTEGER
mdc
The code for the material directionality if it has been uniquely determined at point. otherwise, zero.
Output:
INTEGER
nbr
The number of condense option codes that were found for the above specified set of parameters
INTEGER
dsid()
The unique dof set ID values that were found for the above specified set of values.
INTEGER
<Return Value>
Returns the success or failure of the routine.
Error Conditions:
13000002
Unrecoverable database error
13000007
An unspecified database error occurred
Remarks:
Fetches all dof set ids for the input set of parameters.
Example:
Please see db_bulk_get_possible_dof_sets (p. 991) in the MSC Acumen Toolkit - Code Example.
 
db_get_constitutive_model
(cid, cm_id, cm_name, linearity_code)
 
Description:
Gets a constitutive model in the database.
Input:
INTEGER
cid
The analysis code ID.
INTEGER
cm_id
The constitutive model ID.
Output:
STRING
cm_name[]
The constitutive model name.
INTEGER
linearity_code
The linearity code.
INTEGER
<Return Value>
Returns the success or failure of the routine
Error Conditions:
None.
Remarks:
This routine retrieves a row in the constitutive_model table in the database.
Example:
See example for db_get_matl_category, 414 or db_get_matl_prop_defn, 431. See also db_get_constitutive_model (p. 1018) in the MSC Acumen Toolkit - Code Example.
 
db_get_valid_const_models_count
(cid, atid, mc_id, nbr)
Description:
Returns the number of valid constitutive models for the given analysis code ID, analysis type ID and material category ID.
Input:
INTEGER
cid
The analysis code ID.
INTEGER
atid
The analysis type ID.
INTEGER
mc_id
The material category ID.
Output:
INTEGER
nbr
The number of valid constitutive models.
INTEGER
<Return Value>
Returns the success or failure of the routine.
Error Conditions:
None.
Remarks:
This routine access the valid_constitutive_models table.
Example:
See example for db_get_valid_const_models, 411. See also db_get_valid_const_models_count (p. 1044) in the MSC Acumen Toolkit - Code Example.
 
db_get_valid_const_models
(cid, atid, mc_id, cm_id)
 
 
Description:
Returns the constitutive model IDs for the given analysis code ID, analysis type ID and material category ID.
Input:
INTEGER
cid
The analysis code ID.
INTEGER
atid
The analysis type ID.
INTEGER
mc_id
The material category ID.
Output:
INTEGER
cm_id()
The constitutive model IDs.
INTEGER
<Return Value>
Returns the success or failure of the routine.
Error Conditions:
None.
Remarks:
This routine access the valid_constitutive_models table.
Example:
Please see db_get_valid_const_models (p. 1043) in the MSC Acumen Toolkit - Code Example.
 
db_mo_const_models_specified
(mid, cm_id, magics, active)
Description:
Modifies a constitutive model specified in the database.
Input:
INTEGER
mid
The material ID.
INTEGER
cm_id
The constitutive model ID.
INTEGER
magics(5)
The magic numbers ID.
INTEGER
active
The active flag.
Output:
INTEGER
<Return Value>
Returns the success or failure of the routine.
Error Conditions:
13000120
The material specified in the query was not found
13000164
The constitutive model was not found in the database
Remarks:
This routine modifies rows in the constitutive_mmodels_specified table in the database.
Example:
Please see db_mo_const_models_specified (p. 1048) in the MSC Acumen Toolkit - Code Example.
 
db_delete_matl_const_model
(mid, cmid)
 
 
Description:
Deletes a constitutive model defn from the database.
Input:
INTEGER
mid
The ID of the material associated with the material property value.
INTEGER
cmid
The ID of the constitutive model.
Output:
INTEGER
<Return Value>
Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
Error Conditions:
13000002
Unrecoverable database error
13000007
An unspecified database error occurred
Remarks:
Deletes one record in the “matl_const_model_defn” table in the database.
Example:
Please see db_delete_matl_const_model (p. 1000) in the MSC Acumen Toolkit - Code Example.
 
db_get_matl_category
(cid, mc_id, mc_name, dirctionality)
 
Description:
Gets a material category definition in the database.
Input:
INTEGER
cid
The analysis code ID.
INTEGER
mc_id
The material category defn ID.
Output:
STRING
mc_name[]
The material category defn name.
INTEGER
dirctionality
The directionality code.
INTEGER
<Return Value>
Returns the success or failure of the routine.
Error Conditions:
None.
Remarks:
This routine retrieves a row in the matl_category table in the database.
Example:
Please see db_get_matl_category (p. 1023) in the MSC Acumen Toolkit - Code Example.
 
db_get_valid_mtl_category_cnt
(cid, atid, nbr)
 
Description:
Returns the number of valid material categories for the given analysis code ID and analysis type ID.
Input:
INTEGER
cid
The analysis code ID.
INTEGER
atid
The analysis type ID.
Output:
INTEGER
nbr
The number of valid material categories.
INTEGER
<Return Value>
Returns the success or failure of the routine.
Error Conditions:
None.
Remarks:
This routine access the valid_material_categories table.
Example:
Please see db_get_valid_mtl_category_cnt (p. 1047) in the MSC Acumen Toolkit - Code Example.
 
db_get_valid_mtl_categories
(cid, atid, mc_id)
Description:
Returns the valid material categories for the given analysis code ID and analysis type ID.
Input:
INTEGER
cid
The analysis code ID.
INTEGER
atid
The analysis type ID.
Output:
INTEGER
mc_id()
The material category ids.
INTEGER
<Return Value>
Returns the success or failure of the routine.
Error Conditions:
None.
Remarks:
This routine access the valid_material_categories table.
Example:
See example for db_get_valid_mtl_category_cnt, 415. See also db_get_valid_mtl_categories (p. 1046) in the MSC Acumen Toolkit - Code Example.
 
db_create_mtl_allowable_magics
(cid, mc_id, magic_category_id, magic_alias_id, nbr)
 
Description:
Creates ’nbr’ records in the allowable_magic_prop table.
Input:
INTEGER
cid
The analysis code ID.
INTEGER
mc_id
INTEGER
magic_category_id
INTEGER
magic_alias_id()
INTEGER
nbr
The number of magic aliases.
Output:
INTEGER
<Return Value>
Returns the success or failure of the routine
Error Conditions:
None.
Remarks:
This routine access the allowable_magic_prop table.
Example:
Please see db_create_mtl_allowable_magics (p. 995) in the MSC Acumen Toolkit - Code Example.
 
db_get_mtl_allowable_magic_cnt
(code_id, matl_cat_id, magic_category_id, nbr)
Description:
Returns the number of allowable magic properties for the given magic_category_id, code_id, and matl_cat_id
Input:
INTEGER
code_id
The analysis code ID.
INTEGER
matl_cat_id
The material category ID.
INTEGER
magic_category_id
The magic category ID.
Output:
INTEGER
nbr
The number of magic aliases.
INTEGER
<Return Value>
Returns the success or failure of the routine.
Error Conditions:
None.
Remarks:
This routine access the allowable_magic_prop table.
Example:
Please see db_get_mtl_allowable_magic_cnt (p. 1029) in the MSC Acumen Toolkit - Code Example.
 
db_count_options
(goc, coc, loc, foc, dsid, etop)
 
Description:
Retrieves a count of the number of distinct geometric (or laminate, or...) option codes.
Input:
None.
Output:
INTEGER
goc
The count of geometric options.
INTEGER
coc
The count of condense options.
INTEGER
loc
The count of laminate options.
INTEGER
foc
The count of formulation options.
INTEGER
dsid
The count of dof sets.
INTEGER
etop
The count of element topologies.
INTEGER
<Return Value>
Returns the success or failure of the routine.
Error Conditions:
13000002
Unrecoverable database error
13000007
An unspecified database error occurred
Remarks:
Counts all of the listed option codes.
Example:
Please see db_count_options (p. 994) in the MSC Acumen Toolkit - Code Example.
 
db_get_mtl_allowable_magics
(code_id, matl_cat_id, magic_category_id, magic_alias_id)
 
Description:
Returns the number of allowable magic properties for the given magic_category_id, cid, and mc_id.
Input:
INTEGER
code_id
The analysis code ID.
INTEGER
matl_cat_id
The material category ID.
INTEGER
magic_category_id
The magic category ID.
Output:
INTEGER
magic_alias_id()
The magic alias ids.
INTEGER
<Return Value>
Returns the success or failure of the routine.
Error Conditions:
None.
Remarks:
This routine access the allowable_magic_prop table.
Example:
See example for db_get_mtl_allowable_magic_cnt, 417. See also db_get_mtl_allowable_magics (p. 1030) in the MSC Acumen Toolkit - Code Example.
 
db_get_mtl_magics
(analysis_code_id, analysis_type_id, matl_category_id, constit_model_id, magic_category_id)
 
Description:
Returns the material magic categories for the given cid, mc_id, and cm_id
Input:
INTEGER
analysis_code_id
The analysis code ID.
INTEGER
analysis_type_id
The analysis type ID.
INTEGER
matl_category_id
The material category ID.
INTEGER
constit_model_id
The constitutive model ID.
Output:
INTEGER
magic_category_id()
The magic category ids.
INTEGER
<Return Value>
Returns the success or failure of the routine.
Error Conditions:
None.
Remarks:
This routine access the matl_magic table.
Example:
Please see db_get_mtl_magics (p. 1032) in the MSC Acumen Toolkit - Code Example.
 
db_get_mtl_magics_count
(analysis_code_id, analysis_type_id, matl_category_id, constit_model_id, nbr)
Description:
Returns the number of material magic properties for the given analysis_code_id, analysis_type_id, matl_category_id, and constit_model_id
Input:
INTEGER
analysis_code_id
The analysis code ID.
INTEGER
analysis_type_id
The analysis type ID.
INTEGER
matl_category_id
The material category ID.
INTEGER
constit_model_id
The constitutive model ID.
Output:
INTEGER
nbr
The number of magic categories.
INTEGER
<Return Value>
Returns the success or failure of the routine.
Error Conditions:
None.
Remarks:
This routine access the matl_magic table.
Example:
See example for db_get_mtl_magics, 419. See also db_get_mtl_magics_count (p. 1034) in the MSC Acumen Toolkit - Code Example.
 
db_get_mtl_magics_defn
(analysis_code_id, analysis_type_id, magic_category_id, magic_label)
 
Description:
Returns the magic label given the analysis code ID and the magic category.
Input:
INTEGER
analysis_code_id
The analysis code ID.
INTEGER
analysis_type_id
The analysis type ID.
INTEGER
magic_category_id
The magic category ID.
Output:
STRING
magic_label[]
The magic label.
INTEGER
<Return Value>
Returns the success or failure of the routine.
Error Conditions:
13000086
No Records Found
Remarks:
This routine access the matl_magic_definition table.
Example:
See example for db_get_mtl_magics, 419. See also db_get_mtl_magics_defn (p. 1035) in the MSC Acumen Toolkit - Code Example.
 
db_get_mtl_magics_options
(analysis_code_id, magic_alias_id, magic_name)
Description:
Returns the magic alias given the analysis code ID and the magic alias.
Input:
INTEGER
analysis_code_id
The analysis code ID.
INTEGER
magic_alias_id
The magic alias ID.
Output:
STRING
magic_name[]
The magic alias.
INTEGER
<Return Value>
Returns the success or failure of the routine.
Error Conditions:
13000086
No Records Found
Remarks:
This routine access the matl_magic_alias table.
Example:
See example for db_get_matl_prop_defn, 431. Please see db_get_mtl_magics_options (p. 1037) in the MSC Acumen Toolkit - Code Example.
 
db_get_material_name_from_id
(id, mat_name)
 
Description:
Returns the material name given the ID.
Input:
INTEGER
id
The material ID.
Output:
STRING
mat_name[31]
The name of the material.
INTEGER
<Return Value>
Returns the success or failure of the routine.
Error Conditions:
13000120
The material specified in the query was not found
Remarks:
This routine access the material table in the database.
Example:
Please see db_get_material_name_from_id (p. 1022) in the MSC Acumen Toolkit - Code Example.
 
db_get_material_id_from_name
(mat_name, id)
Description:
Returns the material ID given the name.
Input:
STRING
mat_name[31]
The name of the material.
Output:
INTEGER
id
The material ID.
INTEGER
<Return Value>
Returns the success or failure of the routine.
Error Conditions:
13000120
The material specified in the query was not found
Remarks:
This routine access the material table in the database.
Example:
Please see db_get_material_id_from_name (p. 1020) in the MSC Acumen Toolkit - Code Example.
 
db_count_materials
(count)
Description:
This function returns the number of materials currently defined in the database.
Input:
None.
Output:
INTEGER
count
The number of materials in the database
INTEGER
<Return Value>
Returns the success or failure of the routine
Error Conditions:
13000002
Unrecoverable database error
13000007
An unspecified database error occurred
Remarks:
Counts records in the “material” relation in the database for one specified region.
Example:
See example for db_get_all_material_names, 423. See also db_count_materials (p. 992) in the MSC Acumen Toolkit - Code Example.
 
db_get_all_material_names
()
Description:
Gets all material information from the database, in get all, get next method.
Input:
None.
Output:
INTEGER
<Return Value>
Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
Error Conditions:
None.
Remarks:
None.
Example:
Please see db_get_all_material_names (p. 1007) in the MSC Acumen Toolkit - Code Example.
 
db_get_next_material_name
(name, id, cat, lin, dir, type)
Description:
Gets all material information from the database, in get all, get next method.
Input:
None.
Output:
STRING
name[]
The name of the material retrieved from the database.
INTEGER
id
The ID of the material.
INTEGER
cat
The material category.
INTEGER
lin
The material linearity code.
INTEGER
dir
The material directionality code.
INTEGER
type
The material type.
INTEGER
<Return Value>
Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
Error Conditions:
13000002
Unrecoverable database error
13000117
The query specified has completed
13000007
An unspecified database error occurred
Remarks:
Accesses all records in the “material” table in the database.
Example:
See example for db_get_all_material_names, 423. See also db_get_next_material_name (p. 1041) in the MSC Acumen Toolkit - Code Example.
 
db_modify_material
(mid, desc, mc_id, lin, dir, matl_type)
Description:
Modifies a material in the database.
Input:
INTEGER
mid
The ID of the material to be modified.
STRING
desc[]
The description of the material being modified.
INTEGER
mc_id
The category for the material being modified.
INTEGER
lin
The linearity of the material being modified.
INTEGER
dir
The directionality for the material being modified.
INTEGER
matl_type
The type of the material being modified.
Output:
INTEGER
<Return Value>
Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
Error Conditions:
13000002
Unrecoverable database error
13000004
Duplicate entry exists in table
13000007
An unspecified database error occurred
Remarks:
Modifies one record in the “material” table in the database.
Example:
Please see db_modify_material (p. 1050) in the MSC Acumen Toolkit - Code Example.
 
db_delete_material
(name)
Description:
Deletes a material in the database.
Input:
STRING
name[]
The name of the material to be deleted.
Output:
INTEGER
<Return Value>
Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
Error Conditions:
13000002
Unrecoverable database error
13000004
Duplicate entry exists in table
13000007
An unspecified database error occurred
Remarks:
Deletes one record in the “material” table in the database.
Example:
Please see db_delete_material (p. 997) in the MSC Acumen Toolkit - Code Example.
 
db_get_all_cond_opt_code_names
()
Description:
Gets all condense_option code names from the database, in get all, get next method.
Input:
None.
Output:
INTEGER
<Return Value>
Integer indicating success or failure of the routine.
Error Conditions:
None.
Remarks:
None.
Example:
Please see db_get_all_cond_opt_code_names (p. 1005) in the MSC Acumen Toolkit - Code Example.
 
db_get_next_cond_opt_code_names
(name, id)
Description:
Gets all condense_option code names from the database, in get all, get next method.
Input:
None.
Output:
STRING
name[31]
The name retrieved from the database.
INTEGER
id
The ID received from the database.
INTEGER
<Return Value>
Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
Error Conditions:
13000002
Unrecoverable database error
13000117
The query specified has completed
13000007
An unspecified database error occurred
Remarks:
Accesses all records in the “condense_option” table in the database.
Example:
See example for db_get_all_cond_opt_code_names, 426. See also db_get_next_cond_opt_code_names (p. 1039) in the MSC Acumen Toolkit - Code Example.
 
db_get_all_lam_opt_code_names
()
Description:
Gets all laminate_option code names from the database, in get all, get next method.
Input:
None.
Output:
INTEGER
<Return Value>
Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
Error Conditions:
None.
Remarks:
None.
Example:
See example for db_get_all_cond_opt_code_names, 426. See also db_get_all_lam_opt_code_names (p. 1006) in the MSC Acumen Toolkit - Code Example.
 
db_get_next_lam_opt_code_names
(name, id)
Description:
Gets all laminate_option code names from the database, in get all, get next method.
Input:
None.
Output:
STRING
name[31]
The name retrieved from the database.
INTEGER
id
The ID retrieved from the database.
INTEGER
<Return Value>
Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
Error Conditions:
13000002
Unrecoverable database error
13000117
The query specified has completed
13000007
An unspecified database error occurred
Remarks:
Accesses all records in the “laminate_option” table in the database.
Example:
See example fordb_get_all_cond_opt_code_names, 426. See also db_get_next_lam_opt_code_names (p. 1040) in the MSC Acumen Toolkit - Code Example.
 
db_get_allowable_matl_prop
(cid, atid, mc_id, cm_id, magics, mp_id)
 
Description:
Returns an allowable material property in the database.
Input:
INTEGER
cid
The analysis code ID.
INTEGER
atid
The analysis type ID.
INTEGER
mc_id
The material category ID.
INTEGER
cm_id
The constitutive model ID.
INTEGER
magics(5)
The magic numbers ID.
Output:
INTEGER()
mp_id()
The material prop alias IDs.
INTEGER
<Return Value>
Returns the success or failure of the routine
Error Conditions:
None.
Remarks:
This routine returns a row from the allowable_matl_prop table in the database.
Example:
Please see db_get_allowable_matl_prop (p. 1009) in the MSC Acumen Toolkit - Code Example.
 
db_get_all_allow_matl_prop_cnt
(cid, atid, mc_id, cm_id, nbr)
Description:
Returns an allowable material property in the database.
Input:
INTEGER
cid
The analysis code ID.
INTEGER
atid
The analysis type ID.
INTEGER
mc_id
The material category ID.
INTEGER
cm_id
The constitutive model ID.
Output:
INTEGER
nbr
The number of material prop aliases.
INTEGER
<Return Value>
Returns the success or failure of the routine
Error Conditions:
None.
Remarks:
This routine returns a row from the allowable_matl_prop table in the database.
Example:
See example for db_get_all_allowable_matl_prop, 430. See also db_get_all_allow_matl_prop_cnt (p. 1002) in the MSC Acumen Toolkit - Code Example.
 
db_get_allowable_matl_prop_cnt
(cid, atid, mc_id, cm_id, magics, nbr)
 
Description:
Returns an allowable material property in the database.
Input:
INTEGER
cid
The analysis code ID.
INTEGER
atid
The analysis type ID.
INTEGER
mc_id
The material category ID.
INTEGER
cm_id
The constitutive model ID.
INTEGER
magics(5)
The magic numbers ID.
Output:
INTEGER
nbr
The number of material prop aliases.
INTEGER
<Return Value>
Returns the success or failure of the routine
Error Conditions:
None.
Remarks:
This routine returns a row from the allowable_matl_prop table in the database.
Example:
Please see db_get_allowable_matl_prop_cnt (p. 1011) in the MSC Acumen Toolkit - Code Example.
 
db_get_all_allowable_matl_prop
(cid, atid, mc_id, cm_id, mp_id)
Description:
Returns all allowable material property in the database for the given analysis code, analysis type, material category and constitutive model.
Input:
INTEGER
cid
The analysis code ID.
INTEGER
atid
The analysis type ID.
INTEGER
mc_id
The material category ID.
INTEGER
cm_id
The constitutive model ID.
Output:
INTEGER
mp_id()
The material prop alias IDs.
INTEGER
<Return Value>
Returns the success or failure of the routine
Error Conditions:
None.
Remarks:
This routine returns rows from the allowable_matl_prop table in the database.
Example:
Please see db_get_all_allowable_matl_prop (p. 1004) in the MSC Acumen Toolkit - Code Example.
 
db_get_matl_prop_alias
(cid, atid, mc_id, cm_id, mp_id, mp_alias, field_ok)
 
Description:
Returns a material property alias in the database.
Input:
INTEGER
cid
The analysis code ID.
INTEGER
atid
The analysis type ID.
INTEGER
mc_id
The material category ID.
INTEGER
cm_id
The constitutive model ID.
INTEGER
mp_id
The material prop alias ID.
Output:
STRING
mp_alias[]
The material prop alias.
INTEGER
field_ok
The field ok flag.
INTEGER
<Return Value>
Returns the success or failure of the routine.
Error Conditions:
13000167
The material property alias was not found in the database
Remarks:
This routine returns a row from the material_prop_alias table in the database.
Example:
Please see db_get_matl_prop_alias (p. 1025) in the MSC Acumen Toolkit - Code Example.
 
db_get_matl_prop_defn
(mp_id, mp_name)
Description:
Returns the material property definition name given the ID.
Input:
INTEGER
mp_id
The material prop defn ID.
Output:
STRING
mp_name[]
The material prop defn name.
INTEGER
<Return Value>
Returns the success or failure of the routine.
Error Conditions:
13000163
The material property definition was not found in the database
Remarks:
This routine access the matl_prop_defn table in the database.
Example:
Please see db_get_matl_prop_defn (p. 1027) in the MSC Acumen Toolkit - Code Example.
 
db_modify_matl_prop_value
(mid, mp_id, fid, value, nbr)
 
Description:
Updates an material property value in the database.
Input:
INTEGER
mid
The material ID.
INTEGER
mp_id()
The material prop IDs.
INTEGER
fid()
The field IDs.
REAL
value()
The material values.
INTEGER
nbr
The dimension of the above three arrays.
Output:
INTEGER
<Return Value>
Returns the success or failure of the routine.
Error Conditions:
13000120
The material specified in the query was not found.
13000163
The material property definition was not found in the database
13000127
The field entered does not exist.
Remarks:
None.
Example:
Please see db_modify_matl_prop_value (p. 1053) in the MSC Acumen Toolkit - Code Example.
 
db_delete_material_property
(mid, mpid)
Description:
Deletes a material property value from the database.
Input:
INTEGER
mid
The ID of the material associated with the material property value.
INTEGER
mpid
The ID of the material property.
Output:
INTEGER
<Return Value>
Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
Error Conditions:
13000002
Unrecoverable database error
13000007
An unspecified database error occurred
Remarks:
Deletes one record in the “matl_prop_value” table in the database.
Example:
See example for db_modify_matl_prop_value, 432. See also db_delete_material_property (p. 999) in the MSC Acumen Toolkit - Code Example.
 
db_get_comp_hal
(mat_name, iopt, fiber_name, matrix_name, fiber_vol_frac, matrix_vol_frac, theory, override, aspect_ratios, empirical_factors)
 
Description:
Returns the construction data for composite materials generated using the “Halpin -Tsai” equations, given a material name.
Input:
STRING
mat_name[31]
The name of the material.
Output:
INTEGER
iopt
The construction option.
STRING
fiber_name[]
The name of the fiber.
STRING
matrix_name[]
The name of the matrix.
REAL
fiber_vol_frac
The fiber vol frac.
REAL
matrix_vol_frac
The matrix vol frac.
INTEGER
theory
The theory.
LOGICAL
override
The override.
REAL
aspect_ratios()
A 1 by 2 array of aspect ratios.
REAL
emperical_factors()
A 1 by 9 array of empirical factors.
INTEGER
<Return Value>
Returns the success or failure of the routine
Error Conditions:
13000002
Unrecoverable database error
13000007
An unspecified database error occurred
13000086
No Records Found
13000120
The material specified in the query was not found
Remarks:
This routine accesses the material and halpin_tsai tables.
Example:
Please see db_get_comp_hal (p. 1013) in the MSC Acumen Toolkit - Code Example.
 
db_get_comp_sfc
(mat_name, uni_mat_name, ndim, niter, theta_av, sig_theta, phi_av, sig_phi, rho)
Description:
Returns the construction data for composite materials generated using the “Short Fiber” option, given a material name.
Input:
STRING
mat_name[31]
The name of the material.
Output:
STRING
uni_mat_name[31]
The name of the short fiber.
INTEGER
ndim
The number of dimensions.
INTEGER
niter
The number of iterations.
REAL
theta_av
Theta_av.
REAL
sig_theta
Sig_theta.
REAL
phi_av
Phi_av.
REAL
sig_phi
Sig_phi.
REAL
rho
Rho.
INTEGER
<Return Value>
Returns the success or failure of the routine
Error Conditions:
13000002
Unrecoverable database error
13000007
An unspecified database error occurred
13000086
No Records Found
13000120
The material specified in the query was not found
Remarks:
This routine accesses the material and short_fiber tables.
Example:
See example for db_get_comp_hal, 433. See also db_get_comp_sfc (p. 1016) in the MSC Acumen Toolkit - Code Example.
 
mat_3d_ani_to_3d_ort
(s11, s12, s13, s22, s23, s33, div_tol, e11, e22, e33, v12, v23, v31 )
Description:
Given the 3d orthotropic elements of the stiffness matrix, calculates the 3d orthotropic engineering constants. The shear moduli ( Shear12, Shear23, Shear31 ) are not included since there is a one to one relationship between them and Stiff44, Stiff55 and Stiff66 in ( 11, 22, 33, 12, 23, 31 ) matrix form. Jones “Mechanics of Composite Materials” ( 1975 ) page 38.
Input:
REAL
s11
The 11 element of the stiffness matrix.
REAL
s12
The 12 element of the stiffness matrix. Synonymous to s21.
REAL
s13
The 13 element of the stiffness matrix. Synonymous to s31.
REAL
s22
The 22 element of the stiffness matrix.
REAL
s23
The 23 element of the stiffness matrix. Synonymous to s32.
REAL
s33
The 33 element of the stiffness matrix.
REAL
div_tol
The division tolerance.
Output:
REAL
e11
The elastic modulus in the 11 direction.
REAL
e22
The elastic modulus in the 22 direction.
REAL
e33
The elastic modulus in the 33 direction .
REAL
v12
Poisson ratio relating directions 1 and 2. Not generally equivalent to v21.
REAL
v23
Poisson ratio relating directions 2 and 3. Not generally equivalent to v32.
REAL
v31
Poisson ratio relating directions 3 and 1. Not generally equivalent to v13.
Error Conditions:
None.
Remarks:
None.
Example:
Please see mat_3d_ani_to_3d_ort (p. 1058) in the MSC Acumen Toolkit - Code Example.
 
engin_cons_to_elastic_matrix
(e, c, status)
 
Description:
Compute the stress-strain coefficients for a 3D orthotropic material from the nine engineering constants. This routine was called ORTHCZ in the PATRAN 2.5 library. Do not allow any nulls into the output.
Input:
REAL
e(9)
e = E11, E22, E33, NU12, NU23, NU31, G12, G23, G31.
Output:
REAL
c(21)
c = Material stiffness matrix in string format using the PATCHES sequence for the 21 constants.
INTEGER
status
status = Error flag (0=success, 1=error)
Error Conditions:
None.
Remarks:
AIR FORCE DESIGN GUIDE CONVENTION
EII*VJI = EJJ*VIJ
Example:
Please see engin_cons_to_elastic_matrix (p. 1055) in the MSC Acumen Toolkit - Code Example.
 
mat_2d_ani_to_2d_ort
(s11, s12, s22, div_tol, e11, e22, v12 )
Description:
Given the 2d, orthotropic elements of the reduced ( plane stress or 2d ) stiffness matrix, calculates the 2d engineering constants. The in plane shear modulus is not included since there is a one to one relationship between it and Stiff33 ( in ( 11, 22, 12 ) matrix form ). Jones “Mechanics of Composite Materials” ( 1975 ) page 38.
Input:
REAL
s11
The 11 element of the plane stress stiffness matrix.
REAL
s12
The 12 element of the plane stress stiffness matrix. Synonymous to s21.
REAL
s22
The 22 element of the plane stress stiffness matrix.
REAL
div_tol
The division tolerance.
Output:
REAL
e11
The elastic modulus in the 11 direction.
REAL
e22
The elastic modulus in the 22 direction.
REAL
v12
The in plane poisson ratio. Not generally equal to v21
Error Conditions:
None.
Remarks:
None.
Example:
Please see mat_2d_ani_to_2d_ort (p. 1057) in the MSC Acumen Toolkit - Code Example.
 
get_qab_from_engin_cons
(e, qab, ier )
 
Description:
Compute the reduced materials matrix Qab from the 4 engineering constants for a 2D orthotropic material.
Input:
REAL
e( )
Real array that contains the 4 engineering constants:
E(1) = E11.
E(2) = E22.
E(4) = NU12 .
E(7) = G12.
Output:
REAL
qab( )
The computed reduced materials matrix
INTEGER
ier
Integer indicating the success or failure of the routine.
Error Conditions:
None.
Remarks:
All other elements of E are ignored.
Example:
Please see get_qab_from_engin_cons (p. 1056) in the MSC Acumen Toolkit - Code Example.
 
n21_cons_to_sym_6x6_matrix
(cm, cb )
Description:
Form the 6x6 symmetric matrix CM from the 21 terms in CB. This routine was called SYM6X6 in the PATRAN 2.5 library.
Input:
REAL
cb (21)
Array of 21 engineering constants.
Output:
REAL
cm (6,6)
Value of the 6x6 symmetric matrix.
Error Conditions:
None.
Remarks:
None.
Example:
Please see n21_cons_to_sym_6x6_matrix (p. 1076) in the MSC Acumen Toolkit - Code Example.
 
mat_load_show
(mat_name, itype, iopt, desc, rvals, num_phases )
 
Description:
Load the material properties into the format needed for display after performing some error checking.
Input:
STRING
mat_name[]
Material name.
INTEGER
itype
Please see Remarks below.
INTEGER
iopt
Composite option number (used only for HAL and SFC;
Halpin-Tsai = Option number (1-5)
Short Fiber = Option number (1-2) ).
Output:
STRING
desc[2500]
Material description.
REAL
rvals(6, 36)
Array of material properties.
INTEGER
num_phases
A type-dependent integer ( Laminate = ply count Rule-of-Mixtures = phase count )
INTEGER
<Return Value>
See error returned.
Error Conditions:
28003001
The material name is ““blank””. Enter a material name.
28003026
Material %A% is not a laminated composite.
28003038
Material %A% is not a Rule-of-Mixtures composite.
28003059
Material %A% is not a Halpin-Tsai composite.
28003070
Short Fiber material %A% is a %A% material, but the existing form is used to display %A% materials.
28003069
Halpin-Tsai material %A% is a %A% material, but the existing form is used to display %A% materials.
28004416
Material %A% does not exist.
Remarks:
 
Composite material type
#define MAT_TYP_HOMOG
0
#define MAT_TYP_LAM
1
#define MAT_TYP_MIX
2
#define MAT_TYP_HAL
3
#define MAT_TYP_SFC
4
#define MAT_TYP_EXTERNAL
101
 
Example:
See example for mat_hal_load_defn_show, 440, mat_lam_load_defn_show, 441, mat_mix_load_defn_show, 442 or mat_sfc_load_defn_show, 443. See also mat_load_show (p. 1065) in the MSC Acumen Toolkit - Code Example.
 
mat_hal_load_defn_show
(mat_name, iopt, fiber_name, matrix_name, fvf, mvf, aratio1, aratio2, theory, override, fudge_factor1, fudge_factor2, fudge_factor3, fudge_factor4, fudge_factor5, fudge_factor6 )
 
Description:
Load the Halpin-Tsai material definition data into the format needed for display.
Input:
STRING
mat_name[]
Halpin-Tsai material name.
INTEGER
iopt
Halpin-Tsai option flag :
1=continuous fiber
2=discontinuous fiber
3=continuous ribbon
4=discontinuous ribbon
5=particulate).
Output:
STRING
fiber_name[]
Fiber material name.
STRING
matrix_name[]
Matrix material name.
REAL
fvf
Fiber volume fraction.
REAL
mvf
Matrix volume fraction.
STRING
aratio1[]
String representation of 1st aspect ratio.
STRING
aratio2[]
String representation of 2nd aspect ratio.
INTEGER
theory
1=New Theory (GTT).
2=Old Theory (NUTT).
LOGICAL
override
If ON, use empirical factors in ESTRINGi.
STRING
fudge_factor1[]
String representation of 1st empirical factor
STRING
fudge_factor2[]
String representation of 2nd empirical factor
STRING
fudge_factor3[]
String representation of 3rd empirical factor.
STRING
fudge_factor4[]
String representation of 4th empirical factor.
STRING
fudge_factor5[]
String representation of 5th empirical factor
STRING
fudge_factor6[]
String representation of 6th empirical factor.
INTEGER
<Return Value>
See error returned.
Error Conditions:
28003001
The material name is ““blank””. Enter a material name.
28004416
Material %A% does not exist.
28003069
Halpin-Tsai material %A% is a %A% material, but the existing form is used to display %A% materials.
28003060
Unable to show the properties for composite material %A%.
Remarks:
None.
Example:
Please see mat_hal_load_defn_show (p. 1059) in the MSC Acumen Toolkit - Code Example.
 
mat_lam_load_defn_show
(mat_name, num_plies, ply_names, thicks, orients, num_def, iconv, offset_string )
 
Description:
Load the laminate definition data into the format needed for display.
Input:
STRING
mat_name[]
Laminate material name.
INTEGER
num_plies
Number of plies.
Output:
INTEGER
ply_names
Ply material names (passed as an integer to get through the wrapper).
REAL
thicks
Ply thicknesses (passed as an integer to get through the wrapper).
REAL
orients
Ply orientations (passed as an integer to get through the wrapper)
INTEGER
num_def
Number of plies defined (!= total ply count if ICONV > 1)
INTEGER
iconv
Stacking sequence convention.
STRING
offset_string[]
String containing laminate offset.
INTEGER
<Return Value>
See error returned.
Error Conditions:
28003001
The material name is ““blank””. Enter a material name.
28004416
Material %A% does not exist
28003042
Unable to show the offset for laminate material %A%.
Remarks:
None.
Example:
Please see mat_lam_load_defn_show (p. 1062) in the MSC Acumen Toolkit - Code Example.
 
mat_mix_load_defn_show
(mat_name, num_phases, name_string2, name_string3, name_string4, phase_string, v_f_string, orient_string, ncn, ncv, nco )
Description:
Load the Rule-of-Mixtures material definition data into the format needed for display.
Input:
STRING
mat_name[]
Rule-of-Mixtures material name.
INTEGER
num_phases
Number of phases.
Output:
STRING
name_string2[]
String containing the second phase material name and workspace.
STRING
name_string3[]
String containing the third phase material name and workspace.
STRING
name_string4[]
String containing the fourth phase material name and workspace.
STRING
phase_string[]
String containing the primary phase material name.
STRING
v_f_string[]
Strings containing compressed phase volume fraction string and compressed ply orientation string.
STRING
orient_string[]
String containing the orientation string.
INTEGER
ncn
Number of characters in compressed phase material name string
INTEGER
ncv
Number of characters in compressed phase volume fraction string
INTEGER
nco
Number of characters in compressed phase orientation string.
INTEGER
<Return Value>
See error returned.
Error Conditions:
28003001
The material name is ““blank””. Enter a material name.
28003038
Material %A% is not a Rule-of-Mixtures composite.
28003043
Unable to show the phase material name string for Rule-of-Mixtures material %A%.
28003044
Unable to show the phase volume fraction string for Rule-of-Mixtures material %A%.
28003045
Unable to show the phase orientation string for Rule-of-Mixtures material %A%.
28004416
Material %A% does not exist.
Remarks:
None.
Example:
Please see mat_mix_load_defn_show (p. 1068) in the MSC Acumen Toolkit - Code Example.
 
mat_sfc_load_defn_show
(mat_name, iopt, uni_mat_name, fmo, smo, fsd, ssd, cor, niter )
Description:
Load the Short Fiber material definition data into the format needed for display.
Input:
STRING
mat_name[]
Short Fiber material name.
INTEGER
iopt
Short Fiber material option.
Output:
STRING
uni_mat_name[]
Unidirectional material name.
REAL
fmo
First mean orientation.
REAL
smo
Second mean orientation
REAL
fsd
First standard deviation.
REAL
ssd
Second standard deviation.
REAL
cor
Correlation coefficient
INTEGER
niter
Number of Monte Carlo iteration.
INTEGER
<Return Value>
See error returned.
Error Conditions:
28003001
The material name is ““blank””. Enter a material name.
28003070
Short Fiber material %A% is a %A% material, but the existing form is used to display %A% materials.
28004416
Material %A% does not exist
Remarks:
None.
Example:
Please see mat_sfc_load_defn_show (p. 1070) in the MSC Acumen Toolkit - Code Example.
  
material.namedelete
(<material_name>, <descrip>, <num_material>)
Description:
This function deletes a material from the database. It returns an integer status of zero on successful completion.
Input:
STRING ARRAY
material_name[]()
The names of the material. Array size gets allocated from the num_material argument.
STRING
descrip[]
Description of the material. Can be “”. This arguement is not used.
INTEGER
num_material
The number of materials to be deleted.
Output:
INTEGER
<Return Value>
0 for success., error code for failure.
Error Conditions:
130000120
 
Material does not exist in the database
130000007
 
Database not open.
Example:
Please see material.namedelete (p. 1073) in the MSC Acumen Toolkit - Code Example.