|
[Sponsors] |
April 15, 2020, 19:06 |
Flux calculation in electrostaticFoam
|
#1 |
Senior Member
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18 |
Dear Foamers,
I see that in electrostaticFoam solver, flux has been calculated as follows: Code:
rhoFlux = -k*mesh.magSf()*fvc::snGrad(phi); Code:
solve ( fvm::laplacian(phi) + rho/epsilon0 ); Code:
volVectorField E = -fvc::grad(phi) Code:
rhoFlux = fvc::interpolate(-k*E) & mesh.Sf(); I appreciate any help Kind regards, syavash |
|
June 28, 2020, 21:50 |
|
#2 |
New Member
Join Date: Jun 2020
Location: UK
Posts: 22
Rep Power: 6 |
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 |
|
Tags |
electrostaticfoam, rhoflux |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calculation of spectral transfer flux T(k) | gharek | Main CFD Forum | 3 | August 1, 2017 13:51 |
calculation of wall heat flux in CHT | richard | CFX | 1 | July 23, 2009 10:00 |
Flux calculation across a boundary | hirokata | Siemens | 3 | July 4, 2008 01:25 |
Warning 097- | AB | Siemens | 6 | November 15, 2004 05:41 |
Turbulence Model and Accuracy of convective flux calculation | Lokesh Agrawal | Main CFD Forum | 1 | November 15, 1998 00:24 |