Skip to content

1D models built by an LLM from text

English | Japanese

« One-dimensional models

OpenRheo's 1D tier builds systems from text, not a GUI: a netlist places components, connects them and sets parameters, initial values, outputs and the solver. This page records a test of whether an LLM can write and run such netlists from plain-language requests alone (2026-11-20).

In development

The netlist and the components used here (ported from the Modelica Standard Library) are on development branches and not yet in the public source.

How it was tested

  • A separate LLM agent got only the guide (the agent-guide section "Building a 1D system from text"), the netlist design note and the component catalogue (JSON). It did not see the examples or the tests.
  • The agent looked components up with orheo-1d model=msl list=1 and describe=<type>, wrote the netlist, ran it, read the diagnostics and fixed it, with at most 5 attempts per task.
  • Every answer was checked against a hand calculation or an analytic solution.

Result

count
correct on the first attempt 8 / 10
correct in the end 10 / 10 (at most 3 attempts)

Only the mass–spring–damper (task 5) failed on the first attempt. The pendulum was correct but its energy-balance check reported "marginal". Four problems were found, and all are fixed:

  • a position start value 0.1 m was rejected, with a wrong fix hint;
  • giving only the mass start position disagreed with the spring's own start stretch, and the model silently did not move. The stretch is now derived from the two ends, with a warning on contradictions;
  • the energy-balance check did not handle multibody systems;
  • the guide did not show how to output a spatial profile.

Tasks and answers

Task 1

Connect C1 = 15 J/K (initially 100 °C) and C2 = 15 J/K (initially 0 °C) through a thermal conductance of 10 W/K and compute 1 s.

  • Answer: C1 63.2 °C, C2 36.8 °C at 1 s
  • Check: ΔT = 26.36 K matches the analytic value
  • Attempts: 1

Task 1 result

Netlist written by the LLM (15 lines)
model = msl
name = two_heat_capacities
comp.c1.type = thermal.HeatCapacitor
comp.c1.C = 15 J/K
comp.c1.T_start = 100 degC
comp.c2.type = thermal.HeatCapacitor
comp.c2.C = 15 J/K
comp.c2.T_start = 0 degC
comp.g.type = thermal.ThermalConductor
comp.g.G = 10 W/K
connect = c1.port, g.port_a
connect = g.port_b, c2.port
output = c1.T, c2.T
solver.t_end = 1 s
solver.output_dt = 0.01 s

Task 2

A 50 kJ/K box with a 300 W heater loses heat to 5 °C outside through 20 W/K; start at 5 °C and compute 24 h. Final temperature?

  • Answer: 20 °C
  • Check: 5 + 300/20 = 20
  • Attempts: 1

Task 2 result

Netlist written by the LLM (16 lines)
model = msl
name = heated_box
comp.box.type = thermal.HeatCapacitor
comp.box.C = 50 kJ/K
comp.box.T_start = 5 degC
comp.heater.type = thermal.FixedHeatFlow
comp.heater.Q_flow = 300 W
comp.loss.type = thermal.ThermalConductor
comp.loss.G = 20 W/K
comp.amb.type = thermal.FixedTemperature
comp.amb.T = 5 degC
connect = box.port, heater.port, loss.port_a
connect = loss.port_b, amb.port
output = box.T
solver.t_end = 24 h
solver.output_dt = 300 s

Task 3

Add a PI-controlled heater (max 500 W) to keep the box at 20 °C; raise the set point to 22 °C after 6 h.

  • Answer: 300 W at 20 °C, then 340 W at 22 °C (small overshoot)
  • Check: 20 W/K × 15 K and × 17 K
  • Attempts: 1

Task 3 result

Netlist written by the LLM (29 lines)
model = msl
name = box_pi_heater
comp.box.type = thermal.HeatCapacitor
comp.box.C = 50 kJ/K
comp.box.T_start = 5 degC
comp.heater.type = thermal.PrescribedHeatFlow
comp.loss.type = thermal.ThermalConductor
comp.loss.G = 20 W/K
comp.amb.type = thermal.FixedTemperature
comp.amb.T = 5 degC
comp.sensor.type = thermal.TemperatureSensor
comp.sp.type = blocks.Step
comp.sp.offset = 293.15
comp.sp.height = 2
comp.sp.startTime = 6 h
comp.pid.type = blocks.LimPID
comp.pid.controllerType = PI
comp.pid.k = 200
comp.pid.Ti = 1000 s
comp.pid.yMax = 500
comp.pid.yMin = 0
connect = box.port, loss.port_a, heater.port, sensor.port
connect = loss.port_b, amb.port
connect = sensor.T -> pid.u_m
connect = sp.y -> pid.u_s
connect = pid.y -> heater.Q_flow
output = box.T, pid.y, sp.y
solver.t_end = 12 h
solver.output_dt = 60 s

Task 4

Pump (20 m shut-off head, zero head at 0.01 m³/s), then a 50 mm × 100 m straight pipe and four 90° bends. Operating point? At 80 % speed?

  • Answer: 100 %: 4.74 L/s, 103 kPa; 80 %: 3.72 L/s, 67 kPa
  • Check: friction estimate (about 100 kPa) plus bends; points lie on the pump curve
  • Attempts: 1

Task 4 result

Netlist written by the LLM (31 lines)
model = msl
name = pump_pipe
param.d = 0.05 m
comp.src.type = fluid.Boundary_p
comp.src.p = 1 atm
comp.pump.type = fluid.Pump
comp.pump.V_flow_nominal = 0, 0.01
comp.pump.head_nominal = 20, 0
comp.pump.N_nominal = 1500 rpm
comp.pump.N = 1500 rpm
comp.pipe.type = fluid.StraightPipe
comp.pipe.d_hyd = $d
comp.pipe.L = 100 m
range.i = 1..4
comp.bend{i}.type = fluid.CurvedBend
comp.bend{i}.d_hyd = $d
comp.bend{i}.R_0 = 0.05 m
comp.bend{i}.delta = pi/2
comp.sink.type = fluid.Boundary_p
comp.sink.p = 1 atm
comp.vs.type = fluid.VolumeFlowSensor
connect = src.port, pump.port_a
connect = pump.port_b, pipe.port_a
connect = pipe.port_b, bend1.port_a
connect = bend1.port_b, bend2.port_a
connect = bend2.port_b, bend3.port_a
connect = bend3.port_b, bend4.port_a
connect = bend4.port_b, vs.port_a
connect = vs.port_b, sink.port
output = vs.V_flow, pump.head, pump.dp, pump.V_flow
solver.mode = steady

Task 5

Mass 1 kg, spring 100 N/m, damper 2 N·s/m; initial displacement 0.1 m; compute 5 s.

  • Answer: x(1 s) = −0.0337 m, x(5 s) = 5.5e-4 m
  • Check: matches the analytic underdamped solution
  • Attempts: 3

Task 5 result

Netlist written by the LLM (15 lines)
model = msl
name = mass_spring_damper
comp.m.type = translational.Mass
comp.m.m = 1 kg
comp.m.s_start = 0.1
comp.sd.s_rel_start = 0.1
comp.sd.type = translational.SpringDamper
comp.sd.c = 100 N/m
comp.sd.d = 2 N.s/m
comp.wall.type = translational.Fixed
connect = wall.flange, sd.flange_a
connect = sd.flange_b, m.flange_a
output = m.s, m.v
solver.t_end = 5 s
solver.output_dt = 0.01 s

Task 6

RC circuit R = 1 kΩ, C = 1 mF with a 10 V step; the resistor's heat goes into a 1 J/K element that loses heat to 25 °C through 0.01 W/K; compute 10 s.

  • Answer: the element warms by 0.045 K
  • Check: ½CV² = 0.05 J over 1 J/K, minus the loss
  • Attempts: 1

Task 6 result

Netlist written by the LLM (26 lines)
model = msl
name = rc_heating
comp.v.type = electrical.StepVoltage
comp.v.V = 10 V
comp.v.startTime = 0 s
comp.r.type = electrical.Resistor
comp.r.R = 1 kOhm
comp.r.useHeatPort = true
comp.c.type = electrical.Capacitor
comp.c.C = 1 mF
comp.gnd.type = electrical.Ground
comp.th.type = thermal.HeatCapacitor
comp.th.C = 1 J/K
comp.th.T_start = 25 degC
comp.loss.type = thermal.ThermalConductor
comp.loss.G = 0.01 W/K
comp.amb.type = thermal.FixedTemperature
comp.amb.T = 25 degC
connect = v.p, r.p
connect = r.n, c.p
connect = c.n, v.n, gnd.p
connect = r.heatPort, th.port, loss.port_a
connect = loss.port_b, amb.port
output = c.v, r.i, th.T
solver.t_end = 10 s
solver.output_dt = 0.05 s

Task 7

A 5-layer wall (0.15 m concrete, 0.05 m insulation, …), 35 °C outside and 26 °C inside. Steady heat flux? Then the transient after the outside drops to 30 °C over 1 h.

  • Answer: steady 5.667 W/m²; 2.69 W/m² at 24 h, tending to 2.52
  • Check: 9/ΣR = 5.667, 4/ΣR = 2.518
  • Attempts: 1

Task 7 result

Netlist written by the LLM (64 lines)
model = msl
name = wall_5layer
# per m2 of wall; each layer = G/2 - heat capacity - G/2 (T-network)
comp.out.type = thermal.PrescribedTemperature
comp.tout.type = blocks.Ramp
comp.tout.offset = 35 degC
comp.tout.height = -5
comp.tout.duration = 1 h
comp.tout.startTime = 0 s
comp.inside.type = thermal.FixedTemperature
comp.inside.T = 26 degC
comp.qs.type = thermal.HeatFlowSensor
connect = tout.y -> out.T
comp.render_a.type = thermal.ThermalConductor
comp.render_a.G = 87.0 W/K
comp.render_c.type = thermal.HeatCapacitor
comp.render_c.C = 34000.0 J/K
comp.render_c.T_start = 30 degC
comp.render_b.type = thermal.ThermalConductor
comp.render_b.G = 87.0 W/K
connect = out.port, render_a.port_a
connect = render_a.port_b, render_c.port, render_b.port_a
comp.concrete_a.type = thermal.ThermalConductor
comp.concrete_a.G = 21.333333333333336 W/K
comp.concrete_c.type = thermal.HeatCapacitor
comp.concrete_c.C = 300000.0 J/K
comp.concrete_c.T_start = 30 degC
comp.concrete_b.type = thermal.ThermalConductor
comp.concrete_b.G = 21.333333333333336 W/K
connect = render_b.port_b, concrete_a.port_a
connect = concrete_a.port_b, concrete_c.port, concrete_b.port_a
comp.insul_a.type = thermal.ThermalConductor
comp.insul_a.G = 1.5999999999999999 W/K
comp.insul_c.type = thermal.HeatCapacitor
comp.insul_c.C = 1500.0 J/K
comp.insul_c.T_start = 30 degC
comp.insul_b.type = thermal.ThermalConductor
comp.insul_b.G = 1.5999999999999999 W/K
connect = concrete_b.port_b, insul_a.port_a
connect = insul_a.port_b, insul_c.port, insul_b.port_a
comp.brick_a.type = thermal.ThermalConductor
comp.brick_a.G = 10.0 W/K
comp.brick_c.type = thermal.HeatCapacitor
comp.brick_c.C = 140000.0 J/K
comp.brick_c.T_start = 30 degC
comp.brick_b.type = thermal.ThermalConductor
comp.brick_b.G = 10.0 W/K
connect = insul_b.port_b, brick_a.port_a
connect = brick_a.port_b, brick_c.port, brick_b.port_a
comp.plaster_a.type = thermal.ThermalConductor
comp.plaster_a.G = 93.33333333333333 W/K
comp.plaster_c.type = thermal.HeatCapacitor
comp.plaster_c.C = 18000.0 J/K
comp.plaster_c.T_start = 30 degC
comp.plaster_b.type = thermal.ThermalConductor
comp.plaster_b.G = 93.33333333333333 W/K
connect = brick_b.port_b, plaster_a.port_a
connect = plaster_a.port_b, plaster_c.port, plaster_b.port_a
connect = plaster_b.port_b, qs.port_a
connect = qs.port_b, inside.port
output = qs.Q_flow, out.T, insul_c.T, concrete_c.T
solver.mode = steady+transient
solver.t_end = 24 h
solver.output_dt = 300 s

Task 8

Pendulum (1 m, 1 kg, initial angle 45°) for 5 s. Find the period.

  • Answer: period 2.0866 s
  • Check: 2.086 s from the large-angle series
  • Attempts: 1

Task 8 result

Netlist written by the LLM (20 lines)
model = msl
name = pendulum
comp.world.type = mb.World
comp.joint.type = mb.Revolute
comp.joint.n = 0, 0, 1
comp.joint.phi_start = 45 deg
comp.rod.type = mb.FixedTranslation
comp.rod.r = 0, -1, 0
comp.bob.type = mb.Body
comp.bob.m = 1 kg
comp.bob.r_CM = 0, 0, 0
comp.bob.I_11 = 0
comp.bob.I_22 = 0
comp.bob.I_33 = 0
connect = world.frame_b, joint.frame_a
connect = joint.frame_b, rod.frame_a
connect = rod.frame_b, bob.frame_a
output = joint.phi, joint.w
solver.t_end = 5 s
solver.output_dt = 0.01 s

Task 9

Find the heater power that keeps a room at 20 °C (loss 40 W/K, outside −1 °C). (inverse problem)

  • Answer: 840 W
  • Check: 40 × 21 = 840
  • Attempts: 1

Task 9 result

Netlist written by the LLM (18 lines)
model = msl
name = room_heater_sizing
comp.room.type = thermal.HeatCapacitor
comp.room.C = 100 kJ/K
comp.loss.type = thermal.ThermalConductor
comp.loss.G = 40 W/K
comp.amb.type = thermal.FixedTemperature
comp.amb.T = -1 degC
comp.heater.type = thermal.PrescribedHeatFlow
comp.sensor.type = thermal.TemperatureSensor
comp.goal.type = blocks.Target
comp.goal.value = 293.15
connect = room.port, loss.port_a, heater.port, sensor.port
connect = loss.port_b, amb.port
connect = sensor.T -> goal.u
connect = goal.y -> heater.Q_flow
output = room.T, goal.y
solver.mode = steady

Task 10

An aluminium rod (0.5 m, 1 cm²) in 10 segments, one end at 100 °C and the other insulated. Temperature profile after 30 min.

  • Answer: 98.6 down to 82.0 °C
  • Check: 1D series solution 98.59 to 82.05 °C
  • Attempts: 1

Task 10 result

Netlist written by the LLM (27 lines)
model = msl
name = aluminium_rod
param.k = 237            # W/m/K
param.rho = 2700
param.cp = 900
param.A = 1e-4           # m2
param.L = 0.5
param.N = 10
param.dx = L/N
comp.hot.type = thermal.FixedTemperature
comp.hot.T = 100 degC
comp.g0.type = thermal.ThermalConductor
comp.g0.G = 2*k*A/dx
connect = hot.port, g0.port_a
connect = g0.port_b, n1.port
range.i = 1..10
comp.n{i}.type = thermal.HeatCapacitor
comp.n{i}.C = rho*cp*A*dx
comp.n{i}.T_start = 20 degC
output = n{i}.T
range.j = 1..9
comp.g{j}.type = thermal.ThermalConductor
comp.g{j}.G = k*A/dx
connect = n{j}.port, g{j}.port_a
connect = g{j}.port_b, n{j+1}.port
solver.t_end = 30 min
solver.output_dt = 60 s

Tasks 7 and 10 become a few lines with components added afterwards (the multilayer wall thermal.Wall and the segmented rod thermal.Rod); task 10 in 7 lines gives the same result (within 1.2e-7 K).

The plot labels are as the agent produced them.

Related pages: One-dimensional models, 1D gallery, Local LLM agent.