public static string Map(CapeOpenThermoMaterialPropertyType type) { switch (type) { case CapeOpenThermoMaterialPropertyType.Fraction: return("Fraction"); case CapeOpenThermoMaterialPropertyType.Pressure: return("pressure"); case CapeOpenThermoMaterialPropertyType.Temperature: return("temperature"); case CapeOpenThermoMaterialPropertyType.TotalFlow: return("totalFlow"); case CapeOpenThermoMaterialPropertyType.Volume: return("volume"); case CapeOpenThermoMaterialPropertyType.Enthalpy: return("enthalpy"); default: throw new CapeOpenException(); } }
public void CalculateProperty(CapeOpenThermoMaterialPropertyType property, CapeOpenPhaseType phase, CapeOpenCalculationType calculationType) { string[] zType = new string[1]; zType[0] = CapeOpenThermoMaterialPropertyTypeHelper.Map(property); string[] zPhase = new string[1]; zPhase[0] = CapeOpenPhaseTypeHelper.Map(phase); string zCalculationType = CapeOpenCalculationTypeHelper.Map(calculationType); //mConnectedObject.CalcProp(CapeOpenThermoMaterialPropertyTypeHelper.Map(property), CapeOpenPhaseTypeHelper.Map(phase), "Mixture"); if (calculationType != CapeOpenCalculationType.Nothing) { mConnectedObject.CalcProp(zType, zPhase, zCalculationType); } else { mConnectedObject.CalcProp(zType, zPhase, null); } }