diff --git a/pyTurbulence/solver.py b/pyTurbulence/solver.py index 4228e3f02b98c441fcba1c4454bfefecc7c28448..fcc7d14e8103ce9bafe30c44f0e8d7401762bc11 100644 --- a/pyTurbulence/solver.py +++ b/pyTurbulence/solver.py @@ -22,7 +22,7 @@ def solve(user_params)->dict: """ # Validate the input parameters - params = validate_params(user_params) + params = _validate_params(user_params) # Read the params dictionary nbModes = params["nbModes"] @@ -99,7 +99,7 @@ def solve(user_params)->dict: } # Write the log file - write_log_file(params, results) + _write_log_file(params, results) # Dictionary containing the results of the simulation data = { @@ -116,7 +116,7 @@ def solve(user_params)->dict: return data -def validate_params(params) -> dict: +def _validate_params(params) -> dict: """ Validate the input parameters dictionary, set default values where needed, enforce allowed values, and check numeric ranges. @@ -229,7 +229,7 @@ def validate_params(params) -> dict: return validated_params -def get_metadata()->dict: +def _get_metadata()->dict: metadata = { "code_name": "~~~ pyTurbulence: Synthetic Turbulence Generator ~~~", "author": "Amaury Bilocq", @@ -237,7 +237,7 @@ def get_metadata()->dict: } return metadata -def write_log_file(params, results): +def _write_log_file(params, results): """ Write the log file with metadata, parameters, and results. @@ -251,7 +251,7 @@ def write_log_file(params, results): Dictionary containing the results of the simulation. """ log_file = os.path.join(params["output_dir"], "log.txt") - metadata = get_metadata() + metadata = _get_metadata() with open(log_file, "w") as f: # Display metadata