ForHosting KIT · Math

Mixing tank concentration calculator

A 100-unit tank fed at rate 5 with brine of concentration 2, starting from pure water, reaches 0.7869386806 after 10 time units, on its way to the inlet value of 2. Salt amount and equilibrium are shown. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Volume
100
Flow rate
5
Inlet concentration
2
Initial concentration
0
Time
10
You get
Concentration
0.7869386806
Salt amount
78.6938680575
Equilibrium concentration
2
Exponential factor
0.6065306597

A well-stirred mixing tank with equal inflow and outflow rates is the textbook first-order linear differential equation for salt mass balance. Students, tutors, and process engineers need the concentration at a chosen time without re-deriving the integrating factor on every homework set or lab worksheet. This mixing tank concentration calculator accepts tank volume, volumetric flow rate, inlet concentration, initial concentration, and elapsed time, then returns the closed-form concentration C(t), the salt amount Q equals C times V, the equilibrium concentration, and the exponential decay factor that multiplies the initial deviation from inlet strength.

How the well-stirred tank model works

Picture a tank whose volume never changes because liquid flows in and out at the same rate. Brine with a fixed concentration enters, the contents are mixed perfectly, and the outflow always carries the current tank concentration. The amount of salt then changes at a rate equal to salt coming in minus salt going out, which is a first-order linear differential equation. Its solution says that the concentration moves from its starting value toward the inlet concentration along an exponential curve: C(t) equals the inlet concentration plus the initial difference multiplied by exp(−r·t/V). The salt amount is simply that concentration times the volume.

Reading the result and avoiding common mistakes

The exponential factor shows how much of the initial difference remains. With a volume of 100, a flow of 5, an inlet concentration of 2 and a start of 0, after 10 time units the factor is 0.6065306597 and the concentration is 0.7869386806. The ratio V/r, here 20, is the residence time; after a few multiples of it the tank sits close to the inlet strength. Typical mistakes are mixing units, such as litres for the tank but cubic metres per minute for the flow, entering a negative time, or using this model when inflow and outflow differ or the mixing is incomplete.

Where this tank model is used

Differential-equations courses assign salt-tank problems every term: pure water flushing a brine tank, or a stronger brine fed into a tank that starts empty of salt. Learners need a deterministic oracle that matches the textbook closed form so they can check algebra without waiting for office hours. Invalid input is not billed.

Keep requests small, pin rounded fields in tests, and you get reproducible concentrations for homework, LMS plugins, and edge workers without standing up symbolic math infrastructure of your own.

LMS auto-grading of salt-tank items

Compare learner answers to the deterministic concentration and salt amount, and treat negative time or non-positive volume as invalid input instead of a false numeric match.

Process and environmental notebooks

Estimate how close a continuous stirred tank sits to inlet concentration after a given run time when inflow equals outflow and mixing is ideal.

What assumptions does the model use?

Constant tank volume (inflow rate equals outflow rate), perfect mixing so outlet concentration equals tank concentration, and constant inlet concentration. Variable volume and multi-inlet tanks are out of scope.

What happens when the flow rate is zero?

The exponential factor is 1 for every finite t, so concentration stays at the initial value C0.

What concentration does a tank of volume 100 reach after 10 time units?

With a flow of 5, an inlet concentration of 2 and a start of 0, it reaches 0.7869386806, so the tank holds 78.6938680575 units of salt. The remaining exponential factor is 0.6065306597.

What concentration does the tank approach in the long run?

It approaches the inlet concentration, which is the equilibrium the calculator reports. The ratio of volume to flow, 20 in the example, is the residence time; after a few multiples of it the starting value hardly matters.

Which units should I use?

Any consistent set. Volume and flow multiplied by time must share the same volume unit, both concentrations must use the same mass-per-volume unit, and time must match the time unit inside the flow rate.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/calculus/mixing-tank-concentration

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/calculus/mixing-tank-concentration \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"volume":100,"flow_rate":5,"inlet_concentration":2,"initial_concentration":0,"time":10}'
{
  "volume": 100,
  "flow_rate": 5,
  "inlet_concentration": 2,
  "initial_concentration": 0,
  "time": 10
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "calculus.mixing_tank_concentration",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Failed validation is not billed; successful calls use the published $0.002 base price with no model tokens and no outbound network.

The constant-volume mixing model and closed-form C(t)

Assume a tank of fixed volume V is perfectly mixed, so the outlet concentration always equals the instantaneous tank concentration C(t). Salt mass Q(t) equals C(t) times V. When the flow rate is zero the exponential factor is one for every finite time, so the tank simply holds C0 unchanged. The hydraulic residence time τ equals V over r when r is positive; after a few multiples of τ the tank has largely forgotten its initial condition and sits near the inlet concentration. This capability evaluates that closed form at a single requested time; it does not integrate numerically step by step, does not handle variable volume or unequal in and out rates, and does not model incomplete mixing. Liquid enters at volumetric rate r with dissolved salt concentration c_in and leaves at the same rate r, so the volume never changes. The mass balance says the rate of change of salt equals salt in minus salt out: dQ/dt equals r times c_in minus r times C, which is r times c_in minus (r over V) times Q. That is a first-order linear ordinary differential equation with constant coefficients. Separating variables or using an integrating factor yields Q(t) equals V times c_in plus (Q0 minus V times c_in) times exp of negative r t over V. Dividing by V gives the concentration formula used here: C(t) equals c_in plus (C0 minus c_in) times exp of negative r t over V, where C0 is the initial tank concentration. As t goes to infinity the exponential vanishes and C approaches c_in, the natural equilibrium of a continuous feed of fixed strength. When C0 already equals c_in the exponential term is multiplied by zero and concentration is constant for all t.

Input contract, response fields, and validation rules

An optional precision integer from zero through fifteen sets decimal places for numeric outputs and defaults to ten. Negative volume, flow rate, concentrations, or time also fail with clear messages, because they break the physical model or the domain of the exponential. All numbers are rounded with fixed decimal places for stable goldens across runtimes. Example: volume one hundred, flow rate five, inlet concentration two, initial concentration zero, time ten yields exponential factor about zero point six zero seven and concentration about zero point seven eight seven in the same mass-per-volume unit you used for the inputs. POST a JSON body with five required finite numbers: volume (positive tank volume V), flow_rate (non-negative volumetric rate r with inflow equal to outflow), inlet_concentration (non-negative inflow salt strength c_in), initial_concentration (non-negative tank concentration C0 at t equals zero), and time (non-negative elapsed time t). Each field may arrive as a JSON number or a decimal string; aliases such as V, r, c_in, C0, and t are accepted so notebook scripts can use textbook symbols. Missing fields, empty strings, NaN, Infinity, and magnitudes beyond one times ten to the fifteen fail with invalid_input naming the field. On success the body echoes the rounded inputs, returns concentration C(t), salt_amount Q equals C times V, equilibrium_concentration equal to c_in, exponential_factor equal to exp of negative r t over V, method set to mixing_tank_first_order, the formula string, a short unit_note, and when r is positive the finite time_constant τ equals V over r. When r is zero the time_constant field is omitted so clients never see a JSON null for infinity.

Where a mixing-tank concentration API earns its keep

Learning-management systems can grade numeric free-response items by comparing student answers to this endpoint within a tolerance, rejecting negative times and zero volumes as invalid rather than silent wrong keys. Chemical and environmental engineering notebooks estimate how long a continuous stirred tank needs to approach a discharge limit when feed concentration is fixed; calling a tiny parse API avoids spinning up a full ODE solver for a single exponential.

Homework and ODE lab checks

Students enter V, r, c_in, C0, and t to verify C(t) against hand solutions of the constant-volume mixing ODE without retyping the integrating factor each time.

How do I compute mixing tank concentration at time t?

Send positive volume V, non-negative flow_rate r, inlet_concentration c_in, initial_concentration C0, and non-negative time t. The API returns C(t)=c_in+(C0−c_in)·exp(−r·t/V) plus salt amount Q=C·V.

What is the equilibrium concentration?

As t→∞, C(t) approaches the inlet concentration c_in. The response field equilibrium_concentration always equals the inlet value you supplied.

What does the mixing tank concentration calculator cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →