CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

fvm::laplacian on a regular tetrahedral mesh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 30, 2017, 09:29
Default fvm::laplacian on a regular tetrahedral mesh
  #1
New Member
 
Benjamin Kalloch
Join Date: Mar 2016
Posts: 1
Rep Power: 0
ben_k is on a distinguished road
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 10:52. Reason: For a better referencing, I have inserted the attachements directly into the text.
ben_k is offline   Reply With Quote

Reply

Tags
laplacian, tetrahedral mesh


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ICEM] 2D hybrid mesh (unstructured mesh highly dependent on structured mesh parameters) shubham jain ANSYS Meshing & Geometry 1 April 10, 2017 06:03
[snappyHexMesh] SnappyHexMesh for internal Flow vishwa OpenFOAM Meshing & Mesh Conversion 24 June 27, 2016 09:54
Problem: tetrahedral mesh and interFoam = bad results ? querdynamik OpenFOAM Running, Solving & CFD 1 October 10, 2015 15:17
ParaView Compilation jakaranda OpenFOAM Installation 3 October 27, 2008 12:46
Icemcfd 11: Loss of mesh from surface mesh option? Joe CFX 2 March 26, 2007 19:10


All times are GMT -4. The time now is 12:15.