Public Member Functions | List of all members
MaterialObject Class Reference

MaterialObject class is used to define a material multiple table that has one or more keys.
The class can be called from MaterialLibrary class.
. More...

Inherits ParameterList.

Public Member Functions

void AddCurve (String &propName, double key, String &unitName, String array &mat)
 Defines a table that has one key (used for temperature-dependent tables and stress-dependent tables). More...
 
void AddCurve2 (String &propName, double key, String &unitName, double key2, String &unitName2, String array &mat)
 Defines a table that has two keys (used for stress-dependent iron loss tables). More...
 
void ChangeKeyCurve (String &propName, double oldkey, String &oldunitName, double newkey, String &newunitName)
 Changes the value and unit of the key in the table that has a key (used for temperature-dependent tables and stress-dependent tables). More...
 
void ChangeKeyCurve2 (String &propName, double oldkey, String &oldunitName, double oldkey2, String &oldunitName2, double newkey, String &newunitName, double newkey2, String &newunitName2)
 Modifies the value and unit of the key in the table that has two keys (used for stress-dependent iron loss tables). More...
 
void DeleteCurve (String &propName, double key, String &unitName)
 Removes a value of the key in the table that has a key (used for temperature-dependent tables and stress-dependent tables). More...
 
void DeleteCurve2 (String &propName, double key, String &unitName, double key2, String &unitName2)
 Deletes a value of the key in the table that has two keys (used for stress-dependent iron loss tables). More...
 
DataSetGetCurve (String &propName, double key, String &unitName)
 Returns a value of the key in the table that has a key (used for temperature-dependent tables and stress-dependent tables). More...
 
DataSetGetCurve2 (String &propName, double key, String &unitName, double key2, String &unitName2)
 Returns a value in the table that has two keys (used for such as stress-dependent iron loss table). More...
 
virtual String GetFlagAsString (String &name)
 Returns the settings for the specified properties as a flag property name. More...
 
virtual String GetFlagPropertyHelp (String &propName, Variant &val)
 Returns the help of the flag property as a string for the specified index or name. More...
 
Variant GetKeyNames (String &name)
 Returns the flag name as a string list. More...
 
String GetName ()
 Returns a property name as a string. More...
 
virtual String GetPropertyHelp (String &propName)
 Returns the help of the flag property as a string for the specified index or name. More...
 
Variant GetPropertyNames ()
 Returns the list of all properties that can be specified for the condition. More...
 
String GetPropertyTable ()
 Returns the list of properties including the type and help. More...
 
virtual String GetPropertyType (String &propName)
 Returns a property type. More...
 
virtual String GetStringValue (String &propName)
 Returns the value of the named property. More...
 
DataSetGetTable (String &propName)
 Returns the value of the specified table property. More...
 
DataSetListGetTableList (String &propName)
 Returns the table list of the specified property. More...
 
virtual double GetValue (String &propName)
 Returns the value of property as a real number. More...
 
virtual double GetValueWithUnit (String &propName, String &unitName)
 Returns the value of the named property as a real number in the specified unit. More...
 
bool IsValid ()
 Returns True if an object is valid. More...
 
void LoadLossData (String &filename)
 Loads the material properties from the specified file (*.iron). More...
 
void LoadPermeability (String &filename)
 Loads the material properties from the specified file (*.hb). More...
 
void ModifyCurve (String &propName, double key, String &unitName, String array &mat)
 Edits the value and unit of the key and table value of a table with a key (used for temperature-dependent tables and stress-dependent tables). More...
 
void ModifyCurve2 (String &propName, double key, String &unitName, double key2, String &unitName2, String array &mat)
 Edits the value and unit of the key in the table that has two keys and table value (used for stress-dependent iron loss tables). More...
 
virtual void SetComplexValue (String &propName, double real, double imag)
 Specifies the value of the complex property. More...
 
virtual void SetFlagByName (String &propName, String &scriptKeyName)
 Specifies the value of flag property for the specified name. More...
 
void SetName (String &name)
 Specifies a property name. More...
 
void SetTable (String &propName, String array &mat)
 Specifies the value in the specified table for the properties. More...
 
void SetTableFromFile (String &propName, String &filename)
 Specifies a point sequence for a property that is specified, by importing a point sequence file (*.csv, *.txt, *.pa). More...
 
void SetTableList (String &propName, double primaryKey, String &primaryUnitName, String array &mat)
 Specifies the name for the dataset list (multiple tables). More...
 
void SetTableListName (String &propName, String &name)
 Specifies the name for the dataset list (multiple tables). More...
 
void SetTableListWithDualKey (String &propName, double primaryKey, String &primaryUnitName, double secondaryKey, String &secondaryUnitName, String array &mat)
 Specifies a point sequence for the multidimensional array of the specified primary key and secondary key in the dataset list (multiple tables). More...
 
void SetTableProperty (String &propName, DataSet *set)
 Specifies a table for the specified properties. More...
 
void SetTableWithUnit (String &propName, String array &mat, StringList &unitlist)
 Specifies the value of the specified table property. More...
 
void SetTextTable (String &propName, String array &mat)
 Specifies the value in the specified string table for the properties. More...
 
virtual void SetValue (String &propName, Variant &value)
 Specifies the value of the real number property or flag property. More...
 
virtual void SetValueWithUnit (String &propName, double value, String &unitName)
 Specifies the value of the named property. More...
 

Detailed Description

MaterialObject class is used to define a material multiple table that has one or more keys.
The class can be called from MaterialLibrary class.
.

Example of calling the class object:

app.GetMaterialLibrary().GetMaterial(0)

If a table does not have a key, Material::SetTable can be used.

Member Function Documentation

void MaterialObject::AddCurve ( String &  propName,
double  key,
String &  unitName,
String array &  mat 
)

Defines a table that has one key (used for temperature-dependent tables and stress-dependent tables).

Parameters
propNameProperty name
keyValue that will be the key
unitNameUnit of the value that will be the key
matTable value
MaterialObject_AddCurve001.gif
void MaterialObject::AddCurve2 ( String &  propName,
double  key,
String &  unitName,
double  key2,
String &  unitName2,
String array &  mat 
)

Defines a table that has two keys (used for stress-dependent iron loss tables).

Parameters
propNameProperty name
keyValue of the key
unitNameUnit of the key
key2Value of the key 2
unitName2Unit of the key 2
matTable value
void MaterialObject::ChangeKeyCurve ( String &  propName,
double  oldkey,
String &  oldunitName,
double  newkey,
String &  newunitName 
)

Changes the value and unit of the key in the table that has a key (used for temperature-dependent tables and stress-dependent tables).

Parameters
propNameProperty name
oldkeyValue of the key before changes
oldunitNameUnit of the key before changes
newkeyValue of the key after changes
newunitNameUnit of the key after changes
void MaterialObject::ChangeKeyCurve2 ( String &  propName,
double  oldkey,
String &  oldunitName,
double  oldkey2,
String &  oldunitName2,
double  newkey,
String &  newunitName,
double  newkey2,
String &  newunitName2 
)

Modifies the value and unit of the key in the table that has two keys (used for stress-dependent iron loss tables).

Parameters
propNameProperty name
oldkeyValue of the key before changes
oldunitNameUnit of the key before changes
oldkey2Value of the key 2 before changes
oldunitName2Unit of the key 2 before changes
newkeyValue of the key after changes
newunitNameUnit of the key after changes
newkey2Value of the key 2 after change
newunitName2Unit of the key 2 after changes
void MaterialObject::DeleteCurve ( String &  propName,
double  key,
String &  unitName 
)

Removes a value of the key in the table that has a key (used for temperature-dependent tables and stress-dependent tables).

Parameters
propNameProperty name
keyValue that will be the key
unitNameUnit of the value that will be the key
void MaterialObject::DeleteCurve2 ( String &  propName,
double  key,
String &  unitName,
double  key2,
String &  unitName2 
)

Deletes a value of the key in the table that has two keys (used for stress-dependent iron loss tables).

Parameters
propNameProperty name
keyValue of the key
unitNameUnit of the key
key2Value of the key 2
unitName2Unit of the key 2
DataSet * MaterialObject::GetCurve ( String &  propName,
double  key,
String &  unitName 
)

Returns a value of the key in the table that has a key (used for temperature-dependent tables and stress-dependent tables).

Parameters
propNameProperty name
keyValue that will be the key
unitNameUnit of the value that will be the key
Returns
DataSet object (table value)
DataSet * MaterialObject::GetCurve2 ( String &  propName,
double  key,
String &  unitName,
double  key2,
String &  unitName2 
)

Returns a value in the table that has two keys (used for such as stress-dependent iron loss table).

Parameters
propNameProperty name
keyValue of the key
unitNameUnit of the key
key2Value of the key 2
unitName2Unit of the key 2
Returns
DataSet object (table value)
String ParameterList::GetFlagAsString ( String &  name)
virtualinherited

Returns the settings for the specified properties as a flag property name.

Parameters
nameProperty name
Returns
DataSet object (table of properties)
String ParameterList::GetFlagPropertyHelp ( String &  propName,
Variant &  val 
)
virtualinherited

Returns the help of the flag property as a string for the specified index or name.

Parameters
propNameProperty name
valFlag index/Flag name
Returns
Help of the flag property
Variant ParameterList::GetKeyNames ( String &  name)
inherited

Returns the flag name as a string list.

Parameters
nameProperty name
Returns
Flag name
String MaterialObject::GetName ( )

Returns a property name as a string.

Returns
Property name
String ParameterList::GetPropertyHelp ( String &  propName)
virtualinherited

Returns the help of the flag property as a string for the specified index or name.

Parameters
propNameProperty name
Returns
Help of the property
Variant ParameterList::GetPropertyNames ( )
inherited

Returns the list of all properties that can be specified for the condition.

Returns
List of all properties for the condition
String ParameterList::GetPropertyTable ( )
inherited

Returns the list of properties including the type and help.

Returns
List of the properties
String ParameterList::GetPropertyType ( String &  propName)
virtualinherited

Returns a property type.

Parameters
propNameProperty name
Returns
Property type
String ParameterList::GetStringValue ( String &  propName)
virtualinherited

Returns the value of the named property.

Parameters
propNameProperty name
Returns
Property value

Reimplemented in StudyProperties.

DataSet * ParameterList::GetTable ( String &  propName)
inherited

Returns the value of the specified table property.

Parameters
propNameProperty name
Returns
DataSet (table)
DataSetList * ParameterList::GetTableList ( String &  propName)
inherited

Returns the table list of the specified property.

Parameters
propNameProperty name
Returns
DataSetList (table list)
double ParameterList::GetValue ( String &  propName)
virtualinherited

Returns the value of property as a real number.

Parameters
propNameProperty name
Returns
Property value
double ParameterList::GetValueWithUnit ( String &  propName,
String &  unitName 
)
virtualinherited

Returns the value of the named property as a real number in the specified unit.

Parameters
propNameProperty name
unitNameUnit
Returns
Property value
bool MaterialObject::IsValid ( )
virtual

Returns True if an object is valid.

Returns
Whether or not the MaterialObject objects in the list are valid

Reimplemented from ParameterList.

void MaterialObject::LoadLossData ( String &  filename)

Loads the material properties from the specified file (*.iron).

Parameters
filenameFile path
void MaterialObject::LoadPermeability ( String &  filename)

Loads the material properties from the specified file (*.hb).

Parameters
filenameFile path
void MaterialObject::ModifyCurve ( String &  propName,
double  key,
String &  unitName,
String array &  mat 
)

Edits the value and unit of the key and table value of a table with a key (used for temperature-dependent tables and stress-dependent tables).

Parameters
propNameProperty name
keyValue that will be the key
unitNameUnit of the value that will be the key
matTable value
void MaterialObject::ModifyCurve2 ( String &  propName,
double  key,
String &  unitName,
double  key2,
String &  unitName2,
String array &  mat 
)

Edits the value and unit of the key in the table that has two keys and table value (used for stress-dependent iron loss tables).

Parameters
propNameProperty name
keyValue of the key
unitNameUnit of the key
key2Value of the key 2
unitName2Unit of the key 2
matTable value
void ParameterList::SetComplexValue ( String &  propName,
double  real,
double  imag 
)
virtualinherited

Specifies the value of the complex property.

The unit that is currently being used is used. A real number value is converted into an integer for the flag property.

Parameters
propNameProperty name
realProperty value (real part)
imagProperty value (imaginary part)
void ParameterList::SetFlagByName ( String &  propName,
String &  scriptKeyName 
)
virtualinherited

Specifies the value of flag property for the specified name.

Parameters
propNameProperty name
scriptKeyNameFlag name
void MaterialObject::SetName ( String &  name)

Specifies a property name.

Parameters
nameProperty name
void ParameterList::SetTable ( String &  propName,
String array &  mat 
)
inherited

Specifies the value in the specified table for the properties.

Parameters
propNameProperty name
matMultidimensional array
void ParameterList::SetTableFromFile ( String &  propName,
String &  filename 
)
inherited

Specifies a point sequence for a property that is specified, by importing a point sequence file (*.csv, *.txt, *.pa).

Parameters
propNameProperty name
filenamePath for file that is imported

The following are example. Creates electric current condition and specifies point sequence for the time dependency current by using a file.

Set cond = study.CreateCondition("Current","current")
Call cond.SetValue("XType","Time")
Call cond.SetTableFromFile("Time","D:\sample_read_csv.csv")

The following file formats can be imported.

  • CSV file (*.csv):
    This file can be edited using Microsoft Excel.
  • Text file (*.txt):
  • Point sequence file (*.pa)
    This is table data that can be exported by JMAG-Studio.
void ParameterList::SetTableList ( String &  propName,
double  primaryKey,
String &  primaryUnitName,
String array &  mat 
)
inherited

Specifies the name for the dataset list (multiple tables).

Parameters
propNameProperty name
primaryKeyValue of the primary key
primaryUnitNameUnit name of the primary key
matMultidimensional array
void ParameterList::SetTableListName ( String &  propName,
String &  name 
)
inherited

Specifies the name for the dataset list (multiple tables).

Parameters
propNameProperty name
nameDataset list name
void ParameterList::SetTableListWithDualKey ( String &  propName,
double  primaryKey,
String &  primaryUnitName,
double  secondaryKey,
String &  secondaryUnitName,
String array &  mat 
)
inherited

Specifies a point sequence for the multidimensional array of the specified primary key and secondary key in the dataset list (multiple tables).

Parameters
propNameProperty name
primaryKeyValue of the primary key
primaryUnitNameUnit name of the primary key
secondaryKeyValue of the secondary key
secondaryUnitNameUnit name of the secondary key
matMultidimensional array
void ParameterList::SetTableProperty ( String &  propName,
DataSet set 
)
inherited

Specifies a table for the specified properties.

Parameters
propNameProperty name
setDataSet (table)
void ParameterList::SetTableWithUnit ( String &  propName,
String array &  mat,
StringList &  unitlist 
)
inherited

Specifies the value of the specified table property.

Parameters
propNameProperty name
matMultidimensional array
unitlistUnit list
void ParameterList::SetTextTable ( String &  propName,
String array &  mat 
)
inherited

Specifies the value in the specified string table for the properties.

Parameters
propNameProperty name
matString multidimensional array
void ParameterList::SetValue ( String &  propName,
Variant &  value 
)
virtualinherited

Specifies the value of the real number property or flag property.

The unit that is currently being used is used. A real number value is converted into an integer for the flag property.

Parameters
propNameProperty name
valueProperty value

Reimplemented in CircuitComponent, and StudyProperties.

void ParameterList::SetValueWithUnit ( String &  propName,
double  value,
String &  unitName 
)
virtualinherited

Specifies the value of the named property.

The unit that is currently being used is used. A real number value is converted into an integer for the flag property.

Parameters
propNameProperty name
valueProperty value
unitNameUnit