Nektar++
ProcessLocalStabilityAnalysis.h
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////////////
2//
3// File: ProcessLocalStabilityAnalysis.h
4//
5// For more information, please see: http://www.nektar.info/
6//
7// The MIT License
8//
9// Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10// Department of Aeronautics, Imperial College London (UK), and Scientific
11// Computing and Imaging Institute, University of Utah (USA).
12//
13// Permission is hereby granted, free of charge, to any person obtaining a
14// copy of this software and associated documentation files (the "Software"),
15// to deal in the Software without restriction, including without limitation
16// the rights to use, copy, modify, merge, publish, distribute, sublicense,
17// and/or sell copies of the Software, and to permit persons to whom the
18// Software is furnished to do so, subject to the following conditions:
19//
20// The above copyright notice and this permission notice shall be included
21// in all copies or substantial portions of the Software.
22//
23// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29// DEALINGS IN THE SOFTWARE.
30//
31// Description: Local linear stability analysis of compressible flow.
32//
33////////////////////////////////////////////////////////////////////////////////
34
35#ifndef FIELDUTILS_PROCESSLOCALSTABILITYANALYSIS
36#define FIELDUTILS_PROCESSLOCALSTABILITYANALYSIS
37
39
40#include <string>
41
42namespace Nektar::FieldUtils
43{
44
45/**
46 * @brief This processing module calculates the wall shear stress and adds it
47 * as an extra-field to the output file, and writes it to a surface output file.
48 */
49
50// Define the
51
52extern "C"
53{
55 void F77NAME(copse3d)(const long int &option, const NekDouble *finalValue1,
56 const long int &numStep1,
57 const NekDouble *finalValue2,
58 const long int &numStep2);
59}
60
62{
63public:
64 /// Creates an instance of this class
65 static std::shared_ptr<Module> create(FieldSharedPtr f)
66 {
68 f);
69 }
71
74
75 /// Write mesh to output file.
76 void v_Process(po::variables_map &vm) override;
77
78 std::string v_GetModuleName() override
79 {
80 return "ProcessLocalStabilityAnalysis";
81 }
82
83 std::string v_GetModuleDescription() override
84 {
85 return "Performing local (linear) stability analysis (LST)";
86 }
87
88 // test
89 inline void call_hello()
90 {
92 }
93
94 inline void call_lst(const long int &option, const NekDouble *finalValue1,
95 const long int &numStep1, const NekDouble *finalValue2,
96 const long int &numStep2)
97 {
98 F77NAME(copse3d)(option, finalValue1, numStep1, finalValue2, numStep2);
99 }
100
101protected:
102private:
103 void GenerateInputFiles(); // Generate the PSEREAD.NAM for the LST solver
104
105 // PSEREAD parameters
106 int m_NSTART = 1;
107 int m_ITSE = 0;
108 int m_INEUTRL = 0; // flag for spanwise wavenumber/frequency sweep
109 NekDouble m_BETALIN = 0; // spanwise wavenumber, unit [1/m]
110 NekDouble m_FREQLIN = 2000; // frequency of disturbances, unit [1/s]
111 int m_NGLOBAL = 25; // no. of points to be used in global analysis.
112 int m_NLOCAL = 121; // no. of points to be used in local analysis.
113 int m_ITOLRAY = 5; // tolerance in Rayleigh iteration
114 std::string m_LABEL = "\'localStabilityAnalysis\'";
115 int m_ITSPRES = 0; // history output, 0 ,1, 2
116 int m_IEIGL = 1; // output the eigen function
117 NekDouble m_RGAS = 287.0; // in physical unit rather than the non-dim value
120};
121} // namespace Nektar::FieldUtils
122
123#endif
#define F77NAME(x)
Fortran routines need an underscore.
Definition: TransF77.hpp:46
This processing module sets up for the boundary field to be extracted.
void call_lst(const long int &option, const NekDouble *finalValue1, const long int &numStep1, const NekDouble *finalValue2, const long int &numStep2)
void v_Process(po::variables_map &vm) override
Write mesh to output file.
static std::shared_ptr< Module > create(FieldSharedPtr f)
Creates an instance of this class.
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
std::shared_ptr< Field > FieldSharedPtr
Definition: Field.hpp:1026
std::pair< ModuleType, std::string > ModuleKey
Definition: Module.h:180
void F77NAME() copse3d(const long int &option, const NekDouble *finalValue1, const long int &numStep1, const NekDouble *finalValue2, const long int &numStep2)
void F77NAME() helloworld()
This processing module calculates the wall shear stress and adds it as an extra-field to the output f...
double NekDouble