Table of Contents

Class Material

Namespace
VirtualLabAPI.Core.Materials
Assembly
VirtualLabAPI.dll

Base class for all materials.

[Serializable]
public abstract class Material : ManualSerialization, IDeserializationCallback, IEquatable<IObjectBase>, ISerializable, ICloneable
Inheritance
ObjectBase
SerializableObjectBase
ManualSerialization
Material
Implements
IEquatable<IObjectBase>
Derived
Inherited Members

Constructors

Material()

Standard constructor

public Material()

Fields

RefractiveIndexDefinedAsAbsolute

Is the given refractive index defined as absolute or as relative to the reference material?

public bool RefractiveIndexDefinedAsAbsolute

Field Value

bool

Properties

CatalogClass

The catalogs are of type MaterialsCatalog

public Type CatalogClass { get; }

Property Value

Type

CatalogName

Name of the catalog the material belongs to

public string CatalogName { get; set; }

Property Value

string

Categories

Each string in the list represents one category the catalog belongs to. The format is "subcatalog|subsubcatalog...".

public List<string> Categories { get; set; }

Property Value

List<string>

EditedWithin

Gets and sets how to show the edit dialog of the interface. Must be set prior to calling the edit dialog.

public EditedInType EditedWithin { get; set; }

Property Value

EditedInType

FixedName

A name describing the parameter provider but which doesn't change if its parameters change.

public virtual string FixedName { get; }

Property Value

string

HelpChapterPreview

The help chapter for the preview of the ICatalogEntry

public string HelpChapterPreview { get; }

Property Value

string

IsEditable

Flag which defines whether the catalog entry is editable

public bool IsEditable { get; }

Property Value

bool

Name

Name of the material. Has to be unique if material shall be stored into a catalog.

public string Name { get; set; }

Property Value

string

ParameterRunParameters

public property to get the parameters used for parameter run

public abstract List<Parameter> ParameterRunParameters { get; }

Property Value

List<Parameter>

ReferenceMaterial

Get and set the reference material the relative refractive indices are related to (usually air). If a new reference material is set, this material is set to relatively defined refractive indices.

public Material? ReferenceMaterial { get; set; }

Property Value

Material

StateOfMatter

State of matter of this material

public StateOfMatter StateOfMatter { get; set; }

Property Value

StateOfMatter

Methods

Clone()

Create deep copy of object

public override object Clone()

Returns

object

the cloned object

Edit()

Calls the edit dialog of the catalog entry.

public abstract bool Edit()

Returns

bool

TRUE: Editing was successful.

Equals(object, EqualityIntent)

Determines whether two materials are equal, i.e. whether all properties have the same value.

public override bool Equals(object obj, EqualityIntent equalityIntent)

Parameters

obj object

The material to compare with this material.

equalityIntent EqualityIntent

Defines what kind of equality you want to check when comparing two objects, for example all values or physical equality.

Returns

bool

True if the properties and variables of both materials are equal.

GetAbsorptionCoeff(double)

Returns the absorption for the specified wavelength. If no absorption for this Wavelength is defined an ArgumentException is thrown.

public abstract double GetAbsorptionCoeff(double wavelength)

Parameters

wavelength double

Wavelength for that the absorption should be returned.

Returns

double

Absorption for this wavelength.

GetAbsorptionMinMaxWavelength(out double, out double)

Returns minimum and maximum Wavelength for that a absorption is available.

public abstract void GetAbsorptionMinMaxWavelength(out double minWavelength, out double maxWavelength)

Parameters

minWavelength double

Minimum Wavelength.

maxWavelength double

Maximum Wavelength.

GetComplexRefractiveIndex(double, double, double)

Returns the absolutely defined complex refractive index for the given wavelength.

public Complex GetComplexRefractiveIndex(double vacuumWavelength, double temperatureInDegrees, double pressureInPascal)

Parameters

vacuumWavelength double

The vacuum wavelength needed for the calculation of the refractive index.

temperatureInDegrees double

Temperature to get the index for.

pressureInPascal double

Pressure to get the index for.

Returns

Complex

The complex refractive index

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

GetMinMaxWavelength(out double, out double)

Returns the valid min/max wavelength of the medium.

public void GetMinMaxWavelength(out double minWavelength, out double maxWavelength)

Parameters

minWavelength double

Returns the larger wavelength of both the minimum wavelength for refractive indices and absorption coefficients.

maxWavelength double

Returns the smaller wavelength of both the maximum wavelength for refractive indices and absorption coefficients.

GetRealRefractiveIndex(double, bool, double, double)

Returns the absolutely defined (!) refractive index for the specified Wavelength. If there is no refractive index for the given vacuum wavelength, an ArgumentException is thrown.

public double GetRealRefractiveIndex(double vacuumWavelength, bool checkForValidWavelengthRange, double temperatureInDegrees, double pressureInPascal)

Parameters

vacuumWavelength double

Vacuum wavelength the refractive index should be returned for.

checkForValidWavelengthRange bool

If false, no check is done whether the wavelength is valid. This option should ever be true, except for the case of calculating the vacuum wavelength, where a stack overflow has to be avoided.

temperatureInDegrees double

The temperature in degrees Celsius to calculate the refractive index for.

pressureInPascal double

The pressure in pascals to calculate the refractive index for.

Returns

double

Refractive index for this wavelength.

GetRealRefractiveIndex(double, double, double)

Returns the absolutely defined refractive index for the specified Wavelength. Is no refractive index for this Wavelength given, an ArgumentException is thrown.

public double GetRealRefractiveIndex(double vacuumWavelength, double temperatureInDegrees, double pressureInPascal)

Parameters

vacuumWavelength double

Vacuum wavelength the refractive index should be returned for.

temperatureInDegrees double

The temperature in degrees Celsius to calculate the refractive index for.

pressureInPascal double

The pressure in pascals to calculate the refractive index for.

Returns

double

Refractive index for this wavelength.

GetRealRefractiveIndexAsDefined(double, bool, double, double, double)

Returns the refractive index relative to air for the specified wavelength. Is no refractive index for this wavelength defined an ArgumentException is thrown.

public abstract double GetRealRefractiveIndexAsDefined(double wavelength, bool checkForValidWavelengthRange = true, double vacuumWavelengthIfKnown = 0, double temperatureInDegrees = 20, double pressureInPascal = 101325)

Parameters

wavelength double

Wavelength (as measured in reference material) for that the refractive index should be returned.

checkForValidWavelengthRange bool

If false, no check is done whether the wavelength is valid. This option should ever be true, except for the case of calculating the vacuum wavelength, where a stack overflow has to be avoided.

vacuumWavelengthIfKnown double

If known and checkForValidWavelengthRange == true, the vacuum wavelength must not be calculated again for checking the valid wavelength range.

temperatureInDegrees double

The temperature in degrees Celsius to calculate the refractive index for.

pressureInPascal double

The pressure in pascals to calculate the refractive index for.

Returns

double

Refractive index for this wavelength.

GetRealRefractiveIndexMinMaxWavelength(out double, out double, bool)

Returns wavelength range for that a refractive index is available. If giveVacuumWavelengths is true, the values are vacuum wavelengths, otherwise they refer to the reference material.

public abstract void GetRealRefractiveIndexMinMaxWavelength(out double minWavelength, out double maxWavelength, bool giveVacuumWavelengths)

Parameters

minWavelength double

Minimum Wavelength.

maxWavelength double

Maximum Wavelength.

giveVacuumWavelengths bool

If true, the wavelength range of the reference material's refractive index will be considered, and vacuum wavelengths will be returned. If the material is defined absolutely, the parameter will be ignored.

GetRealRefractiveIndexWavelengthRange(bool)

Gets the valid wavelength range for calculating real refractive indices.

public PhysicalValueRange GetRealRefractiveIndexWavelengthRange(bool giveVacuumWavelengths = true)

Parameters

giveVacuumWavelengths bool

If true, the wavelength range of the reference material's refractive index will be considered, and vacuum wavelengths will be returned. If the material is defined absolutely, the parameter will be ignored. This optional parameter is true by default.

Returns

PhysicalValueRange

The valid wavelength range of the medium.

GetTemperatureInducedRefractiveIndexChange(double, double, double)

Method which calculates the change in the real refractive index which is caused by a temperature difference (between the application temperature and the measurement temperature).

public double GetTemperatureInducedRefractiveIndexChange(double temperatureInDegrees, double refractiveIndexAtStandardConditions, double vacuumWavelength)

Parameters

temperatureInDegrees double

Application temperature in degrees Celsius.

refractiveIndexAtStandardConditions double

The refractive index at standard (i.e. measurement) conditions.

vacuumWavelength double

The vacuum wavelength to get the refractive index for.

Returns

double

The refractive index change.

GetWavelengthRange()

Gets the allowed wavelength range which is the intersection of the allowed wavelength range for the real part of the refractive index and for the absorption index.

public PhysicalValueRange GetWavelengthRange()

Returns

PhysicalValueRange

The allowed wavelength range of the material. Null if the two wavelength ranges do not overlap.

IsConsistent(out ArrayList)

Virtual method to check the consistency of the material

public virtual bool IsConsistent(out ArrayList messageList)

Parameters

messageList ArrayList

Array of ConsistenyErrorOrWarning objects

Returns

bool

True if there is no error