FortranDllService(T).ComputeCollapseMudWeights Method

Fortran DLL Wrapper

FortranDllServiceTComputeCollapseMudWeights Method

Computes collapse mud weights.

Namespace:  FortranWrapper
Assembly:  FortranWrapper (in FortranWrapper.dll) Version: 1.0.1.0 (1.0.1.0)
Syntax
public double[] ComputeCollapseMudWeights(
	T model,
	FailureCriterion criterion = FailureCriterion.MohrCoulomb,
	IProgress<int> progress = null,
	int progressInterval = 10
)
Public Function ComputeCollapseMudWeights ( 
	model As T,
	Optional criterion As FailureCriterion = FailureCriterion.MohrCoulomb,
	Optional progress As IProgress(Of Integer) = Nothing,
	Optional progressInterval As Integer = 10
) As Double()
public:
array<double>^ ComputeCollapseMudWeights(
	T model, 
	FailureCriterion criterion = FailureCriterion::MohrCoulomb, 
	IProgress<int>^ progress = nullptr, 
	int progressInterval = 10
)
member ComputeCollapseMudWeights : 
        model : 'T * 
        ?criterion : FailureCriterion * 
        ?progress : IProgress<int> * 
        ?progressInterval : int 
(* Defaults:
        let _criterion = defaultArg criterion FailureCriterion.MohrCoulomb
        let _progress = defaultArg progress null
        let _progressInterval = defaultArg progressInterval 10
*)
-> float[] 

Parameters

model
Type: T
Simulation model contains parameters required for running.
criterion (Optional)
Type: FortranWrapperFailureCriterion
Failure criterion.
progress (Optional)
Type: FortranWrapperIProgressInt32
Provider for progress updates.
progressInterval (Optional)
Type: SystemInt32
Progress interval - number of data points processed in between two progress reports.

Return Value

Type: Double
An array of collapse mud weights sorted in the order of data points in model. Unit: kg/m^3.
Examples
Compute Collapse Mud Weights
            var model = new ElasticModel()
            {
                WellboreGeometry = new WellboreGeometry()
                {
                    TVD = new double[] { 800, 900, 1000, 1000, 1100, 1200, 1200, 1300, 1400, 1400, 1500, 1600, 1600, 1700, 1800, 1800, 1900, 2000 },
                    BoreholeRadius = new double[] { 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16 },
                    Inclination = new double[] { 0, 20, 25, 20, 30, 28, 30, 24, 17, 24, 15, 22, 15, 28, 35, 28, 40, 45 },
                    Azimuth = new double[] { 0, 10, 20, 10, 30, 40, 30, 50, 60, 50, 70, 80, 70, 90, 100, 90, 110, 120 }
                },
                BoreholeCondition = new BoreholeCondition[] { BoreholeCondition.Impermeable, BoreholeCondition.Impermeable, BoreholeCondition.Impermeable, BoreholeCondition.Permeable, BoreholeCondition.Permeable, BoreholeCondition.Permeable,
BoreholeCondition.Impermeable, BoreholeCondition.Impermeable, BoreholeCondition.Impermeable, BoreholeCondition.Permeable, BoreholeCondition.Permeable, BoreholeCondition.Permeable,
BoreholeCondition.Permeable, BoreholeCondition.Permeable, BoreholeCondition.Permeable, BoreholeCondition.Impermeable, BoreholeCondition.Impermeable, BoreholeCondition.Impermeable },
                StressGradients = new StressGradients()
                {
                    OverburdenStressGradient = new double[] { 24, 24, 24, 26, 26, 26, 25, 25, 25, 27, 27, 27, 28, 28, 28, 29, 29, 29 },
                    MaxHorizontalStressGradient = new double[] { 23, 23, 23, 21.5, 21.5, 21.5, 24.5, 24.5, 24.5, 25, 25, 25, 22, 22, 22, 23, 23, 23 },
                    MinHorizontalStressGradient = new double[] { 18, 18, 18, 18.5, 18.5, 18.5, 19, 19, 19, 16.5, 16.5, 16.5, 17.5, 17.5, 17.5, 17, 17, 17 },
                    MaxHorizontalStressAzimuth = new double[] { 0, 0, 0, 10, 10, 10, 20, 20, 20, 30, 30, 30, 40, 40, 40, 50, 50, 50 },
                    PorePressureGradient = new double[] { 9.8, 9.8, 9.8, 10.7, 10.7, 10.7, 10.2, 10.2, 10.2, 10.1, 10.1, 10.1, 10.5, 10.5, 10.5, 10.6, 10.6, 10.6 },
                },
                MechanicalProperties = new MechanicalProperties()
                {
                    YoungModulusInIsotropicPlane = new double[] { 1800, 1800, 1800, 1900, 1900, 1900, 1850, 1850, 1850, 2200, 2200, 2200, 2400, 2400, 2400, 2900, 2900, 2900 },
                    PoissonRatioInIsotropicPlane = new double[] { 0.3, 0.3, 0.3, 0.21, 0.21, 0.21, 0.32, 0.32, 0.32, 0.28, 0.28, 0.28, 0.25, 0.25, 0.25, 0.22, 0.22, 0.22 },
                },
                FailureProperties = new FailureProperties()
                {
                    Cohesion = new double[] { 7, 7, 7, 8, 8, 8, 12, 12, 12, 9, 9, 9, 6, 6, 6, 8.5, 8.5, 8.5 },
                    FrictionAngle = new double[] { 15, 15, 15, 14, 14, 14, 20, 20, 20, 12, 12, 12, 19, 19, 19, 11, 11, 11 },
                    BreakOutAngle = new double[] { 0, 0, 0, 5, 5, 5, 10, 10, 10, 8, 8, 8, 10, 10, 10, 0, 0, 0 },
                    TensileStrength = new double[] { 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5 },
                    RadialRatio = new double[] { 1, 1, 1, 1.05, 1.05, 1.05, 1.1, 1.1, 1.1, 1.08, 1.08, 1.08, 1.2, 1.2, 1.2, 1.15, 1.15, 1.15 }
                }
            };
            var progress = new FortranWrapper.Progress<int>(i => Debug.WriteLine("Progress: {0}", i));
            var expectedMWs = new double[] { 1324.960205, 1434.374878, 1513.297241, 1261.447754, 1480.377197, 1537.946655,
                859.5744629, 939.8915405, 1014.03064, 2755.102295, 2755.102295, 2755.102051,
                2857.143066, 2857.143066, 2857.142822, 2959.183594, 2959.183838, 2959.183838 };
            var dllService = new FortranDllService<IElasticModel>();
            var actualMWs = dllService.ComputeCollapseMudWeights(model, FailureCriterion.MohrCoulomb, progress, progressInterval: 5);
            var eps = 1E-5; // tolerance epsilon
            Assert.IsTrue(expectedMWs.Length == actualMWs.Length);
            for (int i = 0; i < expectedMWs.Length; i++)
            {
                var diff = Math.Abs(expectedMWs[i] - actualMWs[i]);
                Assert.IsTrue(diff <= eps, 
                    string.Format("i = {0}, expected = {1}, actual = {2}, diff = {3}", i, expectedMWs[i], actualMWs[i], diff));
            }
See Also