BETForcesRadialDistributionResultCSVModel#

class BETForcesRadialDistributionResultCSVModel[source]#

Bases: OptionallyDownloadableResultCSVModel

Model for handling BET forces radial distribution CSV results.

Inherits from OptionallyDownloadableResultCSVModel.

Attributes

remote_file_name: str#
Default:

'bet_forces_radial_distribution_v2.csv'

local_file_name: str#
Default:

None

do_download: bool, optional#
Default:

None

local_storage: str, optional#
Default:

None

temp_file: str#
Default:

'/tmp/tmpx48idwvm/2234fca7-0595-42f3-9120-d04e2ed7b717.csv'

Properties

raw_values#

Get the raw CSV data.

Returns:

Dictionary containing the raw CSV data.

Return type:

dict

values#

Get the current data.

Returns:

Dictionary containing the current data.

Return type:

dict

averages#

Get average data over last 10%

Returns:

Dictionary containing CL, CD, CFx/y/z, CMx/y/z and other columns available in data

Return type:

dict

Additional Constructors

classmethod from_dict(data)#

Load from data dictionary

Parameters:

data (dict)

Methods

format_headers(params, pattern='$BETName_$CylinderName')[source]#

Renames the header entries from Disk{i}_ to based on an input user pattern such as $BETName_$CylinderName

Parameters:
  • params (SimulationParams) – Simulation parameters

  • pattern (str) – Pattern string to rename header entries. Available patterns [$BETName, $CylinderName, $DiskLocalIndex, $DiskGlobalIndex]

Returns:

Model containing csv with updated header

Return type:

LocalResultCSVModel

download(to_file=None, to_folder='.', overwrite=False, **kwargs)#

Download the results to the specified file or folder.

Parameters:
  • to_file (str, optional) – The file path where the results will be saved.

  • to_folder (str, optional) – The folder path where the results will be saved.

  • overwrite (bool, optional) – Whether to overwrite existing files with the same name.

Raises:

CloudFileNotFoundError – If the cloud file for the results is not found.

load_from_local(filename)#

Load CSV data from a local file.

Parameters:

filename (str) – Path to the local CSV file.

load_from_remote(**kwargs_download)#

Load CSV data from a remote source.

reload_data(filter_physical_steps_only=False, include_time=False)#

Change default behavior of data loader, reload

Parameters:
  • filter_physical_steps_only (bool)

  • include_time (bool)

update(df)#

Update containing value to the given DataFrame

Parameters:

df (DataFrame)

to_file(filename=None)#

Save the data to a CSV file.

Parameters:

filename (str, optional) – The name of the file to save the CSV data.

as_dict()#

Convert the data to a dictionary.

Returns:

Dictionary containing the data.

Return type:

dict

as_numpy()#

Convert the data to a NumPy array.

Returns:

NumPy array containing the data.

Return type:

numpy.ndarray

as_dataframe()#

Convert the data to a Pandas DataFrame.

Returns:

DataFrame containing the data.

Return type:

pandas.DataFrame

wait(timeout_minutes=60)#

Wait until the Case finishes processing, refresh periodically. Useful for postprocessing, eg sectional data

include_time()#

Set the option to include time in the data

filter_physical_steps_only()#

filters data to contain only last pseudo step data for every physical step

get_averages(average_fraction)#

Computes the average of data