CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Programming & Development (
-   -   Absence of a term in adjointShapeOptimizationFoam outlet boundary conditions (

robyTKD April 8, 2013 08:02

Absence of a term in adjointShapeOptimizationFoam outlet boundary conditions
Hi Foamers,

I have a question about boundary conditions of adjointShapeOptimizationFoam. In particular, following Othmer's procedure in A continuous adjoint formulation for the computation of topological and surface sensitivities of ducted flows, boundary conditions for the Outlet are:

q = \textbf{u} \cdot \textbf{v} + u_n v_n + \nu (\textbf{n} \cdot \nabla) u_n + \frac{\partial J_{\Gamma}}{v_n}

0 = v_n \textbf{u}_t + \nu (\textbf{n} \cdot \nabla) \textbf{u}_t + \frac{\partial J_{\Gamma}}{\textbf{v}_t}

but I can't find \nu (\textbf{n} \cdot \nabla) \textbf{u}_t and \nu (\textbf{n} \cdot \nabla) u_n in adjointOutletPressureFvPatchScalarField.C and adjointOutletVelocityFvPatchScalarField.C.

Are they neglected because they are irrelevant or is simply the normal gradient of adjoint velocity forced to be null?

Best regards,

Dome April 10, 2013 06:05

Hi Roberto!
I have exactly the same doubt, since in the code:


operator==((phiap/patch().magSf() - 1.0)*phip/patch().magSf() + (Up & Uap));


vectorField::operator=(phiap*patch().Sf()/sqr(patch().magSf()) + UtHat);
there isn't any "normal gradient" term.

Let's hope for some help :)


fumiya January 3, 2016 01:13


You can find how to implement these terms in the following document:

Description of adjointShapeOptimizationFoam and how to implement new objective functions

Best regards,

All times are GMT -4. The time now is 12:16.