46 objectiveIncompressible,
58 const word& adjointSolverName,
59 const word& primalSolverName
67 flowRates_(patches_.size(),
Zero)
84 const label patchI = patches_[pI];
85 flowRates_[pI] =
gSum(
phi.boundaryField()[patchI]);
95 for (
const label patchI : patches_)
104 for (
const label patchI : patches_)
113 for (
const label patchI : patches_)
124 for (
const scalar flowRate : flowRates_)
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
objectiveFlowRate(const fvMesh &mesh, const dictionary &dict, const word &adjointSolverName, const word &primalSolverName)
from components
A list of keyword definitions, which are a keyword followed by a number of values (eg...
autoPtr< OFstream > objFunctionFilePtr_
File to keep the objective values after the end of the primal solver.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface...
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
const surfaceScalarField & phiInst() const
Return const reference to volume flux.
virtual void addHeaderColumns() const
Write headers for additional columns.
Macros for easy insertion into run-time selection tables.
#define forAll(list, i)
Loop across all elements in list.
Type gSum(const FieldField< Field, Type > &f)
virtual scalar J()
Return the objective function value.
virtual void update_boundarydJdvn()
Update values to be added to the adjoint outlet pressure.
A class for handling words, derived from Foam::string.
defineTypeNameAndDebug(objectivePartialVolume, 1)
A List of wordRe with additional matching capabilities.
scalar J_
Objective function value and weight.
autoPtr< boundaryVectorField > bdJdvPtr_
Istream and Ostream manipulators taking arguments.
virtual void addColumnValues() const
Write information to additional columns.
addToRunTimeSelectionTable(objectiveGeometric, objectivePartialVolume, dictionary)
const incompressibleVars & vars_
unsigned int width_
Default width of entries when writing in the objective files.
virtual void update_boundarydJdv()
Update values to be added to the adjoint outlet velocity.
Mesh data needed to do the Finite Volume discretisation.
const std::string patch
OpenFOAM patch number as a std::string.
List< label > sortedToc(const UList< bool > &bools)
Return the (sorted) values corresponding to 'true' entries.
const fvBoundaryMesh & boundary() const noexcept
Return reference to boundary mesh.
Omanip< int > setw(const int i)
autoPtr< boundaryScalarField > bdJdvnPtr_
Adjoint outlet pressure.
Abstract base class for objective functions in incompressible flows.
static constexpr const zero Zero
Global zero (0)