Saras
Finite   Difference   Solver   for   Fluid   Dynamics   Simulations
tseries.h
Go to the documentation of this file.
1/********************************************************************************************************************************************
2 * Saras
3 *
4 * Copyright (C) 2019, Mahendra K. Verma
5 *
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. Neither the name of the copyright holder nor the
16 * names of its contributors may be used to endorse or promote products
17 * derived from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
23 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 *
30 ********************************************************************************************************************************************
31 */
43#ifndef TSERIES_H
44#define TSERIES_H
45
46#include <fstream>
47
48#include "plainsf.h"
49#include "sfield.h"
50#include "vfield.h"
51#include "grid.h"
52
53class tseries {
54 public:
55 tseries(const grid &mesh, vfield &solverV, const sfield &solverP, const real &solverTime, const real &timeStep);
56
57 void writeTSData();
58 void writeTSData(const sfield &T, const real nu, const real kappa);
59
60 ~tseries();
61
62 private:
63 int xLow, xTop;
64 int yLow, yTop;
65 int zLow, zTop;
66
67 real totalVol;
68 real maxDivergence;
69 real totalEnergy, localEnergy;
70 real totalUzT, localUzT, NusseltNo;
71
72 const real &time, &tStp;
73
74 const grid &mesh;
75
76 const sfield &P;
77 vfield &V;
78
79 plainsf divV;
80
81 std::ofstream ofFile;
82};
83
94#endif
Contains all the global variables related to the grid, its slices, limits, and grid derivatives used ...
Definition: grid.h:53
Plain scalar field class to store simple scalar fields with no differentiation or interpolation.
Definition: plainsf.h:51
Scalar field class to store and operate on scalar fields.
Definition: sfield.h:54
Handles the writing of time-series data for various global quantities.
Definition: tseries.h:53
tseries(const grid &mesh, vfield &solverV, const sfield &solverP, const real &solverTime, const real &timeStep)
Constructor of the tseries class.
Definition: tseries.cc:62
void writeTSData()
Overloaded function to write the time-series data for hydro solver.
Definition: tseries.cc:137
Vector field class to store and operate on vector fields.
Definition: vfield.h:54
Class declaration of grid.
Class declaration of plainsf - plain scalar field.
Class declaration of sfield - scalar field.
Class declaration of vfield - vector field.