MadsKirkFoged / SharpFluids

Lightweight CoolProp C# Wrapper - for easy fluid properties lookups
MIT License
30 stars 9 forks source link

Store FluidList on instantiation? #6

Closed wiwalsh closed 4 years ago

wiwalsh commented 4 years ago

It would be nice to have a property that contains the FluidList in the object Fluid when Fluid is created. It looks like all that happens is the FluidList in the ctor is used to set up the AbstractState.factory. Any reason this can't be stored in a property?

MadsFoged commented 4 years ago

I guess it could be - What do we gain from putting it in a property?

wiwalsh commented 4 years ago

Once you create an instance of type Fluid, how do you identify the Fluid Name when it is passed off somewhere else? Maybe I missed a property or method somewhere.

MadsFoged commented 4 years ago

When you create a new fluid like this: Refrigerant Input = new Refrigerant(SharpFluids.FluidList.Ammonia);

It stores the fluidtype in Input.Media

Its name is found in Input.Media.InternalName

Was that what you were looking for?

wiwalsh commented 4 years ago

For now I think this works. I'll re-open if I run into issues.