Teacher reference · public page

Mixing tank: can a smooth curve be trusted? — Teacher reference

Prepare the lesson, inspect the reasoning and keep the evidence limits visible.

50 minutes · Introductory modeling · pairs

Open student guide

Before you begin

Derivatives, units, Python functions and arrays. This is a 50-minute introduction to the existing approximately 150-minute workshop, not its completion.

The well-mixed tank is an invented teaching system. No measured equipment, mixing validation or plant-safety result is supplied.

  • Check Python loading before class and keep the reference CSV/notebook available. Allow more time or use a teacher projection if Python functions and arrays are unfamiliar.
  • Ask learners to export an existing workshop draft before manually changing it. This pack does not create a second draft or mark any of the workshop’s eight stages complete.

One-class sequence

  1. 5 min

    Predict the long-run level

    Sketch a 20 L tank: 2 L/min enters at 10 g/L; equal outflow, reaction 0.05/min, initial concentration 0. Will concentration reach 10 g/L?

    Teacher reasoning / look for

    The prediction is about an invented system with a positive removal reaction. Keep it before showing the reference curve.

  2. 10 min

    State assumptions and balance mass

    Write accumulation as inflow minus outflow minus reaction. Explain why volume is constant and outlet concentration equals tank concentration; check units.

    VdCdt=Q(Cin−C)−kVCV\frac{dC}{dt}=Q(C_{\mathrm{in}}-C)-kVC
    Teacher reasoning / look for

    Equal flows keep volume fixed; perfect mixing sets outlet concentration to the tank concentration; constant temperature supports a fixed reaction rate. These are assumptions, not solver guarantees.

  3. 10 min

    Check two steps, then implement

    Use the initial-value problem below to calculate two Euler steps. Complete student_model and the Euler update in student_euler using your balance.

    y′=−y,y(0)=1,h=0.1y'=-y,\qquad y(0)=1,\qquad h=0.1
    yn+1=yn+h f(tn,yn)y_{n+1}=y_n+h\,f(t_n,y_n)
    Teacher reasoning / look for

    The hand values are 0.9 and 0.81. Divide the mass balance by volume for the rate, then use the Euler update below. A correct balance and a correct loop are separate checks.

  4. 15 min

    Run, change one condition, refine

    Run the default, then set reaction to 0.2 per minute. Return to default physical parameters and halve the time step to 0.25 minutes. Record your actual run’s errors and checks, including failures. If time permits, try zero reaction.

    C∞=(Q/V)CinQ/V+kC_{\infty}=\frac{(Q/V)C_{\mathrm{in}}}{Q/V+k}
    Teacher reasoning / look for

    Use the steady-concentration relation below: default gives 20/3, stronger reaction gives 10/3, zero reaction gives 10 g/L. Compare “Your Euler max error” with “Your half-step max error”; some displayed baseline checks refer to prepared reference calculations, so do not infer that every check validates learner code.

  5. 5 min

    Separate two kinds of evidence

    What would an analytic-solution match tell you? Propose one tracer observation that would challenge the perfect-mixing assumption.

    Teacher reasoning / look for

    Agreement checks implementation of the stated equation. It does not test the real tank’s mixing. A tracer experiment could compare concentration over locations or outlet response with the well-mixed prediction.

  6. 5 min

    Leave a short evidence record

    Write one result, one check and one limitation. Answer the exit question and export the original workshop’s Draft JSON or report; do not mark the full workshop complete.

    Teacher reasoning / look for

    Accept clearly labelled failed or unavailable runs. A precomputed reference is useful for discussion but must remain labelled as reference, never the learner’s execution.

All comparison settings

Default balance

Flow Q (L/min)
2
Volume V (L)
20
Reaction k (1/min)
0.05
Inlet concentration (g/L)
10
Initial concentration (g/L)
0
Time step (min)
0.5
Experiment seed
2026

No reaction

Flow Q (L/min)
2
Volume V (L)
20
Reaction k (1/min)
0
Inlet concentration (g/L)
10
Initial concentration (g/L)
0
Time step (min)
0.5
Experiment seed
2026

Stronger reaction

Flow Q (L/min)
2
Volume V (L)
20
Reaction k (1/min)
0.2
Inlet concentration (g/L)
10
Initial concentration (g/L)
0
Time step (min)
0.5
Experiment seed
2026

Default physics, half step

Flow Q (L/min)
2
Volume V (L)
20
Reaction k (1/min)
0.05
Inlet concentration (g/L)
10
Initial concentration (g/L)
0
Time step (min)
0.25
Experiment seed
2026

Open the original activity

English / Traditional Chinese workshop.

  1. Open the workshop and use its task, Python and results panels.
  2. Apply the settings below manually and keep your prediction before running. Opening this link does not load the preset or reset a saved draft.
  3. Start Python only when ready. Complete student_model and student_euler before running; unfinished starter functions are expected to fail checks.
Open Mixing-tank workshop
Device / Python fallback

Start Python downloads the scientific runtime on demand from jsDelivr. Test the classroom network beforehand. If loading fails, use the labelled precomputed reference and reference CSV/notebook; these are not a learner’s own run. Notebook execution requires Python with NumPy, SciPy and Matplotlib.

Precomputed reference CSV · Reference notebook

Keep this evidence

  • A mass balance with units and three assumptions; two hand-calculated Euler values.
  • An actual run or explicitly labelled reference, a refinement comparison and a limitation, exported from the original workshop where available.

Use the original workshop’s Draft JSON export/import and report. Drafts stay in this browser; the classroom page never reads or writes them. When storage is unavailable, the workshop labels session-only memory and provides export. Export before changing device.

Exit question

Your numerical curve matches the analytic curve. Does that establish perfect mixing in a real tank? What further evidence is needed?

Reference reasoning

No. It checks the chosen equation’s implementation. A physical observation, such as a tracer experiment testing spatial concentration or outlet response, is needed to assess mixing.

Misconceptions to discuss

  • A smooth or stable curve establishes a correct physical model.
  • A smaller time step repairs a missing reaction term.
  • A prepared reference figure is evidence that I ran my code.

These statements are misconceptions, not conclusions. Ask for the missing condition or evidence.

Source and further reading

Sequence adapted from workshop-01 “A tank, a boundary, a balance”, v1.0.0, its existing exercise and reference assets. The 50-minute pacing is an introductory lesson plan; nondimensionalization, failure experiments and extended writing remain in the full workshop.

← All one-class activities