MediaCollection

A collection of media.

Example

app = cf.GetApplication()
project = app:NewProject()

    -- Create two metallic media
    
metal1 = project.Media:AddMetal()
metal2 = project.Media:AddMetal()

    -- Set the conductivity of each metal to 1.5e7

for key,value in pairs(project.Media:GetMetals()) do
    value.Conductivity = 1.5e7
end

Usage locations (collections)

The following objects contain the MediaCollection collection:

Property List

Count
The number of Medium items in the collection. (Read only number)
Library
The media library that contains a list of predefined and user-defined media. (Read only MediaLibrary)
Type
The object type string. (Read only string)

Method List

AddAnisotropicDielectric (properties table)
Create a 3D anisotropic medium from a table defining the properties. (Returns a AnisotropicDielectric object.)
AddAnisotropicDielectric (mediumuu Dielectric, mediumvv Dielectric, mediumnn Dielectric)
Create a 3D anisotropic medium. (Returns a AnisotropicDielectric object.)
AddCharacterisedSurface (properties table)
Create a characterised surface medium from a table defining the properties. (Returns a CharacterisedSurface object.)
AddCharacterisedSurface (filename string)
Create a characterised surface medium. (Returns a CharacterisedSurface object.)
AddDielectric (properties table)
Create a dielectric medium from a table defining the properties. (Returns a Dielectric object.)
AddDielectric ()
Create a dielectric medium. (Returns a Dielectric object.)
AddDielectric (relativepermittivity Expression, losstangent Expression, massdensity Expression)
Create a dielectric medium. (Returns a Dielectric object.)
AddImpedanceSheet (properties table)
Create an impedance sheet medium from a table defining the properties. (Returns a ImpedanceSheet object.)
AddImpedanceSheet ()
Create an impedance sheet medium. (Returns a ImpedanceSheet object.)
AddImpedanceSheet (realimpedance Expression, imaginaryimpedance Expression)
Create an impedance sheet medium. (Returns a ImpedanceSheet object.)
AddLayeredAnisotropicDielectric (properties table)
Create a layered dielectric (anisotropic) medium from a table defining the properties. (Returns a LayeredAnisotropicDielectric object.)
AddLayeredAnisotropicDielectric (thicknesslist List of Expression, directionlist List of Expression, principlemediumlist List of Dielectric, orthogonalmediumlist List of Dielectric)
Create a layered dielectric (anisotropic) medium. (Returns a LayeredAnisotropicDielectric object.)
AddLayeredDielectric (properties table)
Create a layered dielectric (isotropic) medium from a table defining the properties. (Returns a LayeredDielectric object.)
AddLayeredDielectric (thicknesslist List of Expression, mediumlist List of Dielectric)
Create a layered dielectric (isotropic) medium. (Returns a LayeredDielectric object.)
AddMetal (properties table)
Create a metallic medium from a table defining the properties. (Returns a Metal object.)
AddMetal ()
Creates a new metallic medium. (Returns a Metal object.)
AddMetal (relativepermeability Expression, losstangent Expression, conductivity Expression)
Creates a new metallic medium. (Returns a Metal object.)
AddWindscreen (properties table)
Create a windscreen medium from a table defining the properties. (Returns a Windscreen object.)
AddWindscreen (medium LayeredDielectric, offset Expression)
Create a windscreen medium. (Returns a Windscreen object.)
Contains (label string)
Checks if the collection contains an item with the given label. (Returns a boolean object.)
GetAnisotropicDielectric ()
The 3D anisotropic media. (Returns a List of Medium object.)
GetCharacterisedSurfaces ()
The characterised surface media. (Returns a List of Medium object.)
GetDefault ()
A non-physical medium that can be applied to a face or region. It allows the properties to be inferred from the surrounding face or region settings. (Returns a Medium object.)
GetDielectricBoundary ()
A non-physical medium that can be applied to a face to describe the separation between two dielectric regions. (Returns a Medium object.)
GetDielectrics ()
The dielectric media. (Returns a List of Medium object.)
GetFreeSpace ()
The standard free space medium. (Returns a Medium object.)
GetGroundPlane ()
The finite ground plane medium. Only applies if a Planar multilayer substrate has been defined. (Returns a Medium object.)
GetImpedanceSheets ()
The impedance sheet media. (Returns a List of Medium object.)
GetLayeredAnisotropicDielectrics ()
The layered anisotropic dielectric media. (Returns a List of Medium object.)
GetLayeredIsotropicDielectrics ()
The layered isotropic dielectric media. (Returns a List of Medium object.)
GetMetals ()
The non-default metallic media. (Returns a List of Medium object.)
GetPEC ()
The standard perfect electric conductor medium. (Returns a Medium object.)
GetPMC ()
The standard perfect magnetic conductor medium. (Returns a Medium object.)
GetWindscreens ()
The windscreen media. (Returns a List of Medium object.)
GetZero ()
A non-physical medium that can be used with 3D anisotropic media. It represents no coupling to the particular tensor component. (Returns a Medium object.)
Item (index number)
Returns the Medium at the given index. (Returns a Medium object.)
Item (label string)
Returns the Medium with the given label. (Returns a Medium object.)
Items ()
Returns a table of Medium. (Returns a List of Medium object.)
UniqueName (label string)
Generates a unique name base of of the provided base name.If the base name already exists in the collection, a digit will be appended until a valid name is generated. (Returns a boolean object.)

Index List

[number]
Returns the Medium at the given index in the collection. (Read Medium)
[string]
Returns the Medium with the given name in the collection. (Read Medium)

Property Details

Count
The number of Medium items in the collection.
Type
number
Access
Read only
Library
The media library that contains a list of predefined and user-defined media.
Type
MediaLibrary
Access
Read only
Type
The object type string.
Type
string
Access
Read only

Method Details

AddAnisotropicDielectric (properties table)
Create a 3D anisotropic medium from a table defining the properties.
Input Parameters
properties(table)
A table of properties defining the new 3D anisotropic medium.
Return
AnisotropicDielectric
The 3D anisotropic medium.
AddAnisotropicDielectric (mediumuu Dielectric, mediumvv Dielectric, mediumnn Dielectric)
Create a 3D anisotropic medium.
Input Parameters
mediumuu(Dielectric)
The dielectric media making up the U entry of the diagonal matrix.
mediumvv(Dielectric)
The dielectric media making up the V entry of the diagonal matrix.
mediumnn(Dielectric)
The dielectric media making up the N entry of the diagonal matrix.
Return
AnisotropicDielectric
The 3D anisotropic medium.
AddCharacterisedSurface (properties table)
Create a characterised surface medium from a table defining the properties.
Input Parameters
properties(table)
A table of properties defining the new characterised surface medium.
Return
CharacterisedSurface
The characterised surface medium.
AddCharacterisedSurface (filename string)
Create a characterised surface medium.
Input Parameters
filename(string)
The file describing the medium properties.
Return
CharacterisedSurface
The characterised surface medium.
AddDielectric (properties table)
Create a dielectric medium from a table defining the properties.
Input Parameters
properties(table)
A table of properties defining the new dielectric medium.
Return
Dielectric
The dielectric medium.
AddDielectric ()
Create a dielectric medium.
Return
Dielectric
The dielectric medium.
AddDielectric (relativepermittivity Expression, losstangent Expression, massdensity Expression)
Create a dielectric medium.
Input Parameters
relativepermittivity(Expression)
The frequency independent dielectric relative permittivity.
losstangent(Expression)
The frequency independent dielectric loss tangent.
massdensity(Expression)
The mass density (kg/m^3).
Return
Dielectric
The dielectric medium.
AddImpedanceSheet (properties table)
Create an impedance sheet medium from a table defining the properties.
Input Parameters
properties(table)
A table of properties defining the new impedance sheet medium.
Return
ImpedanceSheet
The impedance sheet medium.
AddImpedanceSheet ()
Create an impedance sheet medium.
Return
ImpedanceSheet
The impedance sheet medium.
AddImpedanceSheet (realimpedance Expression, imaginaryimpedance Expression)
Create an impedance sheet medium.
Input Parameters
realimpedance(Expression)
The frequency independent real impedance (Ohm).
imaginaryimpedance(Expression)
The frequency independent imaginary impedance (Ohm).
Return
ImpedanceSheet
The impedance sheet medium.
AddLayeredAnisotropicDielectric (properties table)
Create a layered dielectric (anisotropic) medium from a table defining the properties.
Input Parameters
properties(table)
A table of properties defining the new layered dielectric medium.
Return
LayeredAnisotropicDielectric
The layered anisotropic dielectric medium.
AddLayeredAnisotropicDielectric (thicknesslist List of Expression, directionlist List of Expression, principlemediumlist List of Dielectric, orthogonalmediumlist List of Dielectric)
Create a layered dielectric (anisotropic) medium.
Input Parameters
thicknesslist(List of Expression)
The list of layer thicknesses (in the model unit).
directionlist(List of Expression)
The list of angles (in degrees) from which the principle directions is obtained.
principlemediumlist(List of Dielectric)
The list of layer dielectric media in the principle direction.
orthogonalmediumlist(List of Dielectric)
The list of layer dielectric media in the orthogonal direction.
Return
LayeredAnisotropicDielectric
The layered anisotropic dielectric medium.
AddLayeredDielectric (properties table)
Create a layered dielectric (isotropic) medium from a table defining the properties.
Input Parameters
properties(table)
A table of properties defining the new layered dielectric medium.
Return
LayeredDielectric
The layered isotropic dielectric medium.
AddLayeredDielectric (thicknesslist List of Expression, mediumlist List of Dielectric)
Create a layered dielectric (isotropic) medium.
Input Parameters
thicknesslist(List of Expression)
The list of layer thicknesses (in the model unit).
mediumlist(List of Dielectric)
The list of layer dielectric media.
Return
LayeredDielectric
The layered isotropic dielectric medium.
AddMetal (properties table)
Create a metallic medium from a table defining the properties.
Input Parameters
properties(table)
A table of properties defining the new metallic medium.
Return
Metal
The metallic medium.
AddMetal ()
Creates a new metallic medium.
Return
Metal
The metallic medium.
AddMetal (relativepermeability Expression, losstangent Expression, conductivity Expression)
Creates a new metallic medium.
Input Parameters
relativepermeability(Expression)
The frequency independent relative permeability.
losstangent(Expression)
The frequency independent magnetic loss tangent.
conductivity(Expression)
The frequency independent conductivity (S/m).
Return
Metal
The metallic medium.
AddWindscreen (properties table)
Create a windscreen medium from a table defining the properties.
Input Parameters
properties(table)
A table of properties defining the new windscreen medium.
Return
Windscreen
The windscreen medium.
AddWindscreen (medium LayeredDielectric, offset Expression)
Create a windscreen medium.
Input Parameters
medium(LayeredDielectric)
The layered dielectric contained in the windscreen layers.
offset(Expression)
The distance (in the model unit) from the windscreen curvature reference to the top of layer 1.
Return
Windscreen
The windscreen medium.
Contains (label string)
Checks if the collection contains an item with the given label.
Input Parameters
label(string)
The label of the Medium.
Return
boolean
The success of the check.
GetAnisotropicDielectric ()
The 3D anisotropic media.
Return
List of Medium
The list of 3D anisotropic media.
GetCharacterisedSurfaces ()
The characterised surface media.
Return
List of Medium
The list of characterised surface media.
GetDefault ()
A non-physical medium that can be applied to a face or region. It allows the properties to be inferred from the surrounding face or region settings.
Return
Medium
The default medium.
GetDielectricBoundary ()
A non-physical medium that can be applied to a face to describe the separation between two dielectric regions.
Return
Medium
The dielectric boundary medium.
GetDielectrics ()
The dielectric media.
Return
List of Medium
The list of dielectric media.
GetFreeSpace ()
The standard free space medium.
Return
Medium
The free space medium.
GetGroundPlane ()
The finite ground plane medium. Only applies if a Planar multilayer substrate has been defined.
Return
Medium
The finite ground plane medium.
GetImpedanceSheets ()
The impedance sheet media.
Return
List of Medium
The list of impedance sheet media.
GetLayeredAnisotropicDielectrics ()
The layered anisotropic dielectric media.
Return
List of Medium
The list of layered anisotropic dielectric media.
GetLayeredIsotropicDielectrics ()
The layered isotropic dielectric media.
Return
List of Medium
The list of layer dielectric media.
GetMetals ()
The non-default metallic media.
Return
List of Medium
The list of metallic media.
GetPEC ()
The standard perfect electric conductor medium.
Return
Medium
The PEC medium.
GetPMC ()
The standard perfect magnetic conductor medium.
Return
Medium
The PMC medium.
GetWindscreens ()
The windscreen media.
Return
List of Medium
The list of windscreen media.
GetZero ()
A non-physical medium that can be used with 3D anisotropic media. It represents no coupling to the particular tensor component.
Return
Medium
The zero medium.
Item (index number)
Returns the Medium at the given index.
Input Parameters
index(number)
The index of the Medium.
Return
Medium
The Medium at the given index.
Item (label string)
Returns the Medium with the given label.
Input Parameters
label(string)
The label of the Medium.
Return
Medium
The Medium with the given label.
Items ()
Returns a table of Medium.
Return
List of Medium
A table of Medium.
UniqueName (label string)
Generates a unique name base of of the provided base name.If the base name already exists in the collection, a digit will be appended until a valid name is generated.
Input Parameters
label(string)
The base name.
Return
boolean
The generated unique name label for Medium.