Skip to content

Add Environmental Reference type for Temperature and Pressure References #741

Closed
@sequc82

Description

@sequc82

The issue first presented itself in #422 where a reference pressure was needed to convert gauge, absolute and vacuum pressures. It was resolved in #422 with a public property ReferencePressure.AtmosphericPressure. It has come up again in #724 when discussing another wrapper type ReferenceVolumeFlow, but in this case both the atmospheric Temperature and Pressure.

Create an EnvironmentalReference type, which would be accessible at a level similar to UnitSystem.

For Example:

public enum StandardReference
{
    StandardUS,
    StandardISO,
    StandardAGA,
    Normal,
    Custom
}

public struct EnvironmentalReference
{
	public EnvironmentalReference(Pressure p, Temperature t, double RelativeHumidity)
    {
		/*Assign properties here*/
    }
	
	public static Dictionary<StandardReference, EnvironmentalReference> StandardReferences { get; } = new Dictionary<StandardReference, EnvironmentalReference>()
        {
            {StandardReference.StandardUS, new EnvironmentalReference(Pressure.FromPoundsForcePerSquareInch(14.696), Temperature.FromDegreesFahrenheit(60), 0)},
			/*Define subsequent StandardReferences here*/
        };
{

I'm still trying to understand the usage and storage of UnitSystem, but I would think EnvironmentalReferencewould be similar toUnitSystem, with the STP conditions being similar to BaseUnits, and the DictionaryofStandardReferencewould be similar toUnitSystem.SIif it stored a collection ofUnitSystem` instead of only SI.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions