The Material class gives you access to material cards in PRIMER. More...
The PRIMER JavaScript API provides many class constants, properties and methods. For Arup to
be able to extend and enhance the API in the future any constant, property or method names beginning with a lowercase
or uppercase letter are reserved.
If you need to add your own properties or methods to one of the existing classes then to avoid any potential future conflict you
should ensure that the name begins with either an underscore (_) or a dollar sign ($) or the name is prefixed with your
own unique identifier.
For example if company 'ABC' need to add a property called 'example' then to avoid any potential future conflict use one of:
| Name | Type | Description |
| addDamageGissmo | logical | True if *MAT_ADD_DAMAGE_GISSMO exists for material, false if not defined |
| addErosion | logical | True if *MAT_ADD_EROSION exists for material, false if not defined |
| addKeywords (read only) | integer | The number of extra *MAT_ADD_xxxx keywords that this material definition has. Note that if there is only a single *MAT_ADD_xxxx keyword for an ID this will be 0. For example, if for material 1 both a *MAT_PIECEWISE_LINEAR_PLASTICITY card and a *MAT_ADD_EROSION card exist then this will return 1. If for material 2 only a *MAT_ADD_EROSION card exists then this will return 0. Also see Material.Keyword() and Material.KeywordCards() |
| colour | Colour | The colour of the material |
| cols (read only) | real | The number of columns of data the material has |
| exists (read only) | logical | true if material exists, false if referred to but not defined. |
| include | integer | The Include file number that the material is in. |
| label | integer or string | Material number or character label. Also see the mid property which is an alternative name for this. |
| mid | integer or string | Material number or character label. Also see the label property which is an alternative name for this. |
| model (read only) | integer | The Model number that the material is in. |
| optionalCards (read only) | integer | The number of optional extra cards that this material definition can have. Also see Material.AddOptionalCards() |
| properties | integer | The total number of properties that the material has |
| rows (read only) | integer | The number of rows of data the material has |
| title | string | Material title |
| transparency | integer | The transparency of the material (0-100) 0% is opaque, 100% is transparent. |
| type | string | The material type name(e.g. 'ELASTIC', 'RIGID' etc). |
| typeNumber | string | The material type number (e.g. '001', '034M'). |
Detailed DescriptionThe Material class allows you to create, modify, edit and manipulate material cards. See the documentation below for more details. |
Constructornew Material(Model[Model], mid[integer or string], type[string])DescriptionCreate a new Material object. |
Model that material will be created in
Material number or character label
Material type. Either give the Ansys LS-DYNA material name or 3 digit number.
ReturnsMaterial object Return typeMaterial |
Details of functionsAddOptionalCards()DescriptionAdds any optional cards for the material. |
No arguments
Returnsno return value |
ExampleTo add any optional cards for material m: m.AddOptionalCards();
|
AssociateComment(Comment[Comment])DescriptionAssociates a comment with a material. |
Comment that will be attached to the material
ReturnsNo return value |
ExampleTo associate comment c to the material m: m.AssociateComment(c);
|
Blank()DescriptionBlanks the material |
No arguments
ReturnsNo return value |
ExampleTo blank material m: m.Blank();
|
BlankAll(Model[Model], redraw (optional)[boolean]) [static]DescriptionBlanks all of the materials in the model. |
Model that all materials will be blanked in
If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using View.Redraw().
ReturnsNo return value |
ExampleTo blank all of the materials in model m: Material.BlankAll(m);
|
BlankFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionBlanks all of the flagged materials in the model. |
Model that all the flagged materials will be blanked in
Flag set on the materials that you want to blank
If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using View.Redraw().
ReturnsNo return value |
ExampleTo blank all of the materials in model m flagged with f: Material.BlankFlagged(m, f);
|
Blanked()DescriptionChecks if the material is blanked or not. |
No arguments
Returnstrue if blanked, false if not. Return typeBoolean |
ExampleTo check if material m is blanked: if (m.Blanked() ) do_something...
|
Browse(modal (optional)[boolean])DescriptionStarts an edit panel in Browse mode. |
If this window is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the window will be modal.
Returnsno return value |
ExampleTo Browse material m: m.Browse();
|
ClearFlag(flag[Flag])DescriptionClears a flag on the material. |
Flag to clear on the material
ReturnsNo return value |
ExampleTo clear flag f for material m: m.ClearFlag(f);
|
Copy(range (optional)[boolean])DescriptionCopies the material. The target include of the copied material can be set using Options.copy_target_include. |
If you want to keep the copied item in the range specified for the current include. Default value is false. To set current include, use Include.MakeCurrentLayer().
ReturnsMaterial object Return typeMaterial |
ExampleTo copy material m into material z: var z = m.Copy();
|
Create(Model[Model], modal (optional)[boolean]) [static]DescriptionStarts an interactive editing panel to create a material |
Model that the material will be created in.
If this window is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the window will be modal.
ReturnsMaterial object (or null if not made). Return typeMaterial |
ExampleTo start creating a material in model m: var m = Material.Create(m);
|
Density()DescriptionGet the density material. |
No arguments
Returnsreal Return typeNumber |
ExampleTo get the density for material m: var density = m.Density();
|
DetachComment(Comment[Comment])DescriptionDetaches a comment from a material. |
Comment that will be detached from the material
ReturnsNo return value |
ExampleTo detach comment c from the material m: m.DetachComment(c);
|
Edit(modal (optional)[boolean])DescriptionStarts an interactive editing panel. |
If this window is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the window will be modal.
Returnsno return value |
ExampleTo Edit material m: m.Edit();
|
Error(message[string], details (optional)[string])DescriptionAdds an error for material. For more details on checking see the Check class. |
The error message to give
An optional detailed error message
ReturnsNo return value |
ExampleTo add an error message "My custom error" for material m: m.Error("My custom error");
|
ExtractColour()DescriptionExtracts the actual colour used for material. |
No arguments
Returnscolour value (integer) Return typeNumber |
ExampleTo return the colour used for drawing material m: var colour = m.ExtractColour();
|
First(Model[Model]) [static]DescriptionReturns the first material in the model. |
Model to get first material in
ReturnsMaterial object (or null if there are no materials in the model). Return typeMaterial |
ExampleTo get the first material in model m: var m = Material.First(m);
|
FirstFreeLabel(Model[Model], layer (optional)[Include number]) [static]DescriptionReturns the first free material label in the model. Also see Material.LastFreeLabel(), Material.NextFreeLabel() and Model.FirstFreeItemLabel(). |
Model to get first free material label in
Include file (0 for the main file) to search for labels in (Equivalent to First free in layer in editing panels). If omitted the whole model will be used (Equivalent to First free in editing panels).
ReturnsMaterial label. Return typeNumber |
ExampleTo get the first free material label in model m: var label = Material.FirstFreeLabel(m);
|
FlagAll(Model[Model], flag[Flag]) [static]DescriptionFlags all of the materials in the model with a defined flag. |
Model that all materials will be flagged in
Flag to set on the materials
ReturnsNo return value |
ExampleTo flag all of the materials with flag f in model m: Material.FlagAll(m, f);
|
Flagged(flag[Flag])DescriptionChecks if the material is flagged or not. |
Flag to test on the material
Returnstrue if flagged, false if not. Return typeBoolean |
ExampleTo check if material m has flag f set on it: if (m.Flagged(f) ) do_something...
|
ForEach(Model[Model], func[function], extra (optional)[any]) [static]DescriptionCalls a function for each material in the model. |
Model that all materials are in
Function to call for each material
An optional extra object/array/string etc that will appended to arguments when calling the function
ReturnsNo return value |
GetAddDamageGissmoData()DescriptionReturns the *MAT_ADD_DAMAGE_GISSMO data of material. |
No arguments
Returns |
Object with the following properties:
| Name | Type | Description |
| biaxf | real | Reduction factor for regularization at triaxiality=2/3 |
| dcrit | real | Damage treshold value |
| dmgexp | real | Exponent for nonlinear damage accumalation |
| dtyp | real | Flag for GISSMO damage type |
| ecrit | real/integer | Critical plastic strain (Curve/ table ID if negative) |
| fadexp | real/integer | Exponent for damage-related stress fadeout (Curve/ table ID if negative) |
| hisvn | real | History variable used to evaluate th 3-D table LCSDG |
| instf | integer | Flag for governing the behavior of instability measure F and fading exponent FADEXP |
| lcdlim | integer | Curve ID: damage limit values as a function of triaxiality |
| lcregd | integer | Curve/ table ID (positive) or Table ID (negative): Element-size dependent fading exponent |
| lcsdg | integer | Curve/ table ID (positive) or Function ID (negative): Failure strain curve/table or function |
| lcsoft | integer | Soft reduction factor for failure strain in crashfront elements. |
| lcsrs | integer | Curve/ table ID: Failure strain rate scaling factor v/s strain rate |
| lp2bi | real | Option to use bending indicator instead of the Lode parameter |
| midfail | integer | Mid-plane failure option for shell elements and GISSMO |
| numfip | real | Number of failed integration points prior to element deletion |
| refsz | real | Reference element size |
| rgtr1 | real | First triaxiality value for optional "tub-shaped" regularization |
| rgtr2 | real | Second triaxiality value for optional "tub-shaped" regularization |
| shrf | real | Reduction factor for regularization at triaxiality=0 |
| soft | real | Softening reduction factor for failure strain in crashfront elements |
| stochastic | logical | stochastic = true if _STOCHASTIC is ON. Otherwise, _STOCHASTIC is OFF |
| volfrac | real | Volume fraction required to fail before element deletion |
object
ExampleTo get the *MAT_ADD_DAMAGE_GISSMO data of material m: m.GetAddDamageGissmoData();
|
GetAddErosionData()DescriptionReturns the *MAT_ADD_EROSION data of material. Note that this method does not support pre-R11 properties. |
No arguments
Returns |
Object with the following properties:
| Name | Type | Description |
| dteflt | real | Time period for the low pass filter |
| dtmin | real | Minimum time step size at failure |
| effeps | real | Maximum effective strain at failure |
| engcrt | real | Critical energy for nonlocal failure criterion |
| epssh | real | Shear strain at failure |
| epsthin | real | Thinning strain at failure for shells |
| excl | real | The exclusion number |
| failtm | real | Failure time |
| idam | integer | Flag for damage model |
| impulse | real | Stress impulse for failure |
| lceps12 | integer | Load curve ID defining in-plane shear strain limit vs elem size |
| lceps13 | integer | Load curve ID defining through-thickness shear strain limit vs elem size |
| lcepsmx | integer | Load curve ID defining in-plane major strain limit vs elem size |
| lcfld | integer | Curve (negative) or table (positive) ID: Forming limit diagram |
| lcregd | integer | Curve ID: Element-size dependent fading exponent |
| mneps | real | Minimum principal strain at failure |
| mnpres | real | Pressure at failure |
| mxeps | real/integer | Principal strain at failure (curve ID if negative) |
| mxpres | real | Maximum pressure at failure |
| mxtmp | real | Maximum temperature at failure |
| ncs | real | Number of failure conditions to satisfy before failure occurs |
| nsff | real | Number of explicit time step cycles for stress fade-out used in the LCFLD criterion |
| numfip | real | Number of failed integration points prior to element deletion |
| radcrt | real | Critical radius for nonlocal failure criterion |
| sigp1 | real | Principal stress at failure |
| sigth | real | Threshold stress |
| sigvm | real/integer | Equivalent stress at failure (curve ID if negative) |
| voleps | real | Volumetric strain at failure |
| volfrac | real | The volume fraction required to fail before the element is deleted |
object
ExampleTo get the *MAT_ADD_EROSION data of material m: m.GetAddErosionData();
|
GetAll(Model[Model], property (optional)[string]) [static]DescriptionReturns an array of Material objects or properties for all of the materials in a model in PRIMER. If the optional property argument is not given then an array of Material objects is returned. If the property argument is given, that property value for each material is returned in the array instead of a Material object |
Model to get materials from
Name for property to get for all materials in the model
ReturnsArray of Material objects or properties Return typeArray |
GetComments()DescriptionExtracts the comments associated to a material. |
No arguments
ReturnsArray of Comment objects (or null if there are no comments associated to the node). Return typeArray |
ExampleTo get the array of comments associated to the material m: var comm_array = m.GetComments();
|
GetErosionPropertyByName(acronym[string], idam_index (optional)[integer]) [deprecated]This function is deprecated in version 20.0. It is only provided to keep old scripts working. We strongly advise against using it in new scripts. Support may be removed in future versions. DescriptionReturns the value of Erosion property string acronym for this Material object or null if Erosion is not set on Material or no such Erosion property exists. |
The acronym of the Erosion property value to retrieve
Required if property is one of IDAM cards pair property (for IDAM value less than zero) . If the argument is not given, returns the property value for first IDAM cards Pair. The index value starts from zero.
ReturnsProperty value (real/integer) Return typeNumber |
ExampleTo return the value of IDAM for material m: var idam = m.GetErosionPropertyByName("IDAM");
|
GetFlagged(Model[Model], flag[Flag], property (optional)[string]) [static]DescriptionReturns an array of Material objects for all of the flagged materials in a model in PRIMER If the optional property argument is not given then an array of Material objects is returned. If the property argument is given, then that property value for each material is returned in the array instead of a Material object |
Model to get materials from
Flag set on the materials that you want to retrieve
Name for property to get for all flagged materials in the model
ReturnsArray of Material objects or properties Return typeArray |
GetFromID(Model[Model], number[integer]) [static]DescriptionReturns the Material object for a material ID. |
Model to find the material in
number of the material you want the Material object for
ReturnsMaterial object (or null if material does not exist). Return typeMaterial |
ExampleTo get the Material object for material 100 in model m var m = Material.GetFromID(m, 100);
|
GetMaterialErosionExists() [deprecated]This function is deprecated in version 20.0. It is only provided to keep old scripts working. We strongly advise against using it in new scripts. Support may be removed in future versions. DescriptionChecks if the Erosion properties are defined for this Material object. |
No arguments
Returnslogical Return typeBoolean |
ExampleTo get whether the Material has Erosion Properties: m.GetMaterialErosionExists();
|
GetParameter(prop[string])DescriptionChecks if a Material property is a parameter or not. Note that object properties that are parameters are normally returned as the integer or float parameter values as that is virtually always what the user would want. For this function to work the JavaScript interpreter must use the parameter name instead of the value. This can be done by setting the Options.property_parameter_names option to true before calling the function and then resetting it to false afterwards.. This behaviour can also temporarily be switched by using the Material.ViewParameters() method and 'method chaining' (see the examples below). |
material property to get parameter for
ReturnsParameter object if property is a parameter, null if not. Return typeParameter |
GetPropertyByIndex(index[integer])DescriptionReturns the value of property at index index for this Material object or null if no property exists. |
The index of the property value to retrieve. (the number of properties can be found from properties) Note that indices start at 0. There is no link between indices and rows/columns so adjacent fields on a line for a material may not have adjacent indices.
ReturnsProperty value (real/integer) Return typeNumber |
ExampleTo return the property at index 2, for material m: var prop = m.GetPropertyByIndex(2);
|
GetPropertyByName(acronym[string])DescriptionReturns the value of property string acronym for this Material object or null if no property exists. |
The acronym of the property value to retrieve
ReturnsProperty value (real/integer) Return typeNumber |
ExampleTo return the value of RO for material m: var ro = m.GetPropertyByName("RO");
|
GetPropertyByRowCol(row[integer], col[integer])DescriptionReturns the value of the property for row and col for this Material object or null if no property exists. Note that rows and columns start at 0. |
The row of the property value to retrieve
The column of the property value to retrieve
ReturnsProperty value (real/integer) Return typeNumber |
ExampleTo return the value of the property at row 0, column 1 for material m: var prop = m.GetPropertyByRowCol(0, 1);
|
GetPropertyNameForIndex(index[integer])DescriptionReturns the name of the property at index index for this Material object or null if there is no property. |
The index of the property name to retrieve. (the number of properties can be found from properties) Note that indices start at 0. There is no link between indices and rows/columns so adjacent fields on a line for a material may not have adjacent indices.
ReturnsProperty name (string) Return typeString |
ExampleTo return the name of the property at index 2, for material m: var name = m.GetPropertyNameForIndex(2);
|
GetPropertyNameForRowCol(row[integer], col[integer])DescriptionReturns the name of the property at row and col for this Material object or null if there is no property. Note that rows and columns start at 0. |
The row of the property name to retrieve
The column of the property name to retrieve
ReturnsProperty name (string) Return typeString |
ExampleTo return the name of the property at row 0, column 1 for material m: var name = m.GetPropertyNameForRowCol(0, 1);
|
Keyword(index (optional)[integer])DescriptionReturns the keyword for this material (e.g. *MAT_RIGID, *MAT_ELASTIC etc). Note that a carriage return is not added. See also Material.KeywordCards() |
If this argument is not given then the material keyword is returned as normal. However if the material also has *MAT_ADD_xxxx cards defined for it (e.g. *MAT_ADD_EROSION) then the index can be used to return the title for the *MAT_ADD card instead. The index value starts from zero. The number of *MAT_ADD cards can be found from the addKeywords property
Returnsstring containing the keyword. Return typeString |
KeywordCards(index (optional)[integer])DescriptionReturns the keyword cards for the material. Note that a carriage return is not added. See also Material.Keyword() |
If this argument is not given then the material keyword cards are returned as normal. However if the material also has *MAT_ADD_xxxx cards defined for it (e.g. *MAT_ADD_EROSION) then the index can be used to return the cards for the *MAT_ADD card instead. The index value starts from zero. The number of *MAT_ADD cards can be found from the addKeywords property
Returnsstring containing the cards. Return typeString |
Last(Model[Model]) [static]DescriptionReturns the last material in the model. |
Model to get last material in
ReturnsMaterial object (or null if there are no materials in the model). Return typeMaterial |
ExampleTo get the last material in model m: var m = Material.Last(m);
|
LastFreeLabel(Model[Model], layer (optional)[Include number]) [static]DescriptionReturns the last free material label in the model. Also see Material.FirstFreeLabel(), Material.NextFreeLabel() and see Model.LastFreeItemLabel() |
Model to get last free material label in
Include file (0 for the main file) to search for labels in (Equivalent to Highest free in layer in editing panels). If omitted the whole model will be used.
ReturnsMaterial label. Return typeNumber |
ExampleTo get the last free material label in model m: var label = Material.LastFreeLabel(m);
|
Next()DescriptionReturns the next material in the model. |
No arguments
ReturnsMaterial object (or null if there are no more materials in the model). Return typeMaterial |
ExampleTo get the material in model m after material m: var m = m.Next();
|
NextFreeLabel(Model[Model], layer (optional)[Include number]) [static]DescriptionReturns the next free (highest+1) material label in the model. Also see Material.FirstFreeLabel(), Material.LastFreeLabel() and Model.NextFreeItemLabel() |
Model to get next free material label in
Include file (0 for the main file) to search for labels in (Equivalent to Highest+1 in layer in editing panels). If omitted the whole model will be used (Equivalent to Highest+1 in editing panels).
ReturnsMaterial label. Return typeNumber |
ExampleTo get the next free material label in model m: var label = Material.NextFreeLabel(m);
|
Pick(prompt[string], limit (optional)[Model or Flag], modal (optional)[boolean], button text (optional)[string]) [static]DescriptionAllows the user to pick a material. |
Text to display as a prompt to the user
If the argument is a Model then only materials from that model can be picked. If the argument is a Flag then only materials that are flagged with limit can be selected. If omitted, or null, any materials from any model can be selected. from any model.
If picking is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the pick will be modal.
By default the window with the prompt will have a button labelled 'Cancel' which if pressed will cancel the pick and return null. If you want to change the text on the button use this argument. If omitted 'Cancel' will be used.
ReturnsMaterial object (or null if not picked) Return typeMaterial |
ExampleTo pick a material from model m giving the prompt 'Pick material from screen': var m = Material.Pick('Pick material from screen', m);
|
PoissonsRatio()DescriptionGet Poissons ratio for the material. |
No arguments
Returnsreal Return typeNumber |
ExampleTo get Poissons ratio for material m: var pr = m.PoissonsRatio(f);
|
Previous()DescriptionReturns the previous material in the model. |
No arguments
ReturnsMaterial object (or null if there are no more materials in the model). Return typeMaterial |
ExampleTo get the material in model m before material m: var m = m.Previous();
|
RemoveMaterialErosion() [deprecated]This function is deprecated in version 20.0. It is only provided to keep old scripts working. We strongly advise against using it in new scripts. Support may be removed in future versions. DescriptionRemoves the Erosion properties for this Material object. |
No arguments
ReturnsNo return value |
ExampleTo remove the Erosion properties for material m: m.RemoveMaterialErosion();
|
RenumberAll(Model[Model], start[integer]) [static]DescriptionRenumbers all of the materials in the model. |
Model that all materials will be renumbered in
Start point for renumbering
ReturnsNo return value |
ExampleTo renumber all of the materials in model m, from 1000000: Material.RenumberAll(m, 1000000);
|
RenumberFlagged(Model[Model], flag[Flag], start[integer]) [static]DescriptionRenumbers all of the flagged materials in the model. |
Model that all the flagged materials will be renumbered in
Flag set on the materials that you want to renumber
Start point for renumbering
ReturnsNo return value |
ExampleTo renumber all of the materials in model m flagged with f, from 1000000: Material.RenumberFlagged(m, f, 1000000);
|
Select(flag[Flag], prompt[string], limit (optional)[Model or Flag], modal (optional)[boolean]) [static]DescriptionAllows the user to select materials using standard PRIMER object menus. |
Flag to use when selecting materials
Text to display as a prompt to the user
If the argument is a Model then only materials from that model can be selected. If the argument is a Flag then only materials that are flagged with limit can be selected (limit should be different to flag). If omitted, or null, any materials can be selected. from any model.
If selection is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the selection will be modal.
ReturnsNumber of materials selected or null if menu cancelled Return typeNumber |
SetAddDamageGissmoData(data[object])DescriptionSets the *MAT_ADD_DAMAGE_GISSMO data of material. |
Data returned from Material.GetAddDamageGissmoData
Object has the following properties:
| Name | Type | Description |
| biaxf | real | Reduction factor for regularization at triaxiality=2/3 |
| dcrit | real | Damage treshold value |
| dmgexp | real | Exponent for nonlinear damage accumalation |
| dtyp | real | Flag for GISSMO damage type |
| ecrit | real/integer | Critical plastic strain (Curve/ table ID if negative) |
| fadexp | real/integer | Exponent for damage-related stress fadeout (Curve/ table ID if negative) |
| hisvn | real | History variable used to evaluate th 3-D table LCSDG |
| instf | integer | Flag for governing the behavior of instability measure F and fading exponent FADEXP |
| lcdlim | integer | Curve ID: damage limit values as a function of triaxiality |
| lcregd | integer | Curve/ table ID (positive) or Table ID (negative): Element-size dependent fading exponent |
| lcsdg | integer | Curve/ table ID (positive) or Function ID (negative): Failure strain curve/table or function |
| lcsoft | integer | Soft reduction factor for failure strain in crashfront elements. |
| lcsrs | integer | Curve/ table ID: Failure strain rate scaling factor v/s strain rate |
| lp2bi | real | Option to use bending indicator instead of the Lode parameter |
| midfail | integer | Mid-plane failure option for shell elements and GISSMO |
| numfip | real | Number of failed integration points prior to element deletion |
| refsz | real | Reference element size |
| rgtr1 | real | First triaxiality value for optional "tub-shaped" regularization |
| rgtr2 | real | Second triaxiality value for optional "tub-shaped" regularization |
| shrf | real | Reduction factor for regularization at triaxiality=0 |
| soft | real | Softening reduction factor for failure strain in crashfront elements |
| stochastic | logical | stochastic = true if _STOCHASTIC is ON. Otherwise, _STOCHASTIC is OFF |
| volfrac | real | Volume fraction required to fail before element deletion |
ReturnsNo return value |
ExampleTo set the value of MIDFAIL Damage Gissmo for material m to be 3: var data = m.GetAddDamageGissmoData();
data.midfail = 3;
m.SetAddDamageGissmoData(data);
|
SetAddErosionData(data[object])DescriptionSets the *MAT_ADD_EROSION data of material. Note that this method does not support pre-R11 properties. |
Data returned from Material.GetAddErosionData.
Object has the following properties:
| Name | Type | Description |
| dteflt | real | Time period for the low pass filter |
| dtmin | real | Minimum time step size at failure |
| effeps | real | Maximum effective strain at failure |
| engcrt | real | Critical energy for nonlocal failure criterion |
| epssh | real | Shear strain at failure |
| epsthin | real | Thinning strain at failure for shells |
| excl | real | The exclusion number |
| failtm | real | Failure time |
| idam | integer | Flag for damage model |
| impulse | real | Stress impulse for failure |
| lceps12 | integer | Load curve ID defining in-plane shear strain limit vs elem size |
| lceps13 | integer | Load curve ID defining through-thickness shear strain limit vs elem size |
| lcepsmx | integer | Load curve ID defining in-plane major strain limit vs elem size |
| lcfld | integer | Curve (negative) or table (positive) ID: Forming limit diagram |
| lcregd | integer | Curve ID: Element-size dependent fading exponent |
| mneps | real | Minimum principal strain at failure |
| mnpres | real | Pressure at failure |
| mxeps | real/integer | Principal strain at failure (curve ID if negative) |
| mxpres | real | Maximum pressure at failure |
| mxtmp | real | Maximum temperature at failure |
| ncs | real | Number of failure conditions to satisfy before failure occurs |
| nsff | real | Number of explicit time step cycles for stress fade-out used in the LCFLD criterion |
| numfip | real | Number of failed integration points prior to element deletion |
| radcrt | real | Critical radius for nonlocal failure criterion |
| sigp1 | real | Principal stress at failure |
| sigth | real | Threshold stress |
| sigvm | real/integer | Equivalent stress at failure (curve ID if negative) |
| voleps | real | Volumetric strain at failure |
| volfrac | real | The volume fraction required to fail before the element is deleted |
ReturnsNo return value |
ExampleTo set the value of EXCL Erosion for material m to be 1.25: var data = m.GetAddErosionData();
data.excl = 1.25;
m.SetAddErosionData(data);
|
SetErosionPropertyByName(acronym[string], value[integer/real for numeric properties, string for character properties], idam_index (optional)[integer]) [deprecated]This function is deprecated in version 20.0. It is only provided to keep old scripts working. We strongly advise against using it in new scripts. Support may be removed in future versions. DescriptionSets the value of Erosion property string acronym for this Material object |
The acronym of the property value to set
The value of the property to set.
Required if property is one of IDAM cards pair property (for IDAM value less than zero) . If the argument is not given, set the property values for first IDAM cards Pair. The index value starts from zero.
ReturnsNo return value |
ExampleTo set the value of IDAM Erosion for material m to be 8: m.SetErosionPropertyByName("idam", 8);
|
SetFlag(flag[Flag])DescriptionSets a flag on the material. |
Flag to set on the material
ReturnsNo return value |
ExampleTo set flag f for material m: m.SetFlag(f);
|
SetMaterialErosion() [deprecated]This function is deprecated in version 20.0. It is only provided to keep old scripts working. We strongly advise against using it in new scripts. Support may be removed in future versions. DescriptionInitializes the Erosion properties for this Material object. |
No arguments
ReturnsNo return value |
ExampleTo set the Erosion Property for material m: m.SetMaterialErosion();
|
SetPropertyByIndex(index[integer], value[integer/real for numeric properties, string for character properties])DescriptionSets the value of property at index index for this Material object |
The index of the property value to set. (the number of properties can be found from properties) Note that indices start at 0. There is no link between indices and rows/columns so adjacent fields on a line for a material may not have adjacent indices.
The value of the property to set.
ReturnsNo return value |
ExampleTo set the property at index 2, for material m to be 1.234: m.SetPropertyByIndex(2, 1.234);
|
SetPropertyByName(acronym[string], value[integer/real for numeric properties, string for character properties])DescriptionSets the value of property string acronym for this Material object |
The acronym of the property value to set
The value of the property to set.
ReturnsNo return value |
ExampleTo set the value of RO for material m to be 7.89e-9: m.SetPropertyByName("RO", 7.89e-9);
|
SetPropertyByRowCol(row[integer], col[integer], value[integer/real for numeric properties, string for character properties])DescriptionSets the value of the property for row and col for this Material object.Note that rows and columns start at 0. |
The row of the property value to set
The column of the property value to set
The value of the property to set.
ReturnsNo return value |
ExampleTo set the value of the property at row 0, column 1 for material m to be 7.89e-9: m.SetPropertyByRowCol(0, 1, 7.89e-9);
|
Sketch(redraw (optional)[boolean])DescriptionSketches the material. The material will be sketched until you either call Material.Unsketch(), Material.UnsketchAll(), Model.UnsketchAll(), or delete the model |
If model should be redrawn or not after the material is sketched. If omitted redraw is true. If you want to sketch several materials and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo sketch material m: m.Sketch();
|
SketchFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionSketches all of the flagged materials in the model. The materials will be sketched until you either call Material.Unsketch(), Material.UnsketchFlagged(), Model.UnsketchAll(), or delete the model |
Model that all the flagged materials will be sketched in
Flag set on the materials that you want to sketch
If model should be redrawn or not after the materials are sketched. If omitted redraw is true. If you want to sketch flagged materials several times and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo sketch all materials flagged with flag in model m: Material.SketchFlagged(m, flag);
|
Total(Model[Model], exists (optional)[boolean]) [static]DescriptionReturns the total number of materials in the model. |
Model to get total for
true if only existing materials should be counted. If false or omitted referenced but undefined materials will also be included in the total.
Returnsnumber of materials Return typeNumber |
ExampleTo get the total number of materials in model m: var total = Material.Total(m);
|
Unblank()DescriptionUnblanks the material |
No arguments
ReturnsNo return value |
ExampleTo unblank material m: m.Unblank();
|
UnblankAll(Model[Model], redraw (optional)[boolean]) [static]DescriptionUnblanks all of the materials in the model. |
Model that all materials will be unblanked in
If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using View.Redraw().
ReturnsNo return value |
ExampleTo unblank all of the materials in model m: Material.UnblankAll(m);
|
UnblankFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionUnblanks all of the flagged materials in the model. |
Model that the flagged materials will be unblanked in
Flag set on the materials that you want to unblank
If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using View.Redraw().
ReturnsNo return value |
ExampleTo unblank all of the materials in model m flagged with f: Material.UnblankFlagged(m, f);
|
UnflagAll(Model[Model], flag[Flag]) [static]DescriptionUnsets a defined flag on all of the materials in the model. |
Model that the defined flag for all materials will be unset in
Flag to unset on the materials
ReturnsNo return value |
ExampleTo unset the flag f on all the materials in model m: Material.UnflagAll(m, f);
|
Unsketch(redraw (optional)[boolean])DescriptionUnsketches the material. |
If model should be redrawn or not after the material is unsketched. If omitted redraw is true. If you want to unsketch several materials and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo unsketch material m: m.Unsketch();
|
UnsketchAll(Model[Model], redraw (optional)[boolean]) [static]DescriptionUnsketches all materials. |
Model that all materials will be unblanked in
If model should be redrawn or not after the materials are unsketched. If omitted redraw is true. If you want to unsketch several things and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo unsketch all materials in model m: Material.UnsketchAll(m);
|
UnsketchFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionUnsketches all flagged materials in the model. |
Model that all materials will be unsketched in
Flag set on the materials that you want to unsketch
If model should be redrawn or not after the materials are unsketched. If omitted redraw is true. If you want to unsketch several things and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo unsketch all materials flagged with flag in model m: Material.UnsketchAll(m, flag);
|
No arguments
ReturnsMaterial object. Return typeMaterial |
ExampleTo check if Material property m.example is a parameter by using the Material.GetParameter() method: if (m.ViewParameters().GetParameter(m.example) ) do_something...
|
Warning(message[string], details (optional)[string])DescriptionAdds a warning for material. For more details on checking see the Check class. |
The warning message to give
An optional detailed warning message
ReturnsNo return value |
ExampleTo add a warning message "My custom warning" for material m: m.Warning("My custom warning");
|
Xrefs()DescriptionReturns the cross references for this material. |
No arguments
ReturnsXrefs object. Return typeXrefs |
ExampleTo get the cross references for material m: var xrefs = m.Xrefs();
|
YieldStress()DescriptionGet Yield stress for the material. |
No arguments
Returnsreal Return typeNumber |
ExampleTo get Yield stress for material m: var yield = m.YieldStress();
|
YoungsModulus()DescriptionGet Youngs modulus for the material. |
No arguments
Returnsreal Return typeNumber |
ExampleTo get Youngs modulus for material m: var e = m.YoungsModulus();
|
toString()DescriptionCreates a string containing the material data in keyword format. Note that this contains the keyword header and the keyword cards. See also Material.Keyword() and Material.KeywordCards(). |
No arguments
Returnsstring Return typeString |
ExampleTo get data for material m in keyword format var s = m.toString();
|