[Getdp] why adding a conductive plate in the airgap is a problem ?

Joseph Frippiat joseph_frippiat at voo.be
Sun Dec 27 16:18:25 CET 2015


The attached 2D model 'eddy4' is solved without problem.

Then I've decided to add a conductive plate in the airgap and that's the 
model 'eddy5' (also attached to this mail).

I can't solve the new model, I get lots of error like this:
Error   : '... : Unknown variable 'nan'.

What is(are) my mistake(s) ?
Do I need to change something ?
Why ?

Joseph
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: eddy4.geo
URL: <http://www.geuz.org/pipermail/getdp/attachments/20151227/d4a9effd/attachment-0004.geo>
-------------- next part --------------
/* -------------------------------------------------------------------
   File "eddy4.pro"
   ------------------------------------------------------------------- */

Include "eddy4-data.geo";

Group {

  Air    = Region[ AIR ];
  Core   = Region[ CORE ];
  Ind1   = Region[ INDUCTOR1 ];
  Ind2   = Region[ INDUCTOR2 ];
  Ind    = Region[ {Ind1, Ind2} ];
  AirInf = Region[ AIR_INF ];
  AirGap = Region[ AIR_GAP ];

  SurfaceGh0  = Region[ {} ];
  SurfaceGe0  = Region[ {} ];
  SurfaceGInf = Region[ GAMMA_INF ];

  Val_Rint = rInt;
  Val_Rext = rExt;

  DomainCC_Mag = Region[ {Air, AirInf, Ind, AirGap} ]; // air + stranded inductor + non-conducting core
  DomainC_Mag  = Region[ {Core} ]; // Massive inductor + conducting core
  DomainB_Mag  = Region[ {} ];
  DomainS_Mag  = Region[ {Ind} ]; // stranded inductor
  DomainInf    = Region[ {AirInf} ];
  Domain_Mag   = Region[ {DomainCC_Mag, DomainC_Mag} ];

}

Function {

  mu0 = 4.e-7 * Pi;

  murCore = 100.;

  nu [ #{Air, Ind, AirInf, AirGap} ]  = 1. / mu0;
  nu [ Core ]  = 1. / (murCore * mu0);
//  sigma [ Ind ] = 0;
  sigma [ Core ] = 6.4e6;

  Freq = 3.14; // Hz

}

Constraint {

  { Name MagneticVectorPotential_2D;
    Case {
      { Region SurfaceGe0; Value 0.; }
      { Region SurfaceGInf; Value 0.; }
    }
  }

  Val_I_ = 100. * Sqrt[2.] * 500.;  // 100 wires, 500Arms

  { Name SourceCurrentDensityZ;
    Case {
      { Region Ind1; Value Val_I_; }
      { Region Ind2; Value -Val_I_; }
    }
  }

  { Name Current_2D;
    Case {
    }
  }

  { Name Voltage_2D;
    Case {
      { Region Core; Value 0.; }
    }
  }

}

Include "Jacobian_Lib.pro"
Include "Integration_Lib.pro"
Include "MagDyn_av_2D.pro"

PostOperation {
  { Name Map_a; NameOfPostProcessing MagDyn_av_2D;
    Operation {
      Print[ az, OnElementsOf Domain_Mag, File "az.pos" ];
      Print[ b, OnElementsOf Domain_Mag, File "b.pos" ];
      Print[ nb, OnElementsOf Domain_Mag, File "nb.pos" ];
      Print[ h, OnElementsOf Domain_Mag, File "h.pos" ];
      Print[ j, OnElementsOf Domain_Mag, File "j.pos" ];
      Print[ jz, OnElementsOf Domain_Mag, File "jz.pos" ];
      Print[ roj2, OnElementsOf Domain_Mag, File "roj2.pos" ];
    }
  }
  { Name U_av;  NameOfPostProcessing MagDyn_av_2D;
    Operation {
      Print[ U, OnRegion Ind ];
      Print[ I, OnRegion Ind ];
    }
  }
}
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: eddy4-data.geo
URL: <http://www.geuz.org/pipermail/getdp/attachments/20151227/d4a9effd/attachment-0005.geo>
-------------- 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 ; } }
           }
         }
  }
}
-------------- 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 "MagDyn_av_2D.pro"

    Magnetodynamics - Magnetic vector potential and electric scalar 
                      potential a-v formulation (2D)
   ------------------------------------------------------------------- 

   I N P U T
   ---------

   GlobalGroup :  (Extension '_Mag' is for Magnetic problem)
   -----------
   Domain_Mag               Whole magnetic domain
   DomainCC_Mag             Nonconducting regions (not used)
   DomainC_Mag              Conducting regions
   DomainS_Mag              Inductor regions (Source)
   DomainV_Mag              All regions in movement (for speed term)

   Function :
   --------
   nu[]                     Magnetic reluctivity
   sigma[]                  Electric conductivity

   Velocity[]               Velocity of regions

   Constraint :
   ----------
   MagneticVectorPotential_2D
                            Fixed magnetic vector potential (2D)
                            (classical boundary condition)
   SourceCurrentDensityZ    Fixed source current density (in Z direction)

   Voltage_2D               Fixed voltage
   Current_2D               Fixed Current

   Parameters :
   ----------

   Freq                     Frequency (Hz)

   Parameters for time loop with theta scheme :
   Mag_Time0, Mag_TimeMax, Mag_DTime
                            Initial time, Maximum time, Time step  (s)
   Mag_Theta                Theta  (e.g. 1.  : Implicit Euler,
                                         0.5 : Cranck Nicholson)
*/

Group {
  DefineGroup[ Domain_Mag, DomainCC_Mag, DomainC_Mag,
               DomainS_Mag, DomainV_Mag ];
}

Function {
  DefineFunction[ nu, sigma ];
  DefineFunction[ Velocity ];
  DefineVariable[ Freq ];
  DefineVariable[ Mag_Time0, Mag_TimeMax, Mag_DTime, Mag_Theta ];
}

FunctionSpace {

  // Magnetic vector potential a (b = curl a)
  { Name Hcurl_a_Mag_2D; Type Form1P;
    BasisFunction {
      // a = a  s
      //      e  e
      { Name se; NameOfCoef ae; Function BF_PerpendicularEdge;
        Support Domain_Mag; Entity NodesOf[ All ]; }
    }
    Constraint {
      { NameOfCoef ae; EntityType NodesOf;
        NameOfConstraint MagneticVectorPotential_2D; }
    }
  }

  // Gradient of Electric scalar potential (2D)
  { Name Hregion_u_Mag_2D; Type Form1P;
    BasisFunction {
      { Name sr; NameOfCoef ur; Function BF_RegionZ;
        Support DomainC_Mag; Entity DomainC_Mag; }
    }
    GlobalQuantity {
      { Name U; Type AliasOf       ; NameOfCoef ur; }
      { Name I; Type AssociatedWith; NameOfCoef ur; }
    }
    Constraint {
      { NameOfCoef U; EntityType Region;
        NameOfConstraint Voltage_2D; }
      { NameOfCoef I; EntityType Region;
        NameOfConstraint Current_2D; }
    }
  }

  // Source current density js (fully fixed space)
  { Name Hregion_j_Mag_2D; Type Vector;
    BasisFunction {
      { Name sr; NameOfCoef jsr; Function BF_RegionZ;
        Support DomainS_Mag; Entity DomainS_Mag; }
    }
    Constraint {
      { NameOfCoef jsr; EntityType Region;
        NameOfConstraint SourceCurrentDensityZ; }
    }
  }

}


Formulation {
  { Name Magnetodynamics_av_2D; Type FemEquation;
    Quantity {
      { Name a ; Type Local ; NameOfSpace Hcurl_a_Mag_2D; }
      { Name ur; Type Local ; NameOfSpace Hregion_u_Mag_2D; }
      { Name I ; Type Global; NameOfSpace Hregion_u_Mag_2D [I]; }
      { Name U ; Type Global; NameOfSpace Hregion_u_Mag_2D [U]; }
      { Name js; Type Local ; NameOfSpace Hregion_j_Mag_2D; }
    }
    Equation {
      Galerkin { [ nu[] * Dof{d a} , {d a} ]; In Domain_Mag;
                 Jacobian Vol; Integration CurlCurl; }

      Galerkin { DtDof [ sigma[] * Dof{a} , {a} ]; In DomainC_Mag;
                 Jacobian Vol; Integration CurlCurl; }
      Galerkin { [ sigma[] * Dof{ur} , {a} ]; In DomainC_Mag;
                 Jacobian Vol; Integration CurlCurl; }

      Galerkin { [ - sigma[] * (Velocity[] *^ Dof{d a}) , {a} ];
                 In DomainV_Mag;
                 Jacobian Vol; Integration CurlCurl; }

      Galerkin { [ - Dof{js} , {a} ]; In DomainS_Mag;
                 Jacobian Vol;
                 Integration CurlCurl; }

      Galerkin { DtDof [ sigma[] * Dof{a} , {ur} ]; In DomainC_Mag;
                 Jacobian Vol; Integration CurlCurl; }
      Galerkin { [ sigma[] * Dof{ur} , {ur} ]; In DomainC_Mag;
                 Jacobian Vol; Integration CurlCurl; }
      GlobalTerm { [ Dof{I} , {U} ]; In DomainC_Mag; }
    }
  }
}


Resolution {
  { Name MagDyn_av_2D;
    System {
      { Name Sys_Mag; NameOfFormulation Magnetodynamics_av_2D;
        Type ComplexValue; Frequency Freq; }
    }
    Operation {
      Generate[Sys_Mag]; Solve[Sys_Mag]; SaveSolution[Sys_Mag];
    }
  }

  { Name MagDyn_t_av_2D;
    System {
      { Name Sys_Mag; NameOfFormulation Magnetodynamics_av_2D; }
    }
    Operation {
      InitSolution[Sys_Mag]; SaveSolution[Sys_Mag];
      TimeLoopTheta[Mag_Time0, Mag_TimeMax, Mag_DTime, Mag_Theta] {
        Generate[Sys_Mag]; Solve[Sys_Mag]; SaveSolution[Sys_Mag]; 
      }
    }
  }

}


PostProcessing {
  { Name MagDyn_av_2D; NameOfFormulation Magnetodynamics_av_2D;
    Quantity {
      { Name a; 
        Value { 
          Local { [ {a} ]; In Domain_Mag; Jacobian Vol; } 
        } 
      }
      { Name az; 
        Value { 
          Local { [ CompZ[{a}] ]; In Domain_Mag; Jacobian Vol; }
        }
      }
      { Name b; 
        Value { 
          Local { [ {d a} ]; In Domain_Mag; Jacobian Vol; }
        }
      }
      { Name nb;
        Value {
          Local { [ Norm[{d a}] ]; In Domain_Mag ; Jacobian Vol ; }
        }
      }
      { Name h; 
        Value { 
          Local { [ nu[] * {d a} ]; In Domain_Mag; Jacobian Vol; }
        }
      }
      { Name j; 
        Value { 
          Local { [ - sigma[]*(Dt[{a}]+{ur}) ]; In DomainC_Mag; 
                  Jacobian Vol; } 
        } 
      }
      { Name jz; 
        Value { 
          Local { [ - sigma[]*CompZ[Dt[{a}]+{ur}] ]; In DomainC_Mag; 
                  Jacobian Vol; } 
        } 
      }
      { Name roj2;
        Value { 
          Local { [ sigma[]*SquNorm[Dt[{a}]+{ur}] ]; In DomainC_Mag; 
                  Jacobian Vol; } 
        } 
      }
      { Name U; Value { Local { [ {U} ]; In DomainC_Mag; } } }
      { Name I; Value { Local { [ {I} ]; In DomainC_Mag; } } }
    }
  }
}
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: eddy5.geo
URL: <http://www.geuz.org/pipermail/getdp/attachments/20151227/d4a9effd/attachment-0006.geo>
-------------- next part --------------
/* -------------------------------------------------------------------
   File "eddy5.pro"
   ------------------------------------------------------------------- */

Include "eddy5-data.geo";

Group {

  Air    = Region[ AIR ];
  Core   = Region[ CORE ];
  Ind1   = Region[ INDUCTOR1 ];
  Ind2   = Region[ INDUCTOR2 ];
  Ind    = Region[ {Ind1, Ind2} ];
  AirInf = Region[ AIR_INF ];
  AirGap = Region[ AIR_GAP ];
  Plate  = Region[ PLATE ];

  SurfaceGh0  = Region[ {} ];
  SurfaceGe0  = Region[ {} ];
  SurfaceGInf = Region[ GAMMA_INF ];

  Val_Rint = rInt;
  Val_Rext = rExt;

  DomainCC_Mag = Region[ {Air, AirInf, Ind, AirGap} ]; // air + stranded inductor + non-conducting core
  DomainC_Mag  = Region[ {Core,Plate} ]; // Massive inductor + conducting core
  DomainB_Mag  = Region[ {} ];
  DomainS_Mag  = Region[ {Ind} ]; // stranded inductor
  DomainInf    = Region[ {AirInf} ];
  Domain_Mag   = Region[ {DomainCC_Mag, DomainC_Mag} ];

}

Function {

  mu0 = 4.e-7 * Pi;

  murCore = 100.;

  nu [ #{Air, Ind, AirInf, AirGap} ]  = 1. / mu0;
  nu [ #{Core, Plate} ]  = 1. / (murCore * mu0);
//  sigma [ Ind ] = 0;
  sigma [ #{Core, Plate} ] = 6.4e6;

  Freq = 3.14; // Hz

}

Constraint {

  { Name MagneticVectorPotential_2D;
    Case {
      { Region SurfaceGe0; Value 0.; }
      { Region SurfaceGInf; Value 0.; }
    }
  }

  Val_I_ = 100. * Sqrt[2.] * 500.;  // 100 wires, 500Arms

  { Name SourceCurrentDensityZ;
    Case {
      { Region Ind1; Value Val_I_; }
      { Region Ind2; Value -Val_I_; }
    }
  }

  { Name Current_2D;
    Case {
    }
  }

  { Name Voltage_2D;
    Case {
      { Region Core; Value 0.; }
    }
  }

}

Include "Jacobian_Lib.pro"
Include "Integration_Lib.pro"
Include "MagDyn_av_2D.pro"

PostOperation {
  { Name Map_a; NameOfPostProcessing MagDyn_av_2D;
    Operation {
      Print[ az, OnElementsOf Domain_Mag, File "az.pos" ];
      Print[ b, OnElementsOf Domain_Mag, File "b.pos" ];
      Print[ nb, OnElementsOf Domain_Mag, File "nb.pos" ];
      Print[ h, OnElementsOf Domain_Mag, File "h.pos" ];
      Print[ j, OnElementsOf Domain_Mag, File "j.pos" ];
      Print[ jz, OnElementsOf Domain_Mag, File "jz.pos" ];
      Print[ roj2, OnElementsOf Domain_Mag, File "roj2.pos" ];
    }
  }
  { Name U_av;  NameOfPostProcessing MagDyn_av_2D;
    Operation {
      Print[ U, OnRegion Ind ];
      Print[ I, OnRegion Ind ];
    }
  }
}
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: eddy5-data.geo
URL: <http://www.geuz.org/pipermail/getdp/attachments/20151227/d4a9effd/attachment-0007.geo>