ENH: Tensor/SymmTensor: add devSymm and devTwoSymm funcs to avoid intermediates

This commit is contained in:
Kutalmis Bercin
2023-03-22 10:34:28 +00:00
parent f98ecb38dc
commit 59b1cf080e
56 changed files with 185 additions and 105 deletions

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2018 OpenFOAM Foundation
Copyright (C) 2019-2020 OpenCFD Ltd.
Copyright (C) 2019-2023 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -256,7 +256,7 @@ Foam::RASModels::kineticTheoryModel::R() const
IOobject::NO_READ,
IOobject::NO_WRITE
),
- (nut_)*dev(twoSymm(fvc::grad(U_)))
- (nut_)*devTwoSymm(fvc::grad(U_))
- (lambda_*fvc::div(phi_))*symmTensor::I
)
);
@ -335,7 +335,7 @@ Foam::RASModels::kineticTheoryModel::devRhoReff
IOobject::NO_WRITE
),
- (rho_*nut_)
*dev(twoSymm(fvc::grad(U)))
*devTwoSymm(fvc::grad(U))
- ((rho_*lambda_)*fvc::div(phi_))*symmTensor::I
)
);

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2019-2020 OpenCFD Ltd.
Copyright (C) 2019-2023 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -256,7 +256,7 @@ Foam::RASModels::kineticTheoryModel::R() const
IOobject::NO_READ,
IOobject::NO_WRITE
),
- (nut_)*dev(twoSymm(fvc::grad(U_)))
- (nut_)*devTwoSymm(fvc::grad(U_))
- (lambda_*fvc::div(phi_))*symmTensor::I
)
);
@ -335,7 +335,7 @@ Foam::RASModels::kineticTheoryModel::devRhoReff
IOobject::NO_WRITE
),
- (rho_*nut_)
*dev(twoSymm(fvc::grad(U)))
*devTwoSymm(fvc::grad(U))
- ((rho_*lambda_)*fvc::div(phi_))*symmTensor::I
)
);