KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
adjoint_far_field_lift_response_function.h
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ `
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics
6 //
7 // License: BSD License
8 // Kratos default license: kratos/license.txt
9 //
10 //
11 // Main authors: Marc Nunez, Inigo Lopez
12 //
13 
14 #ifndef ADJOINT_LIFT_FAR_FIELD_RESPONSE_FUNCTION_H
15 #define ADJOINT_LIFT_FAR_FIELD_RESPONSE_FUNCTION_H
16 
17 
18 // System includes
19 
20 // External includes
21 
22 // Project includes
24 
25 
26 namespace Kratos
27 {
28 
31 
35 
39 
43 
47 
52 class KRATOS_API(COMPRESSIBLE_POTENTIAL_FLOW_APPLICATION) AdjointLiftFarFieldResponseFunction : public AdjointPotentialResponseFunction
53 {
54 public:
57 
62 
66 
68  AdjointLiftFarFieldResponseFunction(ModelPart& rModelPart, Parameters ResponseSettings);
69 
72 
76 
80  void InitializeSolutionStep() override;
81 
82  double CalculateValue(ModelPart& rModelPart) override;
83 
84  void CalculateGradient(const Element& rAdjointElement,
85  const Matrix& rResidualGradient,
86  Vector& rResponseGradient,
87  const ProcessInfo& rProcessInfo) override;
88 
89  void CalculateGradient(const Condition& rAdjointCondition,
90  const Matrix& rResidualGradient,
91  Vector& rResponseGradient,
92  const ProcessInfo& rProcessInfo) override;
93 
94  void CalculatePartialSensitivity(Element& rAdjointElement,
95  const Variable<double>& rVariable,
96  const Matrix& rSensitivityMatrix,
97  Vector& rSensitivityGradient,
98  const ProcessInfo& rProcessInfo) override;
99 
100  void CalculatePartialSensitivity(Condition& rAdjointCondition,
101  const Variable<double>& rVariable,
102  const Matrix& rSensitivityMatrix,
103  Vector& rSensitivityGradient,
104  const ProcessInfo& rProcessInfo) override;
105 
106  void CalculatePartialSensitivity(Element& rAdjointElement,
107  const Variable<array_1d<double, 3>>& rVariable,
108  const Matrix& rSensitivityMatrix,
109  Vector& rSensitivityGradient,
110  const ProcessInfo& rProcessInfo) override;
111 
112  void CalculatePartialSensitivity(Condition& rAdjointCondition,
113  const Variable<array_1d<double, 3>>& rVariable,
114  const Matrix& rSensitivityMatrix,
115  Vector& rSensitivityGradient,
116  const ProcessInfo& rProcessInfo) override;
117 
121 
125 
129 
133 
135 
136 protected:
139 
143 
147 
151 
155 
159 
163 
165 
166 private:
167 
170 
174 
175  double mReferenceChord;
176  double mDynamicPressure;
177  double mStepSize;
178  std::string mFarFieldModelPartName;
179  array_1d<double, 3> mFreeStreamVelocity;
180  array_1d<double, 3> mWakeNormal;
181 
182 
186 
190 
191  double ComputeLiftContribution(Element& rElement, const array_1d<double, 3> rNormal, const ProcessInfo& rProcessInfo);
192 
196 
200 
204 
206 
207 }; // Class AdjointLiftFarFieldResponseFunction
208 
210 
213 
217 
219 
220 } // namespace Kratos.
221 
222 #endif // ADJOINT_LIFT_FAR_FIELD_RESPONSE_FUNCTION_H_INCLUDED
AdjointLiftFarFieldResponseFunction.
Definition: adjoint_far_field_lift_response_function.h:53
KRATOS_CLASS_POINTER_DEFINITION(AdjointLiftFarFieldResponseFunction)
Definition: adjoint_potential_response_function.h:36
Base class for all Conditions.
Definition: condition.h:59
Base class for all Elements.
Definition: element.h:60
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
void InitializeSolutionStep(ConstructionUtility &rThisUtil, std::string ThermalSubModelPartName, std::string MechanicalSubModelPartName, std::string HeatFluxSubModelPartName, std::string HydraulicPressureSubModelPartName, bool thermal_conditions, bool mechanical_conditions, int phase)
Definition: add_custom_utilities_to_python.cpp:45
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21