OpenFOAM: API Guide
v2112
The open source CFD toolbox
shapeOptimisationIncompressible.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-2020 PCOpt/NTUA
9
Copyright (C) 2013-2020 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
30
Description
31
Shape optimisation support library
32
33
Class
34
Foam::incompressible::shapeOptimisation
35
36
Description
37
Calculates shape sensitivities using the adjoint approach,
38
computes boundaryMesh movement and propagates it to the volume mesh
39
40
SourceFiles
41
shapeOptimisation.C
42
43
\*---------------------------------------------------------------------------*/
44
45
#ifndef shapeOptimisationIncompressible_H
46
#define shapeOptimisationIncompressible_H
47
48
#include "
optimisationTypeIncompressible.H
"
49
#include "
optMeshMovement.H
"
50
51
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52
53
namespace
Foam
54
{
55
56
namespace
incompressible
57
{
58
59
/*---------------------------------------------------------------------------*\
60
Class shapeOptimisation Declaration
61
\*---------------------------------------------------------------------------*/
62
63
class
shapeOptimisation
64
:
65
public
optimisationType
66
{
67
protected
:
68
69
// Protected data
70
71
autoPtr<optMeshMovement>
optMeshMovement_
;
72
73
bool
writeEachMesh_
;
74
bool
updateGeometry_
;
75
76
77
// Protected Member Functions
78
79
//- Update the design variables given their correction
80
virtual
void
updateDesignVariables
(
scalarField
&
correction
);
81
82
//- Compute eta if not set in the first step
83
virtual
void
computeEta
(
scalarField
&
correction
);
84
85
86
private
:
87
88
// Private Member Functions
89
90
//- No copy construct
91
shapeOptimisation
(
const
shapeOptimisation
&) =
delete
;
92
93
//- No copy assignment
94
void
operator=(
const
shapeOptimisation
&) =
delete
;
95
96
97
public
:
98
99
//- Runtime type information
100
TypeName
(
"shapeOptimisation"
);
101
102
103
// Constructors
104
105
//- Construct from components
106
shapeOptimisation
107
(
108
fvMesh
&
mesh
,
109
const
dictionary
&
dict
,
110
PtrList<adjointSolverManager>
&
adjointSolverManagers
111
);
112
113
114
//- Destructor
115
virtual
~shapeOptimisation
() =
default
;
116
117
118
// Member Functions
119
120
//- Store design variables, as the starting point for line search
121
virtual
void
storeDesignVariables
();
122
123
//- Store design variables, as the starting point for line search
124
virtual
void
resetDesignVariables
();
125
126
//- Write useful quantities to files
127
virtual
void
write
();
128
};
129
130
131
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132
133
}
// End namespace incompressible
134
}
// End namespace Foam
135
136
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137
138
#endif
139
140
// ************************************************************************* //
Foam::incompressible::shapeOptimisation::storeDesignVariables
virtual void storeDesignVariables()
Store design variables, as the starting point for line search.
Definition:
shapeOptimisationIncompressible.C:183
Foam::incompressible::shapeOptimisation::~shapeOptimisation
virtual ~shapeOptimisation()=default
Destructor.
Foam::incompressible::optimisationType
Abstract base class for optimisation methods.
Definition:
optimisationTypeIncompressible.H:58
Foam::correction
tmp< fvMatrix< Type > > correction(const fvMatrix< Type > &)
Foam::incompressible::shapeOptimisation::optMeshMovement_
autoPtr< optMeshMovement > optMeshMovement_
Definition:
shapeOptimisationIncompressible.H:70
Foam::incompressible::shapeOptimisation::updateGeometry_
bool updateGeometry_
Definition:
shapeOptimisationIncompressible.H:73
Foam::incompressible::shapeOptimisation::write
virtual void write()
Write useful quantities to files.
Definition:
shapeOptimisationIncompressible.C:195
Foam::incompressible::shapeOptimisation
Calculates shape sensitivities using the adjoint approach, computes boundaryMesh movement and propaga...
Definition:
shapeOptimisationIncompressible.H:62
Foam::Field< scalar >
adjointSolverManagers
PtrList< adjointSolverManager > & adjointSolverManagers
Definition:
createFields.H:8
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition:
List.H:59
Foam::incompressible::shapeOptimisation::resetDesignVariables
virtual void resetDesignVariables()
Store design variables, as the starting point for line search.
Definition:
shapeOptimisationIncompressible.C:189
dict
dictionary dict
Definition:
searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition:
dictionary.H:123
mesh
dynamicFvMesh & mesh
Definition:
createDynamicFvMesh.H:6
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition:
fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:33
Foam::incompressible::shapeOptimisation::updateDesignVariables
virtual void updateDesignVariables(scalarField &correction)
Update the design variables given their correction.
Definition:
shapeOptimisationIncompressible.C:53
Foam::incompressible::shapeOptimisation::writeEachMesh_
bool writeEachMesh_
Definition:
shapeOptimisationIncompressible.H:72
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition:
HashPtrTable.H:53
Foam::incompressible::shapeOptimisation::computeEta
virtual void computeEta(scalarField &correction)
Compute eta if not set in the first step.
Definition:
shapeOptimisationIncompressible.C:87
optimisationTypeIncompressible.H
optMeshMovement.H
Foam::incompressible::shapeOptimisation::TypeName
TypeName("shapeOptimisation")
Runtime type information.
src
optimisation
adjointOptimisation
adjoint
optimisation
optimisationType
incompressible
shapeOptimisation
shapeOptimisationIncompressible.H
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.