Bug fix: Maxwell transport. M. Nobrega

This commit is contained in:
Hrvoje Jasak 2015-04-29 13:59:22 +01:00 committed by Dominik Christ
parent c080289664
commit a6d1c4021f

View file

@ -77,7 +77,6 @@ Foam::tmp<Foam::fvVectorMatrix> Foam::Maxwell::divTau(volVectorField& U) const
- fvc::laplacian(etaPEff/rho_, U, "laplacian(etaPEff,U)") - fvc::laplacian(etaPEff/rho_, U, "laplacian(etaPEff,U)")
+ fvm::laplacian( (etaPEff + etaS_)/rho_, U, "laplacian(etaPEff+etaS,U)") + fvm::laplacian( (etaPEff + etaS_)/rho_, U, "laplacian(etaPEff+etaS,U)")
); );
} }
@ -86,6 +85,9 @@ void Foam::Maxwell::correct()
// Velocity gradient tensor // Velocity gradient tensor
volTensorField L = fvc::grad(U()); volTensorField L = fvc::grad(U());
// Convected derivate term
volTensorField C = tau_ & L;
// Twice the rate of deformation tensor // Twice the rate of deformation tensor
volSymmTensorField twoD = twoSymm(L); volSymmTensorField twoD = twoSymm(L);
@ -93,8 +95,10 @@ void Foam::Maxwell::correct()
fvSymmTensorMatrix tauEqn fvSymmTensorMatrix tauEqn
( (
fvm::ddt(tau_) fvm::ddt(tau_)
+ fvm::div(phi(), tau_)
== ==
etaP_/lambda_*twoD etaP_/lambda_*twoD
+ twoSymm(C)
- fvm::Sp( 1/lambda_, tau_) - fvm::Sp( 1/lambda_, tau_)
); );