[Getdp] Scalar Field line integral, projection onto surface

Franz Nowak franz.g.nowak at gmail.com
Tue Jul 18 18:13:52 CEST 2017


Dear Christophe, dear Patrick



First of all, huge compliment on your software!


I am a student of computer science trying to learn FEM over the summer and
quickly came across gmsh, getdp, and onelab, which I find very intriguing.


Could you help me with the following problem:


I am trying to model a charged parallel plate capacitor in 3d, calculate
the potential field and then project the field along an axis onto a plane:
Each point on the plane should have the sum (integral) of the potential
field along the line of projection as a value.

My solution would be to use For-loops to construct hundreds or thousands of
lines through my mesh in Gmsh and then calculate the line integrals in
GetDP, inside the Electrostatics template, for each single line something
like this:


{ Name polarisation; Value { Integral { [ {v} ] ; In IntLine[i]; Jacobian
Sur; Integration Int; } }


However this takes too long to compute and generally seems very ugly...
surely there is a more elegant way?


My geometry is the following:


// Gmsh project created on Fri Jul 14 14:02:04 2017

SetFactory("OpenCASCADE");

//+

Box(1) = {-5, -5, -5, 10, 10, 10};

//+

Box(2) = {-0.5, -0.5, -1, 1, 0.1, 2};

//+

Box(3) = {-0.5, 0.4, -1, 1, 0.1, 2};

//+

Surface Loop(4) = {3, 2, 5, 1, 6, 4};

//+

Surface Loop(5) = {10, 11, 7, 9, 8, 12};

//+

Surface Loop(6) = {16, 17, 13, 15, 14, 18};

//+

Volume(4) = {4, 5, 6};

//+

Physical Volume("vacuum") = {4};

//+

Recursive Delete {

Volume{1};

}

//+

Recursive Delete {

Volume{3};

}

//+

Recursive Delete {

Volume{2};

}

//+

Physical Surface("pos") = {7,8,9,10,11,12};

//+

Physical Surface("neg") = {13,14,15,16,17,18};


/*

For k In {-5:5:0.1}

For n In {-5:5:0.1}

p=newp;

Point(p)={k,n,-5,1};

p=newp;

Point(p)={k,n,5,1};

EndFor

EndFor

…

( Lines, Physical Lines etc.)

*/


Best wishes,

Franz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/getdp/attachments/20170718/5ed37ddf/attachment.html>


More information about the getdp mailing list