Skip to content
Snippets Groups Projects
Commit 69fe0859 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

choose frequency

parent eebdf824
No related branches found
No related tags found
No related merge requests found
Pipeline #4779 passed
......@@ -14,7 +14,7 @@
To compute the solution interactively from the Gmsh GUI:
File > Open > electromagnet.pro
You may choose the Resolution in the left panel:
You may choose the Resolution in the left panel:
Magnetodynamics2D_av (default) or Magnetostatics2D_a
Run (button at the bottom of the left panel)
------------------------------------------------------------------- */
......@@ -41,9 +41,11 @@ Group {
Function {
DefineConstant[
murCore = {100, Name "Model parameters/Mur core"},
Current = {0.01, Name "Model parameters/Current"}
Current = {0.01, Name "Model parameters/Current"},
frequency = {1, Name "Model parameters/Frequency"}
];
Freq = frequency;
mu0 = 4.e-7 * Pi;
nu[ Region[{Air, Ind, AirInf}] ] = 1. / mu0;
nu[ Core ] = 1. / (murCore * mu0);
......@@ -86,6 +88,7 @@ PostOperation {
Operation {
Print[ a, OnElementsOf Vol_Mag, File "a.pos" ];
Print[ b, OnElementsOf Vol_Mag, File "b.pos" , HarmonicToTime 20];
Print[ j, OnElementsOf Vol_Mag, File "j.pos", HarmonicToTime 20];
}
}
}
......@@ -215,6 +215,7 @@ PostOperation {
Print[ b, OnElementsOf Vol_Mag, Format Gmsh, File "b.pos" ];
Print[ az, OnElementsOf Vol_Mag, Format Gmsh, File "az.pos" ];
If (type_Analysis == 1) // frequency domain
If (type_Source == 1) // current
// In text file UI.txt: voltage and current for each coil portion (note
// that the voltage is not equally distributed in PLUS and MINUS
......@@ -246,6 +247,7 @@ PostOperation {
Print[ U, OnRegion R_out, Format FrequencyTable, File > "UI.txt" ];
Print[ I, OnRegion R_out, Format FrequencyTable, File > "UI.txt"];
EndIf
EndIf
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment