MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / calc

Function calc

src/functionObjects/field/Q/Q.C:50–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
49
50bool Foam::functionObjects::Q::calc()
51{
52 if (foundObject<volVectorField>(fieldName_))
53 {
54 const volVectorField& U = lookupObject<volVectorField>(fieldName_);
55 const tmp<volTensorField> tgradU(fvc::grad(U));
56 const volTensorField& gradU = tgradU();
57
58 return store
59 (
60 resultName_,
61 0.5*(sqr(tr(gradU)) - tr(((gradU) & (gradU))))
62 );
63 }
64 else
65 {
66 return false;
67 }
68}
69
70
71// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

Callers 13

mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
consistentOrientationFunction · 0.50
ReactingParcel.CFile · 0.50
KinematicParcel.CFile · 0.50
ThermoParcel.CFile · 0.50
SprayParcel.CFile · 0.50
markZoneFunction · 0.50

Calls 2

sqrFunction · 0.50
trFunction · 0.50

Tested by 2

mainFunction · 0.40
mainFunction · 0.40