fvm::laplacian on a regular tetrahedral mesh

 Register Blogs Members List Search Today's Posts Mark Forums Read

 May 30, 2017, 08:29 fvm::laplacian on a regular tetrahedral mesh #1 New Member   Benjamin Kalloch Join Date: Mar 2016 Posts: 1 Rep Power: 0 Hello everyone! I have a seemingly simple issue for which I cannot find a solution, probably because I am a beginner with OpenFOAM and FVM in general. My test-case: - an ideal capacitor with two infinitely large capacitor plates and a homogeneous conductive medium in between as a steady-state case The Geometry: - box domain 5x5x5m on a regular tetrahedral grid - left and right boundaries of the box have a value of +5/-5 Volts - all other boundaries (top&bottom, front&back) have a zeroGradient BC (see the attached images 'domain_1' & 'domain_2' for a depiction of the geometry and the BCs) domain_1.jpg domain_2.jpg The solver setup: I want to solve the electrical potential between the capacitor plates using the equation Code: `0 = ∇( sigma ∇(ElPot) )` using this simple custom solver application Code: ```#include "fvCFD.H" int main( int argc, char *argv[] ) { #include "setRootCase.H" #include "createTime.H" #include "createMesh.H" #include "createFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solve( fvm::laplacian( sigma, ElPot) ); ElPot.write(); return(0); }``` which should result in a perfect gradient from +5 to -5 Volts between the capacitor plates. In more detail: values sampled from a line parallel to the capacitor planes should be all equal and values sampled perpendicular to the capacitor planes should change linearly. (see image 'expected_result'; aside from the [expected] jumps from one cell to another the value remains the same) expected_result.jpg This works perfectly fine for a hexahedral grid. The issue: However the result is impaired by the structure of the regular tetrahedral grid. Values sampled from a line parallel to the capacitor plates are not the same but slowly decrease. (see image 'calculated_result'; here the values decrease over the sampling-line) calculated_result.jpg As a discretization scheme I use: Code: ```divSchemes { default Gauss linear limited 1.0; } laplacianSchemes { laplacian(sigma,ElPot) Gauss linear limited 1.0; }``` I tried to choose the discretization schemes according to: http://www.tfd.chalmers.se/~hani/kur...stPractice.pdf The solver settings are are: Code: ```ElPot { solver PCG; preconditioner DIC; tolerance 1e-15; relTol 0; maxIter 50000; };``` My question: Is this a inevitable issue with this kind of grid and the way OpenFOAM solves the laplacian or did I miss a vital scheme / setting? How could I solve this issue? Thanks a lot in advance! Last edited by ben_k; June 7, 2017 at 09:52. Reason: For a better referencing, I have inserted the attachements directly into the text.

 Tags laplacian, tetrahedral mesh