DNVGL RP-O501 REST Api
API change historyEROSIVE WEAR IN PIPING SYSTEMS
Calculates relative erosion and relative criticality for a set of components (Line object) and a single flow condition specified through a BasicStream object and a ParticleStream object.
REQUEST SCHEMA: LineBasicStream
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
LineBasicStream
{
"FluidStream": {
"VolumetricRate": 0.23,
"Density": 45,
"Viscosity": 1.5E-4
},
"ParticleStream": {
"ParticleDiameter": 150,
"ParticleMassFlowRate": 0.1,
"ErosiveAgent": {
"Name": "Quartz",
"Density": 2650,
"ReductionFactor": 1
}
},
"Line": {
"Tag": "13L0001",
"ServiceLife": 25,
"Components": {
"Bends": [
{
"Material": {
"Name": "CarbonSteel",
"AngleDependency": "Ductile",
"Density": 7800,
"K": 0.000000002,
"N": 2.6
},
"Tag": "8inch CS 3D bend",
"GeometryFactor": 1,
"ErosionAllowance": 3.0,
"PipeDiameter": 0.1683,
"RadiusOfCurvature": 1.5
},
{
"Material": {
"Name": "CarbonSteel",
"AngleDependency": "Ductile",
"Density": 7800,
"K": 0.000000002,
"N": 2.6
},
"Tag": "6inch CS 3D bend",
"GeometryFactor": 1,
"ErosionAllowance": 3.0,
"PipeDiameter": 0.1683,
"RadiusOfCurvature": 1.5
}
],
"Tees": [
{
"Material": {
"Name": "CarbonSteel",
"AngleDependency": "Ductile",
"Density": 7800,
"K": 0.000000002,
"N": 2.6
},
"Tag": "8inch CS blinded tee",
"GeometryFactor": 1,
"ErosionAllowance": 3.0,
"PipeDiameter": 0.1683
},
{
"Material": {
"Name": "CarbonSteel",
"AngleDependency": "Ductile",
"Density": 7800,
"K": 0.000000002,
"N": 2.6
},
"Tag": "6inch CS blinded tee",
"GeometryFactor": 1,
"ErosionAllowance": 3.0,
"PipeDiameter": 0.1245
}
],
"Reducers": [
{
"Material": {
"Name": "Duplex",
"AngleDependency": "Ductile",
"Density": 7850,
"K": 2E-09,
"N": 2.6
},
"Tag": "8x6inch reducer",
"GeometryFactor": 1,
"ErosionAllowance": 2.0,
"InletDiameter": 0.1683,
"OutletDiameter": 0.1245,
"ProjectedAngleInDegrees": 45
}
],
"ErProbes": [
{
"Material": {
"Name": "Duplex",
"AngleDependency": "Ductile",
"Density": 7850,
"K": 2E-09,
"N": 2.6
},
"Tag": "Erosion probe",
"GeometryFactor": 1,
"ErosionAllowance": 2.0,
"PipeDiameter": 0.1245,
"ProjectedAngleInDegrees": 45
}
],
"SmoothPipes": [
{
"Material": {
"Name": "Duplex",
"AngleDependency": "Ductile",
"Density": 7850,
"K": 2E-09,
"N": 2.6
},
"Tag": "Generic 6inch piping",
"GeometryFactor": 1,
"ErosionAllowance": 2.0,
"PipeDiameter": 0.1245
}
],
"WeldedJointsUpstream": [
{
"Material": {
"Name": "Duplex",
"AngleDependency": "Ductile",
"Density": 7850,
"K": 2E-09,
"N": 2.6
},
"Tag": "Generic 6inch weld US",
"GeometryFactor": 1,
"ErosionAllowance": 2.0,
"PipeDiameter": 0.1245,
"ProjectedAngleInDegrees": 60
}
],
"WeldedJointsDownstream": [
{
"Material": {
"Name": "Duplex",
"AngleDependency": "Ductile",
"Density": 7850,
"K": 2E-09,
"N": 2.6
},
"Tag": "Generic 6inch weld DS",
"GeometryFactor": 1,
"ErosionAllowance": 2.0,
"PipeDiameter": 0.1245,
"WeldHeight": 10
}
]
}
}
}
{
"type": "object",
"properties": {
"fluidStream": {
"type": "object",
"properties": {
"density": {
"type": "number",
"description": "Representative mixture density of all phases: [kg/m3]",
"format": "double",
"nullable": true
},
"viscosity": {
"type": "number",
"description": "Representative mixture viscosity of all phases: [Pas]",
"format": "double",
"nullable": true
},
"volumetricRate": {
"type": "number",
"description": "Sum of volumetric flow rate for all phases: [m3/s]",
"format": "double",
"nullable": true
}
},
"additionalProperties": false,
"description": "Defines a single 'snapshot' of a fluid stream with direct specification of fluid properties and flow rate.\r\nNote that rates are given as m3/s rather than m3/day."
},
"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
},
"particleMassFlowRate": {
"type": "number",
"description": "Particle mass flow rate: [g/s]",
"format": "double",
"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": "Defines the particle content in a fluid stream."
},
"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\"VolumetricRate\": 0.23,\r\n\t\t\"Density\": 45,\r\n\t\t\"Viscosity\": 1.5E-4\r\n\t},\r\n\t\"ParticleStream\": {\r\n\t\t\"ParticleDiameter\": 150,\r\n\t\t\"ParticleMassFlowRate\": 0.1,\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\": \"13L0001\",\r\n\t\t\"ServiceLife\": 25,\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\": \"8inch CS 3D bend\",\r\n\t\t\t\t\t\"GeometryFactor\": 1,\r\n\t\t\t\t\t\"ErosionAllowance\": 3.0,\r\n\t\t\t\t\t\"PipeDiameter\": 0.1683,\r\n\t\t\t\t\t\"RadiusOfCurvature\": 1.5\r\n\t\t\t\t},\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\": \"6inch CS 3D bend\",\r\n\t\t\t\t\t\"GeometryFactor\": 1,\r\n\t\t\t\t\t\"ErosionAllowance\": 3.0,\r\n\t\t\t\t\t\"PipeDiameter\": 0.1683,\r\n\t\t\t\t\t\"RadiusOfCurvature\": 1.5\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\": \"8inch CS blinded tee\",\r\n\t\t\t\t\t\"GeometryFactor\": 1,\r\n\t\t\t\t\t\"ErosionAllowance\": 3.0,\r\n\t\t\t\t\t\"PipeDiameter\": 0.1683\r\n\t\t\t\t},\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\": \"6inch CS blinded tee\",\r\n\t\t\t\t\t\"GeometryFactor\": 1,\r\n\t\t\t\t\t\"ErosionAllowance\": 3.0,\r\n\t\t\t\t\t\"PipeDiameter\": 0.1245\r\n\t\t\t\t}\r\n\t\t\t],\r\n\t\t\t\"Reducers\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"Material\": {\r\n\t\t\t\t\t\t\"Name\": \"Duplex\",\r\n\t\t\t\t\t\t\"AngleDependency\": \"Ductile\",\r\n\t\t\t\t\t\t\"Density\": 7850,\r\n\t\t\t\t\t\t\"K\": 2E-09,\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\": \"8x6inch reducer\",\r\n\t\t\t\t\t\"GeometryFactor\": 1,\r\n\t\t\t\t\t\"ErosionAllowance\": 2.0,\r\n\t\t\t\t\t\"InletDiameter\": 0.1683,\r\n\t\t\t\t\t\"OutletDiameter\": 0.1245,\r\n\t\t\t\t\t\"ProjectedAngleInDegrees\": 45\r\n\t\t\t\t}\r\n\t\t\t],\r\n\t\t\t\"ErProbes\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"Material\": {\r\n\t\t\t\t\t\t\"Name\": \"Duplex\",\r\n\t\t\t\t\t\t\"AngleDependency\": \"Ductile\",\r\n\t\t\t\t\t\t\"Density\": 7850,\r\n\t\t\t\t\t\t\"K\": 2E-09,\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\": \"Erosion probe\",\r\n\t\t\t\t\t\"GeometryFactor\": 1,\r\n\t\t\t\t\t\"ErosionAllowance\": 2.0,\r\n\t\t\t\t\t\"PipeDiameter\": 0.1245,\r\n\t\t\t\t\t\"ProjectedAngleInDegrees\": 45\r\n\t\t\t\t}\r\n\t\t\t],\r\n\t\t\t\"SmoothPipes\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"Material\": {\r\n\t\t\t\t\t\t\"Name\": \"Duplex\",\r\n\t\t\t\t\t\t\"AngleDependency\": \"Ductile\",\r\n\t\t\t\t\t\t\"Density\": 7850,\r\n\t\t\t\t\t\t\"K\": 2E-09,\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\": \"Generic 6inch piping\",\r\n\t\t\t\t\t\"GeometryFactor\": 1,\r\n\t\t\t\t\t\"ErosionAllowance\": 2.0,\r\n\t\t\t\t\t\"PipeDiameter\": 0.1245\r\n\t\t\t\t}\r\n\t\t\t],\r\n\t\t\t\"WeldedJointsUpstream\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"Material\": {\r\n\t\t\t\t\t\t\"Name\": \"Duplex\",\r\n\t\t\t\t\t\t\"AngleDependency\": \"Ductile\",\r\n\t\t\t\t\t\t\"Density\": 7850,\r\n\t\t\t\t\t\t\"K\": 2E-09,\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\": \"Generic 6inch weld US\",\r\n\t\t\t\t\t\"GeometryFactor\": 1,\r\n\t\t\t\t\t\"ErosionAllowance\": 2.0,\r\n\t\t\t\t\t\"PipeDiameter\": 0.1245,\r\n\t\t\t\t\t\"ProjectedAngleInDegrees\": 60\r\n\t\t\t\t}\r\n\t\t\t],\r\n\t\t\t\"WeldedJointsDownstream\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"Material\": {\r\n\t\t\t\t\t\t\"Name\": \"Duplex\",\r\n\t\t\t\t\t\t\"AngleDependency\": \"Ductile\",\r\n\t\t\t\t\t\t\"Density\": 7850,\r\n\t\t\t\t\t\t\"K\": 2E-09,\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\": \"Generic 6inch weld DS\",\r\n\t\t\t\t\t\"GeometryFactor\": 1,\r\n\t\t\t\t\t\"ErosionAllowance\": 2.0,\r\n\t\t\t\t\t\"PipeDiameter\": 0.1245,\r\n\t\t\t\t\t\"WeldHeight\": 10\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
{
"componentTags": [
"string"
],
"relativeErosion": [
0.0
],
"relativeCriticality": [
0.0
]
}
{
"type": "object",
"properties": {
"componentTags": {
"type": "array",
"items": {
"type": "string"
},
"nullable": true,
"readOnly": true
},
"relativeErosion": {
"type": "array",
"items": {
"type": "number",
"format": "double"
},
"nullable": true,
"readOnly": true
},
"relativeCriticality": {
"type": "array",
"items": {
"type": "number",
"format": "double"
},
"nullable": true,
"readOnly": true
}
},
"additionalProperties": false,
"description": "Relative erosion and relative criticality for a line of components."
}
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/componentranking/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/componentranking/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/componentranking/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/componentranking/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/componentranking/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/componentranking/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/componentranking/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/componentranking/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/componentranking/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