Skip to content
PetroLabb

FreeLeetCode for petroleum engineering

Build engineering experience before your first job.

Practice problems in every petroleum engineering discipline, from five-minute calculations to week-long field scenarios, all graded against a hidden true answer.

Water Breakthrough Risk in a Mature Field

JO
1 / 6

Read the brief. Sarah needs a recommendation for Thursday’s partners meeting, and you have $60,000 for extra studies.

Why it exists

Seven years of experience is really a count of problems solved.

A drilling engineer with seven years behind them has taken a kick and filled in a kill sheet with the rig waiting. A production engineer has chased a well that would not lift. A reservoir engineer has watched water break through two years early. That is what the job advert means by experience.

Students meet those problems only after someone hires them, and nobody hires them until they have met them. PetroLabb hands you the problems first, in every discipline.

Disciplines

The whole of petroleum engineering, one problem at a time.

Ten disciplines, each with Easy, Medium and Hard problems tagged by the role they prepare you for. Start where your degree is strong, then go where your first job will push you.

  • Easy
  • Medium
  • Hard
Problems
12AO
DRL-021EasyDrillingCasing design

Maximum mud weight before losses

The 9⅝ in shoe is set and the leak-off test is in. The next section crosses a pressured shale, and the superintendent wants to know how heavy you can go before you break the formation at the shoe.

Fracture gradient at shoe
0.78 psi/ft
Shoe depth (TVD)
9,500 ft
Safety margin
0.3 ppg
Mud gradient
0.052 psi/ft per ppg

Maximum mud weight for the next section

Your answerppg
Submit
  • DRL

    Drilling

    Drilling and well engineers

    • Maximum mud weight before losses at the shoe (Easy)
    • Kick tolerance for a 12¼ in section (Medium)
    • Stuck pipe: differential or mechanical? (Medium)
    • Torque and drag on a 3D directional well (Hard)
  • RES

    Reservoir

    Reservoir engineers

    • Volumetric STOIIP with P10, P50 and P90 (Easy)
    • Material balance: is there an aquifer? (Medium)
    • Why did DB-7 drop? Thief zone or well? (Medium)
    • History-match a five-spot waterflood (Hard)
  • PRD

    Production

    Production and artificial lift engineers

    • Productivity index from a stabilised test (Easy)
    • Find the operating point with nodal analysis (Medium)
    • Gas lift valve spacing for an unloading well (Hard)
    • Size an ESP for a 90% water-cut well (Hard)
  • CMP

    Completions

    Completion and intervention engineers

    • Choose sand control for a weak sandstone (Medium)
    • Perforation strategy for a layered reservoir (Medium)
    • Tubing stress check during a frac (Hard)
  • PPH

    Petrophysics

    Petrophysicists and formation evaluators

    • Archie water saturation in a clean sand (Easy)
    • Pick net pay from a gamma, density, neutron suite (Medium)
    • Reconcile core and log porosity (Hard)
  • FAC

    Facilities & flow assurance

    Process, facilities and subsea engineers

    • Size a two-phase separator (Medium)
    • Hydrate risk on a cold subsea tieback (Medium)
    • Wax appearance and pigging frequency (Hard)
  • WIN

    Well integrity

    Well integrity and intervention engineers

    • Draw the barrier diagram for a suspended well (Easy)
    • Sustained casing pressure: which annulus? (Medium)
    • Read a cement bond log before abandonment (Hard)
  • GEO

    Geoscience

    Engineers who work with geologists

    • Contour a structure map from well tops (Easy)
    • Fault seal: will the trap hold? (Medium)
    • Depositional environment from a core photo (Medium)
  • ECO

    Economics & reserves

    Planners, commercial and reserves engineers

    • NPV of an infill well at $60 oil (Easy)
    • Book reserves under PRMS (Medium)
    • Farm-in: what is a 30% stake worth? (Hard)
  • DAT

    Data & Python

    Engineers who code

    • Clean a production dataset with gaps and units (Easy)
    • Fit decline curves to 200 wells at once (Medium)
    • Flag a drifting downhole gauge (Hard)

Try one now

Four problems, four disciplines. No sign-up.

These are the Easy end of the bank: one formula each, the kind an interviewer expects you to do on a whiteboard. Answers within 2% of the true value pass, the same rule the platform uses.

On the platform the inputs change with every attempt, so a remembered number is worth nothing. What you keep is the method.

DRL-003EasyDrilling

Bottomhole hydrostatic pressure

You are drilling a vertical well with water-based mud. Before the next trip the company man asks what pressure the mud column is holding against the formation at TD.

Mud weight
12.5 ppg
True vertical depth
10,000 ft
psi

Two ways to practise

Short problems to build the reflexes. Long scenarios to build the judgement.

Problems

5 to 30 minutes

One question, the data you need and nothing more, graded the moment you submit. Calculations, diagnoses, design choices, log picks and Python tasks, each with a worked solution.

Scenarios

3 to 5 hours

A week at a fictional operator, compressed. An email from a manager, a data room of messy files, a budget, a clock, something that changes halfway through, and a debrief that shows what was really going on.

  • A problem every day

    One new problem each morning, rotating through the disciplines.

  • Study plans

    Ordered sets such as a graduate drilling interview or a first year in production.

  • Contests

    Timed rounds for universities and SPE student chapters, with leaderboards.

  • Worked solutions

    Every problem shows the working, reviewed by a practising engineer.

  • Streaks and a profile

    Everything you solve builds a record you can show an employer.

Scenarios

Why did DB-7 drop? One scenario, start to finish.

Every scenario, in every discipline, runs through the same steps: a briefing, an investigation, checkpoints you commit to, a twist halfway through, and a debrief. This one is a reservoir scenario. Scroll through it.

  1. 1

    Monday 08:12 · Briefing

    An email lands from the asset manager

    Ngozi at Delta Basin Energy writes that DB-7 has fallen from 2,400 to 1,300 bbl/d since March and the water cut has jumped. Partners meet Thursday. Is it the reservoir or the well, and can it be fixed?

    Inbox
    NA

    Ngozi, Asset Manager

    Delta Basin Energy · Mon 08:12

    Urgent

    DB-7, need an answer before Thursday

    DB-7 has gone from 2,400 to 1,300 bbl/d since March and the water cut has jumped.

    Partners meet Thursday. Reservoir or well, and can we fix it?

    N.

    DB-7_prod_2019-2026.xlsxI-2_injection.csv
  2. 2

    Investigate

    You colour the field by permeability

    A thin, bright layer sits near the base of the reservoir. Scrub the timeline and you can watch injected water run along it toward DB-7 while the rock above barely moves.

    Plot Bench · Section I-2 → DB-7 · permeability
    I-2DB-7layer 4k ≈ 2,000 mD, 5 m thick
    10 mD2,000 mD
  3. 3

    Checkpoint 1

    You commit to a cause

    You pick “thief zone from injector I-2” from the list of causes. Nobody tells you whether you are right. That comes at the debrief, the same way it does at work.

    Checkpoint 1 · Diagnosis

    What is causing the drop at DB-7?

    • Coning from the aquifer
    • Thief zone from injector I-2
    • Casing leak behind pipe
    • Scale damage near the wellbore

    Answer locked. Graded at debrief.

  4. 4

    Field request

    You spend $60,000 on a production log

    It takes two sim-days to come back. It shows 80% of the water entering through the bottom 5 m of the completion, which is the evidence your Thursday answer needs.

    Field Requests Desk · Production log (PLT)
    PLT on DB-7$60,000 · 2 sim-daysResults in

    Water entry by interval

    • 2,412–2,417 m2%
    • 2,417–2,422 m3%
    • 2,422–2,427 m4%
    • 2,427–2,432 m5%
    • 2,432–2,437 m6%
    • 2,437–2,442 m80%

    80% of the water comes in through the bottom 5 m.

  5. 5

    Wednesday · Twist

    The partners add a second question

    “Should we also cut injection on I-2?” Cutting it would slow the water, and it would also starve the wells that I-2 is holding pressure up for.

    Inbox · Wed 16:40

    You · Tue

    Early read: thief zone at the base of layer 4. Running a PLT to confirm.

    Ngozi, Asset ManagerNew constraint

    Partners also want to know if we should cut injection on I-2.

    Checkpoint 2 now asks two questions
  6. 6

    Checkpoint 2

    You recommend a fix and forecast it

    A zonal shut-off on the bottom 5 m, a forecast of the new oil rate, and a clear no to cutting injection. Each answer is a number, a range or a choice the grader can score.

    Checkpoint 2 · Recommendation
    • Action

      Zonal shut-off, bottom 5 m

    • Oil rate after fix

      1,850 – 2,100 bbl/d

    • Cut injection on I-2?

      No, it supports DB-4 and DB-9

    Submit to Ngozi before Thursday0d 18:22
  7. 7

    Debrief

    The hidden truth is revealed

    It was a thief zone. You see your path next to an expert’s, the moment the two split, and why you lost a few points: the cheaper pressure survey would have told you the same thing first.

    Debrief Theatre

    84/ 100

    • Diagnosis95
    • Numbers82
    • Decision90
    • Efficiency64

    Your path against the expert’s

    you
    expert

    −6 efficiency: an $8k pressure survey would have separated the hypotheses before the $60k log.

The same shape in other disciplines

  • Drilling

    A kick at 02:40 on a deep gas well. Shut in, read the gauges, write the kill sheet.

  • Production

    Twelve gas-lifted wells, one compressor down. Decide who gets the gas.

  • Well integrity

    Pressure is building on the B annulus of a 20-year-old platform well.

  • Facilities

    A new tieback doubles the water into a separator sized for half of it.

Workspaces

21 workspaces, each built once and reused by every problem.

Each workspace stands in for a tool a working engineer uses, from the well planner to the nodal bench. You do the same work in PetroLabb’s own tools in the browser, so nothing needs a licence or a cracked copy.

  • 01Shared

    Office / Inbox

    Briefings and pings from managers, checkpoint answers, the budget and the clock.

    Stands in for Outlook, Teams

  • 02Shared

    Data Room

    Company files, logs and reports, some of them wrong. Flag the bad ones.

    Stands in for SharePoint, project databases

  • 03Shared

    Notebook

    Python with the problem’s data already loaded.

    Stands in for Jupyter

  • 04Shared

    Field Requests Desk

    Order a log, a test or a sample. Results arrive later and cost money.

    Stands in for Service company call-out

  • 05Shared

    Review Desk

    Red-pen someone else’s design, model or report.

    Stands in for Peer review

  • 06Drilling & wells

    Well Planner

    Mud weight window, casing points, trajectory, torque and drag.

    Stands in for WellPlan, Compass

  • 07Drilling & wells

    Well Control Desk

    Read the shut-in pressures, build the kill sheet, choose the method.

    Stands in for Well control simulators

  • 08Drilling & wells

    Completion Designer

    Sand control, perforating, tubing stress and frac design.

    Stands in for WellCat, StimPlan

  • 09Drilling & wells

    Integrity Desk

    Barrier diagrams, annulus pressures, bond logs, abandonment plans.

    Stands in for Integrity management systems

  • 10Subsurface

    Log Viewer

    Correlate wells, pick tops and net pay, compute saturation.

    Stands in for Techlog, Interactive Petrophysics

  • 11Subsurface

    Plot Bench

    Decline, Chan WOR, Hall, P/Z, VRR and bubble plots.

    Stands in for OFM, Spotfire

  • 12Subsurface

    Material Balance Desk

    Tank model, aquifer, Havlena-Odeh, STOIIP.

    Stands in for MBAL

  • 13Subsurface

    Well Test Lab

    Log-log derivative, type-curve match, kh, skin, boundaries.

    Stands in for Saphir

  • 14Subsurface

    Simulation Studio

    Edit, run, compare to history, all on a run budget.

    Stands in for Eclipse, CMG, tNavigator

  • 15Subsurface

    3D Viewer

    Peel layers, colour by property, scrub through time.

    Stands in for Petrel, ResInsight

  • 16Production & facilities

    Nodal Bench

    Inflow and outflow curves, operating point, sensitivities.

    Stands in for PROSPER, PIPESIM

  • 17Production & facilities

    Lift Designer

    Gas lift spacing, ESP and rod pump sizing.

    Stands in for PROSPER, vendor tools

  • 18Production & facilities

    Process Bench

    Separator sizing, hydrate and wax checks, line sizing.

    Stands in for HYSYS, OLGA

  • 19Business

    Economics Desk

    Cash flow, NPV, decision trees, PRMS booking.

    Stands in for PEEP, Excel

  • 20Business

    Meeting Room

    Defend your answer to a CFO, a partner or a sceptical superintendent.

    Stands in for Real meetings

  • 21Business

    Debrief Theatre

    The truth revealed, your path against an expert’s, the score breakdown.

    Stands in for Nothing. It only exists here.

Grading

The platform builds the well, so it always knows the answer.

Every problem is a template. A random seed fills it in differently each time you start: a different pore pressure, a different permeability, a different right answer. The truth engine keeps one copy as the answer key and hands the other to the data generator, which adds the noise, gaps and traps real data has.

Because the answer is known, about 80 to 90% of grading is plain code. It is instant, it treats everyone the same, and it costs almost nothing to run for a thousand users or a hundred thousand.

Why sharing answers fails · DRL-003, three seeds

SeedMud weightTVDTrue answer
A12.5 ppg10,000 ft6,500 psi
B11.2 ppg8,700 ft5,067 psi
C14.1 ppg12,300 ft9,018 psi

Same problem, three different wells. The answer that is right for your classmate is wrong for you.

  1. 1Problem template + random seedDiscipline, well or field, inputs, checkpoints
  2. 2Truth engineBuilds the hidden well or field and its true answer
  3. 3Data generatorTurns the truth into messy data: noise, gaps, traps
  4. 4WorkspacesYou calculate, investigate, buy tests, answer
  5. 5GradersCompare your answers and decisions with the truth
  6. 6Debrief and profileTruth revealed, expert replay, score, profile update

Four graders, built once and reused

A problem only sets the dials: “The answer is a number with a 2% tolerance.” A scenario does the same for each checkpoint: “Checkpoint 1 is a pick list, the answer is C.” No new grading code is written per problem.

  • Closeness to truth

    Plain code

    Numbers and ranges against the hidden answer.

    Full marks inside a tolerance, sliding down beyond it. A range earns credit for catching the truth and loses some for being too wide.

  • Decision value

    Plain code

    Casing points, lift methods, wells, workovers and bids.

    Your decision is run through the true well or field and compared with the best decision anyone could have made.

  • Process

    Plain code

    The log of everything you did.

    Did you open the right files, catch the bad data, and avoid paying for tests that could not tell your hypotheses apart?

  • Communication

    AI · paid tier

    Memos and meeting replies.

    A rubric: a clear answer, the drivers named, honest uncertainty, a concrete next step. Experts review a sample to keep it honest.

Your profile

A record a hiring manager can read in two minutes.

A CV says what you studied. A PetroLabb profile answers the question an interviewer is really asking: what real problems has this person faced, and how well did they handle them?

  • Problems and scenarios solved

    By discipline and difficulty, so breadth and depth both show.

  • A competency radar

    Diagnosis, numbers, decisions, efficiency and communication, built from graded work.

  • Replays you choose to share

    An employer can watch how you worked, not just the score you got.

  • A match against any job advert

    Paste the advert and see which scenarios would close the gap.

You control what is public. Nothing goes to an employer unless you say yes.

AO

Adaeze O.

Graduate engineer · Drilling and production

Sample
DiagnosisNumbersDecisionsEfficiencyCommunication

148

problems · 6 scenarios

78%

match to pasted advert

7 / 10 Hard well control problems
  • Kick tolerance for a 12¼ in section92
  • Find the operating point with nodal analysis88
  • Why did DB-7 drop? (scenario)84
  • Sustained casing pressure: which annulus?71

Who it is for

Students first. Employers once there are profiles worth searching.

  • Open now

    Students and early-career engineers

    Final-year and postgraduate petroleum, chemical, mechanical and geoscience students, graduates, trainees and engineers moving between disciplines. Get real problems before your first job and a profile to show for them.

    Create a free account
  • Open now

    Universities and SPE chapters

    Set problems and scenarios as assignments, run timed contests with leaderboards, and give students industry-style work in every module without writing it yourself.

    Create a lecturer account
  • Later phase

    Employers

    Search profiles by discipline, difficulty and score. Run private assessment scenarios, or send 1,000 graduate applicants one scenario and get back a ranked list backed by scored work.

    Coming once profiles are worth searching.

FAQ

Questions people ask first

Anything else, ask once you are in. Your questions shape what gets built next.

What is PetroLabb?

LeetCode for petroleum engineering. A bank of practice problems across drilling, reservoir, production, completions, petrophysics, facilities, well integrity, geoscience, economics and data, from five-minute calculations to multi-hour field scenarios. Every answer is graded against a hidden true answer, and everything you solve builds a profile.

Who is it for?

Final-year and postgraduate petroleum, chemical, mechanical and geoscience students, and engineers with up to about three years in the job, including people moving between disciplines. Universities and SPE student chapters can use problems as assignments and contests.

Which disciplines are covered?

Drilling, reservoir, production, completions, petrophysics, facilities and flow assurance, well integrity, geoscience for engineers, economics and reserves, and data and Python. Each has problems at Easy, Medium and Hard, tagged by the role they prepare you for.

What is the difference between a problem and a scenario?

A problem is one question with the data you need, graded on submit, usually in 5 to 30 minutes. A scenario plays out like a week at an oil company: a vague request, a data room, a budget, a twist and a debrief. It takes a few hours and is graded at several checkpoints.

Do I need Petrel, PROSPER, WellPlan or MBAL?

No. Each problem names the tool a working engineer would reach for, and you do the same work in PetroLabb’s own tools in the browser. Nothing needs a licence.

Is the data real?

Wells and fields are generated, or built on public datasets such as Volve, Brugge, the Egg model and UNISIM, then disguised. The companies in problems are fictional. No operator’s confidential data is used.

How is my work graded?

Because the platform generates each well or field itself, it always holds the true answer. Most grading is plain code that compares your numbers, decisions and process with that truth, so it is instant and the same for everyone. Written memos are graded against a rubric in the paid tier.

Can I just copy someone else’s answers?

Not usefully. A random seed changes the inputs for each player, so the mud weight, the depth, the permeability and the right answer all move. An answer that is right for your classmate is wrong for you.

Does a PetroLabb profile replace a degree or a licence?

No, and it does not claim to. It shows which problems you have faced and how well you handled them, which is the part of experience a CV cannot show.

What does it cost?

Making an account is free, and the free tier includes a set number of problems each month. A paid tier adds the full bank, scenarios, memo grading and full debrief replays.

Free account

Meet your first field problem before your first day at work.

Make an account, pick a discipline and solve your first problem in five minutes.