adjointLaminar.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) 2007-2019 PCOpt/NTUA
9  Copyright (C) 2013-2019 FOSS GP
10  Copyright (C) 2019 OpenCFD Ltd.
11 -------------------------------------------------------------------------------
12 License
13  This file is part of OpenFOAM.
14 
15  OpenFOAM is free software: you can redistribute it and/or modify it
16  under the terms of the GNU General Public License as published by
17  the Free Software Foundation, either version 3 of the License, or
18  (at your option) any later version.
19 
20  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
21  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
22  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23  for more details.
24 
25  You should have received a copy of the GNU General Public License
26  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
27 
28 
29 Class
30  Foam::incompressibleAdjoint::adjointRASModels::adjointLaminar
31 
32 Description
33  Dummy turbulence model for a laminar incompressible flow. Can also
34  be used when the "frozen turbulence" assumption is employed.
35 
36 SourceFiles
37  adjointLaminar.C
38 
39 \*---------------------------------------------------------------------------*/
40 
41 #ifndef adjointRasLaminar_H
42 #define adjointRasLaminar_H
43 
44 #include "adjointRASModel.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 namespace incompressibleAdjoint
51 {
52 namespace adjointRASModels
53 {
54 
55 /*---------------------------------------------------------------------------*\
56  Class adjointLaminar Declaration
57 \*---------------------------------------------------------------------------*/
58 
59 class adjointLaminar
60 :
61  public adjointRASModel
62 {
63 private:
64 
65  // Private Member Functions
66 
67  //- No copy construct
68  adjointLaminar(const adjointLaminar&) = delete;
69 
70  //- No copy assignment
71  void operator=(const adjointLaminar&) = delete;
72 
73 
74 public:
75 
76  //- Runtime type information
77  TypeName("adjointLaminar");
78 
79 
80  // Constructors
81 
82  //- Construct from components
84  (
85  incompressibleVars& primalVars,
87  objectiveManager& objManager,
88  const word& adjointTurbulenceModelName
89  = adjointTurbulenceModel::typeName,
90  const word& modelName = typeName
91  );
92 
93 
94  //- Destructor
95  virtual ~adjointLaminar() = default;
96 
97 
98  // Member Functions
99 
100  //- Return the effective stress tensor, i.e. the adjointLaminar stress
101  virtual tmp<volSymmTensorField> devReff() const;
102 
103  //- Return the effective stress tensor based on a given velocity field
105  (
106  const volVectorField& U
107  ) const;
108 
109  //- Return the diffusion term for the momentum equation
111 
112  //- Source terms to the adjoint momentum equation due to the
113  //- differentiation of the turbulence model
115 
116  //- Returns zero field
117  virtual const boundaryVectorField& adjointMomentumBCSource() const;
118 
119  //- Returns zero field
121 
122  //- Returns zero field
124 
125  //- Returns zero field
127 
128  //- Returns zero field
130 
131  //- Nullify all adjoint turbulence model fields and their old times
132  virtual void nullify();
133 
134  //- Correct the primal viscosity field. Redundant?
135  virtual void correct();
136 
137  //- Read adjointRASProperties dictionary
138  virtual bool read();
139 };
140 
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 } // End namespace adjointRASModels
145 } // End namespace incompressibleAdjoint
146 } // End namespace Foam
147 
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 
150 #endif
151 
152 // ************************************************************************* //
Foam::incompressibleAdjoint::adjointRASModels::adjointLaminar::adjointMeanFlowSource
virtual tmp< volVectorField > adjointMeanFlowSource()
Definition: adjointLaminar.C:111
Foam::incompressibleAdjointMeanFlowVars
Manages the adjoint mean flow fields and their mean values.
Definition: incompressibleAdjointMeanFlowVars.H:51
Foam::objectiveManager
class for managing incompressible objective functions.
Definition: objectiveManager.H:54
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
adjointRASModel.H
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::incompressibleAdjoint::adjointRASModels::adjointLaminar::~adjointLaminar
virtual ~adjointLaminar()=default
Destructor.
Foam::incompressibleAdjoint::adjointRASModels::adjointLaminar::devReff
virtual tmp< volSymmTensorField > devReff() const
Return the effective stress tensor, i.e. the adjointLaminar stress.
Definition: adjointLaminar.C:71
Foam::incompressibleAdjoint::adjointRASModels::adjointLaminar::nullify
virtual void nullify()
Nullify all adjoint turbulence model fields and their old times.
Definition: adjointLaminar.C:188
Foam::incompressibleAdjoint::adjointRASModels::adjointLaminar::correct
virtual void correct()
Correct the primal viscosity field. Redundant?
Definition: adjointLaminar.C:200
Foam::incompressibleAdjoint::adjointRASModels::adjointLaminar::wallShapeSensitivities
virtual const boundaryVectorField & wallShapeSensitivities()
Returns zero field.
Definition: adjointLaminar.C:140
Foam::incompressibleAdjoint::adjointRASModels::adjointLaminar::divDevReff
virtual tmp< fvVectorMatrix > divDevReff(volVectorField &U) const
Return the diffusion term for the momentum equation.
Definition: adjointLaminar.C:101
Foam::incompressibleAdjoint::adjointRASModels::adjointLaminar::FISensitivityTerm
virtual tmp< volTensorField > FISensitivityTerm()
Returns zero field.
Definition: adjointLaminar.C:170
Foam::incompressibleAdjoint::adjointRASModels::adjointLaminar::adjointMomentumBCSource
virtual const boundaryVectorField & adjointMomentumBCSource() const
Returns zero field.
Definition: adjointLaminar.C:133
Foam::incompressibleAdjoint::adjointRASModels::adjointLaminar::read
virtual bool read()
Read adjointRASProperties dictionary.
Definition: adjointLaminar.C:194
Foam::incompressibleAdjoint::adjointRASModel
Abstract base class for incompressible turbulence models.
Definition: adjointRASModel.H:77
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
U
U
Definition: pEqn.H:72
Foam::incompressibleAdjoint::adjointRASModels::adjointLaminar::TypeName
TypeName("adjointLaminar")
Runtime type information.
Foam::incompressibleAdjoint::adjointRASModels::adjointLaminar::wallFloCoSensitivities
virtual const boundaryVectorField & wallFloCoSensitivities()
Returns zero field.
Definition: adjointLaminar.C:146
Foam::GeometricField::Boundary
The boundary fields.
Definition: GeometricField.H:115
Foam::incompressibleAdjoint::adjointRASModels::adjointLaminar::distanceSensitivities
virtual tmp< volScalarField > distanceSensitivities()
Returns zero field.
Definition: adjointLaminar.C:152
Foam::GeometricField< vector, fvPatchField, volMesh >
Foam::incompressibleVars
Base class for solution control classes.
Definition: incompressibleVars.H:54
Foam::incompressibleAdjoint::adjointRASModels::adjointLaminar
Dummy turbulence model for a laminar incompressible flow. Can also be used when the "frozen turbulenc...
Definition: adjointLaminar.H:58