Sage Modeling and Simulation Library

Substance Members

The Substance type exposes the following members.

Constructors


  Name Description
Public method Substance(MaterialType, Double, Double, MaterialState)
Initializes a new instance of the Substance class.
Public method Substance()()()()
Initializes a new instance of the Substance class.

Methods


  Name Description
Public method Add
Adds the specified substance to this substance. Both substances must be of the same material type, or an exception will fire.
Public method AddEnergy
Adds the specified number of joules of energy to the mixture.
Public method Static member ApplyMaterialSpecs
Applies the material specs.
Public method ClearMaterialSpecs
Clears the material specification collection.
Public method Clone
Clones this instance.
Public method ConvertMaterialSpec
Converts the entire portion of a substance that is one material spec to another material spec.
Public method DeserializeFrom
Reconstitutes this object from the specified XmlSerializationContext.
Public method Equals(ISupportsMementos)
Ascertains equality between this one and the other one.
Public method Equals(System.Object)
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected method Finalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public method GetEstimatedBoilingPoint
Estimates a boiling point for the substance.
Public method GetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public method GetMaterialSpec
Gets the mass, from this substance, of the provided material specification.
Public method GetMaterialSpecs
Gets the material specification collection.
Public method GetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected method MemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public method Remove(Substance)
Removes the specified substance from this substance. Both substances must be of the same material type, or an exception will fire..
Public method Remove(Double)
Removes the specified mass from this substance.
Public method ResumeChangeEvents
Resumes the change events. When change events are resumed, one change event will be fired if the material has changed. This prevents a cascade of change events that would be issued, for example during the processing of a reaction.
Public method SerializeTo
Stores this object to the specified XmlSerializationContext.
Public method SetMaterialSpec
Sets the material spec of the substance. Call this only once on any given substance. See the tech note on Material Specifications. If you have multiple specifications to set, call SetMaterialSpecs.
Public method SetMaterialSpecs
A non-'empty' guid in the collection applies that guid to the whole mass of this substance. A dictionaryEntry with a guid for a key and a double for a value assumes the double to be a mass, and the guid to be a spec, and assigns that spec to the specfied quantiy (mass) of material.
Public method SuspendChangeEvents
Suspends the issuance of change events. When change events are resumed, one change event will be fired if the material has changed. This prevents a cascade of change events that would be issued, for example during the processing of a reaction. See Mixture..::..MaterialChangeDistiller.
Public method ToString()()()()
Returns a String that represents the current Mixture.
Public method ToString(String, String)
Returns a String that represents the current IMaterial. Uses caller-supplied format strings in forming the numbers representing mass and temperature.
Public method ToStringWithoutTemperature()()()()
Returns a String that represents the current IMaterial.
Public method ToStringWithoutTemperature(String)
Returns a String that represents the current IMaterial.

Operators


  Name Description
Public operator Static member Explicit Narrowing Explicit Explicit Explicit (Substance to WriteLock)
Performs an explicit conversion from Substance to WriteLock.

Fields


  Name Description
Public field Static member DefaultMassFormatString
The default mass format string. This can be changed by client code to default to lesser or greater format precision.

Properties


  Name Description
Public property Static member ByMass
A comparer that compares this substance with another substance only by mass. Useful for sorting mixture contents.
Public property Static member ByMassThenName
A comparer that compares this substance with another substance by mass and then name. Useful for sorting mixture contents.
Public property Density
Gets the density of the material in kilograms per liter.
Public property HasChanged
Reports whether the object has changed relative to its memento since the last memento was recorded.
Public property IsWritable
Indicates if write operations on this equipment are permitted.
Public property LatentHeatOfVaporization
Latent heat of vaporization - the heat energy required to vaporize one kilogram of this material. (J/kg)
Public property Mass
Gets the mass of the material in kilograms.
Public property MaterialType
Gets the type of the material.
Public property Memento
Retrieves a memento from the substance, or reconstitutes it from a memento.
Public property Moles
Gets the number of moles of the substance. This requires that Molecular Weight be set in the appropriate material type.
Public property Name
The user-friendly name for this object.
Public property ReportsOwnChanges
Indicates whether this object can report memento changes to its parent. (Mementos can contain other mementos.)
Public property SpecificHeat
Gets the specific heat of the mixture, in Joules per kilogram degree-K.
Public property State
Gets or sets the material state of the substance.
Public property Tag
Gets or sets the tag, which is a user-supplied data element.
Public property Temperature
Gets or sets the temperature in degrees Celsius (internally, temperatures are stored in degrees Kelvin.)
Public property Volume
Gets the volume of the material in liters.

Events


  Name Description
Public event MaterialChanged
Fired after a material has changed its mass, constituents or temperature.
Public event MementoChangeEvent
This event is fired when the memento contents will have changed. This does not imply that the memento has changed, since the memento is recorded, typically, only on request. It does imply that if you ask for a memento, it might be in some way different from any memento you might have previously acquired.