Lemonergy Wiki

Worked examples

Iron rod: steady conduction

Calculate the tip temperature of a rod carrying 18 W from a 100 °C base through its axial resistance.

Document created Updated
Editorially reviewedSource record reviewed

Find a rod's tip temperature from its heat flow

Calculate the temperature drop along a solid rod carrying a specified steady heat flow. This compact Lemonergy example turns Fourier's one-dimensional conduction relation into four connected blocks, then compares the tip temperature with a published numerical answer.

Use this case to learn temperature units, physical gain coefficients and the difference between a steady calculation and a transient model. The supplied mw-thermal-conduction case, reference version 1, has four prepared blocks and three connections and executes in the Rust/WebAssembly solver.

Open the prepared model

Open prepared examples and choose Iron rod: steady conduction. The complete supplied model loads automatically. Choose Run prepared model to calculate a fresh result with Rust/WebAssembly, then select blocks to inspect their read-only parameters and connections. You can download the original model data for reference.

The public viewer lets you inspect, run and explore this prepared example. To change parameters, connect blocks, import a file or save an edited model, choose Edit with Pro. The Design app opens the selected example in its authenticated Pro editor; the workflow guide explains both experiences.

The four-block steady-conduction model inside Lemonergy, with base temperature, imposed heat, thermal resistance and tip temperature.
Iron rod: steady conduction: the complete prepared graph and Display outputs in the public Lemonergy example viewer. Fit, zoom and scroll reveal its connected blocks; the graph is read-only. Captured .

Define the physical problem

A cylindrical rod has a fixed base temperature of 100 °C and carries 18 W away from the base. With constant conductivity and no side loss in this model:

A = π D² / 4
Rth = L / (k A)
Ttip = Tbase − Q Rth

The geometry, material coefficient and imposed boundaries below are retained inputs from the iron-rod source record, Example 1. Area and resistance are calculated from those inputs. The model treats conductivity as constant; no temperature-dependent material range is established by this example.

Active quantitySymbolValueUnitConditions or basis
DiameterD0.025mSource input; uniform circular cross-section
LengthL0.2mSource input; axial conduction distance
Conductivityk80.2W/(m·K)Source input; constant in this model
Base temperatureTbase100°CSource input; fixed boundary, entered as 373.15 K
Conducted heatQ18WSource input; imposed outward axial heat flow
Cross-sectional areaAApproximately 0.000490873852m²Derived: π D² / 4
Thermal resistanceRthApproximately 5.080257535K/WDerived: L/(kA); the gain stores −Rth

Density 7800 kg/m³, specific heat 447 J/(kg·K) and convection coefficient 32.1 W/(m²·K) are retained in the source case metadata for the related rod examples. They are not active inputs to this steady-conduction graph. To use thermal mass, move to insulated heating; to use surface loss, see cylindrical convection.

The temperature source and output use kelvin inside the solver. The negative resistance gain produces a temperature difference in kelvin; adding it to the absolute base temperature gives the tip temperature. The result comparison subtracts 273.15 to display °C.

Inspect the complete block inventory

Select a block in the prepared diagram to inspect its read-only parameters and connections. The model contains two Constant blocks, one Gain and one Sum.

Block ID · typeParameter valuesConnection and meaning
base-temperature · ConstantValue 373.15 K; temperature outputFeeds the first tip-temperature input
imposed-heat · ConstantValue 18 W; heat outputFeeds the thermal-resistance gain
temperature-drop · GainGain −5.080257535102893 K/W; heat input, temperature outputMultiplies imposed heat by −Rth
tip-temperature · Sum2 inputs; temperature outputAdds base temperature and negative temperature drop
The conduction example's selected block and parameter inspector in Lemonergy.
Iron rod: steady conduction: read-only parameters and connections for the selected temperature-drop block. Pro opens the model editor for changes. Captured .

There are no missing Integrator or Thermal balance blocks: this case has no stored thermal state. Its three connections implement an algebraic relation directly. Adding a thermal mass would define a different problem rather than complete this one.

Run the steady comparison

  1. Confirm Iron rod: steady conduction is both selected and loaded, with four blocks and three connections.
  2. Inspect the source values 373.15 K and 18 W, and the negative sign on temperature-drop.
  3. Keep the supplied 0–1 s observation window. The retained solver configuration is Dormand–Prince 4(5), initial step 0.01 s, minimum 1e−10 s, maximum 5 s, relative tolerance 1e−11, absolute tolerance 1e−12 and maximum 100,000 steps.
  4. Choose Run prepared model. Confirm Passed and trace completeness passed.
  5. Choose Tip temperature in Scope signal. Both endpoint values should match; inspect the native-minus-reference error as well as the overlay.
  6. Choose Download run evidence to retain the fresh model/result comparison and Download results CSV for the sampled signals. The original model data is available under Model, method and references.

Algebraic tolerance/iteration limit is 1e−10/30; implicit tolerance/iteration limit is 1e−10/20. The 0–1 s window is an observation interval for a constant result, not a prediction of the time required to reach steady state.

After the run, move Display time to inspect numerical Display outputs at retained solver times. Choose a signal’s Scope button, or use Scope signal, to view its full trajectory and reference-error plot. Scrubbing changes the inspected time, not the prepared model or its result.

Expected calculation and interpretation

The steady-conduction result inside Lemonergy, showing tip temperature and the error against the printed reference.
Iron rod: steady conduction: fresh Rust/WebAssembly results captured on 2026-10-10. The numerical checks, Scope overlay and error plot come from this same successful run. Captured .
Calculated quantityValue
Axial temperature drop Q RthApproximately 91.444635632 K
Tip temperature, internalApproximately 281.705364368 K
Tip temperature, displayedApproximately 8.555364368 °C
Printed reference8.5554 °C
Fixed maximum absolute error gate0.00005 °C

The retained reference report, generated 1 October 2026 at 19:06:01 UTC, passed with two output points. Maximum error was 3.563185e−5 °C. This small nonzero error is expected because the comparison target is rounded to four decimal places. The gate is half its last printed decimal; it is not a physical measurement uncertainty. The historical report is separate from the current application capture.

The low tip temperature follows from imposing both the heat flow and base temperature. This graph does not impose a 20 °C ambient boundary at the tip. Adding that condition independently would require checking whether the specified 18 W remained consistent with the new problem.

Try a controlled edit (Pro)

Choose Edit with Pro to open this example in the authenticated Design editor. The following changes require Pro editing. Use Run blocks & compare there to solve the edited graph; the public prepared model stays unchanged.

Select Conducted heat · W and change its constant from 18 to 9 W. The temperature drop halves to approximately 45.722317816 K, so the new tip temperature is approximately 54.277682184 °C. Run again: the original 8.5554 °C reference should fail because it remains fixed to the 18 W case.

Save the edited case under a new name, then reload and rerun the reference model to restore the original example. If changing diameter or length, recompute the resistance gain as well; these physical dimensions are documented inputs compiled into the gain, not separate live parameter blocks.

Troubleshoot units and signs

SymptomLikely check
Tip temperature exceeds the baseThe temperature-drop gain should be negative for positive outward heat
Result is offset by 273.15Enter the base as 373.15 K, not 100 in a kelvin source
Small error near 0.0000356 °CExpected rounding difference from the four-decimal reference
No rising temperature curveCorrect: this graph has no thermal storage and is steady
Edited geometry seems ineffectiveUpdate the gain L/(kA); metadata alone does not alter the graph

See read validation results before interpreting a failed gate as a solver defect.

Scope, source and related examples

The case assumes constant conductivity, fixed cross-section and one-dimensional axial conduction without side losses. It calculates a scalar tip temperature; it does not resolve a spatial field, fin or transient heating experiment. Passing verifies the implemented relation for these inputs, not measured physical accuracy.

The rod inputs and printed answer are attributed to MathWorks, Heat Conduction Through Iron Rod. The external application was not executed for the retained report.

Continue with cylindrical convection to calculate a surface heat loss, insulated heating to add storage, and the lumped transient to combine conduction, storage and ambient loss. The example index links all models and reports.

Models and evidence

  • Open Block validation
  • Download original model data 2626 bytes
    Artifact provenance

    Repository origin: outputs/validation-performance/models/mw-thermal-conduction.lemon.json

    SHA-256: 9f639afd451d8566a0443494a7e66d45b46bc2a5d112120a1b685c50f3d45dbf

  • Download reference-case evidence (JSON) 48240 bytes
    Artifact provenance

    Repository origin: outputs/validation-performance/native.json

    SHA-256: 2523aa6c919662d18fd11226a2f72d0f555a555ed24e162c05505ba22b91814f

  • Download reference contract (JSON) 22401 bytes
    Artifact provenance

    Repository origin: benchmarks/cross-tool/matlab-campaign/evidence/reference.json

    SHA-256: 5fafd62331140b6ea2c47df3ba25dcaed14632d63e1b9a6e0537fc31c688d171

Downloads preserve recorded inputs and results. Opening a saved result does not run a new simulation.

Related papers and references

  • article

    MathWorks: Heat Conduction Through Iron Rod

    MathWorks

    The retained campaign contract records the iron-rod inputs and printed answers for Examples 1–3. Campaign source notes record a September 30, 2026 check. The local linear and lumped exponential trajectories are analytical constructions, not downloaded Simscape traces.

    Read original

    Bibliographic reference · contents not reviewed · Example 1: conduction through the iron rod; printed tip-temperature answer 8.5554 °C.