[Getdp] 3D Laplace equation with Neumann and Dirichlet boundary conditions
gilles quemener
quemener at lpccaen.in2p3.fr
Fri Oct 17 11:42:39 CEST 2014
Hello,
Currently I am trying to solve Laplace equation in 3D with both some Neumann and Dirichlet boundary conditions
on different parts of the problem domain. This domain consists in an outer cube with a cubic hole at centre
(see attached file Laplace3D.geo).
The problem to be solved is the following :
- div(grad(u) = 0 in Omega
with both the following BC:
1) Dirichlet BC:
u = 0 on GammaOuter
2) Neumann BC:
\partial u / \partial normal = grad(u).normal = (gbx, gby, gbz).(normalX, normalY, normalZ) on GammaInner
where:
GammaOuter = Outer cube surface
GammaInner = Inner cube surface
Omega = volume limited by these two surfaces
I tried to modify Onelab examples for 2D Laplace equations as shown at http://onelab.info/wiki/Category:GetDP.
I have some known functions of space coordinates X[], Y[] and Z[] and of an order norder (=3 e.g.) for gbx[], gby[]
and gbz[].
As I do not know how to access the normal components (normalX, normalY and normalZ) within GetDP and as
my geometry is quite simple, I divided both GammerOuter and GammaInner into 6 individual Physical Surfaces:
top, bottom, left, right, front and back faces for each cube. There the normal vectors are known and I can therefore
write the Neumann boundary conditions on each face see the (Weak) Formulation space in the attached file
Laplace3D.pro. Note: how to proceed for more complicated surfaces is still a mystery to me but this is not my current
problem !
Gmsh (command: gmsh Laplace3D.geo -3) does its works and provides me with a 3D mesh of the domain of interest.
GetDP (command: getdp Laplace3D.pro -solve -pos) runs and outputs files, but solved potentials are null everywhere !
Does anyone have some clue on what I am doing wrong in this formulation ? I tried to solve the same problem
using FreeFem++ (see atached files Laplace-cube-cube.edp and MeshSurface.idp) and got results making some sense.
But I would prefer much more to solve it in Gmsh/GetDP as Gmsh is so powerful for postprocessing data.
Thanks a lot for any help,
Gilles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/getdp/attachments/20141017/6de68926/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Laplace-cube-cube.edp
Type: application/octet-stream
Size: 11044 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/getdp/attachments/20141017/6de68926/attachment.edp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MeshSurface.idp
Type: application/octet-stream
Size: 4250 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/getdp/attachments/20141017/6de68926/attachment.idp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Laplace3D.geo
Type: text/x-csrc
Size: 5200 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/getdp/attachments/20141017/6de68926/attachment.geo>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Laplace3D.pro
Type: text/x-csrc
Size: 11933 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/getdp/attachments/20141017/6de68926/attachment.pro>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: param.geo
Type: text/x-csrc
Size: 870 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/getdp/attachments/20141017/6de68926/attachment-0001.geo>