Ejemplo n.º 1
0
 //计算在指定过冷度的情况下,保证制冷剂不汽化而允许的最大压降。
 static void CalMaxPDrop(Refrigerant r, double deltaT)
 {
     r.Name = "R410A";
     r.CurrentUnitSystem = UnitSystems.SIwithC;
     double satP, Tsub, deltaP;
     for (int i = 0; i < 60; i++)
     {
         satP = r.Func_P("TQ", i, 0);
         Tsub = i - deltaT;
         deltaP = satP - r.Func_P("TQ", Tsub, 0);
         Console.WriteLine("{0}", deltaP);
     }
 }
Ejemplo n.º 2
0
 //private Refrigerant(string refrigerantName)
 //    : this(refrigerantName, ReferenceState.DEF, UnitSystems.Refprop) { }
 //private Refrigerant(string refrigerantName, UnitSystems currentUnits)
 //    : this(refrigerantName, ReferenceState.DEF, currentUnits) { }
 public static Refrigerant GetInstance(string refrigerantName, ReferenceState? reference = ReferenceState.DEF, UnitSystems currentUnits = UnitSystems.SI)
 {
     if (_instance == null)
     {
         lock (_lockHelper)
         {
             if (_instance == null)
             {
                 _instance = new Refrigerant(refrigerantName, reference, currentUnits);
             }
         }
     }
     else
     {
         _instance.Name = refrigerantName;
         if (reference != null) _instance.Reference = reference;
         _instance.CurrentUnitSystem = currentUnits;
     }
     return _instance;
 }