Repository with all Python scripts and Riemann solvers used to solve the clogging problem. This code should be used within the clawpack package [1].
The riemann solver file should be uploaded into PATH/clawpack/riemann/ and _init_.py, setup.py and static.py need to be updated to add this riemann solver. Just add the following lines to the corresponding python scripts as indicated -
-
_init_.pyfrom . import Mu_I -
setup.pyone_d_riemann = ['Mu_I',
] -
static.pynum_eqn = {'Mu_I' : 1,
'Full_model' : 1,
}
num_waves = {'Mu_I' : 3,
'Full_model' : 3,
}
Once the riemann solver is added you can run the required python script from the Simulation scripts folder of the repository. The script Clog_simulation_Step_ini_R_varying.py should be run after running the MATLAB script Steady_phi_R_vary.m which generates the required .mat file acting as the initial condition of the simulation. The resulting output files can be made into a simulation video by modifying plotclaw1.m and afterframe.m files from visclaw. Below are two simulations that give rise to a "non-clogged" and a "clogged" steady state for input phi = 0.35 and phi = 0.45 respectively.
Varying.Radius.with.phi_in_0.35.mp4
Varying.Radius.with.phi_in_0.45.mp4
[1] Ketcheson, David I. and Mandli, Kyle T. and Ahmadia, Aron J. and Alghamdi, Amal and Quezada de Luna, Manuel and Parsani, Matteo and Knepley, Matthew G. and Emmett, Matthew (2012). PyClaw: Accessible, Extensible, Scalable Tools for Wave Propagation Problems. SIAM Journal on Scientific Computing,34(4), C210--C231.