Utilities
FLOWVPM.run_vpm!
— Functionrun_vpm!(pfield, dt, nsteps; runtime_function=nothing, save_path=nothing, run_name="pfield", nsteps_save=1, verbose=true, prompt=true)
Solves nsteps
of the particle field with a time step of dt
.
Optional Arguments
runtime_function::Function
: Give it a function of the formmyfun(pfield, t, dt)
. On each time step it will call this function. Use this for adding particles, deleting particles, etc.static_particles_function::Function
: Give it a function of the formmyfun(pfield, t, dt)
to add static particles representing solid boundaries to the solver. This function is called at every time step right before solving the governing equations, and any new particles added by this function are immediately removed.save_path::String
: Give it a string for saving VTKs of the particle field. Creates the given path.run_name::String
: Name of output files.nsteps_save::Int64
: Saves vtks every this many time steps.prompt::Bool
: Ifsave_path
already exist, it will prompt the user before overwritting the folder if true; it will directly overwrite it if false.verbose::Bool
: Prints progress of the run to the terminal.verbose_nsteps::Bool
: Number of time steps between verbose.
FLOWVPM.save
— Functionsave(pfield, file_name; path="")
Saves the particle field in HDF5 format and a XDMF file specifying its attributes. This format can be opened in Paraview for post-processing and visualization.
FLOWVPM.read
— Functionread(h5_fname::String, settings_fname::String; overwrite_settings=(),
optargs...)
Read particle field from HDF5 file.
FLOWVPM.save_settings
— Functionsave_settings(pfield::ParticleField, file_name::String;
path::String="", suff="_settings")
Save the settings of a particle field to a BSON file.
FLOWVPM.read_settings
— Functionread_settings(fname::String; path::String="")
Read the settings of a particle field from a BSON file.