Utilities

FLOWVPM.run_vpm!Function

run_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 form myfun(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 form myfun(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 : If save_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.
source
FLOWVPM.saveFunction

save(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.

source
FLOWVPM.readFunction
read(h5_fname::String, settings_fname::String; overwrite_settings=(),
                                                                 optargs...)

Read particle field from HDF5 file.
source
FLOWVPM.save_settingsFunction
save_settings(pfield::ParticleField, file_name::String;
                                    path::String="", suff="_settings")

Save the settings of a particle field to a BSON file.

source
FLOWVPM.read_settingsFunction
read_settings(fname::String; path::String="")

Read the settings of a particle field from a BSON file.

source