User Source Terms Within Adjoint
For certain cases where you provide source terms that supplement the flow equations, Simcenter STAR-CCM+ differentiates these source terms provided they are defined using field functions that use supported quantities and operators.
The cases for which Simcenter STAR-CCM+ differentiates
user-defined source terms are those that apply one or more of the following models:
- Coupled Flow
- Coupled Solid Energy
- SA Turbulence
- Passive Scalar
User-defined source terms for these models are differentiated while computing the adjoint
provided that:
- The source terms are defined using field functions rather than expressions or tables or other methods.
- The field function quantities, and operators used in the function, are themselves differentiable. For a list of differentiable field functions and operators, see the list at the end of Adjoint Cost Functions Reference.
As an example of a differentiable source term, consider the following simulation in which a
user source term is specified for Coupled Flow:


The definition of this user source term is set to use a field function,

MomentumUserSource
. Any user-specified derivative terms, such as
Momentum Source Pressure Derivative, are ignored by the corresponding
adjoint model. These derivative terms are still used by the primal flow model for solution
stabilization.
The field function itself is defined using differentiable terms and operators (apart from
simple specified quantities such as RefVelocity in this example, which is not
differentiable):

