Saras
Finite Difference Solver for Fluid Dynamics Simulations
|
Handles the writing of time-series data for various global quantities. More...
#include "lib/io/tseries.h"
Public Member Functions | |
tseries (const grid &mesh, vfield &solverV, const sfield &solverP, const real &solverTime, const real &timeStep) | |
Constructor of the tseries class. More... | |
void | writeTSData () |
Overloaded function to write the time-series data for hydro solver. More... | |
void | writeTSData (const sfield &T, const real nu, const real kappa) |
Overloaded function to write the time-series data for scalar solver. More... | |
Handles the writing of time-series data for various global quantities.
The class writes the output into a dat file as well as to the standard I/O. The class computes various global quantities use library functions and MPI reduce calls.
tseries::tseries | ( | const grid & | mesh, |
vfield & | solverV, | ||
const sfield & | solverP, | ||
const real & | solverTime, | ||
const real & | timeStep | ||
) |
Constructor of the tseries class.
The constructor initializes the variables and parameters for writing time-series data The header for the time-series data file is also written here. Depending on whether the run is for a scalar solver or hydro solver, the appropriate header is written.
mesh | is a const reference to the global data contained in the grid class |
solverV | is a reference to the velocity vector field whose data is used in calculating global quantities |
solverP | is a const reference to the pressure scalar field whose dimensions are used to set array limits |
solverTime | is a const reference to the real variable holding the value of current solver time |
timeStep | is a const reference to the real variable holding the value of current time-step |
void tseries::writeTSData | ( | ) |
Overloaded function to write the time-series data for hydro solver.
The function computes total energy and divergence for hydro solver runs. Only the root rank (rank 0) writes the output. One line is written to the standard I/O, while another is written to the time series dat file.
void tseries::writeTSData | ( | const sfield & | T, |
const real | nu, | ||
const real | kappa | ||
) |
Overloaded function to write the time-series data for scalar solver.
The function computes total energy, Nusselt number and divergence for scalar solver runs. Only the root rank (rank 0) writes the output. One line is written to the standard I/O, while another is written to the time series dat file.
T | is a const reference to the temperature scalar field whose data is used to compute Nusselt number |
nu | is a const reference to the real variable containing the value of kinematic viscosity |
kappa | is a const reference to the real variable containing the value of thermal diffusion |