Loading...
Searching...
No Matches
sensitivitySurface.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-2023 PCOpt/NTUA
9 Copyright (C) 2013-2023 FOSS GP
10 Copyright (C) 2019 OpenCFD Ltd.
11-------------------------------------------------------------------------------
12License
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
28Class
29 Foam::sensitivitySurface
30
31Description
32 Calculation of adjoint based sensitivities at wall faces
33
34 Reference:
35 \verbatim
36 The computation of the sensitivity derivatives follows the (E-)SI
37 formulation of
38
39 Kavvadias, I. S., Papoutsis-Kiachagias, E. M.,
40 Giannakoglou, K. C. (2015).
41 On the proper treatment of grid sensitivities in continuous adjoint
42 methods for shape optimization.
43 Journal of computational physics, 301, 1-18.
44 https://doi.org/10.1016/j.jcp.2015.08.012
45
46 whereas their smoothing based on the computation of the 'Sobolev
47 gradient' is derived from
48
49 Vassberg J. C., Jameson A. (2006).
50 Aerodynamic Shape Optimization Part I: Theoretical Background.
51 VKI Lecture Series, Introduction to Optimization and
52 Multidisciplinary Design, Brussels, Belgium, 8 March, 2006.
53 \endverbatim
54
55SourceFiles
56 sensitivitySurface.C
57
58\*---------------------------------------------------------------------------*/
59
60#ifndef sensitivitySurfaceIncompressible_H
61#define sensitivitySurfaceIncompressible_H
62
64#include "faMesh.H"
65
66// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
67
68namespace Foam
69{
71/*---------------------------------------------------------------------------*\
72 Class sensitivitySurface Declaration
73\*---------------------------------------------------------------------------*/
74
75class sensitivitySurface
76:
77 public sensitivitySurfacePoints
78{
79protected:
80
81 // Protected data
82
83 //- Smooth sensitivity derivatives based on a surface Laplace solver
85
86 //- Return the complete vector of sensitivities
88
89 //bool finalResultIncludesArea_;
90
91
92 // Protected Member Functions
93
94 //- Compute the size of the return field
95 label computeFaceDerivativesSize(const bool computeVectorFieldSize);
96
97 //- Smooth sensitivity derivatives based on the computation of the
98 //- 'Sobolev gradient'
100
101 //- Compute the physical smoothing radius based on the average boundary
102 //- face 'length'
103 scalar computeRadius(const faMesh& aMesh);
104
105
106private:
107
108 // Private Member Functions
109
110 //- No copy construct
111 sensitivitySurface(const sensitivitySurface&) = delete;
112
113 //- No copy assignment
114 void operator=(const sensitivitySurface&) = delete;
115
116
117public:
118
119 //- Runtime type information
120 TypeName("surface");
121
122
123 // Constructors
124
125 //- Construct from components
126 sensitivitySurface
127 (
128 const fvMesh& mesh,
129 const dictionary& dict,
131 );
132
133
134 //- Destructor
135 virtual ~sensitivitySurface() = default;
136
137
138 // Member Functions
139
140 //- Read controls and update solver pointers if necessary
141 void read();
142
143 //- Assemble sensitivities
144 virtual void assembleSensitivities
145 (
146 autoPtr<designVariables>& designVars
147 );
148};
149
151// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152
153} // End namespace Foam
154
155// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156
157#endif
158
159// ************************************************************************* //
Base class for adjoint solvers.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Finite area mesh (used for 2-D non-Euclidian finite area method) defined using a patch of faces on a ...
Definition faMesh.H:140
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
TypeName("surface")
Runtime type information.
virtual ~sensitivitySurface()=default
Destructor.
void read()
Read controls and update solver pointers if necessary.
bool returnVectorField_
Return the complete vector of sensitivities.
scalar computeRadius(const faMesh &aMesh)
Compute the physical smoothing radius based on the average boundary face 'length'.
bool smoothSensitivities_
Smooth sensitivity derivatives based on a surface Laplace solver.
label computeFaceDerivativesSize(const bool computeVectorFieldSize)
Compute the size of the return field.
void smoothSensitivities()
Smooth sensitivity derivatives based on the computation of the 'Sobolev gradient'.
virtual void assembleSensitivities(autoPtr< designVariables > &designVars)
Assemble sensitivities.
dynamicFvMesh & mesh
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68