CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Multiple Inlets Adjoint (https://www.cfd-online.com/Forums/openfoam-programming-development/211814-multiple-inlets-adjoint.html)

kayla1994 November 20, 2018 11:43

Multiple Inlets Adjoint
 
Hello everyone,
I'm trying to modify the shapeOptimizationFoam in order to account for multiple inlets. In the original createFields.H file there is a line of code that is used to set a zero alpha at the inlet

Code:

const labelList& inletCells = mesh.boundary()["inlet"].faceCells();
which i changed with

Code:

const labelList& inletCells1 = mesh.boundary()["inletLeft"].faceCells();
const labelList& inletCells2 = mesh.boundary()["inletRight"].faceCells();

and I also added

Code:

zeroCells(alpha, inletCells1);
zeroCells(alpha, inletCells2);

after the definition of alpha. Am i doing it right? The solver complied correctly without any problems.
I run the simulation and at the beginning I had this strange warning line and the simulation stopped at the first iteration of the adjoint problem.

Code:

Reading field pa

--> FOAM Warning :
    From function const Foam::HashTable<Foam::List<int>, Foam::word>& Foam::polyBoundaryMesh::groupPatchIDs() const
    in file meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C at line 455
    Removing patchGroup 'wall' which clashes with patch 6 of the same name.

This is strange because, before the simulation, I tested the mesh with simpleFoam to initialize the solution. Any idea of what is this problem?

Thank you for your help


All times are GMT -4. The time now is 23:27.