Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Environmental Reference type for Temperature and Pressure References #741

Closed
sequc82 opened this issue Jan 21, 2020 · 2 comments
Closed

Comments

@sequc82
Copy link
Contributor

sequc82 commented Jan 21, 2020

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.

@angularsen
Copy link
Owner

angularsen commented Jan 21, 2020

Please see some background on UnitSystem. It was an experimental feature in v4 that we later found to have design flaws for basically any other unit system than SI, so we have some ideas on how to change that for v5.

#630 (PR trying to map CGS and FPS unit systems, failed)
#651
#666
#709 (PR trying to repurpose UnitSystem)

@stale
Copy link

stale bot commented Mar 21, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 21, 2020
@stale stale bot closed this as completed Mar 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants