adjointSpalartAllmaras Class Reference

Continuous adjoint to the Spalart-Allmaras one-eqn mixing-length model for incompressible flows. More...

Inheritance diagram for adjointSpalartAllmaras:
[legend]
Collaboration diagram for adjointSpalartAllmaras:
[legend]

Public Member Functions

 TypeName ("adjointSpalartAllmaras")
 Runtime type information. More...
 
 adjointSpalartAllmaras (incompressibleVars &primalVars, incompressibleAdjointMeanFlowVars &adjointVars, objectiveManager &objManager, const word &adjointTurbulenceModelName=adjointTurbulenceModel::typeName, const word &modelName=typeName)
 Construct from components. More...
 
virtual ~adjointSpalartAllmaras ()=default
 Destructor. More...
 
virtual tmp< volSymmTensorFielddevReff () const
 Return the effective stress tensor including the laminar stress. More...
 
virtual tmp< volSymmTensorFielddevReff (const volVectorField &U) const
 Return the effective stress tensor based on a given velocity field. More...
 
virtual tmp< fvVectorMatrixdivDevReff (volVectorField &U) const
 Return the diffusion term for the momentum equation. More...
 
virtual tmp< volVectorFieldadjointMeanFlowSource ()
 
virtual tmp< volScalarFieldnutJacobianTMVar1 () const
 Jacobian of nut wrt the first turbulence model variable. More...
 
virtual tmp< scalarFielddiffusionCoeffVar1 (label patchI) const
 
virtual const boundaryVectorFieldadjointMomentumBCSource () const
 
virtual const boundaryVectorFieldwallShapeSensitivities ()
 Sensitivity terms for shape optimisation, emerging from. More...
 
virtual const boundaryVectorFieldwallFloCoSensitivities ()
 Sensitivity terms for flow control, emerging from the. More...
 
virtual tmp< volScalarFielddistanceSensitivities ()
 
virtual tmp< volTensorFieldFISensitivityTerm ()
 Term contributing to the computation of FI-based sensitivities. More...
 
virtual void nullify ()
 Nullify all adjoint turbulence model fields and their old times. More...
 
virtual void correct ()
 Solve the adjoint turbulence equations. More...
 
virtual bool read ()
 Read adjointRASProperties dictionary. More...
 
- Public Member Functions inherited from adjointRASModel
 TypeName ("adjointRASModel")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, adjointRASModel, dictionary,(incompressibleVars &primalVars, incompressibleAdjointMeanFlowVars &adjointVars, objectiveManager &objManager, const word &adjointTurbulenceModelName),(primalVars, adjointVars, objManager, adjointTurbulenceModelName))
 
 adjointRASModel (const word &type, incompressibleVars &primalVars, incompressibleAdjointMeanFlowVars &adjointVars, objectiveManager &objManager, const word &adjointTurbulenceModelName=adjointTurbulenceModel::typeName)
 Construct from components. More...
 
virtual ~adjointRASModel ()=default
 Destructor. More...
 
const nearWallDisty () const
 Return the near wall distances. More...
 
const dictionarycoeffDict () const
 Const access to the coefficients dictionary. More...
 
const wordprimalSolverName () const
 Const access to the primal solver name. More...
 
const wordadjointSolverName () const
 Const access to the adjoint solver name. More...
 
volScalarFieldgetAdjointTMVariable1Inst ()
 Return non-constant reference to adjoint turbulence model variable 1. More...
 
volScalarFieldgetAdjointTMVariable2Inst ()
 Return non-constant reference to adjoint turbulence model variable 2. More...
 
volScalarFieldgetAdjointTMVariable1 ()
 Return non-constant reference to adjoint turbulence model variable 1. More...
 
volScalarFieldgetAdjointTMVariable2 ()
 Return non-constant reference to adjoint turbulence model variable 2. More...
 
autoPtr< volScalarField > & getAdjointTMVariable1InstPtr ()
 Return non-constant autoPtr to adjoint turbulence model variable 1. More...
 
autoPtr< volScalarField > & getAdjointTMVariable2InstPtr ()
 Return non-constant autoPtr to adjoint turbulence model variable 2. More...
 
virtual tmp< volScalarFieldnutJacobianTMVar2 () const
 Jacobian of nut wrt the second turbulence model variable. More...
 
virtual tmp< scalarFielddiffusionCoeffVar2 (label patchI) const
 
void setChangedPrimalSolution ()
 Set flag of changed primal solution to true. More...
 
void resetMeanFields ()
 Reset mean fields to zero. More...
 
void computeMeanFields ()
 Average adjoint fields on the fly. More...
 
bool includeDistance () const
 Should the adjoint to the eikonal equation be computed. More...
 
- Public Member Functions inherited from adjointTurbulenceModel
 TypeName ("adjointTurbulenceModel")
 Runtime type information. More...
 
 declareRunTimeNewSelectionTable (autoPtr, adjointTurbulenceModel, adjointTurbulenceModel,(incompressibleVars &primalVars, incompressibleAdjointMeanFlowVars &adjointVars, objectiveManager &objManager, const word &adjointTurbulenceModelName),(primalVars, adjointVars, objManager, adjointTurbulenceModelName))
 
 adjointTurbulenceModel (incompressibleVars &primalVars, incompressibleAdjointMeanFlowVars &adjointVars, objectiveManager &objManager, const word &adjointTurbulenceModelName=typeName)
 Construct from components. More...
 
virtual ~adjointTurbulenceModel ()=default
 Destructor. More...
 
tmp< volScalarFieldnu () const
 Return the laminar viscosity. More...
 
virtual tmp< volScalarFieldnuEff () const
 Return the effective viscosity. More...
 
virtual bool writeData (Ostream &) const
 Default dummy write function. More...
 
- Public Member Functions inherited from regIOobject
 TypeName ("regIOobject")
 Runtime type information. More...
 
 regIOobject (const IOobject &io, const bool isTimeObject=false)
 
 regIOobject (const regIOobject &rio)
 Copy construct. More...
 
 regIOobject (const regIOobject &rio, bool registerCopy)
 
 regIOobject (const word &newName, const regIOobject &, bool registerCopy)
 
 regIOobject (const IOobject &io, const regIOobject &rio)
 Copy construct with new IO parameters. More...
 
virtual ~regIOobject ()
 Destructor. More...
 
bool checkIn ()
 Add object to registry, if not already registered. More...
 
bool checkOut ()
 Remove all file watches and remove object from registry. More...
 
virtual void addWatch ()
 Add file watch on object (if registered and READ_IF_MODIFIED) More...
 
bool ownedByRegistry () const
 Is this object owned by the registry? More...
 
bool store ()
 
void release (const bool unregister=false)
 Release ownership of this object from its registry. More...
 
label eventNo () const
 Event number at last update. More...
 
label & eventNo ()
 Event number at last update. More...
 
bool upToDate (const regIOobject &) const
 Return true if up-to-date with respect to given object. More...
 
bool upToDate (const regIOobject &, const regIOobject &) const
 Return true if up-to-date with respect to given objects. More...
 
bool upToDate (const regIOobject &, const regIOobject &, const regIOobject &) const
 Return true if up-to-date with respect to given objects. More...
 
bool upToDate (const regIOobject &, const regIOobject &, const regIOobject &, const regIOobject &) const
 Return true if up-to-date with respect to given objects. More...
 
void setUpToDate ()
 Set as up-to-date. More...
 
virtual void rename (const word &newName)
 Rename. More...
 
const dictionaryfindMetaData () const noexcept
 Return pointer to meta-data or nullptr. More...
 
dictionarygetMetaData () noexcept
 Get or create meta-data. More...
 
void removeMetaData ()
 Remove meta-data. More...
 
virtual void updateMetaData ()
 Update internal meta-data (eg, prior to writing) More...
 
bool headerOk ()
 Read and check header info. More...
 
IstreamreadStream (const word &, const bool valid=true)
 Return Istream and check object type against that given. More...
 
void close ()
 Close Istream. More...
 
virtual label addWatch (const fileName &)
 Add file watch for fileName on object if not yet watched. More...
 
const labelListwatchIndices () const
 Return file-monitoring handles. More...
 
labelListwatchIndices ()
 Return file-monitoring handles. More...
 
virtual bool modified () const
 
virtual bool readIfModified ()
 Read object if modified (as set by call to modified) More...
 
virtual bool writeObject (IOstreamOption streamOpt, const bool valid) const
 Write using stream options. More...
 
virtual bool write (const bool valid=true) const
 Write using setting from DB. More...
 
void operator= (const IOobject &io)
 Copy assignment. More...
 
virtual bool writeObject (IOstreamOption::streamFormat fmt, IOstreamOption::versionNumber ver, IOstreamOption::compressionType comp, const bool valid) const
 Write using given format, version and compression. More...
 
- Public Member Functions inherited from IOobject
 TypeName ("IOobject")
 Declare type-name, virtual type (with debug switch) More...
 
 IOobject (const IOobject &)=default
 Copy construct. More...
 
virtual ~IOobject ()=default
 Destructor. More...
 
 IOobject (const word &name, const fileName &instance, const objectRegistry &registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true, bool globalObject=false)
 Construct from name, instance, registry, io options. More...
 
 IOobject (const word &name, const fileName &instance, const fileName &local, const objectRegistry &registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true, bool globalObject=false)
 Construct from name, instance, local, registry, io options. More...
 
 IOobject (const fileName &path, const objectRegistry &registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true, bool globalObject=false)
 Construct from path, registry, io options. More...
 
 IOobject (const IOobject &io, const objectRegistry &registry)
 Copy construct, resetting registry. More...
 
 IOobject (const IOobject &io, const word &name)
 Copy construct, resetting name. More...
 
 IOobject (const IOobject &io, readOption, writeOption)
 Copy construct, resetting io options. More...
 
autoPtr< IOobjectclone () const
 Clone. More...
 
autoPtr< IOobjectclone (const objectRegistry &registry) const
 Clone resetting registry. More...
 
const objectRegistrydb () const noexcept
 Return the local objectRegistry. More...
 
const Timetime () const
 Return Time associated with the objectRegistry. More...
 
const wordname () const noexcept
 Return name. More...
 
const wordheaderClassName () const noexcept
 Return name of the class name read from header. More...
 
wordheaderClassName () noexcept
 Return non-constant access to the class name read from header. More...
 
const stringnote () const noexcept
 Return the optional note. More...
 
stringnote () noexcept
 Return non-constant access to the optional note. More...
 
bool registerObject () const noexcept
 Should object created with this IOobject be registered? More...
 
bool registerObject (bool on) noexcept
 Change registration preference, return previous value. More...
 
bool globalObject () const noexcept
 Is object same for all processors? More...
 
bool globalObject (bool on) noexcept
 Change global-object status, return previous value. More...
 
unsigned labelByteSize () const noexcept
 The sizeof (label) in bytes, possibly read from the header. More...
 
unsigned scalarByteSize () const noexcept
 The sizeof (scalar) in bytes, possibly read from the header. More...
 
bool isHeaderClassName (const word &clsName) const
 Test if headerClassName() equals the given class name. More...
 
template<class Type >
bool isHeaderClassName () const
 Test if headerClassName() equals Type::typeName. More...
 
readOption readOpt () const noexcept
 The read option. More...
 
readOption readOpt (readOption opt) noexcept
 Change the read option, return previous value. More...
 
writeOption writeOpt () const noexcept
 The write option. More...
 
writeOption writeOpt (writeOption opt) noexcept
 Change the write option, return previous value. More...
 
word group () const
 Return group (extension part of name) More...
 
word member () const
 Return member (name without the extension) More...
 
const fileNamerootPath () const
 
const fileNamecaseName () const
 
const fileNameinstance () const noexcept
 
fileNameinstance () noexcept
 
const fileNamelocal () const noexcept
 
fileName path () const
 The complete path. More...
 
fileName path (const word &instance, const fileName &local=fileName::null) const
 The complete path with alternative instance and local. More...
 
fileName objectPath () const
 The complete path + object name. More...
 
fileName objectRelPath () const
 The object path relative to the root. More...
 
fileName localFilePath (const word &typeName, const bool search=true) const
 Helper for filePath that searches locally. More...
 
fileName globalFilePath (const word &typeName, const bool search=true) const
 Helper for filePath that searches up if in parallel. More...
 
IOstreamOption parseHeader (const dictionary &headerDict)
 
bool readHeader (Istream &is)
 
bool readHeader (dictionary &headerDict, Istream &is)
 
template<class Type >
bool typeHeaderOk (const bool checkType=true, const bool search=true, const bool verbose=true)
 Read header (uses typeFilePath to find file) and check its info. More...
 
template<class Type >
void warnNoRereading () const
 Helper: warn that type does not support re-reading. More...
 
bool writeHeader (Ostream &os) const
 Write header with current type() More...
 
bool writeHeader (Ostream &os, const word &objectType) const
 Write header with override of type. More...
 
void writeHeader (dictionary &dict, IOstreamOption streamOpt) const
 
void writeHeader (dictionary &dict, const word &objectType, IOstreamOption streamOpt) const
 
bool good () const noexcept
 
bool bad () const noexcept
 
InfoProxy< IOobjectinfo () const
 Return info proxy. More...
 
void operator= (const IOobject &io)
 
readOptionreadOpt () noexcept
 Access to the read option. More...
 
writeOptionwriteOpt () noexcept
 Access to the write option. More...
 
boolregisterObject () noexcept
 Access to the register object option. More...
 
boolglobalObject () noexcept
 Access to the global object option. More...
 
template<>
bool isHeaderClassName () const
 Specialization for void always returns true (no headerClassName check). More...
 
template<class StringType >
Foam::word groupName (StringType base, const word &group)
 
- Public Member Functions inherited from IOdictionary
 IOdictionary (const IOobject &io, const dictionary *fallback=nullptr)
 
 IOdictionary (const IOobject &io, const dictionary &dict)
 
 IOdictionary (const IOobject &io, const word &wantedType, const dictionary *fallback=nullptr)
 
 IOdictionary (const IOobject &io, Istream &is)
 Construct given an IOobject and Istream. More...
 
virtual ~IOdictionary ()=default
 Destructor. More...
 
virtual bool global () const
 Is object global. More...
 
virtual fileName filePath () const
 Return complete path + object name if the file exists. More...
 
- Public Member Functions inherited from baseIOdictionary
 TypeName ("dictionary")
 Declare type-name, virtual type (with debug switch) More...
 
 baseIOdictionary (const baseIOdictionary &)=default
 Copy construct. More...
 
 baseIOdictionary (baseIOdictionary &&)=default
 Move construct. More...
 
virtual ~baseIOdictionary ()=default
 Destructor. More...
 
 baseIOdictionary (const IOobject &io, const dictionary *fallback=nullptr)
 
 baseIOdictionary (const IOobject &io, const dictionary &dict)
 
 baseIOdictionary (const IOobject &io, Istream &is)
 Construct given an IOobject and Istream (ununsed) More...
 
const wordname () const
 
virtual bool readData (Istream &)
 The readData function required by regIOobject read operation. More...
 
virtual bool writeData (Ostream &) const
 The writeData function required by regIOobject write operation. More...
 
void operator= (const baseIOdictionary &rhs)
 Copy assignment of dictionary entries (leave regIOobject untouched) More...
 
void operator= (const dictionary &rhs)
 Copy assignment of dictionary entries. More...
 
- Public Member Functions inherited from dictionary
 ClassName ("dictionary")
 
 dictionary ()
 Default construct, a top-level empty dictionary. More...
 
 dictionary (const fileName &name)
 Construct top-level empty dictionary with given name. More...
 
 dictionary (const fileName &name, const dictionary &parentDict, Istream &is, bool keepHeader=false)
 
 dictionary (Istream &is)
 
 dictionary (Istream &is, bool keepHeader)
 
 dictionary (const dictionary &parentDict, const dictionary &dict)
 Copy construct given the parent dictionary. More...
 
 dictionary (const dictionary &dict)
 Copy construct top-level dictionary. More...
 
 dictionary (const dictionary *dict)
 Construct top-level dictionary as copy from pointer to dictionary. More...
 
 dictionary (const dictionary &parentDict, dictionary &&dict)
 Move construct for given parent dictionary. More...
 
 dictionary (dictionary &&dict)
 Move construct top-level dictionary. More...
 
autoPtr< dictionaryclone () const
 Construct and return clone. More...
 
virtual ~dictionary ()
 Destructor. More...
 
const fileNamename () const noexcept
 The dictionary name. More...
 
fileNamename () noexcept
 The dictionary name for modification (use with caution). More...
 
word dictName () const
 The local dictionary name (final part of scoped name) More...
 
fileName relativeName (const bool caseTag=false) const
 The dictionary name relative to the case. More...
 
bool isNullDict () const noexcept
 The dictionary is actually dictionary::null (root dictionary) More...
 
const dictionaryparent () const noexcept
 Return the parent dictionary. More...
 
const dictionarytopDict () const
 Return the top of the tree. More...
 
label startLineNumber () const
 Return line number of first token in dictionary. More...
 
label endLineNumber () const
 Return line number of last token in dictionary. More...
 
SHA1Digest digest () const
 Return the SHA1 digest of the dictionary contents. More...
 
tokenList tokens () const
 Return the dictionary as a list of tokens. More...
 
bool found (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
 Search for an entry (const access) with the given keyword. More...
 
entryfindEntry (const word &keyword, enum keyType::option matchOpt=keyType::REGEX)
 Find for an entry (non-const access) with the given keyword. More...
 
const entryfindEntry (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
 Find an entry (const access) with the given keyword. More...
 
const entryfindScoped (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
 Search for a scoped entry (const access) with the given keyword. More...
 
dictionaryfindDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX)
 Find and return a sub-dictionary pointer if present. More...
 
const dictionaryfindDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
 Find and return a sub-dictionary pointer if present. More...
 
const entrylookupEntry (const word &keyword, enum keyType::option matchOpt) const
 Search for an entry (const access) with the given keyword. More...
 
ITstreamlookup (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
 
template<class T >
T get (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
 
template<class T >
T getOrDefault (const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
 
template<class T >
T getOrAdd (const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX)
 
template<class T >
bool readEntry (const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
 
template<class T >
bool readIfPresent (const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
 
template<class T , class Predicate >
T getCheck (const word &keyword, const Predicate &pred, enum keyType::option matchOpt=keyType::REGEX) const
 
template<class T , class Predicate >
T getCheckOrDefault (const word &keyword, const T &deflt, const Predicate &pred, enum keyType::option matchOpt=keyType::REGEX) const
 
template<class T , class Predicate >
T getCheckOrAdd (const word &keyword, const T &deflt, const Predicate &pred, enum keyType::option matchOpt=keyType::REGEX)
 
template<class T , class Predicate >
bool readCheck (const word &keyword, T &val, const Predicate &pred, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
 
template<class T , class Predicate >
bool readCheckIfPresent (const word &keyword, T &val, const Predicate &pred, enum keyType::option matchOpt=keyType::REGEX) const
 
bool isDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
 Check if entry is found and is a sub-dictionary. More...
 
const dictionarysubDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
 Find and return a sub-dictionary. More...
 
dictionarysubDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX)
 Find and return a sub-dictionary for manipulation. More...
 
dictionarysubDictOrAdd (const word &keyword, enum keyType::option matchOpt=keyType::REGEX)
 Find and return a sub-dictionary for manipulation. More...
 
dictionary subOrEmptyDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX, const bool mandatory=false) const
 
const dictionaryoptionalSubDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
 Find and return a sub-dictionary, otherwise return this dictionary. More...
 
wordList toc () const
 Return the table of contents. More...
 
wordList sortedToc () const
 Return the sorted table of contents. More...
 
template<class Compare >
wordList sortedToc (const Compare &comp) const
 Return table of contents sorted using the specified comparator. More...
 
List< keyTypekeys (bool patterns=false) const
 Return the list of available keys or patterns. More...
 
bool substituteKeyword (const word &keyword, bool mergeEntry=false)
 Substitute the given keyword (which is prefixed by '$') More...
 
bool substituteScopedKeyword (const word &keyword, bool mergeEntry=false)
 Substitute the given scoped keyword (which is prefixed by '$') More...
 
entryadd (entry *entryPtr, bool mergeEntry=false)
 Add a new entry. More...
 
entryadd (const entry &e, bool mergeEntry=false)
 Add an entry. More...
 
entryadd (const keyType &k, const word &v, bool overwrite=false)
 Add a word entry. More...
 
entryadd (const keyType &k, const string &v, bool overwrite=false)
 Add a string entry. More...
 
entryadd (const keyType &k, const label v, bool overwrite=false)
 Add a label entry. More...
 
entryadd (const keyType &k, const scalar v, bool overwrite=false)
 Add a scalar entry. More...
 
entryadd (const keyType &k, const dictionary &d, bool mergeEntry=false)
 Add a dictionary entry. More...
 
template<class T >
entryadd (const keyType &k, const T &v, bool overwrite=false)
 Add a T entry. More...
 
entryset (entry *entryPtr)
 Assign a new entry, overwriting any existing entry. More...
 
entryset (const entry &e)
 Assign a new entry, overwriting any existing entry. More...
 
entryset (const keyType &k, const dictionary &v)
 Assign a dictionary entry, overwriting any existing entry. More...
 
template<class T >
entryset (const keyType &k, const T &v)
 Assign a T entry, overwriting any existing entry. More...
 
bool remove (const word &keyword)
 Remove an entry specified by keyword. More...
 
bool changeKeyword (const keyType &oldKeyword, const keyType &newKeyword, bool overwrite=false)
 Change the keyword for an entry,. More...
 
bool merge (const dictionary &dict)
 Merge entries from the given dictionary. More...
 
void clear ()
 Clear the dictionary. More...
 
void transfer (dictionary &dict)
 Transfer the contents of the argument and annul the argument. More...
 
void checkITstream (const ITstream &is, const word &keyword) const
 
bool read (Istream &is)
 Read dictionary from Istream. Discards the header. More...
 
bool read (Istream &is, bool keepHeader)
 Read dictionary from Istream, optionally keeping the header. More...
 
void writeEntry (Ostream &os) const
 Write sub-dictionary with its dictName as its header. More...
 
void writeEntry (const keyType &keyword, Ostream &os) const
 Write sub-dictionary with the keyword as its header. More...
 
void writeEntries (Ostream &os, const bool extraNewLine=false) const
 Write dictionary entries. More...
 
void write (Ostream &os, const bool subDict=true) const
 Write dictionary, normally with sub-dictionary formatting. More...
 
const_searcher csearch (const word &keyword, enum keyType::option=keyType::REGEX) const
 Search dictionary for given keyword. More...
 
const_searcher search (const word &keyword, enum keyType::option=keyType::REGEX) const
 Search dictionary for given keyword. More...
 
searcher search (const word &keyword, enum keyType::option=keyType::REGEX)
 Search dictionary for given keyword. More...
 
const_searcher csearchScoped (const word &keyword, enum keyType::option) const
 Search using scoping. More...
 
const_searcher searchScoped (const word &keyword, enum keyType::option) const
 Search using dot or slash scoping. More...
 
searcher searchScoped (const word &keyword, enum keyType::option)
 Search using dot or slash scoping. More...
 
const dictionarycfindScopedDict (const fileName &dictPath) const
 Locate a sub-dictionary using slash-scoping. More...
 
const dictionaryfindScopedDict (const fileName &dictPath) const
 Locate a sub-dictionary using slash-scoping. More...
 
dictionaryfindScopedDict (const fileName &dictPath)
 Locate a sub-dictionary using slash-scoping. More...
 
dictionarymakeScopedDict (const fileName &dictPath)
 Locate existing or create sub-dictionary using slash-scoping. More...
 
const_searcher csearchCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option=keyType::REGEX) const
 Search dictionary for given keyword and any compatibility names. More...
 
bool foundCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option=keyType::REGEX) const
 Search dictionary for given keyword and any compatibility names. More...
 
const entryfindCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option) const
 
const entrylookupEntryCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option) const
 
ITstreamlookupCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option=keyType::REGEX) const
 
template<class T >
T getCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option=keyType::REGEX) const
 
template<class T >
T getOrDefaultCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, const T &deflt, enum keyType::option=keyType::REGEX) const
 
template<class T >
bool readCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, T &val, enum keyType::option=keyType::REGEX, bool mandatory=true) const
 
template<class T >
bool readIfPresentCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, T &val, enum keyType::option=keyType::REGEX) const
 
void operator= (const dictionary &rhs)
 Copy assignment. More...
 
void operator+= (const dictionary &rhs)
 Include entries from the given dictionary. More...
 
void operator|= (const dictionary &rhs)
 Conditionally include entries from the given dictionary. More...
 
void operator<<= (const dictionary &rhs)
 Unconditionally include entries from the given dictionary. More...
 
template<class T >
T lookupOrDefault (const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
 
template<class T >
T lookupOrAddDefault (const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX)
 
template<class T >
T lookupOrDefaultCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
 
ITstreamoperator[] (const word &keyword) const
 Deprecated(2018-07) find and return an entry data stream. More...
 
bool found (const word &keyword, bool recursive, bool patternMatch=true) const
 Deprecated(2018-10) More...
 
entrylookupEntryPtr (const word &keyword, bool recursive, bool patternMatch)
 Deprecated(2018-10) More...
 
const entrylookupEntryPtr (const word &keyword, bool recursive, bool patternMatch) const
 Deprecated(2018-10) More...
 
const entrylookupScopedEntryPtr (const word &keyword, bool recursive, bool patternMatch) const
 Deprecated(2018-10) More...
 
const dictionarysubDictPtr (const word &keyword) const
 Deprecated(2018-10) More...
 
dictionarysubDictPtr (const word &keyword)
 
const entrylookupEntry (const word &keyword, bool recursive, bool patternMatch) const
 Deprecated(2018-10) More...
 
ITstreamlookup (const word &keyword, bool recursive, bool patternMatch=true) const
 Deprecated(2018-10) More...
 
template<class T >
T lookupOrDefault (const word &keyword, const T &deflt, bool recursive, bool patternMatch=true) const
 Deprecated(2018-10) More...
 
template<class T >
T lookupOrAddDefault (const word &keyword, const T &deflt, bool recursive, bool patternMatch=true)
 Deprecated(2018-10) More...
 
template<class T >
bool readIfPresent (const word &keyword, T &val, bool recursive, bool patternMatch=true) const
 Deprecated(2018-10) More...
 
template<class T >
T lookupType (const word &keyword, bool recursive=false, bool patternMatch=true) const
 Deprecated(2018-10) find and return a T. More...
 
bool getBool (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
 Same as get< bool >(const word&, keyType::option) More...
 
label getLabel (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
 Same as get< label >(const word&, keyType::option) More...
 
scalar getScalar (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
 Same as get< scalar >(const word&, keyType::option) More...
 
string getString (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
 Same as get< string >(const word&, keyType::option) More...
 
word getWord (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
 Same as get< word >(const word&, keyType::option) More...
 
fileName getFileName (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
 Same as get< fileName >(const word&, keyType::option) More...
 
template<class Compare >
Foam::wordList sortedToc (const Compare &comp) const
 
template<class T >
Foam::entryadd (const keyType &k, const T &v, bool overwrite)
 
template<class T >
Foam::entryset (const keyType &k, const T &v)
 
- Public Member Functions inherited from ILList< LListBase, T >
 ILList ()=default
 Default construct. More...
 
 ILList (T *item)
 Construct and insert the initial T item pointer. More...
 
 ILList (Istream &is)
 Construct from Istream. More...
 
 ILList (const ILList< LListBase, T > &lst)
 Copy construct using the 'clone()' method for each element. More...
 
 ILList (ILList< LListBase, T > &&lst)
 Move construct. More...
 
template<class CloneArg >
 ILList (const ILList< LListBase, T > &lst, const CloneArg &cloneArg)
 Copy constructor with additional argument for clone 'clone()'. More...
 
template<class INew >
 ILList (Istream &is, const INew &inew)
 Construct from Istream using given Istream constructor class. More...
 
 ~ILList ()
 Destructor. More...
 
bool eraseHead ()
 Remove the head element specified from the list and delete it. More...
 
bool erase (T *item)
 Remove the specified element from the list and delete it. More...
 
void clear ()
 Clear the contents of the list. More...
 
void transfer (ILList< LListBase, T > &lst)
 
void operator= (const ILList< LListBase, T > &lst)
 Copy assignment using the 'clone()' method for each element. More...
 
void operator= (ILList< LListBase, T > &&lst)
 Move assignment. More...
 

Protected Member Functions

tmp< volScalarFieldchi () const
 
tmp< volScalarFieldfv1 (const volScalarField &chi) const
 
tmp< volScalarFieldfv2 (const volScalarField &chi, const volScalarField &fv1) const
 
tmp< volScalarFieldStilda (const volScalarField &chi, const volScalarField &fv1) const
 
tmp< volScalarFieldr (const volScalarField &Stilda) const
 
tmp< volScalarFieldfw (const volScalarField &Stilda) const
 
tmp< volScalarFieldDnuTildaEff () const
 
const volScalarFieldnuTilda () const
 References to the primal turbulence model variables. More...
 
const volScalarFieldnut () const
 Return the turbulence viscosity. More...
 
tmp< volScalarFielddFv1_dChi (const volScalarField &chi) const
 
tmp< volScalarFielddFv2_dChi (const volScalarField &chi, const volScalarField &fv1, const volScalarField &dFv1dChi) const
 
tmp< volScalarFielddStilda_dOmega (const volScalarField &Omega, const volScalarField &fv2) const
 
tmp< volScalarFielddStilda_dNuTilda (const volScalarField &Omega, const volScalarField &fv2, const volScalarField &dFv2dChi) const
 
tmp< volScalarFielddStilda_dDelta (const volScalarField &Omega, const volScalarField &fv2) const
 
tmp< volScalarFielddr_dNuTilda (const volScalarField &Stilda) const
 
tmp< volScalarFielddr_dStilda (const volScalarField &Stilda) const
 
tmp< volScalarFielddr_dDelta (const volScalarField &Stilda) const
 
tmp< volScalarFielddfw_dr (const volScalarField &Stilda) const
 
tmp< volScalarFielddfw_dNuTilda (const volScalarField &Stilda, const volScalarField &dfwdr, const volScalarField &dStildadNuTilda) const
 
tmp< volScalarFielddfw_dOmega (const volScalarField &Stilda, const volScalarField &dfwdr, const volScalarField &dStildadOmega) const
 
tmp< volScalarFielddfw_dDelta (const volScalarField &Stilda, const volScalarField &dfwdr, const volScalarField &dStildadDelta) const
 
tmp< volScalarFielddD_dNuTilda (const volScalarField &fw, const volScalarField &dfwdNuTilda) const
 
tmp< volScalarFielddP_dNuTilda (const volScalarField &dStildadNuTilda) const
 
tmp< volScalarFielddnut_dNuTilda (const volScalarField &fv1, const volScalarField &dFv1dChi) const
 
tmp< volVectorFieldconservativeMomentumSource ()
 Conservative source term for the adjoint momentum equations. More...
 
volScalarFieldnuaTilda ()
 Access to the adjoint Spalart - Allmaras field. More...
 
void updatePrimalRelatedFields ()
 Update the constant primal-related fields. More...
 
tmp< volScalarFieldallocateMask ()
 Allocate the mask field. More...
 
- Protected Member Functions inherited from adjointRASModel
virtual void printCoeffs ()
 Print model coefficients. More...
 
void setMeanFields ()
 Set mean fields. More...
 
- Protected Member Functions inherited from regIOobject
bool readHeaderOk (const IOstreamOption::streamFormat fmt, const word &typeName)
 Helper: check readOpt flags and read if necessary. More...
 
- Protected Member Functions inherited from IOobject
void setBad (const string &s)
 Set the object state to bad. More...
 

Protected Attributes

dimensionedScalar sigmaNut_
 
dimensionedScalar kappa_
 
dimensionedScalar Cb1_
 
dimensionedScalar Cb2_
 
dimensionedScalar Cw1_
 
dimensionedScalar Cw2_
 
dimensionedScalar Cw3_
 
dimensionedScalar Cv1_
 
dimensionedScalar Cs_
 
bool limitAdjointProduction_
 
const volScalarFieldy_
 Wall distance. More...
 
volScalarField mask_
 Field for masking (convergence enhancement) More...
 
volSymmTensorField symmAdjointProductionU_
 
volScalarField productionDestructionSource_
 
volScalarField Stilda_
 
volScalarField r_
 
volScalarField fw_
 
volScalarField Cdnut_
 
volTensorField momentumSourceMult_
 
volTensorField gradU_
 
volVectorField gradNuTilda_
 
dimensionedScalar minStilda_
 
- Protected Attributes inherited from adjointRASModel
objectiveManagerobjectiveManager_
 Reference to the objectiveManager. More...
 
Switch adjointTurbulence_
 Turbulence on/off flag. More...
 
Switch printCoeffs_
 Flag to print the model coeffs at run-time. More...
 
dictionary coeffDict_
 Model coefficients dictionary. More...
 
nearWallDist y_
 Near wall distance boundary field. More...
 
autoPtr< volScalarFieldadjointTMVariable1Ptr_
 Adjoint turbulence model variable 1. More...
 
autoPtr< volScalarFieldadjointTMVariable2Ptr_
 Adjoint turbulence model variable 2. More...
 
autoPtr< volScalarFieldadjointTMVariable1MeanPtr_
 Adjoint turbulence model variable 1, mean value. More...
 
autoPtr< volScalarFieldadjointTMVariable2MeanPtr_
 Adjoint turbulence model variable 2, mean value. More...
 
autoPtr< boundaryVectorFieldadjMomentumBCSourcePtr_
 
autoPtr< boundaryVectorFieldwallShapeSensitivitiesPtr_
 Wall sensitivity term for shape optimisation. More...
 
autoPtr< boundaryVectorFieldwallFloCoSensitivitiesPtr_
 Wall sensitivity term for flow control optimisation. More...
 
bool includeDistance_
 
bool changedPrimalSolution_
 Has the primal solution changed? More...
 
- Protected Attributes inherited from adjointTurbulenceModel
incompressibleVarsprimalVars_
 
incompressibleAdjointMeanFlowVarsadjointVars_
 
const TimerunTime_
 
const fvMeshmesh_
 

Additional Inherited Members

- Public Types inherited from IOobject
enum  objectState : char { GOOD, BAD }
 Enumeration defining the valid states of an IOobject. More...
 
enum  readOption : char { MUST_READ, MUST_READ_IF_MODIFIED, READ_IF_PRESENT, NO_READ }
 Enumeration defining the read options. More...
 
enum  writeOption : char { AUTO_WRITE = 0, NO_WRITE = 1 }
 Enumeration defining the write options. More...
 
enum  fileCheckTypes : char { timeStamp, timeStampMaster, inotify, inotifyMaster }
 Enumeration defining the file checking options. More...
 
- Public Types inherited from dictionary
typedef Searcher< true > const_searcher
 Searcher with const access. More...
 
typedef Searcher< false > searcher
 Searcher with non-const access. More...
 
- Static Public Member Functions inherited from adjointRASModel
static autoPtr< adjointRASModelNew (incompressibleVars &primalVars, incompressibleAdjointMeanFlowVars &adjointVars, objectiveManager &objManager, const word &adjointTurbulenceModelName=adjointTurbulenceModel::typeName)
 Return a reference to the selected adjointRAS model. More...
 
- Static Public Member Functions inherited from adjointTurbulenceModel
static autoPtr< adjointTurbulenceModelNew (incompressibleVars &primalVars, incompressibleAdjointMeanFlowVars &adjointVars, objectiveManager &objManager, const word &adjointTurbulenceModelName=typeName)
 Return a reference to the selected turbulence model. More...
 
- Static Public Member Functions inherited from regIOobject
template<class Type >
static Type & store (Type *p)
 Transfer pointer ownership to its registry. More...
 
template<class Type >
static Type & store (autoPtr< Type > &ptr)
 Transfer pointer ownership to its registry. More...
 
template<class Type >
static Type & store (autoPtr< Type > &&ptr)
 Transfer pointer ownership to its registry. More...
 
template<class Type >
static Type & store (refPtr< Type > &ptr)
 Transfer pointer ownership to its registry. More...
 
template<class Type >
static Type & store (refPtr< Type > &&ptr)
 Transfer pointer ownership to its registry. More...
 
template<class Type >
static Type & store (tmp< Type > &ptr)
 Transfer pointer ownership to its registry. More...
 
template<class Type >
static Type & store (tmp< Type > &&ptr)
 Transfer pointer ownership to its registry. More...
 
- Static Public Member Functions inherited from IOobject
static bool bannerEnabled () noexcept
 Status of output file banner. More...
 
static bool bannerEnabled (bool on) noexcept
 Enable/disable an output file banner. More...
 
static bool fileNameComponents (const fileName &path, fileName &instance, fileName &local, word &name)
 Split path into instance, local, name components. More...
 
template<class StringType >
static word groupName (StringType base, const word &group)
 Create dot-delimited name.group string. More...
 
static word group (const word &name)
 Return group (extension part of name) More...
 
static word member (const word &name)
 Return member (name without the extension) More...
 
static word scopedName (const std::string &scope, const word &name)
 Create scope:name or scope_name string. More...
 
static IOobject selectIO (const IOobject &io, const fileName &altFile, const word &ioName="")
 Return the IOobject, but also consider an alternative file name. More...
 
static OstreamwriteBanner (Ostream &os, const bool noSyntaxHint=false)
 Write the standard OpenFOAM file/dictionary banner. More...
 
static OstreamwriteDivider (Ostream &os)
 Write the standard file section divider. More...
 
static OstreamwriteEndDivider (Ostream &os)
 Write the standard end file divider. More...
 
- Static Public Member Functions inherited from dictionary
static int reportOptional () noexcept
 Return the state of reporting optional (default) entries. More...
 
static int reportOptional (const int level) noexcept
 Change the state of reporting optional (default) entries. More...
 
static autoPtr< dictionaryNew (Istream &is)
 Construct top-level dictionary on freestore from Istream. More...
 
- Public Attributes inherited from dictionary
friend const_searcher
 Declare friendship with the searcher classes. More...
 
friend searcher
 
- Static Public Attributes inherited from IOobject
static const Enum< fileCheckTypesfileCheckTypesNames
 Names for the fileCheckTypes. More...
 
static char scopeSeparator
 Character for scoping object names (':' or '_') More...
 
static fileCheckTypes fileModificationChecking
 Type of file modification checking. More...
 
static float fileModificationSkew
 Time skew (seconds) for file modification checks. More...
 
static int maxFileModificationPolls
 Max number of times to poll for file modification changes. More...
 
- Static Public Attributes inherited from dictionary
static int writeOptionalEntries
 Report optional keywords and values if not present in dictionary. More...
 
static const dictionary null
 An empty dictionary, which is also the parent for all dictionaries. More...
 
static refPtr< OSstreamreportingOutput
 Output location when reporting default values. More...
 
- Static Protected Member Functions inherited from IOobject
static void writeHeaderContent (Ostream &os, const IOobject &io, const word &objectType, const dictionary *metaDataDict=nullptr)
 
static void writeHeaderContent (dictionary &dict, const IOobject &io, const word &objectType, IOstreamOption streamOpt, const dictionary *metaDataDict=nullptr)
 
- Static Protected Attributes inherited from regIOobject
static bool masterOnlyReading = false
 To flag master-only reading of objects. More...
 

Detailed Description

Continuous adjoint to the Spalart-Allmaras one-eqn mixing-length model for incompressible flows.

Reference:

    For the adjoint to the Spalart-Allmaras PDE

        Zymaris, A., Papadimitriou, D., Giannakoglou, K., &
        Othmer, C. (2009).
        Continuous adjoint approach to the Spalart-Allmaras turbulence
        model for incompressible flows.
        Computers & Fluids, 38(8), 1528-538.
        http://doi.org/10.1016/j.compfluid.2008.12.006

    For the FI sensitivity terms

        Papoutsis-Kiachagias, E. M., Asouti, V. G., Giannakoglou, K. C.,
        Gkagkas, K., Shimokawa, S., & Itakura, E. (2018).
        Multi-point aerodynamic shape optimization of cars based on
        continuous adjoint.
        Structural and Multidisciplinary Optimization, 59(2), 675-694.
        http://doi.org/10.1007/s00158-018-2091-3

Both of the above-mentioned papers develop the adjoint to the Spalart-Allmaras PDE that includes the fv3 term. The current implementation corresponds to the Spalart-Allmaras PDE as programmed within OpenFOAM and is, thus, slightly different than the one developed in the cited papers

Source files

Definition at line 87 of file adjointSpalartAllmaras.H.

Constructor & Destructor Documentation

◆ adjointSpalartAllmaras()

adjointSpalartAllmaras ( incompressibleVars primalVars,
incompressibleAdjointMeanFlowVars adjointVars,
objectiveManager objManager,
const word adjointTurbulenceModelName = adjointTurbulenceModel::typeName,
const word modelName = typeName 
)

Construct from components.

Definition at line 475 of file adjointSpalartAllmaras.C.

References variablesSet::setField(), variablesSet::solverName(), and variablesSet::useSolverNameForFields().

Here is the call graph for this function:

◆ ~adjointSpalartAllmaras()

virtual ~adjointSpalartAllmaras ( )
virtualdefault

Destructor.

Member Function Documentation

◆ chi()

tmp< volScalarField > chi ( ) const
protected

Definition at line 63 of file adjointSpalartAllmaras.C.

References adjointTurbulenceModel::nu(), and adjointSpalartAllmaras::nuTilda().

Referenced by adjointSpalartAllmaras::distanceSensitivities(), adjointSpalartAllmaras::FISensitivityTerm(), adjointSpalartAllmaras::fv1(), adjointSpalartAllmaras::nutJacobianTMVar1(), and adjointSpalartAllmaras::updatePrimalRelatedFields().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fv1()

tmp< volScalarField > fv1 ( const volScalarField chi) const
protected

Definition at line 69 of file adjointSpalartAllmaras.C.

References adjointSpalartAllmaras::chi(), adjointSpalartAllmaras::Cv1_, and Foam::pow3().

Referenced by adjointSpalartAllmaras::distanceSensitivities(), adjointSpalartAllmaras::FISensitivityTerm(), adjointSpalartAllmaras::nutJacobianTMVar1(), and adjointSpalartAllmaras::updatePrimalRelatedFields().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fv2()

tmp< volScalarField > fv2 ( const volScalarField chi,
const volScalarField fv1 
) const
protected

Definition at line 77 of file adjointSpalartAllmaras.C.

Referenced by adjointSpalartAllmaras::distanceSensitivities(), adjointSpalartAllmaras::FISensitivityTerm(), and adjointSpalartAllmaras::updatePrimalRelatedFields().

Here is the caller graph for this function:

◆ Stilda()

tmp< volScalarField > Stilda ( const volScalarField chi,
const volScalarField fv1 
) const
protected

Definition at line 87 of file adjointSpalartAllmaras.C.

References Foam::mag(), Foam::max(), Foam::skew(), Foam::sqr(), and Foam::sqrt().

Referenced by adjointSpalartAllmaras::updatePrimalRelatedFields().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ r()

tmp< volScalarField > r ( const volScalarField Stilda) const
protected

Definition at line 107 of file adjointSpalartAllmaras.C.

References Foam::max(), Foam::min(), Foam::sqr(), Foam::tr(), and Foam::Zero.

Referenced by adjointSpalartAllmaras::updatePrimalRelatedFields().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fw()

tmp< volScalarField > fw ( const volScalarField Stilda) const
protected

Definition at line 129 of file adjointSpalartAllmaras.C.

References g, Foam::pow(), and Foam::pow6().

Referenced by adjointSpalartAllmaras::updatePrimalRelatedFields().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DnuTildaEff()

tmp< volScalarField > DnuTildaEff ( ) const
protected

Definition at line 139 of file adjointSpalartAllmaras.C.

References adjointTurbulenceModel::nu(), adjointSpalartAllmaras::nuTilda(), and adjointSpalartAllmaras::sigmaNut_.

Referenced by adjointSpalartAllmaras::correct(), and adjointSpalartAllmaras::FISensitivityTerm().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nuTilda()

const volScalarField & nuTilda ( ) const
protected

References to the primal turbulence model variables.

Definition at line 148 of file adjointSpalartAllmaras.C.

References adjointTurbulenceModel::primalVars_, and incompressibleVars::RASModelVariables().

Referenced by adjointSpalartAllmaras::chi(), adjointSpalartAllmaras::correct(), adjointSpalartAllmaras::diffusionCoeffVar1(), adjointSpalartAllmaras::distanceSensitivities(), adjointSpalartAllmaras::DnuTildaEff(), adjointSpalartAllmaras::FISensitivityTerm(), adjointSpalartAllmaras::updatePrimalRelatedFields(), adjointSpalartAllmaras::wallFloCoSensitivities(), and adjointSpalartAllmaras::wallShapeSensitivities().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nut()

const volScalarField & nut ( ) const
protectedvirtual

Return the turbulence viscosity.

Reimplemented from adjointTurbulenceModel.

Definition at line 154 of file adjointSpalartAllmaras.C.

References adjointTurbulenceModel::primalVars_, and incompressibleVars::RASModelVariables().

Referenced by adjointSpalartAllmaras::distanceSensitivities().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dFv1_dChi()

tmp< volScalarField > dFv1_dChi ( const volScalarField chi) const
protected

Definition at line 163 of file adjointSpalartAllmaras.C.

References Foam::pow3(), and Foam::sqr().

Referenced by adjointSpalartAllmaras::distanceSensitivities(), adjointSpalartAllmaras::nutJacobianTMVar1(), and adjointSpalartAllmaras::updatePrimalRelatedFields().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dFv2_dChi()

tmp< volScalarField > dFv2_dChi ( const volScalarField chi,
const volScalarField fv1,
const volScalarField dFv1dChi 
) const
protected

Definition at line 174 of file adjointSpalartAllmaras.C.

References Foam::sqr().

Referenced by adjointSpalartAllmaras::distanceSensitivities(), and adjointSpalartAllmaras::updatePrimalRelatedFields().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dStilda_dOmega()

tmp< volScalarField > dStilda_dOmega ( const volScalarField Omega,
const volScalarField fv2 
) const
protected

Definition at line 185 of file adjointSpalartAllmaras.C.

References Foam::neg(), Foam::pos(), and Foam::sqr().

Referenced by adjointSpalartAllmaras::FISensitivityTerm(), and adjointSpalartAllmaras::updatePrimalRelatedFields().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dStilda_dNuTilda()

tmp< volScalarField > dStilda_dNuTilda ( const volScalarField Omega,
const volScalarField fv2,
const volScalarField dFv2dChi 
) const
protected

Definition at line 200 of file adjointSpalartAllmaras.C.

References nu, Foam::pos(), and Foam::sqr().

Referenced by adjointSpalartAllmaras::updatePrimalRelatedFields().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dStilda_dDelta()

tmp< volScalarField > dStilda_dDelta ( const volScalarField Omega,
const volScalarField fv2 
) const
protected

Definition at line 214 of file adjointSpalartAllmaras.C.

References Foam::pos(), and Foam::sqr().

Referenced by adjointSpalartAllmaras::distanceSensitivities().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dr_dNuTilda()

tmp< volScalarField > dr_dNuTilda ( const volScalarField Stilda) const
protected

Definition at line 227 of file adjointSpalartAllmaras.C.

References Foam::max(), tmp< T >::ref(), Foam::sqr(), and Foam::Zero.

Here is the call graph for this function:

◆ dr_dStilda()

tmp< volScalarField > dr_dStilda ( const volScalarField Stilda) const
protected

Definition at line 243 of file adjointSpalartAllmaras.C.

References Foam::max(), tmp< T >::ref(), Foam::sqr(), and Foam::Zero.

Here is the call graph for this function:

◆ dr_dDelta()

tmp< volScalarField > dr_dDelta ( const volScalarField Stilda) const
protected

Definition at line 259 of file adjointSpalartAllmaras.C.

References Foam::max(), tmp< T >::ref(), Foam::sqr(), and Foam::Zero.

Here is the call graph for this function:

◆ dfw_dr()

tmp< volScalarField > dfw_dr ( const volScalarField Stilda) const
protected

Definition at line 275 of file adjointSpalartAllmaras.C.

References g, Foam::pow(), Foam::pow5(), and Foam::pow6().

Referenced by adjointSpalartAllmaras::distanceSensitivities(), adjointSpalartAllmaras::FISensitivityTerm(), and adjointSpalartAllmaras::updatePrimalRelatedFields().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dfw_dNuTilda()

tmp< volScalarField > dfw_dNuTilda ( const volScalarField Stilda,
const volScalarField dfwdr,
const volScalarField dStildadNuTilda 
) const
protected

Definition at line 291 of file adjointSpalartAllmaras.C.

References Foam::sqr().

Referenced by adjointSpalartAllmaras::updatePrimalRelatedFields().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dfw_dOmega()

tmp< volScalarField > dfw_dOmega ( const volScalarField Stilda,
const volScalarField dfwdr,
const volScalarField dStildadOmega 
) const
protected

Definition at line 305 of file adjointSpalartAllmaras.C.

Referenced by adjointSpalartAllmaras::FISensitivityTerm(), and adjointSpalartAllmaras::updatePrimalRelatedFields().

Here is the caller graph for this function:

◆ dfw_dDelta()

tmp< volScalarField > dfw_dDelta ( const volScalarField Stilda,
const volScalarField dfwdr,
const volScalarField dStildadDelta 
) const
protected

Definition at line 316 of file adjointSpalartAllmaras.C.

Referenced by adjointSpalartAllmaras::distanceSensitivities().

Here is the caller graph for this function:

◆ dD_dNuTilda()

tmp< volScalarField > dD_dNuTilda ( const volScalarField fw,
const volScalarField dfwdNuTilda 
) const
protected

Definition at line 327 of file adjointSpalartAllmaras.C.

References Foam::sqr().

Referenced by adjointSpalartAllmaras::updatePrimalRelatedFields().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dP_dNuTilda()

tmp< volScalarField > dP_dNuTilda ( const volScalarField dStildadNuTilda) const
protected

Definition at line 337 of file adjointSpalartAllmaras.C.

Referenced by adjointSpalartAllmaras::updatePrimalRelatedFields().

Here is the caller graph for this function:

◆ dnut_dNuTilda()

tmp< volScalarField > dnut_dNuTilda ( const volScalarField fv1,
const volScalarField dFv1dChi 
) const
protected

Definition at line 346 of file adjointSpalartAllmaras.C.

References nu.

Referenced by adjointSpalartAllmaras::nutJacobianTMVar1(), and adjointSpalartAllmaras::updatePrimalRelatedFields().

Here is the caller graph for this function:

◆ conservativeMomentumSource()

tmp< volVectorField > conservativeMomentumSource ( )
protected

Conservative source term for the adjoint momentum equations.

Sets also the adjointMomentumBCSource

Definition at line 355 of file adjointSpalartAllmaras.C.

References adjointRASModel::adjMomentumBCSourcePtr_, fvMesh::boundary(), GeometricField< Type, PatchField, GeoMesh >::boundaryField(), Foam::fvc::div(), forAll, adjointTurbulenceModel::mesh_, adjointSpalartAllmaras::momentumSourceMult_, adjointSpalartAllmaras::nuaTilda(), and Foam::foamVersion::patch.

Referenced by adjointSpalartAllmaras::adjointMeanFlowSource().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nuaTilda()

volScalarField& nuaTilda ( )
inlineprotected

◆ updatePrimalRelatedFields()

void updatePrimalRelatedFields ( )
protected

Update the constant primal-related fields.

Definition at line 375 of file adjointSpalartAllmaras.C.

References adjointSpalartAllmaras::Cb1_, adjointSpalartAllmaras::Cdnut_, adjointRASModel::changedPrimalSolution_, adjointSpalartAllmaras::chi(), adjointSpalartAllmaras::Cw1_, adjointSpalartAllmaras::dD_dNuTilda(), adjointSpalartAllmaras::dFv1_dChi(), adjointSpalartAllmaras::dFv2_dChi(), adjointSpalartAllmaras::dfw_dNuTilda(), adjointSpalartAllmaras::dfw_dOmega(), adjointSpalartAllmaras::dfw_dr(), adjointSpalartAllmaras::dnut_dNuTilda(), adjointSpalartAllmaras::dP_dNuTilda(), adjointSpalartAllmaras::dStilda_dNuTilda(), adjointSpalartAllmaras::dStilda_dOmega(), Foam::endl(), adjointSpalartAllmaras::fv1(), adjointSpalartAllmaras::fv2(), adjointSpalartAllmaras::fw(), adjointSpalartAllmaras::fw_, Foam::fvc::grad(), adjointSpalartAllmaras::gradNuTilda_, adjointSpalartAllmaras::gradU_, Foam::Info, Foam::mag(), adjointSpalartAllmaras::mask_, adjointSpalartAllmaras::momentumSourceMult_, adjointSpalartAllmaras::nuTilda(), adjointTurbulenceModel::primalVars_, adjointSpalartAllmaras::productionDestructionSource_, adjointSpalartAllmaras::r(), adjointSpalartAllmaras::r_, Foam::skew(), Foam::sqr(), Foam::sqrt(), adjointSpalartAllmaras::Stilda(), adjointSpalartAllmaras::Stilda_, Foam::symm(), adjointSpalartAllmaras::symmAdjointProductionU_, U, incompressibleVars::U(), and adjointSpalartAllmaras::y_.

Referenced by adjointSpalartAllmaras::correct().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ allocateMask()

tmp< volScalarField > allocateMask ( )
protected

Allocate the mask field.

Definition at line 441 of file adjointSpalartAllmaras.C.

References adjointRASModel::coeffDict_, ATCModel::createLimiter(), Foam::dimless, adjointSpalartAllmaras::limitAdjointProduction_, adjointTurbulenceModel::mesh_, IOobject::NO_READ, IOobject::NO_WRITE, fvMesh::time(), and Time::timeName().

Here is the call graph for this function:

◆ TypeName()

TypeName ( "adjointSpalartAllmaras"  )

Runtime type information.

◆ devReff() [1/2]

tmp< volSymmTensorField > devReff ( ) const
virtual

Return the effective stress tensor including the laminar stress.

Implements adjointRASModel.

Definition at line 703 of file adjointSpalartAllmaras.C.

References adjointTurbulenceModel::adjointVars_, and incompressibleAdjointMeanFlowVars::UaInst().

Here is the call graph for this function:

◆ devReff() [2/2]

tmp< volSymmTensorField > devReff ( const volVectorField U) const
virtual

Return the effective stress tensor based on a given velocity field.

Implements adjointRASModel.

Definition at line 711 of file adjointSpalartAllmaras.C.

References Foam::dev(), Foam::fvc::grad(), tmp< T >::New(), IOobject::NO_READ, IOobject::NO_WRITE, Foam::twoSymm(), and U.

Here is the call graph for this function:

◆ divDevReff()

tmp< fvVectorMatrix > divDevReff ( volVectorField U) const
virtual

Return the diffusion term for the momentum equation.

Implements adjointRASModel.

Definition at line 731 of file adjointSpalartAllmaras.C.

References Foam::dev(), Foam::fvc::div(), Foam::fvc::grad(), Foam::fvm::laplacian(), adjointTurbulenceModel::nuEff(), and Foam::T().

Here is the call graph for this function:

◆ adjointMeanFlowSource()

tmp< volVectorField > adjointMeanFlowSource ( )
virtual

Source terms to the adjoint momentum equation due to the differentiation of the turbulence model

Implements adjointRASModel.

Definition at line 744 of file adjointSpalartAllmaras.C.

References adjointSpalartAllmaras::conservativeMomentumSource(), adjointSpalartAllmaras::gradNuTilda_, and adjointSpalartAllmaras::nuaTilda().

Here is the call graph for this function:

◆ nutJacobianTMVar1()

tmp< volScalarField > nutJacobianTMVar1 ( ) const
virtual

Jacobian of nut wrt the first turbulence model variable.

Needed for objective functions that depend on nut. Defaults to zero

Reimplemented from adjointRASModel.

Definition at line 754 of file adjointSpalartAllmaras.C.

References adjointSpalartAllmaras::chi(), adjointSpalartAllmaras::dFv1_dChi(), adjointSpalartAllmaras::dnut_dNuTilda(), and adjointSpalartAllmaras::fv1().

Here is the call graph for this function:

◆ diffusionCoeffVar1()

tmp< scalarField > diffusionCoeffVar1 ( label  patchI) const
virtual

Diffusion coefficient of the first primal and adjoint turbulence model equation. Needed for some adjoint BCs. Defaults to zero

Reimplemented from adjointRASModel.

Definition at line 764 of file adjointSpalartAllmaras.C.

References fvMesh::boundary(), GeometricField< Type, PatchField, GeoMesh >::boundaryField(), adjointTurbulenceModel::mesh_, adjointTurbulenceModel::nu(), adjointSpalartAllmaras::nuTilda(), tmp< T >::ref(), adjointSpalartAllmaras::sigmaNut_, dimensioned< Type >::value(), and Foam::Zero.

Referenced by adjointSpalartAllmaras::wallShapeSensitivities().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ adjointMomentumBCSource()

const boundaryVectorField & adjointMomentumBCSource ( ) const
virtual

Source for the outlet adjoint momentum BC coming from differentiating the turbulence model

Implements adjointRASModel.

Definition at line 782 of file adjointSpalartAllmaras.C.

References adjointRASModel::adjMomentumBCSourcePtr_.

◆ wallShapeSensitivities()

const boundaryVectorField & wallShapeSensitivities ( )
virtual

Sensitivity terms for shape optimisation, emerging from.

the turbulence model differentiation. Misses dxdb, to be added by the classes assembling the sensitivities

Implements adjointRASModel.

Definition at line 789 of file adjointSpalartAllmaras.C.

References fvMesh::boundary(), GeometricField< Type, PatchField, GeoMesh >::boundaryField(), adjointSpalartAllmaras::diffusionCoeffVar1(), forAll, adjointTurbulenceModel::mesh_, adjointSpalartAllmaras::nuaTilda(), adjointSpalartAllmaras::nuTilda(), Foam::foamVersion::patch, and adjointRASModel::wallShapeSensitivitiesPtr_.

Here is the call graph for this function:

◆ wallFloCoSensitivities()

const boundaryVectorField & wallFloCoSensitivities ( )
virtual

Sensitivity terms for flow control, emerging from the.

turbulence model differentiation

Implements adjointRASModel.

Definition at line 812 of file adjointSpalartAllmaras.C.

References fvMesh::boundary(), GeometricField< Type, PatchField, GeoMesh >::boundaryField(), forAll, adjointTurbulenceModel::mesh_, adjointSpalartAllmaras::nuaTilda(), adjointSpalartAllmaras::nuTilda(), and adjointRASModel::wallFloCoSensitivitiesPtr_.

Here is the call graph for this function:

◆ distanceSensitivities()

tmp< volScalarField > distanceSensitivities ( )
virtual

Sensitivity terms resulting from the differentiation of the distance field. Misses dxdb, to be added by the classes assembling the sensitivities

Implements adjointRASModel.

Definition at line 830 of file adjointSpalartAllmaras.C.

References objectiveManager::adjointSolverName(), adjointTurbulenceModel::adjointVars_, fvMesh::boundary(), GeometricField< Type, PatchField, GeoMesh >::boundaryField(), adjointSpalartAllmaras::Cb1_, adjointSpalartAllmaras::chi(), adjointSpalartAllmaras::Cw1_, adjointSpalartAllmaras::dFv1_dChi(), adjointSpalartAllmaras::dFv2_dChi(), adjointSpalartAllmaras::dfw_dDelta(), adjointSpalartAllmaras::dfw_dr(), adjointSpalartAllmaras::dStilda_dDelta(), Foam::exp(), forAll, adjointSpalartAllmaras::fv1(), adjointSpalartAllmaras::fv2(), adjointSpalartAllmaras::fw_, adjointSpalartAllmaras::gradU_, adjointSpalartAllmaras::kappa_, Foam::mag(), adjointTurbulenceModel::mesh_, Foam::min(), boundaryAdjointContribution::New(), adjointTurbulenceModel::nu(), adjointSpalartAllmaras::nuaTilda(), adjointTurbulenceModel::nuEff(), adjointSpalartAllmaras::nut(), adjointSpalartAllmaras::nuTilda(), adjointRASModel::objectiveManager_, Foam::foamVersion::patch, fvPatchField< Type >::patchInternalField(), adjointTurbulenceModel::primalVars_, tmp< T >::ref(), fvPatchField< Type >::snGrad(), Foam::sqr(), Foam::sqrt(), adjointSpalartAllmaras::Stilda_, Foam::type(), U, incompressibleVars::U(), incompressibleAdjointMeanFlowVars::Ua(), uPlus, fvMesh::V(), adjointRASModel::y(), adjointSpalartAllmaras::y_, and yPlus.

Here is the call graph for this function:

◆ FISensitivityTerm()

◆ nullify()

void nullify ( )
virtual

Nullify all adjoint turbulence model fields and their old times.

Implements adjointRASModel.

Definition at line 1024 of file adjointSpalartAllmaras.C.

References adjointSpalartAllmaras::nuaTilda(), and variablesSet::nullifyField().

Here is the call graph for this function:

◆ correct()

void correct ( )
virtual

Solve the adjoint turbulence equations.

Reimplemented from adjointRASModel.

Definition at line 1030 of file adjointSpalartAllmaras.C.

References objectiveManager::addTMEqn1Source(), adjointRASModel::adjointTurbulence_, adjointTurbulenceModel::adjointVars_, adjointSpalartAllmaras::Cb1_, adjointSpalartAllmaras::Cb2_, adjointSpalartAllmaras::Cdnut_, adjointTurbulenceModel::correct(), GeometricField< Type, PatchField, GeoMesh >::correctBoundaryConditions(), adjointSpalartAllmaras::Cw1_, Foam::fvm::ddt(), Foam::fvm::div(), adjointSpalartAllmaras::DnuTildaEff(), Foam::endl(), adjointSpalartAllmaras::fw_, incompressibleAdjointMeanFlowVars::getSolverControl(), Foam::gMax(), Foam::fvc::grad(), adjointSpalartAllmaras::gradNuTilda_, Foam::Info, Foam::fvc::laplacian(), Foam::fvm::laplacian(), Foam::mag(), Foam::max(), adjointSpalartAllmaras::nuaTilda(), adjointSpalartAllmaras::nuTilda(), adjointRASModel::objectiveManager_, phi, incompressibleVars::phi(), adjointTurbulenceModel::primalVars_, solverControl::printMaxMags(), adjointSpalartAllmaras::productionDestructionSource_, tmp< T >::ref(), GeometricField< Type, PatchField, GeoMesh >::relax(), adjointSpalartAllmaras::sigmaNut_, Foam::solve(), Foam::fvm::Sp(), Foam::sqr(), adjointSpalartAllmaras::Stilda_, GeometricField< Type, PatchField, GeoMesh >::storePrevIter(), Foam::fvm::SuSp(), adjointSpalartAllmaras::symmAdjointProductionU_, incompressibleAdjointMeanFlowVars::UaInst(), adjointSpalartAllmaras::updatePrimalRelatedFields(), dimensioned< Type >::value(), and adjointSpalartAllmaras::y_.

Here is the call graph for this function:

◆ read()

bool read ( )
virtual

Read adjointRASProperties dictionary.

Reimplemented from adjointRASModel.

Definition at line 1090 of file adjointSpalartAllmaras.C.

References adjointSpalartAllmaras::Cb1_, adjointSpalartAllmaras::Cb2_, adjointRASModel::coeffDict(), adjointSpalartAllmaras::Cs_, adjointSpalartAllmaras::Cv1_, adjointSpalartAllmaras::Cw1_, adjointSpalartAllmaras::Cw2_, adjointSpalartAllmaras::Cw3_, adjointSpalartAllmaras::kappa_, adjointRASModel::read(), dimensioned< Type >::readIfPresent(), adjointSpalartAllmaras::sigmaNut_, and Foam::sqr().

Here is the call graph for this function:

Member Data Documentation

◆ sigmaNut_

◆ kappa_

◆ Cb1_

◆ Cb2_

◆ Cw1_

◆ Cw2_

dimensionedScalar Cw2_
protected

Definition at line 112 of file adjointSpalartAllmaras.H.

Referenced by adjointSpalartAllmaras::read().

◆ Cw3_

dimensionedScalar Cw3_
protected

Definition at line 113 of file adjointSpalartAllmaras.H.

Referenced by adjointSpalartAllmaras::read().

◆ Cv1_

dimensionedScalar Cv1_
protected

◆ Cs_

dimensionedScalar Cs_
protected

Definition at line 115 of file adjointSpalartAllmaras.H.

Referenced by adjointSpalartAllmaras::read().

◆ limitAdjointProduction_

bool limitAdjointProduction_
protected

Whether to limit the adjoint production term to enhance stability

Definition at line 119 of file adjointSpalartAllmaras.H.

Referenced by adjointSpalartAllmaras::allocateMask().

◆ y_

const volScalarField& y_
protected

◆ mask_

volScalarField mask_
protected

Field for masking (convergence enhancement)

Definition at line 129 of file adjointSpalartAllmaras.H.

Referenced by adjointSpalartAllmaras::updatePrimalRelatedFields().

◆ symmAdjointProductionU_

volSymmTensorField symmAdjointProductionU_
protected

◆ productionDestructionSource_

volScalarField productionDestructionSource_
protected

◆ Stilda_

◆ r_

◆ fw_

◆ Cdnut_

◆ momentumSourceMult_

◆ gradU_

◆ gradNuTilda_

◆ minStilda_

dimensionedScalar minStilda_
protected

Definition at line 145 of file adjointSpalartAllmaras.H.


The documentation for this class was generated from the following files: