예제 #1
0
        public static RefHTCandDPResult HTCandDP(string[] fluid, double[] composition, double d, double g, double p, double x, double l, double q, double zh, double zdp)
        {
            //Main function for 2-phase flow HTC and calculation
            double href   = 0;
            double PressD = 0;

            //*************Smoothening HTC & DP at single-to-2 phase transitions****************
            //********divided to 2 region based on quality (0 - 0.95 - 1) to calculated HTC & DP********
            if (x <= 0.95 && x >= 0)
            {
                href   = RefrigerantTPHTC.Shah_Evap_href(fluid, composition, d, g, p, x, q, l);
                PressD = RefrigerantTPDP.deltap_smooth(fluid, composition, d, g, p, x, l);
            }

            if (x < 1 && x > 0.95) //vapor to 2-phase
            {
                href   = RefrigerantTPHTC.Shah_Evap_href(fluid, composition, d, g, p, 0.95, q, l);
                PressD = RefrigerantTPDP.deltap_smooth(fluid, composition, d, g, p, 0.95, l);
            }

            //********divided to 4 region based on quality (0 - 0.05 - 0.9 - 0.95 - 1) to calculated HTC & DP END********
            href   = href * zh;
            PressD = PressD * zdp;

            return(new RefHTCandDPResult {
                Href = href, DPref = PressD
            });
        }
예제 #2
0
        public static RefHTCandDPResult HTCandDP_2p(string fluid, double d, double g, double p, double x, double l, double q, double zh, double zdp, double hexType, AbstractState coolprop)
        {
            //Main function for 2-phase flow HTC and calculation
            double href   = 0;
            double PressD = 0;
            //********Smoothening HTC & DP at single-to-2 phase transitions********"
            //Use lambda to avoid discontinutities of the two phase-liquid and vapor-two-phase and liquid"
            double            x_transition;
            double            lambdaL = 0;
            double            lambdaV = 0;
            double            h_ref_2phase, deltap_2phase;
            double            beta              = 50; //"Controlling factor for the sharpness of the transition"
            RefHTCandDPResult htc_dp_single_sat = new RefHTCandDPResult();

            if (x <= 0.05 && x >= 0)
            {
                x_transition = 0.05;
                lambdaL      = (1 + Math.Tanh(beta * (x - x_transition))) / 2;
            }
            else if (x < 1 && x > 0.9)
            {
                x_transition = 0.9; //"0.95 for pressure drop"
                lambdaV      = (1 + Math.Tanh(beta * (x - x_transition))) / 2;
            }
            //"********Smoothening HTC & DP at single-to-2 phase transitions END********"

            //*************Smoothening HTC & DP at single-to-2 phase transitions****************
            //********divided to 3 region based on quality (0 - 0.05 - 0.95 - 1) to calculated HTC & DP********
            if (hexType == 0)
            {
                if (x < 0.05 && x > 0)
                {
                    h_ref_2phase = RefrigerantTPHTC.Shah_Evap_href(fluid, d, g, p, x, q, l, coolprop);
                    //href = RefrigerantTPHTC.Kandlikar_Evap_href(fluid, composition, d, g, p, x, q, l);
                    //href = RefrigerantTPHTC.JR_Evap_href(fluid, composition, d, g, p, x, q, l);
                    deltap_2phase = RefrigerantTPDP.deltap_smooth(fluid, d, g, p, x, l, coolprop);
                    //PressD = RefrigerantTPDP.deltap_JR(fluid, composition, d, g, p, x, l);
                    //PressD = RefrigerantTPDP.deltap_MS(fluid, composition, d, g, p, x, l);
                    htc_dp_single_sat = RefrigerantHTCandDP.HTCandDP_1p_sat(fluid, d, g, p, 0, l, coolprop); //x=0
                    href   = (1 - lambdaL) * htc_dp_single_sat.Href + lambdaL * h_ref_2phase;
                    PressD = (1 - lambdaL) * htc_dp_single_sat.DPref + lambdaL * deltap_2phase;
                }
                else if (x <= 0.9)
                {
                    href = RefrigerantTPHTC.Shah_Evap_href(fluid, d, g, p, x, q, l, coolprop);
                    //href = RefrigerantTPHTC.Kandlikar_Evap_href(fluid, composition, d, g, p, x, q, l);
                    //href = RefrigerantTPHTC.JR_Evap_href(fluid, composition, d, g, p, x, q, l);
                    PressD = RefrigerantTPDP.deltap_smooth(fluid, d, g, p, x, l, coolprop);
                    //PressD = RefrigerantTPDP.deltap_JR(fluid, composition, d, g, p, x, l);
                    //PressD = RefrigerantTPDP.deltap_MS(fluid, composition, d, g, p, x, l);
                }
                else //vapor to 2-phase
                {
                    h_ref_2phase = RefrigerantTPHTC.Shah_Evap_href(fluid, d, g, p, x, q, l, coolprop);
                    //href = RefrigerantTPHTC.Kandlikar_Evap_href(fluid, composition, d, g, p, x, q, l);
                    //href = RefrigerantTPHTC.JR_Evap_href(fluid, composition, d, g, p, x, q, l);
                    deltap_2phase = RefrigerantTPDP.deltap_smooth(fluid, d, g, p, x, l, coolprop);
                    //PressD = RefrigerantTPDP.deltap_JR(fluid, composition, d, g, p, x, l);
                    //PressD = RefrigerantTPDP.deltap_MS(fluid, composition, d, g, p, x, l);
                    htc_dp_single_sat = RefrigerantHTCandDP.HTCandDP_1p_sat(fluid, d, g, p, 1, l, coolprop); //x=1
                    href   = (1 - lambdaV) * h_ref_2phase + lambdaV * htc_dp_single_sat.Href;
                    PressD = (1 - lambdaV) * deltap_2phase + lambdaV * htc_dp_single_sat.DPref;
                }
            }
            else
            {
                if (x < 0.05 && x >= 0)
                {
                    h_ref_2phase = RefrigerantTPHTC.Shah_Cond_href(fluid, d, g, p, x, q, l, coolprop);
                    //href = RefrigerantTPHTC.Dobson_Cond_href(fluid, composition, d, g, p, x, Ts, l);//需要考虑Ts的参数传递
                    deltap_2phase = RefrigerantTPDP.deltap_smooth(fluid, d, g, p, x, l, coolprop);
                    //PressD = RefrigerantTPDP.deltap_JR(fluid, composition, d, g, p, x, l);
                    //PressD = RefrigerantTPDP.deltap_MS(fluid, composition, d, g, p, x, l);
                    htc_dp_single_sat = RefrigerantHTCandDP.HTCandDP_1p_sat(fluid, d, g, p, 0, l, coolprop); //x=0
                    href   = (1 - lambdaL) * htc_dp_single_sat.Href + lambdaL * h_ref_2phase;
                    PressD = (1 - lambdaL) * htc_dp_single_sat.DPref + lambdaL * deltap_2phase;
                }
                else if (x <= 0.9)
                {
                    href = RefrigerantTPHTC.Shah_Cond_href(fluid, d, g, p, x, q, l, coolprop);
                    //href = RefrigerantTPHTC.Dobson_Cond_href(fluid, composition, d, g, p, x, Ts, l);//需要考虑Ts的参数传递
                    PressD = RefrigerantTPDP.deltap_smooth(fluid, d, g, p, x, l, coolprop);
                    //PressD = RefrigerantTPDP.deltap_JR(fluid, composition, d, g, p, x, l);
                    //PressD = RefrigerantTPDP.deltap_MS(fluid, composition, d, g, p, x, l);
                }
                else //vapor to 2-phase
                {
                    h_ref_2phase = RefrigerantTPHTC.Shah_Cond_href(fluid, d, g, p, x, q, l, coolprop);
                    //href = RefrigerantTPHTC.Dobson_Cond_href(fluid, composition, d, g, p, x, Ts, l);//需要考虑Ts的参数传递
                    deltap_2phase = RefrigerantTPDP.deltap_smooth(fluid, d, g, p, x, l, coolprop);
                    //PressD = RefrigerantTPDP.deltap_JR(fluid, composition, d, g, p, x, l);
                    //PressD = RefrigerantTPDP.deltap_MS(fluid, composition, d, g, p, x, l);
                    htc_dp_single_sat = RefrigerantHTCandDP.HTCandDP_1p_sat(fluid, d, g, p, 1, l, coolprop); //x=1
                    href   = (1 - lambdaV) * h_ref_2phase + lambdaV * htc_dp_single_sat.Href;
                    PressD = (1 - lambdaV) * deltap_2phase + lambdaV * htc_dp_single_sat.DPref;
                }
                //********divided to 3 region based on quality (0 - 0.05 - 0.95 - 1) to calculated HTC & DP END********
            }

            href   = href * zh;
            PressD = PressD * zdp;

            return(new RefHTCandDPResult {
                Href = href, DPref = PressD
            });
        }