TheTechIdea.OilGas.WellSchematic
59 public types. Summaries come from the XML documentation of the compiled assembly.
TheTechIdea.OilGas.WellSchematic
| Type | Summary |
|---|---|
AbandonmentCheckstatic class | Permanent plug and abandonment checks on a schematic (thresholds from the environment's abandonment section, defaults after common NORSOK D-010 practice - verify your revision): a plug above the uppermost source of inflow (WP001 / WP002), plug length with or without a mechanical foundation (WP003), casing cement behind each plug over its interval (WP004), a secondary barrier (WP005), an environmental plug near surface (WP006), plugs verified when a barrier set records their status (WP007). |
AbandonmentCheckItemclass | One line of the permanent-abandonment checklist. |
AbandonmentTrackclass | Permanent-abandonment checklist view: each requirement with pass / fail and details. Not depth-indexed. |
AnnulusOverlaystatic class | Draws annulus fluid in the real annular gap (inner OD to outer ID) and an A/B/C tag near the top. |
BarrierBindingclass | A named item a template works with: the first / deepest item playing a symbol role (strings or equipment). |
BarrierElementRuleclass | One barrier element of a template. Depths are expressions over named points (casing.toc, packer.top, plug.base, doc.bottom, max(a, b), min(a, b)); conditions are name (present), name.cemented, a < b, formation (a deep plug), joined with and. |
BarrierOverlaystatic class | Draws well barrier envelopes on a laid-out schematic (NORSOK D-010 conventions): primary blue, secondary red, environmental green; strings / cement as coloured lines on their real drawn radius, equipment outlined, sealing elements closed across the bore (ultimate stage), failed elements dashed with a cross, impaired dashed, and each element tagged with its table number. |
BarrierTableTrackclass | Well barrier schematic table (WBS): header block (well, field, type, phase, planned / as-built, design pressure, revision, prepared / verified), one section per envelope with its status, numbered WBEs (matching the tags on the schematic) with acceptance reference, interval / size, status and verification, common WBEs flagged, notes. |
BarrierTemplateDefinitionclass | A named barrier template: bindings, required bindings, elements per envelope (or plug envelopes), texts; may be based on another. |
BarrierTemplatesstatic class | Starting points for barrier sets. Always review for the actual well — they are typical, not prescriptive. |
CasingDesignRowclass | One string's design-check row (depths in the document's unit, ratings in psi / lbf). |
CasingDesignTrackclass | Casing design checks beside the schematic: API 5C3 ratings and design factors per string. |
ChangeOverlaystatic class | Outlines changed items on a laid-out schematic: added green, modified orange, removed red dashed, with a badge. |
ChangesTrackclass | Non-depth table of the differences between two well states (grouped, counted, colour-coded). |
Commandstruct | One step of a radial-map path (internal layout geometry). |
IBarrierTemplatesinterface | Contract: the barrier templates a host offers (registered with Set``1). |
JsonBarrierTemplatesclass | Barrier templates held as JSON: { "templates": { name: definition } }. The built-in file is embedded (barrier-templates.json); companies merge their own by name (resources.barrierTemplateFiles). The algorithm primitives (role bindings, host string, plug assignment) are code. |
LeakPathTemplatesstatic class | Starting-point leak-path networks mapped onto a barrier set's elements. Simplified — review per well. |
LeakPathTrackclass | Well barrier (leak-path) diagram: cavities as boxes, barrier elements as status-coloured links, the weakest leak paths highlighted, and whether every path keeps the required number of barriers. Not depth-indexed. |
PlugEnvelopeRuleclass | Plug-based envelopes (permanent abandonment): the deepest plugs fill the deep envelopes in order, the shallowest plug above abandonment.environmentalPlugMaxDepth the surface envelope. |
RadialMapclass | Monotonic piecewise-linear map from a symbol radius (units from the x=60 centreline) to a screen radius (px). Breakpoints pin symbol slots to real dimensions (tubing OD, casing ID, tool OD…), so one symbol draws correctly in any string size. Beyond the last breakpoint the last segment's slope continues. |
SchematicAnchorenum | Which end of the symbol body sits at the equipment depth. |
SchematicAnnulistatic class | Annulus helpers on a schematic document: identification, depth extent, screening and validation. |
SchematicDimensioningenum | How schematic tubulars are sized: Scaled (real diameters) or Schematic (standard slots). |
SchematicEquipmentclass | An equipment symbol placed on the schematic. |
SchematicFormationclass | A formation / lithology interval drawn behind the wellbore. |
SchematicIssueclass | One validation finding. |
SchematicIssueSeverityenum | Severity of a schematic validation issue. |
SchematicPlacementenum | How an equipment item is positioned. |
SchematicRectstruct | Axis-aligned rectangle in screen space (kept free of SkiaSharp so layout is testable headless). |
SchematicRenderItemclass | One draw operation produced by the layout engine. |
SchematicRenderItemKindenum | Kind of item in a schematic render plan. |
SchematicRenderPlanclass | Result of WellSchematicLayoutOptions): layered draw items plus geometry facts. |
SchematicSpanstruct | A vertical interval in screen pixels. |
SchematicStringclass | A host string (casing, liner, tubing, line, open hole) drawn with a stretchable symbol. |
SchematicTrackclass | Completion / well schematic as a wellbore track. Depths map through the view's shared DepthMapper (document unit converted to the axis unit), so equipment lines up with log curves and tops in neighbouring tracks. |
SectionWindowSpecclass | Which string an item cuts open, and by how much. |
SvgPathDatastatic class | Absolute SVG path data (M, L, Q, T, Z — the subset the catalog uses; H/V accepted) parsed into explicit commands. T is expanded to Q with the reflected control point, so every point can be warped exactly. |
SymbolCatalogclass | The symbol catalog (generated by the well-schematic symbol library). Symbols are data: new equipment is added by regenerating the JSON, never by adding C# types. |
SymbolDefinitionclass | A catalog entry: metadata from the manifest plus the drawing primitives. |
SymbolPrimitiveclass | One drawing primitive of a symbol, in symbol units (viewBox space). |
SymbolRendererstatic class | Draws catalog symbols with SkiaSharp by interpreting their primitives — no SVG parser. Geometry is transformed point-by-point instead of scaling the canvas, so stretching a string vertically never distorts stroke widths (strokes scale with the horizontal unit scale only). |
TallyBuilderstatic class | Builds casing-program and completion tallies from a schematic document (unit-aware). |
TallyTableclass | A tally / program table: headers + formatted rows; CSV export. |
TallyTrackclass | Completion table as a depth-aligned track: one row per component at its depth (rows pushed apart when crowded, with leaders back to the true depth). Reads the schematic of a SchematicTrack in the same view. |
TallyUnitsclass | Display units for tally values. |
WellComparisonstatic class | Builds comparison views between well states. |
WellModelConversionOptionsclass | Options for converting a canonical well model into schematic and wellbore views (defaults from the environment conversion section). |
WellModelConverterstatic class | Converts the library's canonical WellModel (from any adapter: PPDM, Seabed, CSV…) into schematic and wellbore view documents. Symbol choices come from component-symbols.json. |
WellPathGeometryclass | Screen geometry of a well path in vertical section (displacement along an azimuth vs TVD) at TRUE, equal scale, with bands offset perpendicular to the path in screen space (uniform thickness through bends). Pure — used for drawing and tests. |
WellPathSchematicTrackclass | Completion drawn along the real well path in vertical section: strings as bands (cement to hole wall, steel to OD, bore to ID, largest first), open hole dashed at bit size, equipment across its host, tops as horizontal surfaces at their TVD. Path at true scale; diameters exaggerated by PixelsPerInch. Not depth-indexed. |
WellSchematicDocumentclass | A complete, depth-based well schematic. |
WellSchematicLayoutEnginestatic class | Turns a depth-based WellSchematicDocument into a layered, screen-space SchematicRenderPlan. Pure (no SkiaSharp) so it runs headless and deterministic. Rules (see the symbol library README): inline/annular equipment break their host string over their body; items with a section window cut a string open over [top - margin, bottom + margin]; window parts already replaced by an inline tool are skipped; break caps only where a window meets a plain run; cement = stretched band + repeated stipple tiles; formations = repeated tiles with the hole masked; surface-stack items stack upward from the datum. |
WellSchematicLayoutOptionsclass | Layout options for WellSchematicLayoutEngine. |
WellSchematicRendererstatic class | Renders a WellSchematicDocument: layout (pure) + primitive interpretation (Skia). |
WellSchematicSymbolViewclass | A single catalog symbol as a diagram node (legends, symbol sheets, free-form sketches). Fixed symbols keep their aspect ratio; string assets stretch to the node height. |
WellSchematicTemplatesstatic class | Ready-made documents for demos, templates and tests. |
WellSchematicValidatorstatic class | Checks a document against the catalog before rendering. Structural checks are depth-based; visual overlap is checked on a layout at a nominal size because symbol bodies have fixed screen height (a 90-unit packer covers more depth on a long well than on a short one). |
WellSchematicViewclass | Stand-alone well schematic: a WellboreView with a depth track and a schematic track (wellhead stack shown above the plot). Same drawing path as any composite log + schematic view. |
AbandonmentCheck static class
Permanent plug and abandonment checks on a schematic (thresholds from the environment's abandonment section, defaults after common NORSOK D-010 practice - verify your revision): a plug above the uppermost source of inflow (WP001 / WP002), plug length with or without a mechanical foundation (WP003), casing cement behind each plug over its interval (WP004), a secondary barrier (WP005), an environmental plug near surface (WP006), plugs verified when a barrier set records their status (WP007).
| Member | Summary |
|---|---|
static (List<AbandonmentCheckItem>, List<WellboreIssue>) Analyze(WellSchematicDocument doc) | Runs the P&A checks on a schematic: the checklist lines and the coded issues (WP001-WP007). |
static double? EnvironmentalLimit(WellSchematicDocument doc, AbandonmentRuleSet rules, string unit, bool surfaceUnknown) | The deepest allowed top of the environmental plug, as a schematic depth: the rule set's limit, measured from the ground / mudline (adds SurfaceDepth) or from the depth zero. Null when the rule set has no limit; surfaceUnknown when it measures from the surface but the schematic does not know where that is. |
AbandonmentCheckItem class
One line of the permanent-abandonment checklist.
| Member | Summary |
|---|---|
AbandonmentCheckItem(string requirement, bool? pass, string detail) | Creates a checklist line: requirement, result and details. |
string Detail { get; } | Details (depths, lengths, what was found). |
bool? Pass { get; } | true = met, false = not met, null = not applicable / information. |
string Requirement { get; } | The requirement checked. |
AbandonmentTrack class
Permanent-abandonment checklist view: each requirement with pass / fail and details. Not depth-indexed.
Inherits / implements: WellTrack, ITrackFrame
| Member | Summary |
|---|---|
bool IsDepthIndexed { get; } | False for tracks that are not drawn against depth (tables, legends, header blocks): the view then skips depth grid, tops, break marks and cursor for them, and they may use the full height below the header. |
string SchematicTrackId { get; set; } | Id of the schematic track to use; null = the first schematic track in the view. |
string TypeKey { get; } | Stable key of the track type, written to documents and used to recreate the track (see WellTrackTypeAttribute). |
const string TypeKeyValue = "abandonment" | Type key of the track (serialization). |
void DrawContent(SKCanvas canvas, WellTrackContext ctx) | Draws into the plot (and, if needed, the reserve band). Clipped to the track below its header. |
void LoadPayload(JsonObject payload) | Restores the type-specific settings written by SavePayload (null: keep the defaults). |
JsonObject SavePayload() | Type-specific settings for persistence. |
IEnumerable<WellboreIssue> Validate(WellboreDocument document) | Track-level validation (called by WellboreValidator); families add their own data rules. |
AnnulusOverlay static class
Draws annulus fluid in the real annular gap (inner OD to outer ID) and an A/B/C tag near the top.
| Member | Summary |
|---|---|
static void Draw(SKCanvas canvas, SchematicRenderPlan plan, WellSchematicDocument doc) | Draws the annulus overlay: fluids by colour and status labels. |
BarrierBinding class
A named item a template works with: the first / deepest item playing a symbol role (strings or equipment).
| Member | Summary |
|---|---|
bool Cemented { get; set; } | Only cemented strings. |
string Kind { get; set; } | "string" or "equipment". |
string Pick { get; set; } | "first" (default), "deepest" (deepest top) or "deepestBottom" (deepest bottom). |
string Role { get; set; } | Symbol role (schematic.roles). |
BarrierElementRule class
One barrier element of a template. Depths are expressions over named points (casing.toc, packer.top, plug.base, doc.bottom, max(a, b), min(a, b)); conditions are name (present), name.cemented, a < b, formation (a deep plug), joined with and.
| Member | Summary |
|---|---|
string Bottom { get; set; } | Bottom depth expression (empty: no depth). |
string Name { get; set; } | Element name (empty: the type's name). |
string Target { get; set; } | Binding whose item is the target. |
string TargetId { get; set; } | A literal target id instead (tokens: {plug.id}). |
string TargetKind { get; set; } | Target kind; default: the element type's kind in the model catalog. |
string Top { get; set; } | Top depth expression (empty: no depth). |
string Type { get; set; } | Barrier element type (model catalog). |
string When { get; set; } | Condition; the element is added only when it holds. |
BarrierOverlay static class
Draws well barrier envelopes on a laid-out schematic (NORSOK D-010 conventions): primary blue, secondary red, environmental green; strings / cement as coloured lines on their real drawn radius, equipment outlined, sealing elements closed across the bore (ultimate stage), failed elements dashed with a cross, impaired dashed, and each element tagged with its table number.
| Member | Summary |
|---|---|
static SKColor ColorOf(BarrierRole role) | Envelope colour from the environment's styles (NORSOK convention by default). |
static void Draw(SKCanvas canvas, SchematicRenderPlan plan, WellSchematicDocument doc, WellBarrierSet set, float lineWidth = 3) | Draws the barrier envelopes over the schematic (primary blue, secondary red, environmental green) with element tags. |
BarrierTableTrack class
Well barrier schematic table (WBS): header block (well, field, type, phase, planned / as-built, design pressure, revision, prepared / verified), one section per envelope with its status, numbered WBEs (matching the tags on the schematic) with acceptance reference, interval / size, status and verification, common WBEs flagged, notes.
Inherits / implements: WellTrack, ITrackFrame
| Member | Summary |
|---|---|
bool IsDepthIndexed { get; } | A table, not a depth plot: no depth grid, tops, breaks or cursor; uses the full height. |
List<(string, SKRect)> LastRows { get; } | Row rectangles per element id from the last draw. |
string SchematicTrackId { get; set; } | Id of the schematic track to use; null = the first schematic track in the view. |
string TypeKey { get; } | Stable key of the track type, written to documents and used to recreate the track (see WellTrackTypeAttribute). |
const string TypeKeyValue = "barriers" | Type key of the track (serialization). |
void DrawContent(SKCanvas canvas, WellTrackContext ctx) | Draws into the plot (and, if needed, the reserve band). Clipped to the track below its header. |
string HitTest(WellTrackContext context, float x, float y) | Id of the object under a point, or null. |
void LoadPayload(JsonObject payload) | Restores the type-specific settings written by SavePayload (null: keep the defaults). |
JsonObject SavePayload() | Type-specific settings for persistence. |
SKRect? SelectionBounds(WellTrackContext context, string itemId) | Screen rectangle to highlight for a selected item id (any track may show the same item: cross-highlight). |
IEnumerable<WellboreIssue> Validate(WellboreDocument document) | Track-level validation (called by WellboreValidator); families add their own data rules. |
BarrierTemplateDefinition class
A named barrier template: bindings, required bindings, elements per envelope (or plug envelopes), texts; may be based on another.
| Member | Summary |
|---|---|
string BasedOn { get; set; } | Template this one starts from; its bindings and envelopes are replaced by name, its texts when given. |
Dictionary<string, BarrierBinding> Bind { get; set; } | Bindings by name. |
Dictionary<string, List<BarrierElementRule>> Envelopes { get; set; } | Elements by envelope (Primary, Secondary, Environmental), in order. |
string Notes { get; set; } | Notes (token: {abandonment.reference}). |
Dictionary<string, string> NotesWhenMissing { get; set; } | Text appended to the notes when a binding finds nothing. |
string Phase { get; set; } | Phase of the generated set. |
PlugEnvelopeRule Plugs { get; set; } | Plug-based envelopes instead of fixed ones. |
Dictionary<string, string> Rename { get; set; } | Element names by type applied last (for example PRODUCTION_TREE -> Injection tree). |
List<string> Require { get; set; } | Bindings without which no set is generated. |
string WellType { get; set; } | Well type of the generated set. |
BarrierTemplates static class
Starting points for barrier sets. Always review for the actual well — they are typical, not prescriptive.
| Member | Summary |
|---|---|
static List<SchematicEquipment> CementPlugs(WellSchematicDocument doc) | Cement plugs of a schematic, deepest first (component type CEMENT_PLUG or the P&A cement-plug symbol). |
static WellBarrierSet DrillingWell(WellSchematicDocument doc) | Drilling with a fluid column (NORSOK D-010 drilling structure): primary = fluid column; secondary = casing cement, casing, wellhead, high-pressure riser (when present) and drilling BOP (when present in the schematic). Null without a cemented casing. |
static (double, double)? ElementInterval(WellSchematicDocument doc, BarrierElement e) | Depth interval of a cement / string element in document units (element interval, else the string's cement or full span). |
static SchematicString HostString(WellSchematicDocument doc, double top, double bottom) | The innermost casing / liner covering a depth interval (the string a plug sits in). |
static WellBarrierSet InjectionWell(WellSchematicDocument doc) | Injection well: the production-well structure (NORSOK D-010 injection example is analogous) with injection naming. |
static WellBarrierSet PermanentAbandonment(WellSchematicDocument doc) | Permanent abandonment from the cement plugs in the schematic: the deepest plug is the primary barrier, the next the secondary, a plug shallower than the environmental limit the open-hole-to-surface (environmental) barrier; each with the casing cement behind it over the plug interval and (primary / secondary) the in-situ formation at its base. Null without plugs. |
static WellBarrierSet ProductionWell(WellSchematicDocument doc) | Typical production well capable of flowing (structure after the NORSOK D-010 example): primary = casing and cement below the packer, production packer, completion string packer-to-DHSV, DHSV; secondary = casing and cement above the packer, wellhead, tubing hanger, annulus access valve, production tree. Returns null if the schematic lacks the essential items (tubing, production casing, packer, DHSV). |
static IReadOnlyList<BarrierIssue> Validate(WellSchematicDocument doc) | Validates a schematic's barrier set: target existence and size/depth for casing and cement WBEs. |
static WellBarrierSet WorkoverWell(WellSchematicDocument doc) | Workover with the completion pulled and a BOP installed: primary = kill-fluid column; secondary as for drilling, on the production casing. |
CasingDesignRow class
One string's design-check row (depths in the document's unit, ratings in psi / lbf).
| Member | Summary |
|---|---|
float Bottom { get; set; } | Shoe depth. |
double? Burst { get; set; } | Burst rating (psi). |
double? BurstFactor { get; set; } | Burst design factor. |
double? Collapse { get; set; } | Collapse rating (psi). |
double? CollapseFactor { get; set; } | Collapse design factor. |
string Grade { get; set; } | Grade. |
string Name { get; set; } | String name. |
string Notes { get; set; } | Notes (why not rated, recorded-rating differences). |
bool? Pass { get; set; } | Whether the design factors meet the minimums (null: not checked). |
string Regime { get; set; } | Collapse regime. |
double? Tension { get; set; } | Tension rating (lbf). |
double? TensionFactor { get; set; } | Tension design factor. |
float Top { get; set; } | Top depth. |
CasingDesignTrack class
Casing design checks beside the schematic: API 5C3 ratings and design factors per string.
Inherits / implements: WellTrack, ITrackFrame
| Member | Summary |
|---|---|
List<CasingDesignRow> Rows { get; } | Rows, one per string. |
string TypeKey { get; } | Stable key of the track type, written to documents and used to recreate the track (see WellTrackTypeAttribute). |
const string TypeKeyValue = "casingDesign" | Type key. |
void ConvertDepthUnit(DepthUnit from, DepthUnit to) | Converts depth data the track stores in the document axis unit (called by DepthUnit) and Boolean)). Tracks whose data carries its own unit (e.g. schematics) need not override. |
void DrawContent(SKCanvas canvas, WellTrackContext ctx) | Draws into the plot (and, if needed, the reserve band). Clipped to the track below its header. |
static CasingDesignTrack FromModel(WellModel model, DepthUnit unit, CasingLoadCase loads = null, List<string> warnings = null) | The design checks of a model as a track in unit. |
void LoadPayload(JsonObject payload) | Restores the type-specific settings written by SavePayload (null: keep the defaults). |
string ReadoutAt(WellTrackContext context, float depth) | Cursor readout at depth (axis units), e.g. "GR 65.2 API"; null = nothing to show. |
JsonObject SavePayload() | Type-specific settings for persistence. |
ChangeOverlay static class
Outlines changed items on a laid-out schematic: added green, modified orange, removed red dashed, with a badge.
| Member | Summary |
|---|---|
static string Badge(ChangeKind k) | Badge character of a change kind (+ added, ~ modified, - removed). |
static SKColor ColorOf(ChangeKind k) | Change colour from the environment's styles. |
static void Draw(SKCanvas canvas, SchematicRenderPlan plan, IReadOnlyDictionary<string, ChangeKind> highlights) | Draws change highlights (added / modified / removed) over the schematic. |
ChangesTrack class
Non-depth table of the differences between two well states (grouped, counted, colour-coded).
Inherits / implements: WellTrack, ITrackFrame
| Member | Summary |
|---|---|
List<WellChange> Changes { get; } | The changes listed. |
string FromTitle { get; set; } | Title of the earlier state. |
bool IsDepthIndexed { get; } | False for tracks that are not drawn against depth (tables, legends, header blocks): the view then skips depth grid, tops, break marks and cursor for them, and they may use the full height below the header. |
string ToTitle { get; set; } | Title of the later state. |
string TypeKey { get; } | Stable key of the track type, written to documents and used to recreate the track (see WellTrackTypeAttribute). |
const string TypeKeyValue = "changes" | Type key of the track (serialization). |
void DrawContent(SKCanvas canvas, WellTrackContext ctx) | Draws into the plot (and, if needed, the reserve band). Clipped to the track below its header. |
void LoadPayload(JsonObject payload) | Restores the type-specific settings written by SavePayload (null: keep the defaults). |
JsonObject SavePayload() | Type-specific settings for persistence. |
Command struct
One step of a radial-map path (internal layout geometry).
| Member | Summary |
|---|---|
Command(Char op, float[] pts) | A path command: its operator letter (M, L, Q, T, Z) and its point coordinates. |
Char Op { get; } | M, L, Q or Z. |
float[] Points { get; } | M/L: x,y. Q: cx,cy,x,y. Z: empty. |
IBarrierTemplates interface
Contract: the barrier templates a host offers (registered with Set``1).
| Member | Summary |
|---|---|
IReadOnlyCollection<string> Names { get; } | Template names. |
WellBarrierSet Build(string name, WellSchematicDocument doc) | A barrier set from a template, or null when the schematic lacks what the template requires. |
JsonBarrierTemplates class
Barrier templates held as JSON: { "templates": { name: definition } }. The built-in file is embedded (barrier-templates.json); companies merge their own by name (resources.barrierTemplateFiles). The algorithm primitives (role bindings, host string, plug assignment) are code.
Inherits / implements: IBarrierTemplates, IJsonPersistable
| Member | Summary |
|---|---|
static JsonBarrierTemplates BuiltIn { get; } | The templates embedded in this library. |
static IBarrierTemplates Current { get; } | The templates in effect: one registered on the current services, else the built-in ones merged with the environment's resources.barrierTemplateFiles (a file that cannot be read is reported in the services' warnings). |
IReadOnlyCollection<string> Names { get; } | Template names. |
Dictionary<string, BarrierTemplateDefinition> Templates { get; set; } | Templates by name. |
WellBarrierSet Build(string name, WellSchematicDocument doc) | A barrier set from a template, or null when the schematic lacks what the template requires. |
static JsonBarrierTemplates FromJson(string json) | Reads templates: { "templates": { name: definition } }. |
JsonBarrierTemplates Merge(JsonBarrierTemplates other) | These templates with other's added; a template with the same name replaces this one's. |
string ToJson() | The templates as JSON, readable by String). |
List<ConfigIssue> Verify(IModelCatalog catalog, SchematicSettings schematic) | Static checks of every template (CV101-CV109): base template, binding roles and kinds, required bindings, envelopes, element types, targets, target kinds, and every depth expression and condition - the mistakes that otherwise only show when a template runs. |
static List<ConfigIssue> VerifyRoleSymbols(SchematicSettings schematic, SymbolCatalog catalog) | Symbols named in schematic.roles that the symbol catalog does not have (CV110). |
LeakPathTemplates static class
Starting-point leak-path networks mapped onto a barrier set's elements. Simplified — review per well.
| Member | Summary |
|---|---|
const string AnnulusA = "A" | Cavity id of the A annulus. |
const string OutsideCasing = "O" | Cavity id of the space outside the (production) casing. |
const string Reservoir = "R" | Cavity id of the reservoir (source). |
const string Surroundings = "E" | Cavity id of the surroundings (sink). |
const string TubingAbove = "TU" | Cavity id of the tubing above the downhole safety valve. |
const string TubingBelow = "TL" | Cavity id of the tubing below the downhole safety valve. |
static LeakPathResult Analyze(WellSchematicDocument doc, LeakPathNetwork network = null, int? required = null, bool? countImpaired = null) | Leak-path analysis straight from a schematic (headless integrity reports): the production-well network unless one is given, element statuses from the document's barrier set, required count / impaired rule from the environment. |
static LeakPathNetwork FluidColumnWell(WellBarrierSet set) | Drilling / workover with a fluid column: reservoir, well bore, outside the casing, surroundings. Fluid column between reservoir and bore; BOP, wellhead and riser between bore and surroundings; casing between bore and outside; casing cement between outside and surroundings. |
static LeakPathNetwork ForSet(WellBarrierSet set) | The network for a barrier set's well type, by the selection rules in effect (production when none matches). |
static LeakPathNetwork InjectionWell(WellBarrierSet set) | Injection well: the production-well network (same cavities and element roles). |
static LeakPathNetwork PermanentAbandonment(WellBarrierSet set) | Permanent abandonment: reservoir, the bore between the primary and secondary plugs, between secondary and environmental plugs, surroundings. Each plug is a link, and so are the casing cement behind it and the formation at its base. |
static LeakPathNetwork ProductionWell(WellBarrierSet set) | Production well capable of flowing (pairs with WellSchematicDocument)): reservoir, tubing below / above the DHSV, A annulus, outside the production casing, surroundings; elements joined by type and role. |
LeakPathTrack class
Well barrier (leak-path) diagram: cavities as boxes, barrier elements as status-coloured links, the weakest leak paths highlighted, and whether every path keeps the required number of barriers. Not depth-indexed.
Inherits / implements: WellTrack, ITrackFrame
| Member | Summary |
|---|---|
bool CountImpaired { get; set; } | Count impaired elements as barriers (default from the environment). |
bool IsDepthIndexed { get; } | False for tracks that are not drawn against depth (tables, legends, header blocks): the view then skips depth grid, tops, break marks and cursor for them, and they may use the full height below the header. |
LeakPathNetwork LastNetwork { get; } | The network actually drawn from the last draw (template networks are rebuilt per resolve). |
LeakPathResult LastResult { get; } | The result of the last analysis, or null. |
LeakPathNetwork Network { get; set; } | Explicit network; null = production-well template from the schematic's barrier set. |
int RequiredBarriers { get; set; } | Barriers required on every path (default from the environment). |
string SchematicTrackId { get; set; } | Id of the schematic track to use; null = the first schematic track in the view. |
string TypeKey { get; } | Stable key of the track type, written to documents and used to recreate the track (see WellTrackTypeAttribute). |
const string TypeKeyValue = "leakpaths" | Type key of the track (serialization). |
LeakPathResult Analyze(WellboreDocument view) | Analyses the view's barrier set with the network for its well type (null without a schematic or barrier set). |
void DrawContent(SKCanvas canvas, WellTrackContext ctx) | Draws into the plot (and, if needed, the reserve band). Clipped to the track below its header. |
void LoadPayload(JsonObject payload) | Restores the type-specific settings written by SavePayload (null: keep the defaults). |
JsonObject SavePayload() | Type-specific settings for persistence. |
static string Summary(LeakPathResult res) | The summary line (configurable labels: leakpaths.summary, leakpaths.met, leakpaths.notMet, leakpaths.unverified). |
IEnumerable<WellboreIssue> Validate(WellboreDocument document) | Track-level validation (called by WellboreValidator); families add their own data rules. |
PlugEnvelopeRule class
Plug-based envelopes (permanent abandonment): the deepest plugs fill the deep envelopes in order, the shallowest plug above abandonment.environmentalPlugMaxDepth the surface envelope.
| Member | Summary |
|---|---|
List<string> DeepEnvelopes { get; set; } | Envelopes filled by the deep plugs, deepest first. |
List<BarrierElementRule> PerPlug { get; set; } | Elements added for each plug (bindings: plug, host = the innermost string covering the plug). |
string SurfaceEnvelope { get; set; } | Envelope of the surface plug (null: none). |
RadialMap class
Monotonic piecewise-linear map from a symbol radius (units from the x=60 centreline) to a screen radius (px). Breakpoints pin symbol slots to real dimensions (tubing OD, casing ID, tool OD…), so one symbol draws correctly in any string size. Beyond the last breakpoint the last segment's slope continues.
| Member | Summary |
|---|---|
RadialMap(IEnumerable<(float, float)> breakpoints) | A map from symbol radius to pixels through the given breakpoints (sorted by radius). |
IReadOnlyList<(float, float)> Breakpoints { get; } | The breakpoints (radius, pixels). |
static RadialMap Linear(float scale) | Uniform scale (schematic mode). |
float Map(float r) | Pixels for a radius (linear between breakpoints, extrapolated beyond). |
float Slope(float r) | Local scale (px per unit) at radius r — used for circle radii and dash lengths. |
string ToString() | The breakpoints as text. |
float X(float symbolX, float centerX) | Screen x of a symbol x (centreline at 60). |
SchematicAnchor enum
Which end of the symbol body sits at the equipment depth.
| Member | Summary |
|---|---|
Top | Body top at TopDepth (default). |
Bottom | Body bottom at TopDepth (e.g. casing shoes recorded at shoe depth). |
SchematicAnnuli static class
Annulus helpers on a schematic document: identification, depth extent, screening and validation.
| Member | Summary |
|---|---|
static (double, double)? Extent(WellSchematicDocument doc, AnnulusInfo a) | Depth range of an annulus (document units): from surface to the packer (tubing annulus) or to the inner casing's top of cement, never below the outer string. |
static List<AnnulusInfo> Identify(WellSchematicDocument doc) | Annuli from the strings reaching surface (OD from attributes, else the string's nominal OD). |
static double Od(SchematicString s) | Outside diameter of a schematic string (attributes first, else the string's OD). |
static List<MaaspLimit> Screen(WellSchematicDocument doc, AnnulusInfo a, WellDepthReference depthRef = null) | MAASP screening for an annulus from the strings' burst / collapse ratings and the outer shoe TVD. |
static SKColor StatusColor(AnnulusStatus s) | Status colour from the environment. |
static string StatusText(AnnulusStatus s) | Short status text (OK, above MAWOP...). |
static IReadOnlyList<BarrierIssue> Validate(WellSchematicDocument doc, WellDepthReference depthRef = null) | Annulus checks: above MAASP (error), above MAWOP (warning), MAWOP over MAASP, missing MAASP / readings. |
SchematicDimensioning enum
How schematic tubulars are sized: Scaled (real diameters) or Schematic (standard slots).
| Member | Summary |
|---|---|
Schematic | Symbols at a fixed width (a schematic, not to scale). |
Scaled | Diameters to scale where sizes are known. |
SchematicEquipment class
An equipment symbol placed on the schematic.
| Member | Summary |
|---|---|
SchematicAnchor Anchor { get; set; } | Which end of the symbol is at the depth. |
EngineeringAttributes Attributes { get; set; } | Engineering attributes; null when unknown. |
double? BottomDepth { get; set; } | Optional bottom depth. Overlay symbols (perforations, frac ports) repeat to cover [TopDepth, BottomDepth]; for other items it is the recorded bottom (tally). |
string BreaksStringId { get; set; } | Optional explicit host string to break (overrides host resolution by slot). |
string ComponentType { get; set; } | Canonical component type (e.g. PACKER_PERMANENT) when known. |
string Id { get; set; } | Item id (component id when converted from a model). |
string Label { get; set; } | Optional label; null or empty = no label. |
double LabelOffset { get; set; } | Vertical label offset in screen pixels (manual declutter). |
SchematicPlacement Placement { get; set; } | At a depth, or in the surface stack. |
double Scale { get; set; } | Uniform symbol scale (e.g. host radius / drawn radius for a casing accessory in a liner). |
string SectionStringId { get; set; } | Optional explicit string to cut open (overrides section-window resolution by slot). |
SourceRef Source { get; set; } | Record this item came from. |
string SymbolId { get; set; } | Catalog symbol id, e.g. pk_permanent. |
double TopDepth { get; set; } | Depth of the top of the symbol body (ignored for SurfaceStack). |
SchematicFormation class
A formation / lithology interval drawn behind the wellbore.
| Member | Summary |
|---|---|
double BottomDepth { get; set; } | Bottom of the formation. |
string LithologyId { get; set; } | Lithology code or alias from the shared LithologyLibrary, e.g. oil_sand, shale (legacy fm_* ids accepted). |
string Name { get; set; } | Formation name. |
double TopDepth { get; set; } | Top of the formation. |
SchematicIssue class
One validation finding.
| Member | Summary |
|---|---|
SchematicIssue(SchematicIssueSeverity severity, string code, string message, string itemId = null) | Creates an issue: severity, code, message and the item concerned. |
string Code { get; } | Stable machine code, e.g. WS001. |
string ItemId { get; } | Id of the item concerned. |
string Message { get; } | What is wrong. |
SchematicIssueSeverity Severity { get; } | How serious the issue is. |
string ToString() | Severity, code and message on one line. |
SchematicIssueSeverity enum
Severity of a schematic validation issue.
| Member | Summary |
|---|---|
Info | Information. |
Warning | Should be reviewed. |
Error | The schematic is not valid. |
SchematicPlacement enum
How an equipment item is positioned.
| Member | Summary |
|---|---|
AtDepth | Top of the symbol body sits at TopDepth. |
SurfaceStack | Wellhead / surface stack: stacked upward from the depth datum in list order (first = lowest). |
SchematicRect struct
Axis-aligned rectangle in screen space (kept free of SkiaSharp so layout is testable headless).
| Member | Summary |
|---|---|
SchematicRect(float left, float top, float width, float height) | A rectangle from its left, top, width and height. |
float Bottom { get; } | Bottom edge. |
float Height { get; } | Height. |
float Left { get; } | Left edge. |
float Right { get; } | Right edge. |
float Top { get; } | Top edge. |
float Width { get; } | Width. |
bool Equals(SchematicRect other) | True when both rectangles are the same. |
bool Equals(object obj) | True when both rectangles are the same. |
int GetHashCode() | Hash of the rectangle. |
string ToString() | Position and size as text. |
SchematicRenderItem class
One draw operation produced by the layout engine.
| Member | Summary |
|---|---|
string Anchor { get; set; } | Text anchor: start | middle | end. |
float CenterX { get; set; } | Centre line x used by the radial map. |
SchematicRect? Clip { get; set; } | Optional clip (partial tiles at the end of an interval). |
string Color { get; set; } | Colour (#rrggbb). |
SchematicRect Dest { get; set; } | Destination rectangle the symbol viewBox maps to. |
float FontSize { get; set; } | Font size. |
bool HasLeader { get; set; } | Draw a leader line from the label to the item. |
SchematicRenderItemKind Kind { get; set; } | What the item draws. |
string Layer { get; set; } | Render layer (decides the draw order). |
RadialMap Radial { get; set; } | Dimension-driven drawing: when set, symbol x maps through this radial map around CenterX and y scales by Dest.Height / viewBox height (true dimensions instead of one uniform scale). |
string SourceId { get; set; } | Id of the document object this item came from (hit-testing / selection). |
bool Stretch { get; set; } | True: viewBox maps non-uniformly to Dest (stretchable strings). False: uniform scale. |
string SymbolId { get; set; } | Symbol drawn, for symbol items. |
string Text { get; set; } | Text of labels and ticks. |
float UnitScale { get; set; } | Screen pixels per symbol unit horizontally (stroke scaling reference). |
float X1 { get; set; } | Start x (labels, lines, leaders). |
float X2 { get; set; } | End x (leaders, lines). |
float Y1 { get; set; } | Start y. |
float Y2 { get; set; } | End y. |
SchematicRenderItemKind enum
Kind of item in a schematic render plan.
| Member | Summary |
|---|---|
Symbol | Draw a catalog symbol into Dest. |
Mask | Fill Dest with Color (hole masks). |
Label | Text at (X1,Y1); optional leader from (X2,Y2) when HasLeader. |
DepthTick | Depth tick at Y1 across X1..X2 with Text. |
DepthAxis | Depth axis line X1,Y1 -> X2,Y2. |
Lithology | Fill Dest with the lithology whose code is in Text. |
SchematicRenderPlan class
Result of WellSchematicLayoutOptions): layered draw items plus geometry facts.
| Member | Summary |
|---|---|
Dictionary<string, List<float>> Caps { get; } | Screen y where break caps were placed, per string id. |
float CenterX { get; } | Screen x of the well centreline. |
SchematicRect Column { get; set; } | Rectangle of the 120-unit schematic column. |
SchematicRect DepthArea { get; set; } | Depth-mapped area (below the surface stack). |
SchematicRect DepthTrack { get; set; } | Area of the depth scale. |
Dictionary<string, SchematicSpan> EquipmentBodies { get; } | Body interval of each placed equipment id. |
Dictionary<string, float> EquipmentHalfWidths { get; } | Per equipment id: drawn body half-width in px. |
List<SchematicRenderItem> Items { get; } | The items, in draw order. |
SchematicRect LabelArea { get; set; } | Area of the labels. |
Dictionary<string, List<SchematicSpan>> PlainSegments { get; } | Plain (uncut) segments per string id. |
Dictionary<string, float> StringInnerRadii { get; } | Per string id: inner wall (ID) radius in px — annulus fills stop here. |
Dictionary<string, (float, float)> StringRadii { get; } | Per string id: outer wall radius and cement / hole radius in px from the column centre (barrier overlays). |
float UnitScale { get; set; } | Screen pixels per symbol unit. |
List<string> Warnings { get; } | Problems found while laying out (unknown symbols, unresolved hosts). |
Dictionary<string, List<SchematicSpan>> WindowSegments { get; } | Section-window segments per string id (after merging and inline exclusion). |
float DepthToY(double depth) | Screen y of a depth (document unit). |
string HitTestEquipment(float x, float y) | Topmost equipment whose body contains the point (screen space), or null. |
double YToDepth(float y) | Depth (document unit) at a screen y. |
SchematicSpan struct
A vertical interval in screen pixels.
| Member | Summary |
|---|---|
SchematicSpan(float top, float bottom) | A vertical span from top to bottom (pixels). |
float Bottom { get; } | Bottom (pixels). |
float Length { get; } | Length (pixels). |
float Top { get; } | Top (pixels). |
string ToString() | The span as text. |
SchematicString class
A host string (casing, liner, tubing, line, open hole) drawn with a stretchable symbol.
| Member | Summary |
|---|---|
EngineeringAttributes Attributes { get; set; } | Engineering attributes (OD/ID/weight/grade/connection…); null when unknown. |
double BottomDepth { get; set; } | Bottom (shoe) of the string. |
double? CementBottom { get; set; } | Bottom of cement; defaults to BottomDepth when CementTop is set. |
double? CementTop { get; set; } | Top of cement; null = uncemented. |
double? HoleDiameter { get; set; } | Bit size (in) of the hole this string was run in — the cement sheath's outer boundary; null = estimated. |
string Id { get; set; } | Unique id within the document (referenced by equipment overrides). |
string Name { get; set; } | Display name, e.g. "9-5/8in 47# L80". |
double? OuterDiameter { get; set; } | Optional nominal OD in inches (labels / validation). |
SourceRef Source { get; set; } | Record this string came from (PPDM, Seabed, CSV…). |
string SymbolId { get; set; } | Catalog symbol id, e.g. str_production_casing. |
double TopDepth { get; set; } | Top of the string (document unit). |
SchematicTrack class
Completion / well schematic as a wellbore track. Depths map through the view's shared DepthMapper (document unit converted to the axis unit), so equipment lines up with log curves and tops in neighbouring tracks.
Inherits / implements: WellTrack, ITrackFrame
| Member | Summary |
|---|---|
bool AllowEditing { get; set; } | Pressing on equipment, a casing shoe or a cement top drags it (off by default). |
SymbolCatalog Catalog { get; set; } | The symbol catalog. |
float ColumnFraction { get; set; } | Share of the plot used by the schematic column when ColumnWidth is 0 and labels are shown. |
float ColumnWidth { get; set; } | Screen width of the 120-unit schematic column; 0 = ColumnFraction of the plot. |
float CompressedGlyphHeight { get; set; } | Compressed depth, Scaled dimensioning: minimum height reserved for each component. |
SchematicDimensioning Dimensioning { get; set; } | Schematic (uniform symbols) or Scaled (real OD/ID/hole sizes and true component lengths). |
WellSchematicDocument Document { get; set; } | The schematic shown. |
float EditSnap { get; set; } | Depth snap for edits (0 = none), in the document unit. |
Dictionary<string, ChangeKind> Highlights { get; } | Change highlights (item id -> kind) for state comparisons: added green, modified orange, removed red dashed. |
SchematicRenderPlan LastPlan { get; } | Plan from the last draw (hit-testing). |
int PlanBuilds { get; } | Number of layout rebuilds — diagnostics / tests. |
bool ShowAnnuli { get; set; } | Draw annulus fluids and A/B/C tags when the document has annulus data. |
bool ShowBarriers { get; set; } | Draw well barrier envelopes when the document has barrier data. |
bool ShowCement { get; set; } | Show cement. |
bool ShowFormations { get; set; } | Show formations. |
bool ShowLabels { get; set; } | Show equipment labels. |
bool ShowSectionWindows { get; set; } | Open section windows in strings at equipment. |
bool ShowSurfaceStack { get; set; } | Show the surface stack (wellhead, tree) above the depth area. |
bool ShowSymbolLabels { get; set; } | Show labels drawn inside symbols. |
string TypeKey { get; } | Stable key of the track type, written to documents and used to recreate the track (see WellTrackTypeAttribute). |
const string TypeKeyValue = "schematic" | Type key of the track (serialization). |
TrackEdit AddEquipment(SchematicEquipment item) | Adds equipment (applied now); record the returned edit with WellboreView.RecordTrackEdit to make it undoable. |
TrackEdit CommitDepthShift(string key, float delta, float referenceDepth, string depthUnit) | Commits a previewed shift and returns its undoable edit (null when nothing changed or unsupported). |
void ConvertDepthUnit(DepthUnit from, DepthUnit to) | No-op: the schematic document carries its own DepthUnit and is converted at draw time. |
IEnumerable<DepthFeature> DepthFeatures(float plotWidth, DepthAxis axis) | Compressed depth: every placed component asks for readable space — its natural symbol height (Schematic) or CompressedGlyphHeight (Scaled) — over its depth interval (axis units). |
void DrawContent(SKCanvas canvas, WellTrackContext ctx) | Draws into the plot (and, if needed, the reserve band). Clipped to the track below its header. |
string HitTest(WellTrackContext context, float x, float y) | Id of the object under a point, or null. |
string HitTestEditable(WellTrackContext context, float x, float y) | Editable item under the pointer: "equip:id", "string:id:bottom" (shoe) or "string:id:cementTop". |
(float, float)? ItemDepthRange(string itemId, DepthAxis axis) | Depth range (axis units) of an item, for "zoom to item". |
IEnumerable<LegendEntry> LegendEntries() | Equipment symbols used (drawn icons), formation lithologies and, with barrier data, the envelope colours. |
void LoadPayload(JsonObject payload) | Restores the type-specific settings written by SavePayload (null: keep the defaults). |
WellSchematicLayoutOptions Options(float plotWidth, DepthMapper? mapper) | Layout options for a plot width, bound to the view's depth mapper. |
float PreferredTopReserve(float plotWidth, DepthAxis axis) | Height this track wants above the plot (applied uniformly to all tracks to keep them aligned). |
bool PreviewDepthShift(string key, float delta) | Previews a vertical shift of one item (e.g. a curve by mnemonic) by delta depth units; false if unsupported. |
string ReadoutAt(WellTrackContext context, float depth) | Equipment under the cursor, else the innermost string at that depth. |
TrackEdit RemoveEquipment(string id) | Removes equipment by id (applied now); null when absent. |
JsonObject SavePayload() | Type-specific settings for persistence. |
SKRect? SelectionBounds(WellTrackContext context, string itemId) | Screen rectangle to highlight for a selected item id (any track may show the same item: cross-highlight). |
TrackEdit SetStringDepths(string stringId, double? top = null, double? bottom = null, double? cementTop = null) | Changes a string's top, bottom or cement top (applied now; the shoe follows the bottom); null when the string is absent. |
IEnumerable<WellboreIssue> Validate(WellboreDocument document) | Folds the schematic (WS), barrier (WB) and annulus (WA) validators into the view validation. |
SectionWindowSpec class
Which string an item cuts open, and by how much.
| Member | Summary |
|---|---|
float Margin { get; set; } | Extra length opened above and below the item (symbol units). |
float Radius { get; set; } | Radius of the string that is cut open (symbol units). |
string Slot { get; set; } | Which string the window opens: host or outer (see SectionWindowSpec). |
string Target { get; set; } | host = the string the item sits in; outer = the string around the annulus. |
SvgPathData static class
Absolute SVG path data (M, L, Q, T, Z — the subset the catalog uses; H/V accepted) parsed into explicit commands. T is expanded to Q with the reflected control point, so every point can be warped exactly.
| Member | Summary |
|---|---|
static List<Command> Parse(string d) | Parses SVG path data (M/L/Q/T/Z subset) into commands. |
SymbolCatalog class
The symbol catalog (generated by the well-schematic symbol library). Symbols are data: new equipment is added by regenerating the JSON, never by adding C# types.
Inherits / implements: IJsonPersistable
| Member | Summary |
|---|---|
IEnumerable<string> Categories { get; } | Equipment categories, sorted. |
static SymbolCatalog Current { get; } | The catalog in effect: one a host set (WellboreServices.Set<SymbolCatalog>), else the environment's resources.symbolCatalogFile, else the embedded catalog. Conversion, layout, rendering and the tally use this. |
static SymbolCatalog Default { get; } | The catalog embedded in this assembly. |
IEnumerable<SymbolDefinition> Equipment { get; } | Equipment symbols. |
IReadOnlyList<string> LayerOrder { get; } | Back-to-front render layer order. |
string Library { get; } | Library name from the catalog. |
IEnumerable<SymbolDefinition> StringAssets { get; } | String and companion assets (strings, cement bands, section tiles, caps). |
IReadOnlyList<SymbolDefinition> Symbols { get; } | All symbols. |
string Version { get; } | Library version. |
const string EmbeddedResourceName = "TheTechIdea.OilGas.WellSchematic.symbols.json" | Logical name of the embedded catalog resource. |
static IReadOnlyCollection<string> EquipmentKinds | Equipment kinds the layout places (inline, insert, annular, surface, overlay, free). |
SymbolDefinition Companion(string stringSymbolId, string pattern) | Companion asset of a string symbol, e.g. ("str_liner", "sec_{0}_tile") -> sec_liner_tile when present. |
bool Contains(string id) | True when the catalog has a symbol with this id. |
static SymbolCatalog FromJson(string json) | Reads a catalog from JSON. |
SymbolDefinition Get(string id) | Gets a symbol by id (throws when unknown). |
int LayerIndex(string layer) | Draw order index of a layer (unknown layers last). |
static SymbolCatalog Load(Stream stream) | Reads a catalog from a stream. |
static SymbolCatalog LoadFromFile(string path) | Reads a catalog file. |
SymbolCatalog Merge(SymbolCatalog extra) | This catalog with the symbols of extra added (same id: the extra symbol replaces this one); a company library over the built-in one. |
string ToJson() | The catalog as JSON (library, version, conventions, symbols; unknown fields kept), readable by String). |
bool TryGet(string id, SymbolDefinition symbol) | Gets a symbol by id; false when unknown. |
List<SchematicIssue> Validate() | Checks the catalog: WS070 duplicate id, WS071 unknown equipment kind, WS072 layer not in the layer order, WS073 symbol without drawing, WS074 equipment body outside its viewBox, WS075 symbol without a name. |
SymbolDefinition class
A catalog entry: metadata from the manifest plus the drawing primitives.
| Member | Summary |
|---|---|
string Abbreviation { get; set; } | Abbreviation shown in labels. |
float AnchorY { get; set; } | Vertical point of the symbol placed at the depth (caps). |
float BodyBottom { get; set; } | Bottom of the equipment body in the viewBox. |
float BodyHeight { get; set; } | Body height (the length that scales with the depth). |
float BodyTop { get; set; } | Top of the equipment body in the viewBox (where the depth is placed). |
string Category { get; set; } | Category (packers, safety valves...). |
string Description { get; set; } | Description. |
Dictionary<string, JsonElement> Extra { get; set; } | Fields this library does not interpret, kept so a load and save loses nothing. |
string Group { get; set; } | string | equipment. |
string Host { get; set; } | Slot the equipment sits in (tubing, casing, liner, lower completion...); its radius locates the host string. |
string Id { get; set; } | Symbol id, for example pk_permanent. |
bool IsEquipment { get; } | True for equipment (false for string assets). |
string Kind { get; set; } | inline | insert | annular | surface | overlay (equipment only). |
List<SymbolPrimitive> Labels { get; set; } | Label primitives drawn with the symbol, if any. |
string Layer { get; set; } | Render layer (strings); equipment use "equipment" / "overlay". |
string Name { get; set; } | Display name. |
float Offset { get; set; } | Horizontal offset from the centre line for strings without a radius (lines hugging the tubing). |
float OuterRadius { get; set; } | Outer radius of a cement band (symbol units). |
List<SymbolPrimitive> Primitives { get; set; } | The drawing primitives. |
float Radius { get; set; } | Wall radius of a string symbol (symbol units). |
string SectionOf { get; set; } | The string key a section asset belongs to. |
SectionWindowSpec SectionWindow { get; set; } | The section window the item opens in a string, if any. |
bool Stretchable { get; set; } | The symbol is stretched along its depth span (strings). |
string StringKey { get; } | For str_* symbols: the key used by companion assets (cem_/sec_), e.g. "production_casing". |
string Style { get; set; } | section | elevation (equipment only). |
float TileHeight { get; set; } | Repeat height of a tiled asset (textures, sections). |
float[] ViewBox { get; set; } | viewBox width, height. |
float ViewBoxHeight { get; } | viewBox height (300 when not given). |
float ViewBoxWidth { get; } | viewBox width (120 when not given). |
SymbolPrimitive class
One drawing primitive of a symbol, in symbol units (viewBox space).
| Member | Summary |
|---|---|
string Anchor { get; set; } | Text anchor (start, middle, end). |
float Cx { get; set; } | Circle centre x. |
float Cy { get; set; } | Circle centre y. |
float[] Dash { get; set; } | Dash pattern, or null for a solid line. |
Dictionary<string, JsonElement> Extra { get; set; } | Fields this library does not interpret, kept so a load and save loses nothing. |
string Fill { get; set; } | Fill colour (#rrggbb) or null for no fill. |
float FontSize { get; set; } | Text size (symbol units). |
float H { get; set; } | Rectangle height. |
int NonScalingStroke { get; set; } | 1 when the stroke must not scale with the symbol (stretchable strings). |
string PathData { get; set; } | SVG path data (M/L/Q/T/Z subset) for paths. |
float[] Points { get; set; } | Flat point list x0,y0,x1,y1,... for polygons / polylines. |
float R { get; set; } | Circle radius. |
float Rx { get; set; } | Rectangle corner radius. |
string Stroke { get; set; } | Stroke colour (#rrggbb) or null for no stroke. |
float StrokeWidth { get; set; } | Stroke width (symbol units). |
string Text { get; set; } | Text content (labels only). |
string Type { get; set; } | r = rect, l = line, pg = polygon, pl = polyline, p = path, c = circle, tx = text. |
float W { get; set; } | Rectangle width. |
float X { get; set; } | Rectangle x. |
float X1 { get; set; } | Line start x. |
float X2 { get; set; } | Line end x. |
float Y { get; set; } | Rectangle y. |
float Y1 { get; set; } | Line start y. |
float Y2 { get; set; } | Line end y. |
SymbolRenderer static class
Draws catalog symbols with SkiaSharp by interpreting their primitives — no SVG parser. Geometry is transformed point-by-point instead of scaling the canvas, so stretching a string vertically never distorts stroke widths (strokes scale with the horizontal unit scale only).
| Member | Summary |
|---|---|
static void Draw(SKCanvas canvas, SymbolDefinition symbol, SKRect dest, bool stretch, bool drawLabels = true) | Draws symbol so its viewBox maps onto dest. stretch: x and y scale independently (strings); otherwise uniform (x scale). |
static void DrawWarped(SKCanvas canvas, SymbolDefinition symbol, float centerX, RadialMap map, float top, float sy, float strokeScale, bool drawLabels = true) | Dimension-driven draw: x = centre ± map(|x-60|), y = top + y*sy. Rectangles stay axis-aligned, circles take the local radial slope, paths are rebuilt point by point (exact for M/L/Q; T expanded). |
static SKColor ParseColor(string hex) | Parses #rrggbb (cached); falls back to black. |
TallyBuilder static class
Builds casing-program and completion tallies from a schematic document (unit-aware).
| Member | Summary |
|---|---|
static (string, string)[] CompletionColumns | The built-in completion tally columns (key, header); the columns used come from the environment (equipment.tallyColumns), which defaults to these. |
static (string, string)[] ProgramColumns | Columns of the casing and tubing program (key, header). |
static TallyTable CasingProgram(WellSchematicDocument doc, TallyUnits units = null) | The casing and tubing program: one row per string with hole size and cement top. |
static TallyTable CasingProgram(WellSchematicDocument doc, TallyUnits units, CultureInfo culture) | The casing program with numbers in culture (views: the display culture; files: invariant). |
static TallyTable Completion(WellSchematicDocument doc, TallyUnits units = null, SymbolCatalog catalog = null, Func<double, double?> mdToTvd = null) | The completion tally: equipment top down with depths, sizes and attributes (TVD when a converter is given). |
static TallyTable Completion(WellSchematicDocument doc, TallyUnits units, SymbolCatalog catalog, Func<double, double?> mdToTvd, CultureInfo culture) | The completion tally: equipment top down with depths, sizes and attributes (TVD when a converter is given). |
static string OilfieldInches(double inches) | 9.625 -> "9 5/8"; values not near a 1/16 fall back to decimals. |
static string OilfieldInches(double inches, CultureInfo culture) | 9.625 -> "9 5/8"; decimals (values not near a 1/16) in culture. |
TallyTable class
A tally / program table: headers + formatted rows; CSV export.
| Member | Summary |
|---|---|
List<(string, string)> Columns { get; } | Columns: key and header text. |
List<double> RowDepths { get; } | Top depth per row, document unit (depth alignment). |
List<string> RowIds { get; } | Source item id per row (selection / cross-highlighting). |
List<string[]> Rows { get; } | Rows (one cell per column). |
string Title { get; set; } | Table title. |
string Cell(int row, string key) | The cell of a row by column key (empty when absent). |
string ToCsv() | The table as CSV. |
TallyTrack class
Completion table as a depth-aligned track: one row per component at its depth (rows pushed apart when crowded, with leaders back to the true depth). Reads the schematic of a SchematicTrack in the same view.
Inherits / implements: WellTrack, ITrackFrame
| Member | Summary |
|---|---|
List<(string, float)> Columns { get; } | Column keys from CompletionColumns, with relative widths. |
List<(string, SKRect)> LastRows { get; } | Row rectangles from the last draw (hit-testing). |
float RowHeight { get; set; } | Row height (pixels). |
string SchematicTrackId { get; set; } | Schematic track to read; null = first schematic track in the view. |
string Subtitle { get; } | Second header line (units, mnemonic); null = none. |
string TypeKey { get; } | Stable key of the track type, written to documents and used to recreate the track (see WellTrackTypeAttribute). |
TallyUnits Units { get; set; } | Units of the table. |
const string TypeKeyValue = "tally" | Type key of the track (serialization). |
static float[] Declutter(IReadOnlyList<float> targets, float rowHeight, float top, float bottom) | Row y positions (screen) after declutter; pure, testable. |
void DrawContent(SKCanvas canvas, WellTrackContext ctx) | Draws into the plot (and, if needed, the reserve band). Clipped to the track below its header. |
string HitTest(WellTrackContext context, float x, float y) | Id of the object under a point, or null. |
void LoadPayload(JsonObject payload) | Restores the type-specific settings written by SavePayload (null: keep the defaults). |
JsonObject SavePayload() | Type-specific settings for persistence. |
SKRect? SelectionBounds(WellTrackContext context, string itemId) | Highlights the row of a selected component (cross-highlight with the schematic). |
IEnumerable<WellboreIssue> Validate(WellboreDocument document) | Track-level validation (called by WellboreValidator); families add their own data rules. |
TallyUnits class
Display units for tally values.
| Member | Summary |
|---|---|
string Diameter { get; set; } | Diameter unit of the tables (default from the environment). |
bool InchFractions { get; set; } | Show inch diameters as oilfield fractions (9 5/8). |
string Pressure { get; set; } | Pressure unit. |
string Weight { get; set; } | Weight unit. |
WellComparison static class
Builds comparison views between well states.
| Member | Summary |
|---|---|
static WellboreDocument SideBySide(WellState a, WellState b, WellModelConversionOptions options = null, double matchTolerance = 200) | Side-by-side view on one depth axis: depth, state A schematic (removed / modified highlighted), state B schematic (added / modified highlighted) and a changes table. |
WellModelConversionOptions class
Options for converting a canonical well model into schematic and wellbore views (defaults from the environment conversion section).
| Member | Summary |
|---|---|
bool AddCasingShoes { get; set; } | Add a shoe mark at the bottom of every casing/liner string that has none. |
DepthScaleMode DepthMode { get; set; } | Views use compressed depth by default so every component is readable; True = linear. |
DepthUnit DepthUnit { get; set; } | Depth unit of the produced documents. |
SchematicDimensioning Dimensioning { get; set; } | Views draw real dimensions by default (data from a well model is engineering data). |
Func<WellModel, DepthUnit, IEnumerable<WellTrack>> ExtraTracks { get; set; } | Tracks from other families built from the same model (e.g. WellLogTracks.FromModel), inserted before the tables. |
bool GenerateAnnuli { get; set; } | When the model has no annulus data, identify annuli from the strings (fluids / limits unknown). |
bool GenerateBarriers { get; set; } | When the model has no barrier data, generate the typical production-well set (flagged Planned). |
bool InstalledOnly { get; set; } | Skip components/strings whose status is Removed or Abandoned (as-is view). |
bool LabelComponents { get; set; } | Label equipment (component name, else canonical type name). |
bool ShowBarrierTable { get; set; } | Add a well barrier table track to the view when barrier data exists. |
bool ShowTrajectory { get; set; } | Add a deviation track when the model has a survey. |
WellModelConverter static class
Converts the library's canonical WellModel (from any adapter: PPDM, Seabed, CSV…) into schematic and wellbore view documents. Symbol choices come from component-symbols.json.
| Member | Summary |
|---|---|
static List<(string, string, string, string)> ApplyEdits(WellSchematicDocument doc, WellModel model) | Writes schematic edits back to the model by id (components, strings, intervals), each value in its own unit. Equipment added in the schematic becomes a component; components removed from it are marked Removed (history kept). Generated items (casing shoes, open hole) are skipped. Returns the changes (id, field, before, after). |
static List<(string, string, string, string)> ApplyEdits(WellSchematicDocument doc, WellModel model, string author, string reason) | As WellModel), and records every change in the model's audit trail with author and reason (source "schematic editor"); no audit when the author is null. |
static string SymbolFor(string componentType, SymbolCatalog catalog = null) | Symbol id for a canonical component type (or a type that already is a symbol id). |
static WellSchematicDocument ToSchematic(WellModel model, WellModelConversionOptions options, List<string> warnings) | A schematic from the canonical model (strings, equipment, intervals, formations from tops, barrier set, annuli); problems in warnings. |
static WellboreDocument ToWellboreView(WellModel model, WellModelConversionOptions options, List<string> warnings) | Wellbore view: depth track, schematic, tally, tops as markers — all on one axis. |
WellPathGeometry class
Screen geometry of a well path in vertical section (displacement along an azimuth vs TVD) at TRUE, equal scale, with bands offset perpendicular to the path in screen space (uniform thickness through bends). Pure — used for drawing and tests.
| Member | Summary |
|---|---|
WellPathGeometry(Trajectory t, string docUnit, double azimuth, double mdTop, double mdBottom, SKRect area, float margin = 24) | Well-path geometry for a trajectory on a vertical section of azimuth, fitted (equal scale) into area. |
SKRect Area { get; } | The drawing area. |
double Azimuth { get; } | Azimuth of the vertical section (degrees). |
double MdBottom { get; } | Bottom of the MD range drawn. |
double MdTop { get; } | Top of the MD range drawn. |
float Scale { get; } | Screen px per trajectory length unit (same both axes). |
SKPoint At(double mdDoc) | Screen point of a measured depth (document unit). |
List<SKPoint> Band(double top, double bottom, float halfPx, int samples = 80) | Closed polygon of a band of half-width halfPx around the path over [top, bottom] MD. |
List<SKPoint> Edge(double top, double bottom, float offsetPx, int samples = 80) | One edge of a band (offset polyline) — for walls / dashed open hole. |
SKPoint Normal(double mdDoc) | Unit normal (tangent rotated 90°) in screen space. |
SKPoint Tangent(double mdDoc) | Unit tangent (direction of increasing MD) in screen space. |
float YOfTvd(double tvdDoc) | Screen y of a TVD (doc unit) — horizontal surfaces. |
WellPathSchematicTrack class
Completion drawn along the real well path in vertical section: strings as bands (cement to hole wall, steel to OD, bore to ID, largest first), open hole dashed at bit size, equipment across its host, tops as horizontal surfaces at their TVD. Path at true scale; diameters exaggerated by PixelsPerInch. Not depth-indexed.
Inherits / implements: WellTrack, ITrackFrame
| Member | Summary |
|---|---|
bool IsDepthIndexed { get; } | False for tracks that are not drawn against depth (tables, legends, header blocks): the view then skips depth grid, tops, break marks and cursor for them, and they may use the full height below the header. |
WellPathGeometry LastGeometry { get; } | The geometry of the last drawing, or null. |
float PixelsPerInch { get; set; } | Diameter exaggeration: screen px per inch of diameter (the path itself is true scale). |
string SchematicTrackId { get; set; } | Id of the schematic track to use; null = the first schematic track in the view. |
double? SectionAzimuth { get; set; } | Section azimuth (degrees); null = closure azimuth. |
bool ShowEquipment { get; set; } | Draw equipment along the path. |
bool ShowTops { get; set; } | Draw formation tops as surfaces. |
string Subtitle { get; } | Second header line (units, mnemonic); null = none. |
string TypeKey { get; } | Stable key of the track type, written to documents and used to recreate the track (see WellTrackTypeAttribute). |
const string TypeKeyValue = "wellpath" | Type key of the track (serialization). |
static float[] Declutter(IReadOnlyList<float> desired, float min, float max, float gap) | Two-pass label declutter: push down to keep gap, then pull back up from max so labels near the bottom (e.g. on a lateral) stay inside [min, max]. Input order = desired order. |
void DrawContent(SKCanvas canvas, WellTrackContext ctx) | Draws into the plot (and, if needed, the reserve band). Clipped to the track below its header. |
WellPathGeometry Geometry(WellboreDocument view, SKRect area) | The well-path geometry for a view in an area (null without a trajectory). |
void LoadPayload(JsonObject payload) | Restores the type-specific settings written by SavePayload (null: keep the defaults). |
static List<SchematicString> Order(WellSchematicDocument doc) | Draw order: largest OD first so smaller strings nest inside. |
JsonObject SavePayload() | Type-specific settings for persistence. |
IEnumerable<WellboreIssue> Validate(WellboreDocument document) | Track-level validation (called by WellboreValidator); families add their own data rules. |
WellSchematicDocument class
A complete, depth-based well schematic.
Inherits / implements: IJsonPersistable
| Member | Summary |
|---|---|
List<AnnulusInfo> Annuli { get; set; } | Surface-accessible annuli (A, B, C…) with fluids, pressures and limits; empty = none shown. |
WellBarrierSet Barriers { get; set; } | Well barrier schematic data (envelopes, WBEs, WBS header); null = no barriers shown. |
double BottomDepth { get; set; } | Depth at the bottom of the depth track (usually TD). |
DepthUnit DepthUnit { get; set; } | Depth unit of all depths in the document. |
List<SchematicEquipment> Equipment { get; set; } | Equipment and intervals. |
List<SchematicFormation> Formations { get; set; } | Formations behind the strings. |
string Name { get; set; } | Document name. |
int SchemaVersion { get; set; } | Schema version of the document. |
List<SchematicString> Strings { get; set; } | Casing, liner, tubing and other strings. |
double? SurfaceDepth { get; set; } | Depth of the ground level / mudline below the schematic's depth zero (document units); null = unknown. Filled by the converter from the datum elevation minus the ground / seabed elevation (datum codes GL, SB, ML) - a vertical top hole is assumed. |
double TopDepth { get; set; } | Depth at the top of the depth track (usually the datum, 0). |
string WellName { get; set; } | Well name. |
const int CurrentSchemaVersion = 2 | Current document schema: v2 adds attributes/provenance/anchor/span and library lithology codes. |
static IReadOnlyDictionary<int, Action<JsonObject>> Migrations | Schema migrations: key = from-version. |
double DepthFraction(double depth) | Maps a depth to its 0..1 fraction of the depth axis (unclamped). |
static WellSchematicDocument FromJson(string json) | Deserializes a document produced by ToJson (or hand-written JSON). |
string ToJson() | Serializes to compact JSON (camelCase, enums as strings). |
WellSchematicLayoutEngine static class
Turns a depth-based WellSchematicDocument into a layered, screen-space SchematicRenderPlan. Pure (no SkiaSharp) so it runs headless and deterministic. Rules (see the symbol library README): inline/annular equipment break their host string over their body; items with a section window cut a string open over [top - margin, bottom + margin]; window parts already replaced by an inline tool are skipped; break caps only where a window meets a plain run; cement = stretched band + repeated stipple tiles; formations = repeated tiles with the hole masked; surface-stack items stack upward from the datum.
| Member | Summary |
|---|---|
static SchematicRenderPlan Build(WellSchematicDocument document, SymbolCatalog catalog, SchematicRect plot, WellSchematicLayoutOptions options = null) | Lays out a schematic in plot: the render plan with every item, geometry and warnings. |
WellSchematicLayoutOptions class
Layout options for WellSchematicLayoutEngine.
| Member | Summary |
|---|---|
DepthMapper? Binding { get; set; } | Shared wellbore depth mapping. When set, the depth area is exactly the plot rectangle, depths map through the mapper (document unit converted to the axis unit), equipment outside the view is culled, and surface-stack items sit above the plot (in the view's top reserve). |
float ColumnWidth { get; set; } | Screen width of the 120-unit schematic column. |
float DefaultGlyphHeight { get; set; } | Scaled mode: height used when a component has no recorded length. |
float DepthTrackWidth { get; set; } | Width of the depth scale (pixels). |
SchematicDimensioning Dimensioning { get; set; } | Schematic: one uniform symbol scale (classic diagram). Scaled: radii from real OD/ID/hole sizes and component heights from true length at the current depth scale (engineering-correct). |
float LabelAreaWidth { get; set; } | Width of the label area (pixels). |
float LabelFontSize { get; set; } | Label font size. |
float MinGlyphHeight { get; set; } | Scaled mode: minimum on-screen height of a component (short tools stay visible). |
float MinTickSpacing { get; set; } | Minimum pixel spacing between depth ticks. |
bool ShowCement { get; set; } | Draw cement. |
bool ShowDepthScale { get; set; } | Draw the depth scale. |
bool ShowFormations { get; set; } | Draw formations. |
bool ShowLabels { get; set; } | Draw equipment labels. |
bool ShowSectionWindows { get; set; } | Open section windows in strings at equipment. |
bool ShowSurfaceStack { get; set; } | Draw surface-stack (wellhead) items. |
WellSchematicRenderer static class
Renders a WellSchematicDocument: layout (pure) + primitive interpretation (Skia).
| Member | Summary |
|---|---|
static SchematicRenderPlan Draw(SKCanvas canvas, SKRect bounds, WellSchematicDocument document, SymbolCatalog catalog = null, WellSchematicLayoutOptions options = null, bool drawSymbolLabels = true) | Lays out and draws the document into bounds; returns the plan (hit-testing, overlays). |
static void DrawPlan(SKCanvas canvas, SchematicRenderPlan plan, SymbolCatalog catalog, bool drawSymbolLabels = true) | Draws an already computed plan (e.g. cached between frames while only panning). |
WellSchematicSymbolView class
A single catalog symbol as a diagram node (legends, symbol sheets, free-form sketches). Fixed symbols keep their aspect ratio; string assets stretch to the node height.
Inherits / implements: ViewSurface
| Member | Summary |
|---|---|
IReadOnlyList<AccessibleItem> AccessibleChildren { get; } | The view's elements (tracks, wells...) with their state, for assistive technology. |
SymbolCatalog Catalog { get; set; } | The symbol catalog. |
string Filter { get; set; } | Gallery filter: matches id, name, abbreviation, category and description (empty = all). |
SKSize GalleryCell { get; set; } | Gallery cell size (pixels). |
bool GalleryMode { get; set; } | Show every catalog symbol (matching Filter) as a grid instead of one symbol; click or arrow keys select. |
IReadOnlyList<SymbolDefinition> GallerySymbols { get; } | The symbols the gallery shows: equipment, then strings, filtered. |
bool ShowCaption { get; set; } | Show the symbol name under the drawing. |
string SymbolId { get; set; } | Catalog symbol id; unknown ids are ignored. |
bool HandleKey(ViewKey key, ViewModifiers modifiers = None) | A key with modifiers; true when handled (the host redraws). See each view for its keys. |
SymbolDefinition SymbolAt(SKPoint point) | The gallery symbol at a point, or null (single-symbol mode: the shown symbol inside the view). |
WellSchematicTemplates static class
Ready-made documents for demos, templates and tests.
| Member | Summary |
|---|---|
static WellSchematicDocument CreateGasLiftProducerDemo() | Gas-lifted producer: conductor / surface / intermediate / production casing, 7in liner, tubing with TRSV, two GLMs, sliding sleeve, permanent packer, nipple with standing valve, perforated liner; a PLT run in the tubing shows a tubing section window. Laid out to read without overlaps at WellSchematicView default size. |
WellSchematicValidator static class
Checks a document against the catalog before rendering. Structural checks are depth-based; visual overlap is checked on a layout at a nominal size because symbol bodies have fixed screen height (a 90-unit packer covers more depth on a long well than on a short one).
| Member | Summary |
|---|---|
static IReadOnlyList<SchematicIssue> Validate(WellSchematicDocument document, SymbolCatalog catalog, float nominalHeight = 1000, WellSchematicLayoutOptions options = null, bool includeDisplayChecks = true) | Structural and depth-based checks; with includeDisplayChecks also on-screen overlaps of symbol bodies at nominalHeight px true scale (WS041) using options. |
WellSchematicView class
Stand-alone well schematic: a WellboreView with a depth track and a schematic track (wellhead stack shown above the plot). Same drawing path as any composite log + schematic view.
Inherits / implements: WellboreView
| Member | Summary |
|---|---|
SchematicRenderPlan LastPlan { get; } | The render plan of the schematic track's last drawing. |
WellSchematicDocument Schematic { get; set; } | The schematic document; call CommitDocumentChanges after editing it in place. |
SchematicTrack Track { get; } | The schematic track of this view. |
static WellboreDocument Build(WellSchematicDocument schematic) | Wraps a schematic document in a wellbore view whose axis matches the schematic. |
IReadOnlyList<SchematicIssue> ValidateSchematic() | Validates the schematic against the catalog. |