fluidsim.util.phys_fields

Utilities for physical fields files

fluidsim.util.phys_fields.save_file(path_file, state_phys, sim_info, output_name_run, oper, time, it, particular_attr=None, state_params=None)[source]

Save a state_phys file

fluidsim.util.phys_fields.compute_file_name(time, str_width, ext, it=None)[source]

Compute the file name from time and co

fluidsim.util.phys_fields.time_from_path(path, exact=False)[source]

Regular expression search to extract time from filename.

fluidsim.util.phys_fields.name_file_from_time_approx(path_dir, t_approx=None)[source]

Return the file name whose time is the closest to the given time.

Warning: for parallel runs and if t_approx is not None, it is safer to only call this function by one process.

Parameters:
path_dir: Path or str

Path of the directory of the simulation.

t_approxnumber or “last” (optional)

Approximate time of the file to be loaded. If “last”, use the last time. If None, just return the last file name (sorted in alphabetic order).

Functions

compute_file_name(time, str_width, ext[, it])

Compute the file name from time and co

name_file_from_time_approx(path_dir[, t_approx])

Return the file name whose time is the closest to the given time.

save_file(path_file, state_phys, sim_info, ...)

Save a state_phys file

time_from_path(path[, exact])

Regular expression search to extract time from filename.