Public Member Functions | Private Member Functions | Private Attributes
Q Class Reference

This function object calculates and outputs the second invariant of the velocity gradient tensor [1/s^2]. More...

Collaboration diagram for Q:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("Q")
 Runtime type information. More...
 
 Q (const word &name, const objectRegistry &, const dictionary &, const bool loadFromFiles=false)
 Construct for given objectRegistry and dictionary. More...
 
virtual ~Q ()
 Destructor. More...
 
virtual const wordname () const
 Return name of the set of Q. More...
 
virtual void read (const dictionary &)
 Read the Q data. More...
 
virtual void execute ()
 Execute, currently does nothing. More...
 
virtual void end ()
 Execute at the final time-loop, currently does nothing. More...
 
virtual void timeSet ()
 Called when time was set at the end of the Time::operator++. More...
 
virtual void write ()
 Calculate the Q and write. More...
 
virtual void updateMesh (const mapPolyMesh &)
 Update for changes of mesh. More...
 
virtual void movePoints (const polyMesh &)
 Update for changes of mesh. More...
 

Private Member Functions

 Q (const Q &)
 Disallow default bitwise copy construct. More...
 
void operator= (const Q &)
 Disallow default bitwise assignment. More...
 

Private Attributes

word name_
 Name of this set of Q objects. More...
 
const objectRegistryobr_
 Reference to the database. More...
 
bool active_
 On/off switch. More...
 
word UName_
 Name of velocity field, default is "U". More...
 
word resultName_
 Result name. More...
 
Switch log_
 Switch to send output to Info as well as to file. More...
 

Detailed Description

This function object calculates and outputs the second invariant of the velocity gradient tensor [1/s^2].

\[ Q = 0.5(sqr(tr(\nabla U)) - tr(((\nabla U) \cdot (\nabla U)))) \]

where

$ U $ = velocity [m/s]

Example of function object specification to calculate Q:

    Q1
    {
        type        Q;
        functionObjectLibs ("libutilityFunctionObjects.so");
        ...
    }


Function object usage

Property Description Required Default value
type type name: Q yes
UName Name of velocity field no U
resultName Name of Q field no <function name>
log Log to standard output no yes
Source files

Definition at line 119 of file Q.H.

Constructor & Destructor Documentation

◆ Q() [1/2]

Q ( const Q )
private

Disallow default bitwise copy construct.

◆ Q() [2/2]

Q ( const word name,
const objectRegistry obr,
const dictionary dict,
const bool  loadFromFiles = false 
)

Construct for given objectRegistry and dictionary.

Allow the possibility to load fields from files

Definition at line 42 of file Q.C.

References dict, Foam::dimless, Foam::dimTime, Foam::endl(), mesh, Foam::nl, Foam::read(), Foam::sqr(), and WarningInFunction.

Here is the call graph for this function:

◆ ~Q()

~Q ( )
virtual

Destructor.

Definition at line 95 of file Q.C.

Member Function Documentation

◆ operator=()

void operator= ( const Q )
private

Disallow default bitwise assignment.

◆ TypeName()

TypeName ( "Q"  )

Runtime type information.

◆ name()

virtual const word& name ( ) const
inlinevirtual

Return name of the set of Q.

Definition at line 177 of file Q.H.

References Q::name_.

Referenced by Q::write().

Here is the caller graph for this function:

◆ read()

void read ( const dictionary dict)
virtual

Read the Q data.

Definition at line 101 of file Q.C.

References dict, and dictionary::readIfPresent().

Here is the call graph for this function:

◆ execute()

void execute ( )
virtual

Execute, currently does nothing.

Definition at line 120 of file Q.C.

References Foam::fvc::grad(), objectRegistry::lookupObject(), mesh, Foam::sqr(), Foam::tr(), and U.

Here is the call graph for this function:

◆ end()

void end ( )
virtual

Execute at the final time-loop, currently does nothing.

Definition at line 142 of file Q.C.

◆ timeSet()

void timeSet ( )
virtual

Called when time was set at the end of the Time::operator++.

Definition at line 148 of file Q.C.

◆ write()

void write ( )
virtual

Calculate the Q and write.

Definition at line 154 of file Q.C.

References Foam::endl(), Foam::Info, Q::name(), Foam::nl, Foam::type(), and Q::write().

Referenced by Q::write(), and molecule::writeFields().

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

◆ updateMesh()

virtual void updateMesh ( const mapPolyMesh )
inlinevirtual

Update for changes of mesh.

Definition at line 198 of file Q.H.

◆ movePoints()

virtual void movePoints ( const polyMesh )
inlinevirtual

Update for changes of mesh.

Definition at line 202 of file Q.H.

Field Documentation

◆ name_

word name_
private

Name of this set of Q objects.

Definition at line 124 of file Q.H.

Referenced by Q::name().

◆ obr_

const objectRegistry& obr_
private

Reference to the database.

Definition at line 127 of file Q.H.

◆ active_

bool active_
private

On/off switch.

Definition at line 130 of file Q.H.

◆ UName_

word UName_
private

Name of velocity field, default is "U".

Definition at line 133 of file Q.H.

◆ resultName_

word resultName_
private

Result name.

Definition at line 136 of file Q.H.

◆ log_

Switch log_
private

Switch to send output to Info as well as to file.

Definition at line 139 of file Q.H.


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