GSI_Toolbox 1.0.0
A toolbox for Gas-Surface Interaction simulations
|
Public Member Functions | |
__init__ (self, mu_array, sigma_array, sample_length, local_parameters) | |
find_coefficients (self, func, n_coeff, lim, N) | |
compute_Hermite_expansion (self, coeff_array, tau) | |
compute_psd (self, Z) | |
generate_height_pdf (self, Z) | |
correct_PSD (self, Z, target_psd) | |
correct_height (self, Z_h, Z_p) | |
generate (self, samples, iterations, verbose) | |
compute_autocorr_length (self, Z) | |
save (self, project_name, file_name) | |
A class used to represent a 3D surface with stochastic characteristics. The surface is generated based on mu and sigma arrays, which control the shape and roughness of the surface. This class also handles saving the surface geometry to a file.
surface_generator.Surface.__init__ | ( | self, | |
mu_array, | |||
sigma_array, | |||
sample_length, | |||
local_parameters ) |
Initializes the Surface object. Parameters: - mu_array: Array of coefficients for the mu parameter of the surface. - sigma_array: Array of coefficients for the sigma parameter of the surface. - sample_length: Length of the surface to be generated. - local_parameters: Additional local parameters associated with the surface.
surface_generator.Surface.compute_autocorr_length | ( | self, | |
Z ) |
Computes the autocorrelation length of the surface. Parameters: - Z: The surface height matrix. Returns: - The autocorrelation length as a float.
surface_generator.Surface.compute_Hermite_expansion | ( | self, | |
coeff_array, | |||
tau ) |
Evaluates the Hermite expansion for the given coefficients and input values. Parameters: - coeff_array: Array of Hermite coefficients. - tau: Input value or array for evaluating the expansion. Returns: - The evaluated Hermite expansion.
surface_generator.Surface.compute_psd | ( | self, | |
Z ) |
Computes the power spectral density (PSD) of the surface Z. Parameters: - Z: The surface height matrix. Returns: - The power spectral density as a numpy array.
surface_generator.Surface.correct_height | ( | self, | |
Z_h, | |||
Z_p ) |
Corrects the height of the surface based on a reference surface. Parameters: - Z_h: The target height distribution surface. - Z_p: The reference surface. Returns: - The modified surface with corrected heights.
surface_generator.Surface.correct_PSD | ( | self, | |
Z, | |||
target_psd ) |
Adjusts the PSD of the surface to match the target PSD. Parameters: - Z: The surface height matrix. - target_psd: The target power spectral density to match. Returns: - The modified surface height matrix with the corrected PSD.
surface_generator.Surface.find_coefficients | ( | self, | |
func, | |||
n_coeff, | |||
lim, | |||
N ) |
Computes the Hermite polynomial coefficients for a given function. Parameters: - func: The function to fit. - n_coeff: The number of Hermite coefficients to compute. - lim: The range over which to compute the coefficients. - N: The number of points to use for the fitting. Returns: - Hermite coefficients as a numpy array.
surface_generator.Surface.generate | ( | self, | |
samples, | |||
iterations, | |||
verbose ) |
Generates the surface by iteratively correcting its PSD and height distribution. Parameters: - samples: Number of samples along each dimension of the surface. - iterations: Number of iterations for the PSD and height correction. - verbose: Boolean flag to print details during the surface generation.
surface_generator.Surface.generate_height_pdf | ( | self, | |
Z ) |
Generates the height distribution function for the surface based on mu and sigma arrays. Parameters: - Z: The surface height matrix. Returns: - The modified surface height matrix with a Gaussian height distribution.
surface_generator.Surface.save | ( | self, | |
project_name, | |||
file_name ) |
Saves the generated surface to STL and SRF files. Parameters: - project_name: The name of the project directory. - file_name: The base name of the files to save.