Runners¶
Introduction¶
Runners control the progression of the simulation:
mufem.SteadyRunner: Used for solving stationary problems using a fixed number of iterations.mufem.UnsteadyRunner: Used for time-dependent simulations with explicit time stepping.
Both runners can be assigned to the simulation instance and executed using the
.run() method.
Coefficients¶
Each runner registers simulation progress fields as coefficient functions:
| Name | Field Type | Description |
|---|---|---|
| Iteration [-] | Scalar | Current global iteration number in the steady-state solver. |
| Name | Field Type | Description |
|---|---|---|
| Time [s] | Scalar | Current physical simulation time. |
| Iteration [-] | Scalar | Iteration number within the current time step. |
Example¶
import mufem
sim = mufem.Simulation.New("Transient Example", "data/geometry.mesh")
runner = mufem.UnsteadyRunner(total_time=1.0, time_step_size=0.1, total_inner_iterations=3)
sim.set_runner(runner)
sim.run()
field_exporter = sim.get_field_exporter()
field_exporter.add_field_output("Time")
# @todo: field_exporter.add_field_output("Time Step")
# @todo: field_exporter.add_field_output("Iteration")
field_exporter.save()