Simulation

Simulation(self, t_end=10, cfl=0.5, max_dt=0.01, nx=100, verbose=True)

A class to simulate a model using the Finite Volume Method (FVM).

Attributes

Name Type Description
bc BCBase Boundary conditions object applied at the first interface.
geometry Geometry The Geometry object of the domain.
t_end float Total simulation time (default: 10s)
cfl float CFL (Courant–Friedrichs–Lewy) number for time step stability (default: 0.5)
max_dt float Maximum time step size (default: 0.01s)
nx int Spatial grid resolution (default: 0.1m)
verbose bool Flag to show the progress (default: True)

Methods

Name Description
run Run the simulation using the provided geometry, boundary conditions, and solver.

run

Simulation.run(
    geometry,
    bc,
    limiter=Limiter.minmod,
    flux=Flux.HLL,
    timeintegration=TimeIntegration.RK2,
)

Run the simulation using the provided geometry, boundary conditions, and solver.

The simulation involves discretizing the geometry, applying the Finite Volume Method (FVM), and computing the wetting front velocity for each geometry part. The simulation runs until the end time is reached or the conditions specified by the solver are satisfied.

Parameters

Name Type Description Default
geometry Geometry Geometry object representing the physical domain for the simulation. required
bc BCBase Boundary conditions for the simulation. required
limiter Limiter The limiter to use in the simulation. The default is Limiter.minmod. Limiter.minmod
flux Flux Flux types to use in the simulation. The default is Flux.HLL. Flux.HLL
timeintegration TimeIntegration Time integration scheme to use in the simulation. The default is TimeIntegration.EF. TimeIntegration.RK2

Returns

Name Type Description
Geometry A new copy of the geometry object with the simulation results.