DNVGL RP-O501 REST Api
API change historyEROSIVE WEAR IN PIPING SYSTEMS
Calculates erosion in mm/ton sand and mm/year for a set of components (Line object) and a single flow condition. Mixture velocity is also returned.
REQUEST SCHEMA: LineBasicStreamTimeSeries
Consult the examples and sub-schemas for details on how the various components are defined.
Try itRequest
Request URL
Request headers
-
(optional)stringMedia type of the body sent to the API.
Request body
LineBasicStreamTimeSeries
{
"FluidStream": {
"Densities": [
423,
512,
389,
407.3333333,
390.3333333,
373.3333333,
356.3333333,
236.4444444,
252.9444444,
269.4444444,
285.9444444,
302.4444444,
368,
237.3333333,
401
],
"Viscosities": [
1.00E-04,
1.30E-04,
1.20E-04,
1.37E-04,
1.47E-04,
1.57E-04,
1.67E-04,
1.77E-04,
1.87E-04,
1.97E-04,
2.07E-04,
2.17E-04,
2.27E-04,
2.37E-04,
2.47E-04
],
"TimeSeries": [
"01/04/2019",
"01/05/2019",
"01/06/2019",
"01/07/2019",
"01/08/2019",
"01/09/2019",
"01/10/2019",
"01/11/2019",
"01/12/2019",
"01/01/2020",
"01/02/2020",
"01/03/2020",
"01/04/2020",
"01/05/2020",
"01/06/2020"
],
"VolumetricRates": [
0.41,
0.49,
0.3,
0.42,
0.365,
0.349,
0.333,
0.317,
0.301,
0.285,
0.269,
0.253,
0.237,
0.221,
0.205
]
},
"ParticleStream": {
"ParticleDiameter": 50,
"TimeSeries": [
"01/04/2019",
"01/05/2019",
"01/06/2019",
"01/07/2019",
"01/08/2019",
"01/09/2019",
"01/10/2019",
"01/11/2019",
"01/12/2019",
"01/01/2020",
"01/02/2020",
"01/03/2020",
"01/04/2020",
"01/05/2020",
"01/06/2020"
],
"ParticleMassFlowRates": [
0,
8.26388888888889E-05,
3.14814814814815E-05,
3.73842592592593E-05,
1.57407407407407E-05,
0,
1.18055555555556E-05,
2.55787037037037E-05,
6.09953703703704E-05,
6.2962962962963E-05,
4.72222222222222E-05,
2.55787037037037E-05,
4.13194444444444E-05,
2.95138888888889E-05,
4.72222222222222E-05
],
"ErosiveAgent": {
"Name": "Quartz",
"Density": 2650,
"ReductionFactor": 1
}
},
"Line": {
"Tag": "BC-USC",
"ServiceLife": 20,
"Components": {
"Bends": [
{
"Material": {
"Name": "CarbonSteel",
"AngleDependency": "Ductile",
"Density": 7800,
"K": 0.000000002,
"N": 2.6
},
"Tag": "XMT elbow 5inch",
"GeometryFactor": 2,
"ErosionAllowance": 0.83,
"PipeDiameter": 0.1223,
"RadiusOfCurvature": 3
}
],
"Tees": [
{
"Material": {
"Name": "CarbonSteel",
"AngleDependency": "Ductile",
"Density": 7800,
"K": 0.000000002,
"N": 2.6
},
"Tag": "XMT Tee",
"GeometryFactor": 1,
"ErosionAllowance": 3,
"PipeDiameter": 0.1302
}
]
}
}
}
{
"type": "object",
"properties": {
"fluidStream": {
"type": "object",
"properties": {
"densities": {
"type": "array",
"items": {
"type": "number",
"format": "double"
},
"description": "Array of representative mixture densities of all phases: [kg/m3]",
"nullable": true
},
"viscosities": {
"type": "array",
"items": {
"type": "number",
"format": "double"
},
"description": "Array of representative mixture viscosities of all phases: [Pas]",
"nullable": true
},
"volumetricRates": {
"type": "array",
"items": {
"type": "number",
"format": "double"
},
"description": "Array of volumetric flow rates: [m3/s]",
"nullable": true
},
"timeSeries": {
"type": "array",
"items": {
"type": "string"
},
"description": "Array of timestamps. Several valid formats apply, e.g. \"08/18/2018 07:22:16\", \"8/2018\", \"2018-08-18T07:22:16.0000000-07:00\".\r\nMake sure that all timestamps are arranged in chronological order, as this is required to calculate accumulated erosion.",
"nullable": true
}
},
"additionalProperties": false,
"description": "Similar to the BasicStream specification, except that fluid density, viscosity and flow rate are given as\r\ntime series rather than a single set of values.\r\nNote that rates are given as m3/s rather than m3/day.\r\n \r\nAlso note that the number of data sets, i.e. the length of the density, viscosity, flow rate and TimeSeries\r\narrays must match each other and those of the ParticleStreamTimeSeries object."
},
"particleStream": {
"type": "object",
"properties": {
"particleDiameter": {
"type": "number",
"description": "Representative particle diameter. Typically set to d50 for the particle size distribution: [microns]",
"format": "double",
"nullable": true
},
"particleMassFlowRates": {
"type": "array",
"items": {
"type": "number",
"format": "double"
},
"description": "Array of particle mass flow rates: [g/s]",
"nullable": true
},
"timeSeries": {
"type": "array",
"items": {
"type": "string"
},
"description": "Array of timestamps. Several valid formats apply, e.g. \"08/18/2018 07:22:16\", \"8/2018\", \"2018-08-18T07:22:16.0000000-07:00\".\r\nMake sure that all timestamps are arranged in chronological order, as this is required to calculate accumulated erosion.",
"nullable": true
},
"erosiveAgent": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of predefined erosive agent, or custom name (optional).",
"nullable": true
},
"density": {
"type": "number",
"description": "Density of erosive agent [kg/m3]",
"format": "double",
"nullable": true
},
"reductionFactor": {
"type": "number",
"description": "ReductionFactor [-] Correction factor enabling adjustment of the erosive response based on geometric properties\r\nof the erosive agents. For example, proppants would typically be modelled with ReductionFactor > 1.\r\nA value of 1.0 corresponds to standard RP-O501 models.",
"format": "double",
"nullable": true
}
},
"additionalProperties": false,
"description": "Describes the erosive agent present in a fluid stream.\r\n\r\nTo use predefined erosive agent properties (see separate endpoint), specify the name of the predefined\r\nerosive agent. In this case, the values of Density and ReductionFactor will be ignored,\r\nand the corresponding predefined erosive agent values will be applied.\r\nIf Name does not correspond to a predefined erosive agent, the values of Density, and ReductionFactor must be\r\nspecified."
}
},
"additionalProperties": false,
"description": "Similar to the ParticleStream specification, except that particle mass flow rate is given as time series rather\r\nthan a single set of values.\r\n \r\nPlease note that the number of data sets, i.e. the length of the ParticleMassFlowRates and TimeSeries arrays\r\nmust match each other and those of the fluid stream (BasicStreamTimeSeries or BlackOilStreamTimeSeries)."
},
"line": {
"type": "object",
"properties": {
"tag": {
"type": "string",
"nullable": true
},
"serviceLife": {
"type": "number",
"format": "double",
"nullable": true
},
"components": {
"type": "object",
"properties": {
"bends": {
"type": "array",
"items": {
"type": "object",
"properties": {
"geometryFactor": {
"type": "number",
"description": "Correction factor applied to results in order to account for isometric effects (swirl) [-]",
"format": "double",
"nullable": true
},
"erosionAllowance": {
"type": "number",
"description": "Erosion allowance for component. Used for calculation of relative criticality [mm]",
"format": "double",
"nullable": true
},
"tag": {
"type": "string",
"description": "Component ID",
"nullable": true
},
"material": {
"type": "object",
"properties": {
"angleDependency": {
"enum": [
"Ductile",
"DuctileLegacy",
"Brittle"
],
"type": "string"
},
"name": {
"type": "string",
"description": "Name of predefined target material, or custom name (optional).",
"nullable": true
},
"density": {
"type": "number",
"description": "Density of target material [kg/m3]",
"format": "double",
"nullable": true
},
"k": {
"type": "number",
"description": "Constant of proportionality in RP-O501 response equation",
"format": "double",
"nullable": true
},
"n": {
"type": "number",
"description": "Velocity exponent in RP-O501 response equation",
"format": "double",
"nullable": true
}
},
"additionalProperties": false,
"description": "To use predefined target material properties (see separate endpoint), specify the name of the predefined\r\ntarget material. In this case, the values of AngleDependencyOption, Density, K and N will be ignored,\r\nand the corresponding predefined material values will be applied.\r\nIf Name does not correspond to a predefined target material, the values of AngleDependencyOption Density,\r\nK and N must be specified."
},
"pipeDiameter": {
"type": "number",
"description": "Diameter of pipe [m]",
"format": "double",
"nullable": true
},
"radiusOfCurvature": {
"type": "number",
"description": "Radius of curvature for the pipe, expressed in number of inner diameters [-]",
"format": "double",
"nullable": true
}
},
"additionalProperties": false,
"description": "Bend geometry model definition."
},
"nullable": true
},
"tees": {
"type": "array",
"items": {
"type": "object",
"properties": {
"geometryFactor": {
"type": "number",
"description": "Correction factor applied to results in order to account for isometric effects (swirl) [-]",
"format": "double",
"nullable": true
},
"erosionAllowance": {
"type": "number",
"description": "Erosion allowance for component. Used for calculation of relative criticality [mm]",
"format": "double",
"nullable": true
},
"tag": {
"type": "string",
"description": "Component ID",
"nullable": true
},
"material": {
"type": "object",
"properties": {
"angleDependency": {
"enum": [
"Ductile",
"DuctileLegacy",
"Brittle"
],
"type": "string"
},
"name": {
"type": "string",
"description": "Name of predefined target material, or custom name (optional).",
"nullable": true
},
"density": {
"type": "number",
"description": "Density of target material [kg/m3]",
"format": "double",
"nullable": true
},
"k": {
"type": "number",
"description": "Constant of proportionality in RP-O501 response equation",
"format": "double",
"nullable": true
},
"n": {
"type": "number",
"description": "Velocity exponent in RP-O501 response equation",
"format": "double",
"nullable": true
}
},
"additionalProperties": false,
"description": "To use predefined target material properties (see separate endpoint), specify the name of the predefined\r\ntarget material. In this case, the values of AngleDependencyOption, Density, K and N will be ignored,\r\nand the corresponding predefined material values will be applied.\r\nIf Name does not correspond to a predefined target material, the values of AngleDependencyOption Density,\r\nK and N must be specified."
},
"pipeDiameter": {
"type": "number",
"description": "Diameter of pipe at inlet/outlet [m]",
"format": "double",
"nullable": true
}
},
"additionalProperties": false,
"description": "Blinded tee geometry model definition."
},
"nullable": true
},
"reducers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"geometryFactor": {
"type": "number",
"description": "Correction factor applied to results in order to account for isometric effects (swirl) [-]",
"format": "double",
"nullable": true
},
"erosionAllowance": {
"type": "number",
"description": "Erosion allowance for component. Used for calculation of relative criticality [mm]",
"format": "double",
"nullable": true
},
"tag": {
"type": "string",
"description": "Component ID",
"nullable": true
},
"material": {
"type": "object",
"properties": {
"angleDependency": {
"enum": [
"Ductile",
"DuctileLegacy",
"Brittle"
],
"type": "string"
},
"name": {
"type": "string",
"description": "Name of predefined target material, or custom name (optional).",
"nullable": true
},
"density": {
"type": "number",
"description": "Density of target material [kg/m3]",
"format": "double",
"nullable": true
},
"k": {
"type": "number",
"description": "Constant of proportionality in RP-O501 response equation",
"format": "double",
"nullable": true
},
"n": {
"type": "number",
"description": "Velocity exponent in RP-O501 response equation",
"format": "double",
"nullable": true
}
},
"additionalProperties": false,
"description": "To use predefined target material properties (see separate endpoint), specify the name of the predefined\r\ntarget material. In this case, the values of AngleDependencyOption, Density, K and N will be ignored,\r\nand the corresponding predefined material values will be applied.\r\nIf Name does not correspond to a predefined target material, the values of AngleDependencyOption Density,\r\nK and N must be specified."
},
"inletDiameter": {
"type": "number",
"description": "Inlet diameter of contraction [m]",
"format": "double",
"nullable": true
},
"outletDiameter": {
"type": "number",
"description": "Outlet diameter of contraction [m]",
"format": "double",
"nullable": true
},
"projectedAngleInDegrees": {
"type": "number",
"description": "Angle between the pipe axis and the surface of the contracting part of the pipe [deg]",
"format": "double",
"nullable": true
}
},
"additionalProperties": false,
"description": "Reducer/contraction geometry model definition."
},
"nullable": true
},
"erProbes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"geometryFactor": {
"type": "number",
"description": "Correction factor applied to results in order to account for isometric effects (swirl) [-]",
"format": "double",
"nullable": true
},
"erosionAllowance": {
"type": "number",
"description": "Erosion allowance for component. Used for calculation of relative criticality [mm]",
"format": "double",
"nullable": true
},
"tag": {
"type": "string",
"description": "Component ID",
"nullable": true
},
"material": {
"type": "object",
"properties": {
"angleDependency": {
"enum": [
"Ductile",
"DuctileLegacy",
"Brittle"
],
"type": "string"
},
"name": {
"type": "string",
"description": "Name of predefined target material, or custom name (optional).",
"nullable": true
},
"density": {
"type": "number",
"description": "Density of target material [kg/m3]",
"format": "double",
"nullable": true
},
"k": {
"type": "number",
"description": "Constant of proportionality in RP-O501 response equation",
"format": "double",
"nullable": true
},
"n": {
"type": "number",
"description": "Velocity exponent in RP-O501 response equation",
"format": "double",
"nullable": true
}
},
"additionalProperties": false,
"description": "To use predefined target material properties (see separate endpoint), specify the name of the predefined\r\ntarget material. In this case, the values of AngleDependencyOption, Density, K and N will be ignored,\r\nand the corresponding predefined material values will be applied.\r\nIf Name does not correspond to a predefined target material, the values of AngleDependencyOption Density,\r\nK and N must be specified."
},
"pipeDiameter": {
"type": "number",
"description": "Diameter of pipe [m]",
"format": "double",
"nullable": true
},
"projectedAngleInDegrees": {
"type": "number",
"description": "Angle between the pipe axis and surface of the probe elements [deg]",
"format": "double",
"nullable": true
}
},
"additionalProperties": false,
"description": "Erosion probe (electrical resistivity probe) geometry model definition."
},
"nullable": true
},
"smoothPipes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"geometryFactor": {
"type": "number",
"description": "Correction factor applied to results in order to account for isometric effects (swirl) [-]",
"format": "double",
"nullable": true
},
"erosionAllowance": {
"type": "number",
"description": "Erosion allowance for component. Used for calculation of relative criticality [mm]",
"format": "double",
"nullable": true
},
"tag": {
"type": "string",
"description": "Component ID",
"nullable": true
},
"material": {
"type": "object",
"properties": {
"angleDependency": {
"enum": [
"Ductile",
"DuctileLegacy",
"Brittle"
],
"type": "string"
},
"name": {
"type": "string",
"description": "Name of predefined target material, or custom name (optional).",
"nullable": true
},
"density": {
"type": "number",
"description": "Density of target material [kg/m3]",
"format": "double",
"nullable": true
},
"k": {
"type": "number",
"description": "Constant of proportionality in RP-O501 response equation",
"format": "double",
"nullable": true
},
"n": {
"type": "number",
"description": "Velocity exponent in RP-O501 response equation",
"format": "double",
"nullable": true
}
},
"additionalProperties": false,
"description": "To use predefined target material properties (see separate endpoint), specify the name of the predefined\r\ntarget material. In this case, the values of AngleDependencyOption, Density, K and N will be ignored,\r\nand the corresponding predefined material values will be applied.\r\nIf Name does not correspond to a predefined target material, the values of AngleDependencyOption Density,\r\nK and N must be specified."
},
"pipeDiameter": {
"type": "number",
"description": "Diameter of pipe [m]",
"format": "double",
"nullable": true
}
},
"additionalProperties": false,
"description": "Smooth pipe geometry model definition."
},
"nullable": true
},
"weldedJointsUpstream": {
"type": "array",
"items": {
"type": "object",
"properties": {
"geometryFactor": {
"type": "number",
"description": "Correction factor applied to results in order to account for isometric effects (swirl) [-]",
"format": "double",
"nullable": true
},
"erosionAllowance": {
"type": "number",
"description": "Erosion allowance for component. Used for calculation of relative criticality [mm]",
"format": "double",
"nullable": true
},
"tag": {
"type": "string",
"description": "Component ID",
"nullable": true
},
"material": {
"type": "object",
"properties": {
"angleDependency": {
"enum": [
"Ductile",
"DuctileLegacy",
"Brittle"
],
"type": "string"
},
"name": {
"type": "string",
"description": "Name of predefined target material, or custom name (optional).",
"nullable": true
},
"density": {
"type": "number",
"description": "Density of target material [kg/m3]",
"format": "double",
"nullable": true
},
"k": {
"type": "number",
"description": "Constant of proportionality in RP-O501 response equation",
"format": "double",
"nullable": true
},
"n": {
"type": "number",
"description": "Velocity exponent in RP-O501 response equation",
"format": "double",
"nullable": true
}
},
"additionalProperties": false,
"description": "To use predefined target material properties (see separate endpoint), specify the name of the predefined\r\ntarget material. In this case, the values of AngleDependencyOption, Density, K and N will be ignored,\r\nand the corresponding predefined material values will be applied.\r\nIf Name does not correspond to a predefined target material, the values of AngleDependencyOption Density,\r\nK and N must be specified."
},
"pipeDiameter": {
"type": "number",
"description": "Diameter of pipe [m]",
"format": "double",
"nullable": true
},
"projectedAngleInDegrees": {
"type": "number",
"description": "Angle between the pipe axis and flow-facing surface of the weld [deg]",
"format": "double",
"nullable": true
}
},
"additionalProperties": false,
"description": "Welded joint (flow-facing side) geometry model definition."
},
"nullable": true
},
"weldedJointsDownstream": {
"type": "array",
"items": {
"type": "object",
"properties": {
"geometryFactor": {
"type": "number",
"description": "Correction factor applied to results in order to account for isometric effects (swirl) [-]",
"format": "double",
"nullable": true
},
"erosionAllowance": {
"type": "number",
"description": "Erosion allowance for component. Used for calculation of relative criticality [mm]",
"format": "double",
"nullable": true
},
"tag": {
"type": "string",
"description": "Component ID",
"nullable": true
},
"material": {
"type": "object",
"properties": {
"angleDependency": {
"enum": [
"Ductile",
"DuctileLegacy",
"Brittle"
],
"type": "string"
},
"name": {
"type": "string",
"description": "Name of predefined target material, or custom name (optional).",
"nullable": true
},
"density": {
"type": "number",
"description": "Density of target material [kg/m3]",
"format": "double",
"nullable": true
},
"k": {
"type": "number",
"description": "Constant of proportionality in RP-O501 response equation",
"format": "double",
"nullable": true
},
"n": {
"type": "number",
"description": "Velocity exponent in RP-O501 response equation",
"format": "double",
"nullable": true
}
},
"additionalProperties": false,
"description": "To use predefined target material properties (see separate endpoint), specify the name of the predefined\r\ntarget material. In this case, the values of AngleDependencyOption, Density, K and N will be ignored,\r\nand the corresponding predefined material values will be applied.\r\nIf Name does not correspond to a predefined target material, the values of AngleDependencyOption Density,\r\nK and N must be specified."
},
"pipeDiameter": {
"type": "number",
"description": "Diameter of pipe [m]",
"format": "double",
"nullable": true
},
"weldHeight": {
"type": "number",
"description": "Height of weld as measured from the pipe wall [mm]",
"format": "double",
"nullable": true
}
},
"additionalProperties": false,
"description": "Welded joint (downstream side) geometry model definition."
},
"nullable": true
}
},
"additionalProperties": false,
"description": "Contains definition of all components on the line. At least one of the arrays containing at least one component,\r\nhas to be specified."
}
},
"additionalProperties": false,
"description": "Contains the Line definition, i.e. the virtual pipe containing a group of components for which erosion\r\nis to be calculated."
}
},
"additionalProperties": false,
"description": "",
"example": "{\r\n\t\"FluidStream\": {\r\n\t\t\"Densities\": [\r\n\t\t\t423,\r\n\t\t\t512,\r\n\t\t\t389,\r\n\t\t\t407.3333333,\r\n\t\t\t390.3333333,\r\n\t\t\t373.3333333,\r\n\t\t\t356.3333333,\r\n\t\t\t236.4444444,\r\n\t\t\t252.9444444,\r\n\t\t\t269.4444444,\r\n\t\t\t285.9444444,\r\n\t\t\t302.4444444,\r\n\t\t\t368,\r\n\t\t\t237.3333333,\r\n\t\t\t401\r\n\t\t],\r\n\t\t\"Viscosities\": [\r\n\t\t\t1.00E-04,\r\n\t\t\t1.30E-04,\r\n\t\t\t1.20E-04,\r\n\t\t\t1.37E-04,\r\n\t\t\t1.47E-04,\r\n\t\t\t1.57E-04,\r\n\t\t\t1.67E-04,\r\n\t\t\t1.77E-04,\r\n\t\t\t1.87E-04,\r\n\t\t\t1.97E-04,\r\n\t\t\t2.07E-04,\r\n\t\t\t2.17E-04,\r\n\t\t\t2.27E-04,\r\n\t\t\t2.37E-04,\r\n\t\t\t2.47E-04\r\n\t\t],\r\n\t\t\"TimeSeries\": [\r\n\t\t\t\"01/04/2019\",\r\n\t\t\t\"01/05/2019\",\r\n\t\t\t\"01/06/2019\",\r\n\t\t\t\"01/07/2019\",\r\n\t\t\t\"01/08/2019\",\r\n\t\t\t\"01/09/2019\",\r\n\t\t\t\"01/10/2019\",\r\n\t\t\t\"01/11/2019\",\r\n\t\t\t\"01/12/2019\",\r\n\t\t\t\"01/01/2020\",\r\n\t\t\t\"01/02/2020\",\r\n\t\t\t\"01/03/2020\",\r\n\t\t\t\"01/04/2020\",\r\n\t\t\t\"01/05/2020\",\r\n\t\t\t\"01/06/2020\"\r\n\t\t],\r\n\t\t\"VolumetricRates\": [\r\n\t\t\t0.41,\r\n\t\t\t0.49,\r\n\t\t\t0.3,\r\n\t\t\t0.42,\r\n\t\t\t0.365,\r\n\t\t\t0.349,\r\n\t\t\t0.333,\r\n\t\t\t0.317,\r\n\t\t\t0.301,\r\n\t\t\t0.285,\r\n\t\t\t0.269,\r\n\t\t\t0.253,\r\n\t\t\t0.237,\r\n\t\t\t0.221,\r\n\t\t\t0.205\r\n\t\t]\r\n\t},\r\n\t\"ParticleStream\": {\r\n\t\t\"ParticleDiameter\": 50,\r\n\t\t\"TimeSeries\": [\r\n\t\t\t\"01/04/2019\",\r\n\t\t\t\"01/05/2019\",\r\n\t\t\t\"01/06/2019\",\r\n\t\t\t\"01/07/2019\",\r\n\t\t\t\"01/08/2019\",\r\n\t\t\t\"01/09/2019\",\r\n\t\t\t\"01/10/2019\",\r\n\t\t\t\"01/11/2019\",\r\n\t\t\t\"01/12/2019\",\r\n\t\t\t\"01/01/2020\",\r\n\t\t\t\"01/02/2020\",\r\n\t\t\t\"01/03/2020\",\r\n\t\t\t\"01/04/2020\",\r\n\t\t\t\"01/05/2020\",\r\n\t\t\t\"01/06/2020\"\r\n\t\t],\r\n\t\t\"ParticleMassFlowRates\": [\r\n\t\t\t0,\r\n\t\t\t8.26388888888889E-05,\r\n\t\t\t3.14814814814815E-05,\r\n\t\t\t3.73842592592593E-05,\r\n\t\t\t1.57407407407407E-05,\r\n\t\t\t0,\r\n\t\t\t1.18055555555556E-05,\r\n\t\t\t2.55787037037037E-05,\r\n\t\t\t6.09953703703704E-05,\r\n\t\t\t6.2962962962963E-05,\r\n\t\t\t4.72222222222222E-05,\r\n\t\t\t2.55787037037037E-05,\r\n\t\t\t4.13194444444444E-05,\r\n\t\t\t2.95138888888889E-05,\r\n\t\t\t4.72222222222222E-05\r\n\t\t],\r\n\t\t\"ErosiveAgent\": {\r\n\t\t\t\"Name\": \"Quartz\",\r\n\t\t\t\"Density\": 2650,\r\n\t\t\t\"ReductionFactor\": 1\r\n\t\t}\r\n\t},\r\n\t\"Line\": {\r\n\t\t\"Tag\": \"BC-USC\",\r\n\t\t\"ServiceLife\": 20,\r\n\t\t\"Components\": {\r\n\t\t\t\"Bends\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"Material\": {\r\n\t\t\t\t\t\t\"Name\": \"CarbonSteel\",\r\n\t\t\t\t\t\t\"AngleDependency\": \"Ductile\",\r\n\t\t\t\t\t\t\"Density\": 7800,\r\n\t\t\t\t\t\t\"K\": 0.000000002,\r\n\t\t\t\t\t\t\"N\": 2.6\r\n\t\t\t\t\t},\r\n\t\t\t\t\t\"Tag\": \"XMT elbow 5inch\",\r\n\t\t\t\t\t\"GeometryFactor\": 2,\r\n\t\t\t\t\t\"ErosionAllowance\": 0.83,\r\n\t\t\t\t\t\"PipeDiameter\": 0.1223,\r\n\t\t\t\t\t\"RadiusOfCurvature\": 3\r\n\t\t\t\t}\r\n\t\t\t],\r\n\t\t\t\"Tees\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"Material\": {\r\n\t\t\t\t\t\t\"Name\": \"CarbonSteel\",\r\n\t\t\t\t\t\t\"AngleDependency\": \"Ductile\",\r\n\t\t\t\t\t\t\"Density\": 7800,\r\n\t\t\t\t\t\t\"K\": 0.000000002,\r\n\t\t\t\t\t\t\"N\": 2.6\r\n\t\t\t\t\t},\r\n\t\t\t\t\t\"Tag\": \"XMT Tee\",\r\n\t\t\t\t\t\"GeometryFactor\": 1,\r\n\t\t\t\t\t\"ErosionAllowance\": 3,\r\n\t\t\t\t\t\"PipeDiameter\": 0.1302\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t}\r\n\t}\r\n}"
}
Responses
200 OK
Success
Representations
[
{
"geometryModel": "string",
"tag": "string",
"erosionAccumulated": 0.0,
"timeSeries": [
"string"
],
"fluidVelocity": [
0.0
],
"erosionPerTon": [
0.0
],
"erosionPerYear": [
0.0
]
}
]
{
"type": "array",
"items": {
"type": "object",
"properties": {
"geometryModel": {
"type": "string",
"nullable": true,
"readOnly": true
},
"tag": {
"type": "string",
"nullable": true,
"readOnly": true
},
"erosionAccumulated": {
"type": "number",
"format": "double",
"readOnly": true
},
"timeSeries": {
"type": "array",
"items": {
"type": "string",
"format": "date-time"
},
"nullable": true,
"readOnly": true
},
"fluidVelocity": {
"type": "array",
"items": {
"type": "number",
"format": "double"
},
"description": "Array of mixture velocities applied in erosion model",
"nullable": true,
"readOnly": true
},
"erosionPerTon": {
"type": "array",
"items": {
"type": "number",
"format": "double"
},
"description": "Array of erosion rates [mm/ton]",
"nullable": true,
"readOnly": true
},
"erosionPerYear": {
"type": "array",
"items": {
"type": "number",
"format": "double"
},
"description": "Array of erosion rates [mm/year]",
"nullable": true,
"readOnly": true
}
},
"additionalProperties": false,
"description": "Calculation results for a single component when fluid and particle streams are specified as time series"
}
}
400 Bad Request
Invalid or insufficient input. This includes valid input that is outside the model ranges.
Representations
{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string"
}
{
"type": "object",
"properties": {
"type": {
"type": "string",
"nullable": true
},
"title": {
"type": "string",
"nullable": true
},
"status": {
"type": "integer",
"format": "int32",
"nullable": true
},
"detail": {
"type": "string",
"nullable": true
},
"instance": {
"type": "string",
"nullable": true
}
},
"additionalProperties": {}
}
500 Internal Server Error
Calculation error. Unhandled exceptions.
Code samples
@ECHO OFF
curl -v -X POST "https://api.veracity.com/ext/dnvgl/rpo501/v2015/api/erosion/timeseries/basicstream"
-H "Content-Type: application/json"
-H "Ocp-Apim-Subscription-Key: {subscription key}"
--data-ascii "{body}"
using System;
using System.Net.Http.Headers;
using System.Text;
using System.Net.Http;
using System.Web;
namespace CSHttpClientSample
{
static class Program
{
static void Main()
{
MakeRequest();
Console.WriteLine("Hit ENTER to exit...");
Console.ReadLine();
}
static async void MakeRequest()
{
var client = new HttpClient();
var queryString = HttpUtility.ParseQueryString(string.Empty);
// Request headers
client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "{subscription key}");
var uri = "https://api.veracity.com/ext/dnvgl/rpo501/v2015/api/erosion/timeseries/basicstream?" + queryString;
HttpResponseMessage response;
// Request body
byte[] byteData = Encoding.UTF8.GetBytes("{body}");
using (var content = new ByteArrayContent(byteData))
{
content.Headers.ContentType = new MediaTypeHeaderValue("< your content type, i.e. application/json >");
response = await client.PostAsync(uri, content);
}
}
}
}
// // This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
import java.net.URI;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
public class JavaSample
{
public static void main(String[] args)
{
HttpClient httpclient = HttpClients.createDefault();
try
{
URIBuilder builder = new URIBuilder("https://api.veracity.com/ext/dnvgl/rpo501/v2015/api/erosion/timeseries/basicstream");
URI uri = builder.build();
HttpPost request = new HttpPost(uri);
request.setHeader("Content-Type", "application/json");
request.setHeader("Ocp-Apim-Subscription-Key", "{subscription key}");
// Request body
StringEntity reqEntity = new StringEntity("{body}");
request.setEntity(reqEntity);
HttpResponse response = httpclient.execute(request);
HttpEntity entity = response.getEntity();
if (entity != null)
{
System.out.println(EntityUtils.toString(entity));
}
}
catch (Exception e)
{
System.out.println(e.getMessage());
}
}
}
<!DOCTYPE html>
<html>
<head>
<title>JSSample</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
</head>
<body>
<script type="text/javascript">
$(function() {
var params = {
// Request parameters
};
$.ajax({
url: "https://api.veracity.com/ext/dnvgl/rpo501/v2015/api/erosion/timeseries/basicstream?" + $.param(params),
beforeSend: function(xhrObj){
// Request headers
xhrObj.setRequestHeader("Content-Type","application/json");
xhrObj.setRequestHeader("Ocp-Apim-Subscription-Key","{subscription key}");
},
type: "POST",
// Request body
data: "{body}",
})
.done(function(data) {
alert("success");
})
.fail(function() {
alert("error");
});
});
</script>
</body>
</html>
#import <Foundation/Foundation.h>
int main(int argc, const char * argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSString* path = @"https://api.veracity.com/ext/dnvgl/rpo501/v2015/api/erosion/timeseries/basicstream";
NSArray* array = @[
// Request parameters
@"entities=true",
];
NSString* string = [array componentsJoinedByString:@"&"];
path = [path stringByAppendingFormat:@"?%@", string];
NSLog(@"%@", path);
NSMutableURLRequest* _request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:path]];
[_request setHTTPMethod:@"POST"];
// Request headers
[_request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
[_request setValue:@"{subscription key}" forHTTPHeaderField:@"Ocp-Apim-Subscription-Key"];
// Request body
[_request setHTTPBody:[@"{body}" dataUsingEncoding:NSUTF8StringEncoding]];
NSURLResponse *response = nil;
NSError *error = nil;
NSData* _connectionData = [NSURLConnection sendSynchronousRequest:_request returningResponse:&response error:&error];
if (nil != error)
{
NSLog(@"Error: %@", error);
}
else
{
NSError* error = nil;
NSMutableDictionary* json = nil;
NSString* dataString = [[NSString alloc] initWithData:_connectionData encoding:NSUTF8StringEncoding];
NSLog(@"%@", dataString);
if (nil != _connectionData)
{
json = [NSJSONSerialization JSONObjectWithData:_connectionData options:NSJSONReadingMutableContainers error:&error];
}
if (error || !json)
{
NSLog(@"Could not parse loaded json with error:%@", error);
}
NSLog(@"%@", json);
_connectionData = nil;
}
[pool drain];
return 0;
}
<?php
// This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
require_once 'HTTP/Request2.php';
$request = new Http_Request2('https://api.veracity.com/ext/dnvgl/rpo501/v2015/api/erosion/timeseries/basicstream');
$url = $request->getUrl();
$headers = array(
// Request headers
'Content-Type' => 'application/json',
'Ocp-Apim-Subscription-Key' => '{subscription key}',
);
$request->setHeader($headers);
$parameters = array(
// Request parameters
);
$url->setQueryVariables($parameters);
$request->setMethod(HTTP_Request2::METHOD_POST);
// Request body
$request->setBody("{body}");
try
{
$response = $request->send();
echo $response->getBody();
}
catch (HttpException $ex)
{
echo $ex;
}
?>
########### Python 2.7 #############
import httplib, urllib, base64
headers = {
# Request headers
'Content-Type': 'application/json',
'Ocp-Apim-Subscription-Key': '{subscription key}',
}
params = urllib.urlencode({
})
try:
conn = httplib.HTTPSConnection('api.veracity.com')
conn.request("POST", "/ext/dnvgl/rpo501/v2015/api/erosion/timeseries/basicstream?%s" % params, "{body}", headers)
response = conn.getresponse()
data = response.read()
print(data)
conn.close()
except Exception as e:
print("[Errno {0}] {1}".format(e.errno, e.strerror))
####################################
########### Python 3.2 #############
import http.client, urllib.request, urllib.parse, urllib.error, base64
headers = {
# Request headers
'Content-Type': 'application/json',
'Ocp-Apim-Subscription-Key': '{subscription key}',
}
params = urllib.parse.urlencode({
})
try:
conn = http.client.HTTPSConnection('api.veracity.com')
conn.request("POST", "/ext/dnvgl/rpo501/v2015/api/erosion/timeseries/basicstream?%s" % params, "{body}", headers)
response = conn.getresponse()
data = response.read()
print(data)
conn.close()
except Exception as e:
print("[Errno {0}] {1}".format(e.errno, e.strerror))
####################################
require 'net/http'
uri = URI('https://api.veracity.com/ext/dnvgl/rpo501/v2015/api/erosion/timeseries/basicstream')
request = Net::HTTP::Post.new(uri.request_uri)
# Request headers
request['Content-Type'] = 'application/json'
# Request headers
request['Ocp-Apim-Subscription-Key'] = '{subscription key}'
# Request body
request.body = "{body}"
response = Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|
http.request(request)
end
puts response.body