[Getdp] Inductor Solenoid/Calculate Inductance

ansarimikail at gmail.com ansarimikail at gmail.com
Wed May 18 15:08:39 CEST 2016


Good day
I have an inductor/solenoid model.
I am attempting to compute the inductance from the magnetic energy based on 
the tutorial example.
I adapted the following code, to include Magnetic Energy and 
Inductance_from_MagEnergy.  But no inductance value is displayed.

PostProcessing {
  { Name MagSta_phi; NameOfFormulation MagSta_phi;
    Quantity {
      { Name b; Value { Local { [ - mu[-{d phi}] * {d phi} ]; In Domain; 
Jacobian JVol; }
                        Local { [ - mu[] * hc[] ]; In Domain_M; Jacobian 
JVol; } } }
      { Name h; Value { Local { [ - {d phi} ]; In Domain; Jacobian JVol; } 
} }
      { Name hc; Value { Local { [ hc[] ]; In Domain_M; Jacobian JVol; } } }
      { Name phi; Value { Local { [ {phi} ]; In Domain; Jacobian JVol; } } }

    }
  }
  { Name MagSta_a; NameOfFormulation MagSta_a;
    Quantity {
      { Name az; Value { Local { [ CompZ[{a}] ]; In Domain; Jacobian JVol; 
} } }
      { Name b; Value { Local { [ {d a} ]; In Domain; Jacobian JVol; } } }
      { Name a; Value { Local { [ {a} ]; In Domain; Jacobian JVol; } } }
      { Name h; Value { Local { [ nu[{d a}] * {d a} ]; In Domain; Jacobian 
JVol; }
                        Local { [ hc[] ]; In Domain_M; Jacobian JVol; } } }
      { Name hc; Value { Local { [ hc[] ]; In Domain_M; Jacobian JVol; } } }
      { Name js; Value { Local { [ js[] ]; In Domain_S; Jacobian JVol; } } }
      { Name MagEnergy ; Value { Integral { [ 1/2 *nu[{d a}] * {d a} ]; In 
Domain; Jacobian JVol; } } }
      { Name Inductance_from_MagEnergy ; Value { Term { Type Global; [ 2 * 
$MagEnergy * 1e3/(100*100) ] ; In DomainDummy ; } } }
    }
  }
  
}

PostOperation {
  { Name MagSta_phi; NameOfPostProcessing MagSta_phi;
    Operation {
      Print[ b, OnElementsOf Domain, File StrCat[resPath, 
"MagSta_phi_b.pos"] ];
      Print[ h, OnElementsOf Domain, File StrCat[resPath, 
"MagSta_phi_h.pos"] ];
      Print[ hc, OnElementsOf Domain_M, File StrCat[resPath, 
"MagSta_a_hc.pos"] ];
      Print[ phi, OnElementsOf Domain, File StrCat[resPath, 
"MagSta_phi_phi.pos"] ];
    }
  }
  { Name MagSta_a; NameOfPostProcessing MagSta_a;
    Operation {
      Print[ b, OnElementsOf Domain, File StrCat[resPath, "MagSta_a_b.pos"] 
];
      Print[ h, OnElementsOf Domain, File StrCat[resPath, "MagSta_a_h.pos"] 
];
      Print[ hc, OnElementsOf Domain_M, File StrCat[resPath, 
"MagSta_a_hc.pos"] ];
      Print[ js, OnElementsOf Domain_S, File StrCat[resPath, 
"MagSta_a_js.pos"] ];
      Print[ az, OnElementsOf Domain, File StrCat[resPath, 
"MagSta_a_az.pos"] ];
           Print[ MagEnergy[Domain], OnGlobal, Format TimeTable,
     File > StrCat[Dir,"ME",ExtGnuplot], LastTimeStepOnly, StoreInVariable 
$MagEnergy,
     SendToServer StrCat[po,"41Magnetic Energy [W]"],  Color "LightYellow" 
];

   Print[ Inductance_from_MagEnergy, OnRegion DomainDummy, Format Table, 
LastTimeStepOnly,
     File StrCat[Dir,"InductanceE",ExtGnuplot],
     SendToServer StrCat[po,"51Inductance from Magnetic Energy [mH]"], 
Color "LightYellow" ];
    }
  }

}
}


Kind Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/getdp/attachments/20160518/afa6f26d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: simple_coil.geo
Type: application/octet-stream
Size: 1055 bytes
Desc: not available
URL: <http://onelab.info/pipermail/getdp/attachments/20160518/afa6f26d/attachment-0001.geo>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Magnetostatics.pro
Type: application/octet-stream
Size: 20817 bytes
Desc: not available
URL: <http://onelab.info/pipermail/getdp/attachments/20160518/afa6f26d/attachment-0004.pro>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MaterialDatabase.pro
Type: application/octet-stream
Size: 4043 bytes
Desc: not available
URL: <http://onelab.info/pipermail/getdp/attachments/20160518/afa6f26d/attachment-0005.pro>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MaterialMacros.pro
Type: application/octet-stream
Size: 3159 bytes
Desc: not available
URL: <http://onelab.info/pipermail/getdp/attachments/20160518/afa6f26d/attachment-0006.pro>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: simple_coil.pro
Type: application/octet-stream
Size: 626 bytes
Desc: not available
URL: <http://onelab.info/pipermail/getdp/attachments/20160518/afa6f26d/attachment-0007.pro>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Inductor Solenoid.PNG
Type: image/png
Size: 149002 bytes
Desc: not available
URL: <http://onelab.info/pipermail/getdp/attachments/20160518/afa6f26d/attachment-0001.PNG>


More information about the getdp mailing list