Flux calculation in electrostaticFoam
Dear Foamers,
I see that in electrostaticFoam solver, flux has been calculated as follows: Code:
rhoFlux = -k*mesh.magSf()*fvc::snGrad(phi); Code:
solve Code:
volVectorField E = -fvc::grad(phi) Code:
rhoFlux = fvc::interpolate(-k*E) & mesh.Sf(); I appreciate any help :) Kind regards, syavash |
Hi,
The resaon for solver crash using your approach is that there is a small sign typo in your flux equation. The correct form of the equation would be: Code:
rhoFlux = fvc::interpolate(k*E) & mesh.Sf(); In this case you may get away with the introduced gradient error, but in general it can result in non-physical "checkerboard" effects. Cheers |
All times are GMT -4. The time now is 07:21. |