예제 #1
0
        private LineSeries GetDirPwdR2Series(double skin, double cd)
        {
            Func <double, double> f = (x) => InfiniteHomogenousReservoir2.PwdRDerivative(x, cd, skin);
            var dp = GetXValues().Select(c => new DataPoint(c, f(c)));
            var ls = new LineSeries()
            {
                Title = $"DirPwdR2 Skin={skin} CD={cd}"
            };

            ls.Points.AddRange(dp);
            return(ls);
        }
예제 #2
0
        public void PwdR2_and_DirPwdR2_PwDbLinearSealingFault()
        {
            if (!Debugger.IsAttached)
            {
                return;
            }

            var pm = new PlotModel()
            {
                Title = nameof(PwdR2_and_DirPwdR2_PwDbLinearSealingFault)
            };;

            pm.Axes.Add(new LogarithmicAxis()
            {
                Position = AxisPosition.Bottom, AbsoluteMinimum = 0.001
            });
            pm.Axes.Add(new LogarithmicAxis()
            {
                Position = AxisPosition.Left, AbsoluteMinimum = 0.001
            });
            pm.LegendPlacement = LegendPlacement.Outside;

            var cd   = 50;
            var skin = 5;
            var Ld   = 500;

            Func <double, double> f1 = (x) => InfiniteHomogenousReservoir2.PwdR(x, cd, skin) +
                                       OuterBoundaries.PwDbLinearSealingFault(x, Ld);
            var dp1 = GetXValues().Select(c => new DataPoint(c / cd, f1(c) / cd));
            var ls1 = new LineSeries()
            {
                Title = $"PwdR2 Skin={skin} CD={cd}"
            };

            ls1.Points.AddRange(dp1);
            pm.Series.Add(ls1);


            Func <double, double> f2 = (x) => InfiniteHomogenousReservoir2.PwdRDerivative(x, cd, 0)
                                       + OuterBoundaries.PwDbLinearSealingFaultDerivative(x, Ld);

            var dp2 = GetXValues().Select(c => new DataPoint(c / cd, f2(c) / cd));
            var ls2 = new LineSeries()
            {
                Title = $"PwdRDerivative Skin={skin} CD={cd}"
            };

            ls2.Points.AddRange(dp2);

            pm.Series.Add(ls2);

            ShowPlot(pm);
        }