Closed mhvwerts closed 1 year ago
This is a great addition. The only function I can add to the to-do list is an interpolator that calculates the value of a cell variable for a specified location that is not necessarily at a cell center.
Standard interpolation may be done using functions from scipy.interpolate
on basis of the output from the get_CellVariable_profile
functions. This could be documented in a future Notebook (and later in the the full PyFVTool documentation...).
Utility functions have been added to
pyfvtool.cell
for obtaining cell coordinates and cell values over the entire domain of aCellVariable
, calculating the values at the outer faces using the ghost cells. The code was taken frompyfvtool.visualization.visualizeCells()
and these functions now replace that code, avoiding code repetition.Moreover, these utility functions can now also be used outside of
visualizeCells
, for exporting/analysing/plottingCellVariable
(FVM solutions) data with other code.The utility functions could later become methods of the
CellVariable
class. For now, separate methods are provided for 1D, 2D and 3D meshes, and we could later envisage a single 'portal' function that calls the appropriate function depending on the type of mesh of the CellVariable. This has not been done at this stage, in order to keep things simple.