|
[Sponsors] |
March 3, 2021, 13:50 |
Use oneThirdI and twoThirdsI in my own code
|
#1 |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 |
Hello,
In a certain part of a turbulence model I need to introduce the tensor (which is obviously symmetric). However, when I use twoThirdsI I get an error. Well, I don't even arrive to check it, but I got a huge list of notes, where I mostly understand I can't use it directly. Mi code contains: Code:
tmp<fvSymmTensorMatrix> REqn ( fvm::ddt(alpha, rho, R) + fvm::div(alphaRhoPhi, R) - fvm::laplacian(alpha*rho*DREff(), R) == alpha*rho*P + alpha*rho*oneMinusFn_*phiw // velocity-pressure correlation at wall - fvm::Sp(alpha*rho*fn_*phiC1/2/k_,R) // C1 implicit term pressure + alpha*rho*fn_* ( phiC1* (b-dev(b)) // C1 explicit term pressure + C2_*epsilon_*dev(innerSqr(b)) // C2 term + k_ *( (C3_ - C3Star_*mag(b))*S // C3 Term + C4_*dev(twoSymm(b&S)) // C4 Term + C5_*twoSymm(b&W.T()) // C5 Term ) ) - fvm::Sp(alpha*rho*oneMinusFn_*epsilon_/k_,R) // epsilon wall term - twoThirdsI*fn_*epsilon_//(b-dev2(b))*fn_*epsilon_ // epsilon high term + fvOptions(alpha, rho, R) ); A walkaround I found is to use (A-dev2(A)) where I ensure that I get but it is not the most elegant way. Have you ever tried to do something similar before? |
|
|
|