[Getdp] Current computation
Florin CIUPRINA
florin at elmat.pub.ro
Mon Mar 10 19:42:53 CET 2003
Hello,
I'm new with GetDP, and I'm trying to compute the global current flowing
through a L-shape
conductor (3D) in electrical conduction formulation. I now that it is not
something new under the sky, but
I have tried to do this using GetDP Manual
and the very useful information found on your mailing list, and
unfortunately I failed. So I decided to
bother you with a question which was already asked.
I obtained the current density (j) and I tried to integrate it (as others
did) on the surfaces (named "Hot" and "Ground")
where I imposed the Dirichlet conditions. I retained your advice that Hot
an Ground have to be parts of whole region
(DomainC_Ele) and I used
DomainC_Ele = Region[{Conductor,Hot,Ground}];
I obtained the solution, but I obtained the messages
GetDP : P r o c e s s i n g . . .
GetDP : Error : Null determinant in 'Get_InverseMatrix'
and
GetDP : P o s t - P r o c e s s i n g . . .
GetDP : Warning : Zero determinant in 'Cal_PostQuantity'
and the current was null.
Then, tried also with DomainC_Ele without Hot and Ground
DomainC_Ele = Region[{Conductor}];
and I obtained the solution without any error message, but the integral
for current on
Hot (or Ground) was (obvious) null. What is wrong?
I attach the problem files.
Thank you in advance!
Florin
Florin Ciuprina, Ph.D.
Associate Professor
----------------------------------------------------------------------------
POLITEHNICA University of Bucharest
Electrical Engineering Faculty
Electrical Materials Laboratory
Spl.Independentei 313, 77206, Bucharest, Romania
Tel: +40.21.402 92 91
Fax: +40.21.410 43 55
e-mail: florin at elmat.pub.ro
----------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/getdp/attachments/20030310/56bdb259/attachment.html>
-------------- next part --------------
/* -------------------------------------------------------------------
File "Integration_Lib.pro"
Definition of integration methods
------------------------------------------------------------------- */
Integration {
{ Name GradGrad ;
Case { {Type Gauss ;
Case { { GeoElement Triangle ; NumberOfPoints 4 ; }
{ GeoElement Quadrangle ; NumberOfPoints 4 ; }
{ GeoElement Tetrahedron ; NumberOfPoints 4 ; }
{ GeoElement Hexahedron ; NumberOfPoints 6 ; }
{ GeoElement Prism ; NumberOfPoints 9 ; } }
}
}
}
{ Name CurlCurl ;
Case { {Type Gauss ;
Case { { GeoElement Triangle ; NumberOfPoints 4 ; }
{ GeoElement Quadrangle ; NumberOfPoints 4 ; }
{ GeoElement Tetrahedron ; NumberOfPoints 4 ; }
{ GeoElement Hexahedron ; NumberOfPoints 6 ; }
{ GeoElement Prism ; NumberOfPoints 9 ; } }
}
}
}
{ Name Int_1 ;
Case { {Type Gauss ;
Case { { GeoElement Triangle ; NumberOfPoints 4 ; }
{ GeoElement Quadrangle ; NumberOfPoints 4 ; }
{ GeoElement Tetrahedron ; NumberOfPoints 4 ; }
{ GeoElement Hexahedron ; NumberOfPoints 6 ; }
{ GeoElement Prism ; NumberOfPoints 9 ; } }
}
}
}
}
-------------- next part --------------
/* -------------------------------------------------------------------
File "EleCin_v.pro"
Electrocinetic - Electric scalar potential v formulation
-------------------------------------------------------------------
I N P U T
---------
Global Groups : (Extension '_Ele' is for Electric problem)
-------------
Domain_Ele Whole electric domain (not used)
DomainCC_Ele Nonconducting regions (not used)
DomainC_Ele Conducting regions
Function :
--------
sigma[] Conductivity
Constraint :
----------
ElectricScalarPotential Fixed electric scalar potential
(classical boundary condition)
*/
Group {
DefineGroup[ DomainC_Ele, Hot, Ground ];
}
Function {
DefineFunction[ sigma ];
}
FunctionSpace {
{ Name Hgrad_v_Ele; Type Form0;
BasisFunction {
// v = v s , for all nodes
// n n
{ Name sn; NameOfCoef vn; Function BF_Node;
Support Region[{DomainC_Ele,Hot,Ground}]; Entity NodesOf[ All ]; }
}
Constraint {
{ NameOfCoef vn; EntityType NodesOf;
NameOfConstraint ElectricScalarPotential; }
}
}
}
Formulation {
{ Name Electrocinetic_v; Type FemEquation;
Quantity {
{ Name v; Type Local; NameOfSpace Hgrad_v_Ele; }
}
Equation {
Galerkin { [ sigma[] * Dof{d v} , {d v} ]; In DomainC_Ele;
Jacobian Vol; Integration GradGrad; }
}
}
}
Resolution {
{ Name EleCin_v;
System {
{ Name Sys_Ele; NameOfFormulation Electrocinetic_v; }
}
Operation {
Generate[Sys_Ele]; Solve[Sys_Ele]; SaveSolution[Sys_Ele];
}
}
}
PostProcessing {
{ Name EleCin_v; NameOfFormulation Electrocinetic_v;
Quantity {
{ Name v;
Value {
Local { [ {v} ]; In DomainC_Ele; Jacobian Vol; }
}
}
{ Name e;
Value {
Local { [ -{Grad v} ]; In DomainC_Ele; Jacobian Vol; }
}
}
{ Name j;
Value {
Local { [ -sigma[] * {Grad v} ]; In DomainC_Ele;
Jacobian Vol; }
}
}
{ Name p;
Value {
Integral { [ sigma[] * {Grad v} *{Grad v} ]; In DomainC_Ele;
Jacobian Vol; Integration Int_1; }
}
}
{ Name i;
Value {
Integral { [ - sigma[] * {Grad v} ];
In DomainC_Ele; Jacobian Vol; Integration Int_1; }
}
}
}
}
}
-------------- next part --------------
/* -------------------------------------------------------------------
File "L3D.geo"
This file is the geometrical description used by GMSH to produce
the file "L3D.msh".
------------------------------------------------------------------- */
/* Definition of some parameters for geometrical dimensions, i.e.
w (width of 'Line')*/
w = 1. ;
h = 1. ;
/* Definition of parameters for local mesh dimensions */
s = 1. ;
p0 = w / 3. * s ;
/* Definition of gemetrical points */
Point(1) = { 0, 0, 0, p0} ;
Point(2) = { w, 0, 0, p0} ;
Point(3) = { 2*w, 0, 0, p0} ;
Point(4) = { 2*w, w, 0, p0} ;
Point(5) = { w, w, 0, p0} ;
Point(6) = { 0, w, 0, p0} ;
Point(7) = { 0, 2*w, 0, p0} ;
Point(8) = { w, 2*w, 0, p0} ;
Point(21) = { 0, 0, h, p0} ;
Point(22) = { w, 0, h, p0} ;
Point(23) = { 2*w, 0, h, p0} ;
Point(24) = { 2*w, w, h, p0} ;
Point(25) = { w, w, h, p0} ;
Point(26) = { 0, w, h, p0} ;
Point(27) = { 0, 2*w, h, p0} ;
Point(28) = { w, 2*w, h, p0} ;
/* Definition of gemetrical lines */
/* L in the plane z = 0*/
Line(1) = {1,2}; Line(2) = {2,5}; Line(3) = {5,6};
Line(4) = {6,1}; Line(5) = {2,3}; Line(6) = {3,4};
Line(7) = {4,5}; Line(8) = {5,8}; Line(9) = {6,7};
Line(10) = {7,8};
/* L in the plane z = h*/
Line(21) = {21,22}; Line(22) = {22,25}; Line(23) = {25,26};
Line(24) = {26,21}; Line(25) = {22,23}; Line(26) = {23,24};
Line(27) = {24,25}; Line(28) = {25,28}; Line(29) = {26,27};
Line(30) = {27,28};
/* liniile intre cele doua L-fete*/
Line(41) = {1, 21}; Line(42) = {2, 22};
Line(43) = {3, 23}; Line(44) = {4, 24};
Line(45) = {5, 25}; Line(46) = {6, 26};
Line(47) = {7, 27}; Line(48) = {8, 28};
/* Definition of geometrical surfaces */
/* Squares on L at z = 0 */
Line Loop(11) = {1,2,3,4}; Plane Surface(12) = {11};
Line Loop(13) = {5,6,7,-2}; Plane Surface(14) = {13};
Line Loop(15) = {-3,8,-10,-9}; Plane Surface(16) = {15};
/* Squares on L at z = h */
Line Loop(31) = {21,22,23,24}; Plane Surface(32) = {31};
Line Loop(33) = {25,26,27,-22}; Plane Surface(34) = {33};
Line Loop(35) = {-23,28,-30,-29}; Plane Surface(36) = {35};
/* Squares between L-s */
Line Loop(51) = {1, 42, -21, -41}; Plane Surface(52) = {51};
Line Loop(53) = {5, 43, -25, -42}; Plane Surface(54) = {53};
Line Loop(55) = {-3, 45, 23, -46}; Plane Surface(56) = {55};
Line Loop(57) = {-7, 44, 27, -45}; Plane Surface(58) = {57};
Line Loop(59) = {10, 48, -30, -47}; Plane Surface(60) = {59};
Line Loop(61) = {-9, 46, 29, -47}; Plane Surface(62) = {61};
Line Loop(63) = {4, 41, -24, -46}; Plane Surface(64) = {63};
Line Loop(65) = {-8, 45, 28, -48}; Plane Surface(66) = {65};
Line Loop(67) = {-2, 42, 22, -45}; Plane Surface(68) = {67};
Line Loop(69) = {-6, 43, 26, -44}; Plane Surface(70) = {69};
/* Definition of geometrical volumes */
Surface Loop(101) = {12, 32, 52, 68, 56, 64}; Volume(102) = {101};
Surface Loop(103) = {14, 34, 68, 54, 70, 58}; Volume(104) = {103};
Surface Loop(105) = {16, 36, 56, 66, 60, 62}; Volume(106) = {105};
/* Definition of Physical entities (volumes, surfaces). The Physical
entities tell GMSH the elements and their associated region numbers
to save in the file 'L3D.msh'. */
Physical Volume (100) = {102, 104, 106}; /* Conductor */
Physical Surface (110) = {60} ; /* Hot */
Physical Surface (111) = {70} ; /* Ground */
-------------- next part --------------
/* -------------------------------------------------------------------
File "L3Dcin.pro"
This file defines the problem dependent data structures for the
microstrip problem.
To compute the solution: getdp L3Dcin -solve EleCin_v
To compute post-results: getdp L3Dcin -pos Map
or getdp L3Dcin -pos Cut
------------------------------------------------------------------- */
Group {
/* Let's start by defining the interface (i.e. elementary groups)
between the mesh file and GetDP (no mesh object is defined, so
the default mesh will be assumed to be in GMSH format and located
in "L3D.msh") */
Conductor = Region[100];
Ground = Region[111]; Hot = Region[110];
/* We can then define a global group (used in "EleCin_v.pro",
the file containing the function spaces and formulations) */
DomainC_Ele = Region[{Conductor,Hot,Ground}];
}
Function {
/* The conductivity (needed in the formulation) is piecewise
defined in elementary groups */
sigma[Conductor] = 1.;
sigma[Hot] = 1.;
sigma[Ground] = 1.;
}
Constraint {
/* Now, some Dirichlet conditions are defined. The name
'ElectricScalarPotential' refers to the constraint name given in
the function space */
{ Name ElectricScalarPotential; Type Assign;
Case {
{ Region Ground; Value 0.; }
{ Region Hot; Value 1.; }
}
}
}
/* The formulation used and its tools, considered as being
in a black box, can now be included */
Include "Jacobian_Lib.pro"
Include "Integration_Lib.pro"
Include "EleCin_v.pro"
/* Finally, we can define some operations to output results */
PostOperation {
{ Name Map; NameOfPostProcessing EleCin_v;
Operation {
Print [ v, OnElementsOf Conductor, File "L3D_v.pos" ];
Print [ e, OnElementsOf Conductor, File "L3D_e.pos" ];
}
}
{ Name Cut; NameOfPostProcessing EleCin_v;
Operation {
Print [ e, OnPlane {{0,1.5,0}{1,1.5,0}{0,1.5,2}} {50,50}, File "Cut_e" ];
}
}
{ Name Power; NameOfPostProcessing EleCin_v;
Operation {
Print [ p[Conductor], OnGlobal, Format Table, File "Power.txt" ];
}
}
{ Name Current_Hot; NameOfPostProcessing EleCin_v;
Operation {
Print [ i[Hot], OnGlobal, Format Table, File "Current.txt" ];
}
}
{ Name Current_Ground; NameOfPostProcessing EleCin_v;
Operation {
Print [ i[Ground], OnGlobal, Format Table, File >> "Current.txt" ];
}
}
}