<div dir="ltr"><div><div><div>Dear Michael,<br><br></div>thank you for your help. I could get it work by modifying the "Region" line as you suggested.<br><br></div>Best Regards<br></div>Peter<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 7, 2015 at 8:29 AM, <span dir="ltr"><<a href="mailto:michael.asam@infineon.com" target="_blank">michael.asam@infineon.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div link="blue" vlink="purple" lang="EN-GB">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi Peter,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">there are some issues in your <a href="http://coil.pro" target="_blank">coil.pro</a>.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">E.g. the crash comes due to this line:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> Omega = Region[ All ];<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">You have to specify the regions by their names:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> Omega = Region[ {Omega_air, Omega_coil} ];<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Also your function space is of form 0 (i.e. nodal<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">based scalar basis functions). For the vector<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">potential you need form 1 (edge based vector<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">basis functions). In your case of a 2D simulation<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">you need Form1P.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Maybe the best starting point would be to<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">modify the magnetic example delivered with<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">GetDP. You will find it in your installation directory:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">C:\Path\to\GetDP\demos\<a href="http://magnet.pro" target="_blank">magnet.pro</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">There are two resolutions: One calculates the<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">magnetic vector potential. Alternatively the other<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">calculates the magnetic scalar potential.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">You can also look into the examples at:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><a href="http://onelab.info/wiki/Inductor" target="_blank">http://onelab.info/wiki/Inductor</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Cheers,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Michael<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" lang="DE">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" lang="DE"> getdp [mailto:<a href="mailto:getdp-bounces@ace20.montefiore.ulg.ac.be" target="_blank">getdp-bounces@ace20.montefiore.ulg.ac.be</a>]
<b>On Behalf Of </b>Peter Kis<br>
<b>Sent:</b> Friday, August 07, 2015 12:27 AM<br>
<b>To:</b> <a href="mailto:getdp@geuz.org" target="_blank">getdp@geuz.org</a><br>
<b>Subject:</b> [Getdp] [solve] Segmentation fault (core dumped)<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Dear List Members,<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">I am at the very beginning of learning how to use getdp. In fact I bumped into a problem at my first model, which is about an axisymmetric 2D coil in time domain. I use vector potential formalism with excitation
current perpendicular to the plane. Therefore this is a nodal FEM problem because the vector potential has only phi component as the current density.
<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">I did my best to tackle this problem but something is wrong with my *.pro file. However the example files run well.
<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">I use getdp version 2.6.1 64 bit on Linux and get this message:<br>
<br>
<span style="font-family:"Courier New"">getdp <a href="http://coil.pro" target="_blank">coil.pro</a> -solve '#1' -pos '#1' -msh coil.msh<br>
Info : Running 'getdp <a href="http://coil.pro" target="_blank">coil.pro</a> -solve #1 -pos #1 -msh coil.msh' [GetDP 2.6.1, 1 node]<br>
Info : Started (Fri Aug 7 00:13:51 2015, CPU = 0.076s, Mem = 255.719Mb)<br>
Info : Initializing Gmsh<br>
Info : Loading problem definition '<a href="http://coil.pro" target="_blank">coil.pro</a>'<br>
Info : Loading problem definition 'param.geo'<br>
Info : Selected Resolution 'Solution'<br>
Info : Loading Geometric data 'coil.msh'<br>
Info : System 'Syst' : Real<br>
P r e - P r o c e s s i n g . . .<br>
Info : Treatment Formulation 'VectorPotentialFormulation'<br>
make: *** [solve] Segmentation fault (core dumped)</span><br>
<br>
<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Could you take a look at my project file what's wrong with it? This is really my very first project in getDP. So any clue is welcome.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Thank you for your help in advance.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Peter<br>
<br>
-----------<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><a href="http://coil.pro" target="_blank">coil.pro</a>:<br>
------------<br>
<span style="font-family:"Courier New"">// <a href="http://coil.pro" target="_blank">coil.pro</a>: weak formulation<br>
<br>
Include "param.geo";<br>
<br>
Group{ // OK<br>
Omega_air = Region[{Omega_air}];<br>
Omega_coil = Region[{Omega_coil}];<br>
Omega = Region[ All ];<br>
Gama_D = Region[{Gama_D}]; // Dirichlet for A=0<br>
}<br>
<br>
Function{ // OK<br>
InitialState[Omega] = 0.;<br>
mu0 = 4e-7*Pi;<br>
Freq = 50;<br>
t0 = 0;<br>
tmax = 2.;<br>
dt = 0.1;<br>
theta = 1.; // backward Euler<br>
source_current_t = {0, 1, 2};<br>
source_current_j = {0, 1, 1};<br>
Js[] = InterpolationLinear[$1]{ListAlt[source_current_t, source_current_j]};<br>
// Jext[] = Js[$Time];<br>
Jext[] = 50*(1-Exp[-0.5*$Time]);<br>
sigma[Omega_air] = 1;<br>
sigma[Omega_coil] = 6e7;<br>
}<br>
<br>
Jacobian { // OK<br>
{ Name JVol; // for 2D regions<br>
Case {<br>
{Region All; Jacobian VolAxi;}<br>
}<br>
}<br>
{ Name JSur; // for 1D regions<br>
Case {<br>
{Region All; Jacobian SurAxi;}<br>
}<br>
}<br>
}<br>
<br>
Integration {<br>
{ Name I1 ;<br>
Case {<br>
{ Type Gauss ;<br>
Case {<br>
{ GeoElement Point ; NumberOfPoints 1 ; }<br>
{ GeoElement Line ; NumberOfPoints 4 ; }<br>
{ GeoElement Triangle ; NumberOfPoints 6 ; }<br>
{ GeoElement Quadrangle ; NumberOfPoints 7 ; }<br>
{ GeoElement Tetrahedron ; NumberOfPoints 15 ; }<br>
{ GeoElement Hexahedron ; NumberOfPoints 34 ; }<br>
}<br>
}<br>
}<br>
}<br>
}<br>
<br>
Constraint{ // OK<br>
// Initial State<br>
{Name InitialData; Type Init;<br>
Case {<br>
{Region Omega; Value InitialState[];}<br>
}<br>
}<br>
// Dirichlet in Inf.<br>
{Name DirichletBC; Type Assign;<br>
Case {<br>
{Region Gama_D; Value 0;}<br>
}<br>
}<br>
// No constraint for the axis<br>
}<br>
<br>
FunctionSpace{ // OK<br>
{ Name Afs; Type Form0;<br>
BasisFunction{<br>
{Name Ni; NameOfCoef Ai; Function BF_Node;<br>
Support Omega; Entity NodesOf[All];}<br>
}<br>
Constraint {<br>
{NameOfCoef Ai; EntityType NodesOf;<br>
NameOfConstraint DirichletBC;}<br>
{NameOfCoef Ai; EntityType NodesOf;<br>
NameOfConstraint InitialData;}<br>
}<br>
}<br>
}<br>
<br>
Formulation{ // OK<br>
{Name VectorPotentialFormulation; Type FemEquation;<br>
Quantity{<br>
{Name a; Type Local; NameOfSpace Afs;}<br>
}<br>
Equation{<br>
Galerkin{ [1/mu0*Dof{Curl a},{Curl a}];<br>
In Omega; Jacobian JVol; Integration I1;}<br>
<br>
Galerkin{ DtDof[sigma[]*Dof{a},{a}];<br>
In Omega; Jacobian JVol; Integration I1;}<br>
<br>
Galerkin{ [-Jext[],{a}];<br>
In Omega_coil; Jacobian JVol; Integration I1;}<br>
}<br>
}<br>
}<br>
<br>
Resolution{<br>
{Name Solution;<br>
System{<br>
{Name Syst; NameOfFormulation VectorPotentialFormulation;}<br>
}<br>
Operation{<br>
InitSolution[Syst];SaveSolution[Syst];<br>
TimeLoopTheta[t0,tmax,dt,theta] {<br>
Generate[Syst]; Solve[Syst]; SaveSolution[Syst];<br>
}<br>
}<br>
}<br>
}<br>
<br>
PostProcessing{<br>
{Name VectorPotentialPostProc; NameOfFormulation VectorPotentialFormulation;<br>
Quantity {<br>
{Name vec_pot; Value {Local{[{a}];In Omega;Jacobian JVol;}}}<br>
}<br>
}<br>
}<br>
<br>
PostOperation{<br>
{Name Map_Vectorpotential; NameOfPostProcessing VectorPotentialPostProc;<br>
Operation{<br>
Print[vec_pot, OnElementsOf Omega, File "A.pos"];<br>
}<br>
}<br>
}<br>
</span><br>
---------------------<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">param.geo<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">---------------------<br>
<span style="font-family:"Courier New"">// param.geo: the auxiliary file<br>
<br>
// PhysicalIDs<br>
Omega_coil = 700;<br>
Omega_air = 1000;<br>
Gama_D = 500;<br>
<br>
// Geometry<br>
r_enc = 60e-3;<br>
z_enc = 40e-3;<br>
inner_radius = 59e-3/2;<br>
thick = 100e-6;<br>
width = 4e-3;<br>
<br>
// Mesh<br>
lc_air = 0.008;<br>
lc_coil = 0.5e-3;<br>
</span><br>
<br>
---------------------<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">coil.geo<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">---------------------<br>
<br>
<span style="font-family:"Courier New"">// coil.geo: creation of the geometry with GMSH<br>
// <br>
<br>
Include "param.geo";<br>
<br>
// Enclosure points<br>
p1 = newp; Point(p1) = {0,-z_enc,0,lc_air};<br>
p2 = newp; Point(p2) = {r_enc,-z_enc,0,lc_air};<br>
p3 = newp; Point(p3) = {r_enc,z_enc,0,lc_air};<br>
p4 = newp; Point(p4) = {0,z_enc,0,lc_air};<br>
<br>
// First turn points<br>
p5 = newp; Point(p5) = {inner_radius,-width/2,0,lc_coil};<br>
p6 = newp; Point(p6) = {inner_radius,width/2,0,lc_coil};<br>
p7 = newp; Point(p7) = {inner_radius+thick,width/2,0,lc_coil};<br>
p8 = newp; Point(p8) = {inner_radius+thick,-width/2,0,lc_coil};<br>
<br>
// Enclosure lines<br>
L1 = newreg; Line(L1) = {p1,p2};<br>
L2 = newreg; Line(L2) = {p2,p3};<br>
L3 = newreg; Line(L3) = {p3,p4};<br>
L4 = newreg; Line(L4) = {p4,p1};<br>
<br>
// First turn lines<br>
L5 = newreg; Line(L5) = {p5,</span>p6};<br>
<span style="font-family:"Courier New"">L6 = newreg; Line(L6) = {p6,p7};<br>
L7 = newreg; Line(L7) = {p7,p8};<br>
L8 = newreg; Line(L8) = {p8,p5};<br>
<br>
// Line loops<br>
Bound = newreg; Line Loop(Bound) = {L1,L2,L3,L4};<br>
Turn = newreg; Line Loop(Turn) = {L5,L6,L7,L8};<br>
<br>
SurfaceOmega_air = newreg; Plane Surface(SurfaceOmega_air) = {Bound,Turn};<br>
SurfaceOmega_coil = newreg; Plane Surface(SurfaceOmega_coil) = {Turn};<br>
<br>
Physical Surface(Omega_air) = {SurfaceOmega_air};<br>
Physical Surface(Omega_coil) = {SurfaceOmega_coil};<br>
<br>
// For Dirichlet bnd cnd<br>
Physical Line(Gama_D) = {L1,L2,L3};<br>
<br>
Mesh.Algorithm = 1;<br>
//Mesh.SurfaceFaces = 1;<br>
//Mesh.SurfaceNumbers = 1;<br>
//Mesh.LabelType = 2; // Show Phys ID<br>
//Mesh 2;</span><u></u><u></u></p>
</div>
</div>
</div></div></div>
</div>
</blockquote></div><br></div>