/// <summary> /// The expression of dimensionless line source solution pressure of infinite homogeneous reservoir. /// </summary> /// <param name="td">dimensionless time</param> /// <param name="rd">dimensionless radius</param> /// <returns>System.Double.</returns> public static double Pd(double td, double rd) { Condition.Requires(td, nameof(td)).IsGreaterOrEqual(0.0); Condition.Requires(rd, nameof(rd)).IsGreaterOrEqual(0.0); return(-0.5 * ExponentialIntegral.Evaluate(-rd * rd / (4 * td))); }
/// <summary> /// Dimensionless bottom hole pressure affected by outer boundary. Boundary type - Linear Constant Pressure. Dimensionless line source solution pressure of infinite homogeneous reservoir, which is a function in the principle of superposition. /// </summary> /// <param name="td">dimensionless time</param> /// <param name="Ld">dimensionless distance to fault</param> /// <returns>System.Double.</returns> public static double PwDbLinearConstantPressure(double td, double Ld) { Condition.Requires(td, nameof(td)).IsGreaterOrEqual(0.0); Condition.Requires(Ld, nameof(Ld)).IsGreaterThan(0.0); return(0.5 * ExponentialIntegral.Evaluate(-Ld * Ld / td)); }
/// <inheritdoc /> public override double PwDb(double td) { return(+0.5 * ( +ExponentialIntegral.Evaluate(-_ld1 * _ld1 / td) + ExponentialIntegral.Evaluate(-_ld2 * _ld2 / td) + ExponentialIntegral.Evaluate(-(_ld1 * _ld1 + _ld2 * _ld2) / td) )); }
/// <summary> /// Dimensionless bottom hole pressure affected by outer boundary. Boundary type - Perpendicular Constant Pressures. Dimensionless line source solution pressure of infinite homogeneous reservoir, which is a function in the principle of superposition. /// </summary> /// <param name="td">dimensionless time</param> /// <param name="Ld1">dimensionless distance to fault 1</param> /// <param name="Ld2">dimensionless distance to fault 2</param> /// <returns>System.Double.</returns> public static double PwDbPerpendicularConstantPressures(double td, double Ld1, double Ld2) { Condition.Requires(td, nameof(td)).IsGreaterOrEqual(0.0); Condition.Requires(Ld1, nameof(Ld1)).IsGreaterThan(0.0); Condition.Requires(Ld2, nameof(Ld2)).IsGreaterThan(0.0); return(0.5 * ( +ExponentialIntegral.Evaluate(-Ld1 * Ld1 / td) + ExponentialIntegral.Evaluate(-Ld2 * Ld2 / td) + ExponentialIntegral.Evaluate(-(Ld1 * Ld1 + Ld2 * Ld2) / td) )); }
public void EvaluateTest() { var error = 1e-5; ExponentialIntegral.Evaluate(-100).ShouldEqual(-3.68359776168203e-46, error); ExponentialIntegral.Evaluate(-10).ShouldEqual(-4.15696892968532e-6, error); ExponentialIntegral.Evaluate(-5).ShouldEqual(-0.00114829559127532, error); ExponentialIntegral.Evaluate(-1).ShouldEqual(-0.21938393439552, error); ExponentialIntegral.Evaluate(-0.1).ShouldEqual(-1.82292, error); ExponentialIntegral.Evaluate(-0.01).ShouldEqual(-4.03793, error); ExponentialIntegral.Evaluate(-0.001).ShouldEqual(-6.33154, error); ExponentialIntegral.Evaluate(0.001).ShouldEqual(-6.32954, error); ExponentialIntegral.Evaluate(0.1).ShouldEqual(-1.62281, error); ExponentialIntegral.Evaluate(1).ShouldEqual(1.89511781635593, error); ExponentialIntegral.Evaluate(2).ShouldEqual(4.954234, error); ExponentialIntegral.Evaluate(10).ShouldEqual(2492.22897624187, error); (1e-41 * ExponentialIntegral.Evaluate(100)).ShouldEqual(2.71555274485388, error); }
/// <inheritdoc /> public override double PwDb(double td) { return(0.5 * ExponentialIntegral.Evaluate(-_ld * _ld / td)); }