pointNoise.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2015-2016 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::noiseModels::pointNoise
28
29Description
30 Perform noise analysis on point-based pressure data.
31
32 Input data is read from a dictionary, e.g.
33
34 \verbatim
35 // Pressure reference
36 pRef 0;
37
38 // Number of samples in sampling window, default = 2^16 (=65536)
39 N 4096;
40
41 // Lower frequency bounds
42 fl 25;
43
44 // Upper frequency bounds
45 fu 25;
46
47 // Start time
48 startTime 0;
49
50 windowModel <modelType>
51 <modelType>Coeffs
52 {
53 ...
54 }
55
56 // Pressure data supplied in CSV file format
57 file "pressureData";
58 //files ("pressureData1" "pressureData2");
59 nHeaderLine 1;
60 refColumn 0;
61 componentColumns (1);
62 separator " ";
63 mergeSeparators yes;
64
65 graphFormat raw;
66
67 \endverbatim
68
69SourceFiles
70 pointNoise.C
71
72SeeAlso
73 noiseModel.H
74 windowModel.H
75
76\*---------------------------------------------------------------------------*/
77
78#ifndef noiseModels_pointNoise_H
79#define noiseModels_pointNoise_H
80
81#include "noiseModel.H"
82#include "CSV.H"
83
84// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
85
86namespace Foam
87{
88namespace noiseModels
89{
90
91/*---------------------------------------------------------------------------*\
92 Class pointNoise Declaration
93\*---------------------------------------------------------------------------*/
95class pointNoise
96:
97 public noiseModel
98{
99
100protected:
101
102 // Protected data
103
104 //- Input file names - optional
106
107
108 // Protected Member Functions
109
110 void filterTimeData
111 (
112 const scalarField& t0,
113 const scalarField& p0,
114 scalarField& t,
116 ) const;
117
118 //- Process the CSV data
119 void processData
120 (
121 const label dataseti,
123 );
124
125
126public:
127
128 //- Runtime type information
129 TypeName("pointNoise");
130
131 //- Constructor
132 pointNoise(const dictionary& dict, const bool readFields = true);
133
134 //- Destructor
135 virtual ~pointNoise() = default;
136
137
138 // Public Member Functions
139
140 //- Read from dictionary
141 virtual bool read(const dictionary& dict);
142
143 //- Calculate
144 virtual void calculate();
145};
146
147
148// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149
150} // End namespace noiseModels
151} // End namespace Foam
152
153// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154
155#endif
156
157// ************************************************************************* //
Templated CSV function.
Definition: CSV.H:78
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: List.H:77
Database for solution data, solver performance and other reduced data.
Definition: data.H:58
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Base class for noise models.
Definition: noiseModel.H:176
Perform noise analysis on point-based pressure data.
Definition: pointNoise.H:97
void filterTimeData(const scalarField &t0, const scalarField &p0, scalarField &t, scalarField &p) const
Definition: pointNoise.C:47
void processData(const label dataseti, const Function1Types::CSV< scalar > &data)
Process the CSV data.
Definition: pointNoise.C:72
TypeName("pointNoise")
Runtime type information.
virtual bool read(const dictionary &dict)
Read from dictionary.
Definition: pointNoise.C:262
List< fileName > inputFileNames_
Input file names - optional.
Definition: pointNoise.H:104
virtual ~pointNoise()=default
Destructor.
virtual void calculate()
Calculate.
Definition: pointNoise.C:238
volScalarField & p
const volScalarField & p0
Definition: EEqn.H:36
Namespace for OpenFOAM.
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const wordHashSet &selectedFields, LIFOStack< regIOobject * > &storedObjects)
Read the selected GeometricFields of the templated type.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73