# Implementation of continuous adjoint SA model

 Register Blogs Members List Search Today's Posts Mark Forums Read

 July 23, 2018, 04:34 Implementation of continuous adjoint SA model #1 New Member   c3k1uI5gzT Join Date: Jul 2018 Posts: 2 Rep Power: 0 Hi, I am trying to implement a continuous adjoint formulation of the Spalart-Allmaras turbulence model. This comes down to programming three additional (adjoint) equations for the adjoint velocity, adjoint pressure, and the adjoint SA-variable. The first two are similar to the velocity and pressure equation with some minor modifications and work fine. The third is similar to the SA model transport equation. My question is: What would be the most convenient way to implement this third equation, provided that - it has a form similar to the SA model transport equation - it uses both the velocity and the adjoint velocity - it uses the SA coefficients/quantities Proposed solution 1: implement it in a way similar to UEqn, pEqn, (as I did for UaEqn, paEqn for the other adjoint variables) - difficulty: how to access the SA-quantities (e.g. fv1, fv2, coefficients, etc.) from the solver Proposed solution 2: implement it in a way similar to the SA turbulence model, i.e. as a turbulence model - difficulty: would require the use of two turbulence models/adjoint equation is not strictly a turbulence model Thanks!

 August 13, 2018, 04:16 #2 New Member   c3k1uI5gzT Join Date: Jul 2018 Posts: 2 Rep Power: 0 For anyone wondering, I went for solution 2. I implemented the adjoint nuTilda equation in the same file as the nuTilda equation (spalartAllmaras.C). For the variables I needed which were not available in the turbulence model I used for example Code: `this->db().objectRegistry::lookupObject ("Ua");`