Cart3D PySAGAS Wrapper
The PySAGAS wrapper for Cart3D includes a main wrapper module and a utilities module.
- class pysagas.sensitivity.cart3d.cart3d.Cart3DSensitivityCalculator[source]
PySAGAS Cart3D flow sensitivity calculator.
- __init__(freestream, sensitivity_filepath, components_filepath=None, pointdata=None, celldata=None, write_data=False, verbosity=1, **kwargs)[source]
A PySAGAS sensitivity calculator for Cart3D.
- Parameters:
freestream (FlowState) – The flow state of the freestream.
sensitivity_filepath (str) – The filepath to the geometry sensitivities.
components_filepath (str, optional) – The filepath to the Components.i.plt file to be processed. The default is None.
pointdata (pd.DataFrame, optional) – The point data. Must be supplied with celldata.
celldata (pd.DataFrame, optional) – The cell data. Must be supplied with pointdata.
write_data (bool, optional) – Write the flow data to CSV files. The default is True.
verbosity (int, optional) – The verbosity of the code. The defualt is 1.
- Return type:
None
- _transcribe_cells(parameters)[source]
Transcribes the cells from Components.i.plt files into PySAGAS Cell objects.
- Parameters:
parameters (List[str]) – A list of the geometric design parameters.
- Returns:
cells – A list of all transcribed cells.
- Return type:
List[Cell]
See also
pysagas.geometry.Cell
- pysagas.sensitivity.cart3d.utilities.process_components_file(a_inf, rho_inf, filepath='Components.i.plt', write_data=True, verbosity=1)[source]
A ParaView script to process Components.i.plt to extract points and cells with data attached.
- Parameters:
a_inf (float) – The freestream speed of sound (m/s).
rho_inf (float) – The freestream density (kg/m^3).
filepath (str, optional) – The filepath to the Components.i.plt file to be processed. The default is Components.i.plt.
write_data (bool, optional) – Write the flow data to CSV files. The default is True.
verbosity (int, optional) – The verbosity of the code. The defualt is 1.
- Returns:
points (pd.DataFrame) – A DataFrame of the point data.
cells (pd.DataFrame) – A DataFrame of the cell data.
- Return type:
Tuple[DataFrame, DataFrame]