aPriori.DNS¶

DNS.py: the core module of the aPrioriDNS package.

Classes¶

Field3D

Class representing a 3D field with various attributes and methods for visualization and data management.

Scalar3D

A class representing a 3D scalar field.

Mesh3D

A class used to represent a 3D mesh.

Functions¶

add_variable(attribute_name, file_name[, species, ...])

compute_cell_volumes(x, y, z)

Compute the volumes of the cells in a 3D mesh grid.

delete_existing_files(paths[, delete, context])

Checks if any of the given paths exist. If so, prompts the user once to confirm deletion.

delete_file(file_path)

Deletes the specified file from the file system.

download([repo_url, dest_folder, dataset])

Downloads all files from a specified GitHub repository directory and saves them to the destination folder,

downsample(array, N)

process_file(file_path)

Read a binary file and convert its contents into a numpy array.

filter_gauss(field, delta[, mode])

Apply a Gaussian filter to a 3D numpy array.

filter_box(field, delta[, mode])

Apply a box filter to a 3D numpy array using scipy's convolve function.

filter_3D(field, filter_size[, RHO, favre, filter_type])

Apply a 3D filter (Gaussian or box) to a numpy array, with optional Favre filtering.

save_file(X, file_name)

Saves the given array to a file in binary format.

gradient_x(F, mesh[, filter_size])

Description

gradient_y(F, mesh[, filter_size])

Computes the gradient of a 3D, non downsampled, filtered field. Numpy is

gradient_z(F, mesh[, filter_size])

Computes the z component of the gradient of a 3D, non downsampled, filtered field.

generate_mask(start, shape, delta)

Computes the downsampled mask of a 3D field.

check_same_shape(*args)

Checks if the shape of the input arguments *args is the same

check_input_string(input_string, valid_strings, input_name)

Checks if the value of input_string is contained in the list valid_strings.

plot_power_spectrum(field[, C])

Plots the power spectrum of a 3D field.

process_chunk_LFR(j, T_chunk, P_chunk, Y_chunk, ...)

process_chunk_PSR(j, T_j, P_j, RHO_j, Tau_c_j, ...)

section_and_average(x, y, n_sections)

Divides the given array into sections and computes the average for each section.

read_variable_in_chunks(file_path, chunk_size)

Generator to read a binary file in chunks.

process_species_in_chunks(file_paths, species_file, ...)

Reads species mass fractions in chunks from the specified files.

x_midplane(array)

y_midplane(array)

z_midplane(array)