Simulation Runners

Overview

Simulation runners control the progression of the simulation.

  • SteadyRunner: Used for solving stationary problems using a fixed number of iterations.

  • 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.

Coefficient Functions

Each runner registers simulation progress fields as coefficient functions:

SteadyRunner Fields

Name

Type

Description

Iteration [-]

Scalar Field

Current global iteration number in the steady-state solver.

UnsteadyRunner Fields

Name

Type

Description

Time [s]

Scalar Field

Current physical simulation time.

Iteration [-]

Scalar Field

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()
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Welcome to μfem (0.2.94-dev) by Raiden Numerics LLC.


             μfem - a finite element application framework
                           __
                   _   _  / _|  ___  _ __ ___
                  | | | || |_  / _ \| '_ ` _ \
                  | |_| ||  _||  __/| | | | | |
                  |  __/ |_|   \___||_| |_| |_|
                  |_|    

              https://www.raiden-numerics.com/mufem

For questions and bug reports please reach out to mufem@raiden-numerics.com 
or visit https://www.raiden-numerics.com/mufem/.

Usage at own risk. No warranty provided. 
                            
License: Community (Non-commercial)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Total processes: 1
Mesh: Elements(12) Vertices(9) Edges(26) Faces(30)
Starting...
Starting unsteady simulation.

1  - No residuals available -  
2  - No residuals available -  
3  - No residuals available -  
Time: 0.1 of 1 with Δt=0.1
4  - No residuals available -  
5  - No residuals available -  

6  - No residuals available -  
Time: 0.2 of 1 with Δt=0.1
7  - No residuals available -  
8  - No residuals available -  
9  - No residuals available -  
Time: 0.3 of 1 with Δt=0.1
10  - No residuals available -  

11  - No residuals available -  
12  - No residuals available -  
Time: 0.4 of 1 with Δt=0.1
13  - No residuals available -  
14  - No residuals available -  
15  - No residuals available -  
Time: 0.5 of 1 with Δt=0.1

16  - No residuals available -  
17  - No residuals available -  
18  - No residuals available -  
Time: 0.6 of 1 with Δt=0.1
19  - No residuals available -  
20  - No residuals available -  

21  - No residuals available -  
Time: 0.7 of 1 with Δt=0.1
22  - No residuals available -  
23  - No residuals available -  
24  - No residuals available -  
Time: 0.8 of 1 with Δt=0.1
25  - No residuals available -  

26  - No residuals available -  
27  - No residuals available -  
Time: 0.9 of 1 with Δt=0.1
28  - No residuals available -  
29  - No residuals available -  
30  - No residuals available -  
Time: 1.0 of 1 with Δt=0.10000000000000009
Simulation done. Thank you for using the software.