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

sync with template + fix static postop

parent 8366d870
No related branches found
No related tags found
No related merge requests found
Pipeline #7589 passed
...@@ -408,6 +408,7 @@ Resolution { ...@@ -408,6 +408,7 @@ Resolution {
} }
} }
Operation { Operation {
CreateDirectory[resPath];
If(Flag_FrequencyDomain) If(Flag_FrequencyDomain)
Generate[A]; Solve[A]; SaveSolution[A]; Generate[A]; Solve[A]; SaveSolution[A];
Else Else
...@@ -438,6 +439,7 @@ Resolution { ...@@ -438,6 +439,7 @@ Resolution {
{ Name A; NameOfFormulation Magnetostatics2D_a; } { Name A; NameOfFormulation Magnetostatics2D_a; }
} }
Operation { Operation {
CreateDirectory[resPath];
InitSolution[A]; InitSolution[A];
Generate[A]; Solve[A]; Generate[A]; Solve[A];
If(NbrRegions[Vol_NL_Mag]) If(NbrRegions[Vol_NL_Mag])
...@@ -473,6 +475,10 @@ PostProcessing { ...@@ -473,6 +475,10 @@ PostProcessing {
Term { [ CompZ[{a}] ]; In Vol_Mag; Jacobian Vol; } Term { [ CompZ[{a}] ]; In Vol_Mag; Jacobian Vol; }
} }
} }
{ Name xaz; Value {
Term { [ X[] * CompZ[{a}] ]; In Vol_Mag; Jacobian Vol; }
}
}
{ Name b; Value { { Name b; Value {
Term { [ {d a} ]; In Vol_Mag; Jacobian Vol; } Term { [ {d a} ]; In Vol_Mag; Jacobian Vol; }
} }
...@@ -542,6 +548,10 @@ PostProcessing { ...@@ -542,6 +548,10 @@ PostProcessing {
Term { [ CompZ[{a}] ]; In Vol_Mag; Jacobian Vol; } Term { [ CompZ[{a}] ]; In Vol_Mag; Jacobian Vol; }
} }
} }
{ Name xaz; Value {
Term { [ X[] * CompZ[{a}] ]; In Vol_Mag; Jacobian Vol; }
}
}
{ Name b; Value { { Name b; Value {
Term { [ {d a} ]; In Vol_Mag; Jacobian Vol; } Term { [ {d a} ]; In Vol_Mag; Jacobian Vol; }
} }
...@@ -556,6 +566,9 @@ PostProcessing { ...@@ -556,6 +566,9 @@ PostProcessing {
Term { [ Vector[0,0,0] ]; In Vol_Mag; Jacobian Vol; } Term { [ Vector[0,0,0] ]; In Vol_Mag; Jacobian Vol; }
} }
} }
{ Name flux; Value {
Integral { [ CoefGeos[] * Ns[] / Sc[] * CompZ[{a}] ];
In Vol_S_Mag; Jacobian Vol; Integration Gauss_v; } } }
} }
} }
} }
...@@ -8,13 +8,13 @@ ...@@ -8,13 +8,13 @@
current source current source
To compute the static solution in a terminal: To compute the static solution in a terminal:
getdp electromagnet -solve Magnetostatics2D_a -pos Map_a getdp electromagnet -solve Magnetostatics2D_a -pos sta
To compute the frequency-domain solution in a terminal: To compute the frequency-domain solution in a terminal:
getdp electromagnet -solve Magnetodynamics2D_av -pos Map_a getdp electromagnet -solve Magnetodynamics2D_av -pos dyn
To compute the time-dependent dynamic solution in a terminal: To compute the time-dependent dynamic solution in a terminal:
getdp electromagnet -setnumber TimeDomain 1 -solve Magnetodynamics2D_av -pos Map_a getdp electromagnet -setnumber TimeDomain 1 -solve Magnetodynamics2D_av -pos dyn
To compute the solution interactively from the Gmsh GUI: To compute the solution interactively from the Gmsh GUI:
File > Open > electromagnet.pro File > Open > electromagnet.pro
...@@ -113,7 +113,14 @@ Constraint { ...@@ -113,7 +113,14 @@ Constraint {
Include "Lib_Magnetodynamics2D_av_Cir.pro"; Include "Lib_Magnetodynamics2D_av_Cir.pro";
PostOperation { PostOperation {
{ Name Map_a; NameOfPostProcessing Magnetodynamics2D_av; { Name dyn; NameOfPostProcessing Magnetodynamics2D_av;
Operation {
Print[ a, OnElementsOf Vol_Mag, File "a.pos" ];
Print[ b, OnElementsOf Vol_Mag, File "b.pos" ];
Print[ j, OnElementsOf Vol_Mag, File "j.pos" ];
}
}
{ Name sta; NameOfPostProcessing Magnetostatics2D_a;
Operation { Operation {
Print[ a, OnElementsOf Vol_Mag, File "a.pos" ]; Print[ a, OnElementsOf Vol_Mag, File "a.pos" ];
Print[ b, OnElementsOf Vol_Mag, File "b.pos" ]; Print[ b, OnElementsOf Vol_Mag, File "b.pos" ];
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
- Circuit coupling used as a black-box (see Tutorial 8 for details) - Circuit coupling used as a black-box (see Tutorial 8 for details)
To compute the solution in a terminal: To compute the solution in a terminal:
getdp transfo -solve Magnetodynamics2D_av -pos Map_a getdp transfo -solve Magnetodynamics2D_av -pos dyn
To compute the solution interactively from the Gmsh GUI: To compute the solution interactively from the Gmsh GUI:
File > Open > transfo.pro File > Open > transfo.pro
...@@ -21,8 +21,7 @@ DefineConstant[ ...@@ -21,8 +21,7 @@ DefineConstant[
// way as far as circuit-coupling is concerned // way as far as circuit-coupling is concerned
ConductorType = {2, Choices{1 = "Massive", 2 = "Coil"}, Highlight "Blue", ConductorType = {2, Choices{1 = "Massive", 2 = "Coil"}, Highlight "Blue",
Name "Parameters/01Conductor type"} Name "Parameters/01Conductor type"}
Freq = {1, Min 0, Max 1e3, Step 1, Freq = {1, Min 0, Max 1e3, Step 1, Name "Parameters/Frequency"}
Name "Parameters/Frequency"}
mur_Core = {1000, Min 1, Max 10000, Step 1, mur_Core = {1000, Min 1, Max 10000, Step 1,
Name "Parameters/Core relative permeability"} Name "Parameters/Core relative permeability"}
]; ];
...@@ -190,7 +189,7 @@ Constraint { ...@@ -190,7 +189,7 @@ Constraint {
Include "Lib_Magnetodynamics2D_av_Cir.pro"; Include "Lib_Magnetodynamics2D_av_Cir.pro";
PostOperation { PostOperation {
{ Name Map_a; NameOfPostProcessing Magnetodynamics2D_av; { Name dyn; NameOfPostProcessing Magnetodynamics2D_av;
Operation { Operation {
Print[ j, OnElementsOf Region[{Vol_C_Mag, Vol_S_Mag}], Format Gmsh, File "j.pos" ]; Print[ j, OnElementsOf Region[{Vol_C_Mag, Vol_S_Mag}], Format Gmsh, File "j.pos" ];
Print[ b, OnElementsOf Vol_Mag, Format Gmsh, File "b.pos" ]; Print[ b, OnElementsOf Vol_Mag, Format Gmsh, File "b.pos" ];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment