Nektar++
Loading...
Searching...
No Matches
edesign/EquationSystems/NavierStokesCFE.h
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: NavierStokesCFE.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: Navier-Stokes equations in conservative variables without
32// artificial diffusion
33//
34///////////////////////////////////////////////////////////////////////////////
35
36#pragma once
37
39#include <SolverCore/EquationSystems/UnsteadySystem.h>
40#include <SolverCore/TraceFlux/TraceFluxOp.hpp>
41
42namespace Nektar
43{
44template <typename TData> class CFLVelocityCFEOp;
45
46namespace MultiRegions
47{
48template <typename TData> class IProductWRTBaseOp;
49template <typename TData> class MultiplyByElmtInvMassOp;
50} // namespace MultiRegions
51
52namespace SolverCore
53{
54template <typename TData> class AdvWeakDGDiffusionIPOp;
55} // namespace SolverCore
56
57using namespace SolverCore;
58using namespace MultiRegions;
59
61{
62public:
63 friend class MemoryManager<NavierStokesCFE>;
64
65 /// Creates an instance of this class
69 {
72 equ->InitObject();
73 return equ;
74 }
75
76 /// Name of class
77 static std::string className;
78
79protected:
80 // Initialise operators
81 std::shared_ptr<AdvWeakDGDiffusionIPOp<double>> m_advDiffusionOp;
82 std::shared_ptr<CFLVelocityCFEOp<double>> m_cflVelocityOp;
83 // Element-local projection of the solution to coefficients for output.
84 std::shared_ptr<IProductWRTBaseOp<double>> m_iProductWRTBaseOp;
85 std::shared_ptr<MultiplyByElmtInvMassOp<double>> m_multiplyByElmtInvMassOp;
87
90
91 ~NavierStokesCFE() override = default;
92
95 const double &time);
96
99 [[maybe_unused]] const double &time,
100 [[maybe_unused]] const double &factor);
101
102 void v_InitObject(bool declareExpansionLists = true) override;
103
104 /// Attach the boundary conditions this system supports.
106
107 /// The viscous trace form SOLVERINFO ViscousTraceFlux selects.
109
110 void v_GenerateSummary(SummaryList &s) override;
111
113
114 void v_InitialiseOperators() override;
115
116 /// Project the solution to coefficients and return views of them.
117 CoefficientFieldViews v_GetOutputFieldViews() override;
118
119 CFLVelocity v_GetCFLVelocity() override;
120};
121
122} // namespace Nektar
A Field represents expansion data to be operated on.
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
static std::string className
Name of class.
NavierStokesCFE(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
std::shared_ptr< IProductWRTBaseOp< double > > m_iProductWRTBaseOp
std::shared_ptr< MultiplyByElmtInvMassOp< double > > m_multiplyByElmtInvMassOp
CoefficientFieldViews v_GetOutputFieldViews() override
Project the solution to coefficients and return views of them.
CFLVelocity v_GetCFLVelocity() override
Supply the Courant estimate with the compressible wave speed.
LibUtilities::Field< double, FieldState::Phys > m_cflVelocity
SolverCore::TraceFluxOp< double >::ViscousTraceForm ReadViscousTraceForm()
The viscous trace form SOLVERINFO ViscousTraceFlux selects.
void DoOdeRhs(LibUtilities::Field< double, FieldState::Phys > &in, LibUtilities::Field< double, FieldState::Phys > &out, const double &time, const double &factor)
Assemble the explicit Navier-Stokes increment.
void v_GenerateSummary(SummaryList &s) override
Print a summary of time stepping parameters.
std::shared_ptr< CFLVelocityCFEOp< double > > m_cflVelocityOp
std::shared_ptr< AdvWeakDGDiffusionIPOp< double > > m_advDiffusionOp
void SetUpBoundaryConditions()
Attach the boundary conditions this system supports.
~NavierStokesCFE() override=default
static EquationSystemSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
Creates an instance of this class.
void v_InitObject(bool declareExpansionLists=true) override
Initialization object for CompressibleFlowSystem class.
void DoProjection(LibUtilities::Field< double, FieldState::Phys > &in, LibUtilities::Field< double, FieldState::Phys > &out, const double &time)
Project onto the solution space, which for DG is a copy.
Base class for unsteady solvers.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::vector< std::pair< std::string, std::string > > SummaryList
Definition Misc.h:46
std::shared_ptr< EquationSystem > EquationSystemSharedPtr
A shared pointer to an EquationSystem object.
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
Definition MeshGraph.h:287