[Getdp] Re: getdp: conductivity, el. quasistatical approx.
Samuel Kvasnica
samuel.kvasnica at tuwien.ac.at
Fri Jul 27 13:33:18 CEST 2001
> You cannot combine the electrostatic model and the electrokinetic model
> the way you did: there are two different kinds of hypotheses involved
> (predominant displacement or conduction currents) and you miss a time
> derivative in the first term. For electrokinetics, you should solve
>
> Equation {
> Galerkin { [ sigma[] * Dof{d v} , {d v} ] ;
> In DomainC_Ele ;
> Jacobian Vol ; Integration GradGrad ; }
> }
>
ok, but if I want to consider electrostatical effects between 2 DC circuits with high voltages should I then
compute
the electrokinetics first and then use computed potentials as boundary condition for electrostatics ? Can I do
these
2 steps automatically in getdp ?
> If displacement and conduction currents are of the same order of
> magnitude, you end up with the so-called electrodynamic model:
>
> Equation {
> Galerkin { DtDof [ epsr[] * Dof{d v} , {d v} ] ;
> In DomainCC_Ele ;
> Jacobian Vol ; Integration GradGrad ; }
> Galerkin { [ sigma[] * Dof{d v} , {d v} ] ;
> In DomainC_Ele ;
> Jacobian Vol ; Integration GradGrad ; }
> }
>
> >
> > How can I enhance this formulation further for harmonic quasistationary
> >
> > solution (without eddy currents) ? Do I have to solve it in time domain or
> >
> > it is possible to work just with complex amplitudes with equations like
> >
> > div eps*e = q, div((i*omega*eps+1/sigma)e+j_e) = 0
>
> Yes, simply define the above electrodynamic equations, and specify
> 'Frequency omega/(2*Pi)' in the 'System' field of the resolution (cf.
> http://www.geuz.org/getdp/doc/texinfo/getdp_7.html#SEC75). That's it:
> the time derivative in the equations will be automatically transformed
> into its appropriate harmonic representation.
ok, that sounds good. I tried it, solve converges but at the and I get strange results displayed in gmsh -
potential lines
are dashed and it looks like there were missing mesh elements when I try to visualize them in option dialog of
potential.
I tried to display {v} and also Norm[{v}]. I looked into your magnetodynamics example to get some inspiration
and added
the ComplexValue option into my resolution, but that makes no effect. What's wrong (I'm sending you the files
attached) ?
> The concept hidden behind the definition of the Galerkin term is the one
> of weak formulation. You can have a look on a rough example of how to
> define a weak formulation from Maxwell's equations in the static case at
> http://www.geuz.org/getdp/doc/slides/getdp-18.html. But you should
> really consider reading any finite element introductory course. The book
> from bossavit I mentioned above is definitely a good starting point. The
> 'Integration' permits to specify the integration method to use.
Yes, I borrowed it 2 days ago in my desperation but it looks like I'll need some weeks to swallow it. First
I've got an impression
of a book full of 'dry' theory written by a mathemacian, anyway after few pages I started to like it - just
like the book of Birdsall
on PIC methods.
Thanks a lot,
Sam
--
----------------------------------------------------------------
Mag.Samuel Kvasnica
IEMW TU-WIEN
Gusshausstrase 27-29 / 366 email: samuel.kvasnica at tuwien.ac.at
1040 Wien tel: +43-1-58801-36639
Austria fax: +43-1-58801-36695
----------------------------------------------------------------
-------------- next part --------------
/* -------------------------------------------------------------------
File "EleSta_v.pro"
Electrostatics - 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
DomainC_Ele Conducting regions (not used)
Function :
--------
epsr[] Relative permittivity
sigma[] Conductivity
Constraint :
----------
ElectricScalarPotential Fixed electric scalar potential
(classical boundary condition)
Physical constants :
------------------ */
eps0 = 8.854187818e-12 ;
Group {
DefineGroup[ Domain_Ele, DomainCC_Ele, DomainC_Ele ] ;
}
Function {
DefineFunction[ epsr ] ;
DefineFunction[ sigma ];
DefineFunction[ Freq ];
}
FunctionSpace {
{ Name Hgrad_v_Ele ; Type Form0 ;
BasisFunction {
// v = v s , for all nodes
// n n
{ Name sn ; NameOfCoef vn ; Function BF_Node ;
Support Domain_Ele ; Entity NodesOf[ All ] ;}
// { Name sn2 ; NameOfCoef vn2 ; Function BF_Node_2E ;
// Support Domain_Ele ; Entity EdgesOf[ All ] ;}
}
Constraint {
{ NameOfCoef vn ; EntityType NodesOf ;
NameOfConstraint ElectricScalarPotential ;}
// { NameOfCoef vn2 ; EntityType EdgesOf ;
// NameOfConstraint ElectricScalarPotential ;}
}
}
}
Formulation {
{ Name Electrodynamics_v ; Type FemEquation ;
Quantity {
{ Name v ; Type Local ; NameOfSpace Hgrad_v_Ele ; }
}
Equation {
// Galerkin { DtDof [ epsr[] * Dof{d v} , {d v} ] ;
// In DomainCC_Ele ;
// Jacobian Vol ; Integration GradGrad ; }
Galerkin { [ sigma[] * Dof{d v} , {d v} ] ;
In DomainC_Ele ;
Jacobian Vol ; Integration GradGrad ; }
}
}
}
Resolution {
{ Name EleHarm_v ;
System {
{ Name Sys_Ele ; NameOfFormulation Electrodynamics_v ;
Type ComplexValue; Frequency Freq;
}
}
Operation {
Generate Sys_Ele ; Solve Sys_Ele ; SaveSolution Sys_Ele ;
}
}
}
PostProcessing {
{ Name EleSta_v ; NameOfFormulation Electrodynamics_v ;
PostQuantity {
{ Name v ; Value { Local { [ (Re[{v}]+Im[{v}])*(Re[{v}]-Im[{v}]) ] ; In Domain_Ele ; Jacobian Vol; } } }
{ Name j ; Value { Local { [ sigma[] * {d v} ] ; In Domain_Ele ; Jacobian Vol; } } }
{ Name e ; Value { Local { [ -Norm[{d v}] ] ; In Domain_Ele ; Jacobian Vol; } } }
{ Name d ; Value { Local { [ -eps0*epsr[] *{d v} ] ;
In DomainCC_Ele ; } } }
}
}
}
-------------- next part --------------
/* -------------------------------------------------------------------
File "capcond.geo"
Geometrical description of epsilon-sigma test
------------------------------------------------------------------- */
/* Definition of some parameters for geometrical dimensions, i.e.
h (height of 'Diel1'), w (width of 'Line'), t (thickness of 'Line')
xBox (width of the air box) and yBox (height of the air box) */
mu = 1.e-6 ;
mm = 1e-3;
h1 = 20 * mm;
h2 = 5 * mm;
w1 = 5 * mm;
w2 = 15 * mm;
top = 40 * mm ;
inf = 100*mm ;
/* Definition of parameters for local mesh dimensions */
s = 3 ;
p0 = h1 / 50. * s ;
pInf = h1 / 10. * s ;
pDet = h1 / 50 * s /10 ;
//pLine0 = w/2. / 10. * s ; pLine1 = w/2. / 50. * s ;
//pxBox = xBox / 10. * s ; pyBox = yBox / 8. * s ;
/* Definition of gemetrical points */
Point(1) = { 0 , 0, 0, p0} ;
Point(2) = { w1, 0, 0, p0} ;
Point(3) = { w1+w2, 0, 0, p0} ;
Point(4) = { w1+w2+w2, 0, 0, p0} ;
Point(5) = { w1+w2+w2+w1, 0, 0, p0} ;
Point(6) = { w1+w2+w2+w1, h1, 0, p0} ;
Point(7) = { w1+w2+w2+w1/2, h1, 0, p0} ;
Point(8) = { w1+w2+w2+w1/2, h1+h2, 0, p0} ;
Point(9) = { w1/2,h1+h2, 0, p0} ;
Point(10) = { w1/2, h1, 0, p0} ;
Point(11) = { 0, h1, 0, p0} ;
Point(12) = { w1+w2+w2, h1, 0, p0} ;
Point(13) = { w1+w2, h1, 0, p0} ;
Point(14) = { w1, h1, 0, p0} ;
Point(100) = { inf,0, 0, pInf};
Point(101) = { inf, inf, 0, pInf};
Point(102) = { 0, inf, 0, pInf};
/* Definition of gemetrical lines */
Line(1) = {1,2};
Line(2) = {2,3};
Line(3) = {3,4};
Line(4) = {4,5};
Line(5) = {5,6};
Line(6) = {6,7};
Line(7) = {7,8};
Line(8) = {8,9};
Line(9) = {9,10};
Line(10) = {10,11};
Line(11) = {11,1};
Line(12) = {7,12};
Line(13) = {12,13};
Line(14) = {13,14};
Line(15) = {14,10};
Line(16) = {12,4};
Line(17) = {13,3};
Line(18) = {14,2};
Line(100) = {5,100};
Line(101) = {100,101};
Line(102) = {101,102};
Line(103) = {102,11};
/* Definition of geometrical surfaces */
Line Loop(200) = {1,-18,15,10,11}; // Contact1
Plane Surface(201) = {200};
Line Loop(202) = {2,-17,14,18}; // Conductor1
Plane Surface(203) = {202};
Line Loop(204) = {3,-16,13,17}; // Conductor2
Plane Surface(205) = {204};
Line Loop(206) = {4,5,6,12,16}; // Contact2
Plane Surface(207) = {206};
Line Loop(208) = {-15,-14,-13,-12,7,8,9}; // Diel1
Plane Surface(209) = {208};
Line Loop(210) = {100,101,102,103,-10,-9,-8,-7,-6,-5}; // Air
Plane Surface(211) = {210};
/* Definition of Physical entities (surfaces, lines). The Physical
entities tell GMSH the elements and their associated region numbers
to save in the file 'mStrip.msh'. For example, the Region
111 is made of elements of surface 13, while the Region 121 is
made of elements of lines 9, 10 and 11 */
Physical Surface (1001) = {211} ; /* Air */
Physical Surface (1002) = {201} ; /* Contact1 */
Physical Surface (1003) = {203} ; /* Conductor1 */
Physical Surface (1004) = {205} ; /* Conductor2 */
Physical Surface (1005) = {207} ; /* Contact2 */
Physical Surface (1006) = {209} ; /* Diel1 */
//Physical Line (120) = {1} ; /* Ground */
//Physical Line (121) = {9,10,11} ; /* Line */
Physical Line (1010) = {101,102} ; /* SurfInf */
Physical Line (1011) = {11} ; /* contact1 */
Physical Line (1012) = {5} ; /* contact2 */
Physical Line (1013) = {103} ; /* Y axis */
-------------- next part --------------
/* -------------------------------------------------------------------
File "Jacobian_Lib.pro"
Definition of a jacobian method
-------------------------------------------------------------------
I N P U T
---------
GlobalGroup :
-----------
DomainInf Regions with Spherical Shell Transformation
Parameters :
----------
Val_Rint, Val_Rext Inner and outer radius of the Spherical Shell
of DomainInf
*/
Group {
DefineGroup[ DomainInf ] ;
DefineVariable[ Val_Rint, Val_Rext ] ;
}
Jacobian {
{ Name Vol ;
Case { { Region DomainInf ;
Jacobian VolSphShell {Val_Rint, Val_Rext} ; }
{ Region All ; Jacobian Vol ; }
}
}
}
-------------- 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 ; } }
}
}
}
}