diff --git a/Modelica/Magnetic/FluxTubes/BaseClasses/FixedShape.mo b/Modelica/Magnetic/FluxTubes/BaseClasses/FixedShape.mo index 3ae8378627..e6ddc1b5dd 100644 --- a/Modelica/Magnetic/FluxTubes/BaseClasses/FixedShape.mo +++ b/Modelica/Magnetic/FluxTubes/BaseClasses/FixedShape.mo @@ -1,42 +1,57 @@ within Modelica.Magnetic.FluxTubes.BaseClasses; partial model FixedShape "Base class for flux tubes with fixed shape during simulation; linear or non-linear material characteristics" + import Modelica.Magnetic.FluxTubes.Types.Magnetization; - extends Interfaces.TwoPort; - + // Material + // This parameter is kept for backwards compatibility reasons, might be replaced by a member "Linear" in the enumeration Magnetization parameter Boolean nonLinearPermeability=true "= true, if non-linear rel. permeability is used, otherwise constant rel. permeability" - annotation (Dialog(group="Material"), Evaluate=true); + annotation (Dialog(tab="Material"), Evaluate=true); parameter SI.RelativePermeability mu_rConst=1 - "Constant relative permeability; used if nonLinearPermeability = false" - annotation (Dialog(group="Material", enable=not nonLinearPermeability)); - - parameter FluxTubes.Material.SoftMagnetic.BaseData material= - Material.SoftMagnetic.BaseData() - "Ferromagnetic material characteristics; used if nonLinearPermeability = true" - annotation (choicesAllMatching=true, Dialog(group="Material", enable= - nonLinearPermeability)); - + "Constant relative permeability; used if nonLinearPermeability=false" + annotation (Dialog(tab="Material", enable=not nonLinearPermeability)); + parameter Magnetization magnetization=Magnetization.Roschke + "Choose the approximation of the magnetization characteristic" + annotation (Evaluate=true, Dialog(tab="Material", enable=nonLinearPermeability)); + parameter Modelica.Magnetic.FluxTubes.Material.SoftMagnetic.BaseData + material=Modelica.Magnetic.FluxTubes.Material.SoftMagnetic.BaseData() + "Ferromagnetic material characteristics, approximation according to Roschke" + annotation (choicesAllMatching=true, Dialog(tab="Material", + enable=nonLinearPermeability and magnetization==Magnetization.Roschke)); + parameter Modelica.Magnetic.FluxTubes.Material.SoftMagnetic.Macfadyen.BaseData + materialMacfadyen=Modelica.Magnetic.FluxTubes.Material.SoftMagnetic.Macfadyen.BaseData() + "Ferromagnetic material characteristics, approximation according to Macfadyen" + annotation (choicesAllMatching=true, Dialog(tab="Material", + enable=nonLinearPermeability and magnetization == Magnetization.Macfadyen)); + + extends Modelica.Magnetic.FluxTubes.Interfaces.TwoPort; + input SI.CrossSection A "Cross-sectional area"; SI.Reluctance R_m "Magnetic reluctance"; SI.Permeance G_m "Magnetic permeance"; - SI.MagneticFluxDensity B "Magnetic flux density"; - SI.CrossSection A "Cross-sectional area penetrated by magnetic flux"; - SI.MagneticFieldStrength H "Magnetic field strength"; - - SI.RelativePermeability mu_r "Relative magnetic permeability"; - + SI.MagneticFluxDensity B(start=0) "Magnetic flux density"; + SI.MagneticPolarization J "Magnetic polarization"; + SI.MagneticFieldStrength H(start=0) "Magnetic field strength"; + SI.RelativePermeability mu_r(start=mu_rConst) "Relative magnetic permeability"; protected - Real B_N "Absolute value of normalized B"; - + Real B_N=abs(B/material.B_myMax) "Absolute value of normalized B"; + constant Real epsilon=1e3*Modelica.Constants.eps; equation - B_N = abs(B/material.B_myMax); - mu_r = if nonLinearPermeability then - 1 + (material.mu_i - 1 + material.c_a*B_N)/(1 + material.c_b*B_N + B_N^material.n) else mu_rConst; - R_m = 1/G_m; V_m = Phi*R_m; - B = Phi/A; - H = B/(mu_0*mu_r); - + if nonLinearPermeability then + if magnetization == Magnetization.Roschke then + mu_r = 1 + (material.mu_i - 1 + material.c_a*B_N)/(1 + material.c_b*B_N + B_N^material.n); + else // if magnetization == Magnetization.Macfadyen then + mu_r = smooth(1, (if noEvent(abs(H)Shapes.FixedShape for utilisation of this partial model. diff --git a/Modelica/Magnetic/FluxTubes/Examples/BasicExamples/CompareModels.mo b/Modelica/Magnetic/FluxTubes/Examples/BasicExamples/CompareModels.mo new file mode 100644 index 0000000000..81651e8356 --- /dev/null +++ b/Modelica/Magnetic/FluxTubes/Examples/BasicExamples/CompareModels.mo @@ -0,0 +1,112 @@ +within Modelica.Magnetic.FluxTubes.Examples.BasicExamples; +model CompareModels "Compare non-hysteretic model and Tellinen/Everett" + extends Modelica.Icons.Example; + parameter SI.Current I=1 "Excitation peak current"; + SI.MagneticFieldStrength H1=coreNon_Hys.H "Field Strength in non-hysteretic core"; + SI.MagneticFluxDensity B1=coreNon_Hys.B "Flux Density in non-hysteretic core"; + SI.MagneticPolarization J1=B1 - mu_0*H1 "Magnetic polarisation in non-hysteretic core"; + SI.MagneticFieldStrength H2=coreEverett.H "Field Strength in hysteretic core = H1"; + SI.MagneticFluxDensity B2=coreEverett.B "Flux Density in hysteretic core"; + SI.MagneticPolarization J2=B2 - mu_0*H2 "Magnetic polarisation in hysteretic core"; + Modelica.Electrical.Analog.Sources.SignalCurrent signalCurrent1 annotation ( + Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=90, + origin={0,50}))); + Modelica.Electrical.Analog.Sources.SignalCurrent signalCurrent2 annotation ( + Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=90, + origin={0,-50}))); + Modelica.Electrical.Analog.Basic.Ground groundE1 + annotation (Placement(transformation(extent={{-10,10},{10,30}}))); + Modelica.Electrical.Analog.Basic.Ground groundE2 + annotation (Placement(transformation(extent={{-10,-90},{10,-70}}))); + Modelica.Magnetic.FluxTubes.Basic.ElectroMagneticConverter excitingCoil1(N=700) + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={20,50}))); + Modelica.Magnetic.FluxTubes.Basic.ElectroMagneticConverter excitingCoil2(N=700) + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={20,-50}))); + Modelica.Magnetic.FluxTubes.Shapes.FixedShape.GenericFluxTube + coreNon_Hys( + magnetization=Modelica.Magnetic.FluxTubes.Types.Magnetization.Macfadyen, + mu_rConst=1000, + material= + Modelica.Magnetic.FluxTubes.Material.SoftMagnetic.ElectricSheet.M330_50A(), + materialMacfadyen= + Modelica.Magnetic.FluxTubes.Material.SoftMagnetic.Macfadyen.M330_50A(), + area=0.000112, + l=0.94) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=270, + origin={40,50}))); + Modelica.Magnetic.FluxTubes.Shapes.HysteresisAndMagnets.GenericHystTellinenEverett + coreEverett( + mat=Modelica.Magnetic.FluxTubes.Material.HysteresisEverettParameter.M330_50A(), + l=0.94, + A=0.000112, + MagRel(fixed=true)) + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=270, + origin={40,-50}))); + Modelica.Magnetic.FluxTubes.Basic.Ground groundM1 + annotation (Placement(transformation(extent={{30,10},{50,30}}))); + Modelica.Magnetic.FluxTubes.Basic.Ground groundM2 + annotation (Placement(transformation(extent={{30,-90},{50,-70}}))); + Modelica.Blocks.Sources.Sine sine(amplitude=I, f=50) annotation (Placement( + transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={-50,0}))); +equation + connect(signalCurrent1.p, groundE1.p) + annotation (Line(points={{0,40},{0,30}}, color={0,0,255})); + connect(signalCurrent2.p, groundE2.p) + annotation (Line(points={{0,-60},{0,-70}}, color={0,0,255})); + connect(signalCurrent1.n, excitingCoil1.p) + annotation (Line(points={{0,60},{10,60}}, color={0,0,255})); + connect(signalCurrent1.p, excitingCoil1.n) + annotation (Line(points={{0,40},{10,40}}, color={0,0,255})); + connect(signalCurrent2.n, excitingCoil2.p) + annotation (Line(points={{0,-40},{10,-40}}, color={0,0,255})); + connect(signalCurrent2.p, excitingCoil2.n) + annotation (Line(points={{0,-60},{10,-60}}, color={0,0,255})); + connect(coreNon_Hys.port_n, groundM1.port) + annotation (Line(points={{40,40},{40,30}}, color={255,127,0})); + connect(excitingCoil1.port_n, coreNon_Hys.port_n) + annotation (Line(points={{30,40},{40,40}}, color={255,127,0})); + connect(excitingCoil1.port_p, coreNon_Hys.port_p) + annotation (Line(points={{30,60},{40,60}}, color={255,127,0})); + connect(coreEverett.port_n, groundM2.port) + annotation (Line(points={{40,-60},{40,-70}}, color={255,127,0})); + connect(excitingCoil2.port_n, coreEverett.port_n) + annotation (Line(points={{30,-60},{40,-60}}, color={255,127,0})); + connect(excitingCoil2.port_p, coreEverett.port_p) + annotation (Line(points={{30,-40},{40,-40}}, color={255,127,0})); + connect(sine.y, signalCurrent1.i) annotation (Line(points={{-39,0},{-20,0},{-20, + 50},{-12,50}}, color={0,0,127})); + connect(sine.y, signalCurrent2.i) annotation (Line(points={{-39,0},{-20,0},{-20, + -50},{-12,-50}}, color={0,0,127})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false)), + experiment( + StopTime=0.1, + Interval=1e-05, + Tolerance=1e-06), + Documentation(info=" +

+This model compares the magnetization characteristic of a non-hysteretic model with a Tellinen/Everett-model including hysteresis, both for M330-50A. +

+

+Plot B1 (flux density of the non-hysteretic model) and B1 (flux density of the hysteretic model) +versus H1 (field strength, which is the same as H2 due to the same geometry of the core and the same excitation). +Try different excitation peak currents I. +

+")); +end CompareModels; diff --git a/Modelica/Magnetic/FluxTubes/Examples/BasicExamples/EIcore.mo b/Modelica/Magnetic/FluxTubes/Examples/BasicExamples/EIcore.mo new file mode 100644 index 0000000000..06854692f8 --- /dev/null +++ b/Modelica/Magnetic/FluxTubes/Examples/BasicExamples/EIcore.mo @@ -0,0 +1,172 @@ +within Modelica.Magnetic.FluxTubes.Examples.BasicExamples; +model EIcore "An iron core with shape E and I" + extends Modelica.Icons.Example; + parameter SI.Length delta=0.5e-3 "Air gap"; + parameter SI.Current I=5 "Excitation current"; + parameter Modelica.Magnetic.FluxTubes.Material.SoftMagnetic.MaterialSettings + materialSettings(magnetization=Modelica.Magnetic.FluxTubes.Types.Magnetization.Macfadyen, + materialMacfadyen= + Modelica.Magnetic.FluxTubes.Material.SoftMagnetic.Macfadyen.M330_50A()) + annotation (Placement(transformation(extent={{20,50},{40,70}}))); + Modelica.Magnetic.FluxTubes.Shapes.FixedShape.Cuboid yokeUL( + nonLinearPermeability=materialSettings.nonLinearPermeability, + mu_rConst=materialSettings.mu_rConst, + magnetization=materialSettings.magnetization, + material=materialSettings.material, + materialMacfadyen=materialSettings.materialMacfadyen, + l(displayUnit="mm") = 0.075, + a(displayUnit="mm") = 0.04, + b(displayUnit="mm") = 0.02) + "Upper Left yoke" annotation (Placement(transformation(extent={{-40,90},{-60,70}}))); + Modelica.Magnetic.FluxTubes.Shapes.FixedShape.Cuboid yokeUR( + nonLinearPermeability=materialSettings.nonLinearPermeability, + mu_rConst=materialSettings.mu_rConst, + magnetization=materialSettings.magnetization, + material=materialSettings.material, + materialMacfadyen=materialSettings.materialMacfadyen, + l(displayUnit="mm") = 0.075, + a(displayUnit="mm") = 0.04, + b(displayUnit="mm") = 0.02) + "Upper RIght yoke" annotation (Placement(transformation(extent={{40,70},{60,90}}))); + Modelica.Magnetic.FluxTubes.Shapes.FixedShape.Cuboid yokeLL( + nonLinearPermeability=materialSettings.nonLinearPermeability, + mu_rConst=materialSettings.mu_rConst, + magnetization=materialSettings.magnetization, + material=materialSettings.material, + materialMacfadyen=materialSettings.materialMacfadyen, + l(displayUnit="mm") = 0.075, + a(displayUnit="mm") = 0.04, + b(displayUnit="mm") = 0.02) + "Lower Left yoke" annotation (Placement(transformation(extent={{-60,-90},{-40,-70}}))); + Modelica.Magnetic.FluxTubes.Shapes.FixedShape.Cuboid yokeLR( + nonLinearPermeability=materialSettings.nonLinearPermeability, + mu_rConst=materialSettings.mu_rConst, + magnetization=materialSettings.magnetization, + material=materialSettings.material, + materialMacfadyen=materialSettings.materialMacfadyen, + l(displayUnit="mm") = 0.075, + a(displayUnit="mm") = 0.04, + b(displayUnit="mm") = 0.02) + "Lower Right yoke" annotation (Placement(transformation(extent={{60,-90},{40,-70}}))); + Modelica.Magnetic.FluxTubes.Shapes.FixedShape.Cuboid legL( + nonLinearPermeability=materialSettings.nonLinearPermeability, + mu_rConst=materialSettings.mu_rConst, + magnetization=materialSettings.magnetization, + material=materialSettings.material, + materialMacfadyen=materialSettings.materialMacfadyen, + l(displayUnit="mm") = 0.1, + a(displayUnit="mm") = 0.04, + b(displayUnit="mm") = 0.02) + "Left leg" annotation (Placement(transformation( + extent={{10,10},{-10,-10}}, + rotation=90, + origin={-80,0}))); + Modelica.Magnetic.FluxTubes.Shapes.FixedShape.Cuboid legR( + nonLinearPermeability=materialSettings.nonLinearPermeability, + mu_rConst=materialSettings.mu_rConst, + magnetization=materialSettings.magnetization, + material=materialSettings.material, + materialMacfadyen=materialSettings.materialMacfadyen, + l(displayUnit="mm") = 0.1, + a(displayUnit="mm") = 0.04, + b(displayUnit="mm") = 0.02) + "Right leg" annotation (Placement(transformation( + extent={{10,10},{-10,-10}}, + rotation=90, + origin={80,0}))); + Modelica.Magnetic.FluxTubes.Shapes.FixedShape.Cuboid legM( + nonLinearPermeability=materialSettings.nonLinearPermeability, + mu_rConst=materialSettings.mu_rConst, + magnetization=materialSettings.magnetization, + material=materialSettings.material, + materialMacfadyen=materialSettings.materialMacfadyen, + l(displayUnit="mm") = 0.1 - delta, + a(displayUnit="mm") = 0.04, + b(displayUnit="mm") = 0.04) + "Middle leg" annotation (Placement(transformation(extent={{10,10},{-10, + -10}}, rotation=270))); + Modelica.Magnetic.FluxTubes.Shapes.FixedShape.Cuboid airgap( + nonLinearPermeability=false, + mu_rConst=1, + l(displayUnit="mm") = delta, + a(displayUnit="mm") = 0.04, + b(displayUnit="mm") = 0.04) + "Airgap" annotation (Placement(transformation( + extent={{10,10},{-10,-10}}, + rotation=270, + origin={0,-30}))); + Modelica.Magnetic.FluxTubes.Basic.Ground groundM + annotation (Placement(transformation(extent={{-10,-100},{10,-80}}))); + Modelica.Magnetic.FluxTubes.Basic.ElectroMagneticConverter coil(N=100) + annotation (Placement(transformation(extent={{-20,20},{0,40}}))); + Modelica.Electrical.Analog.Sources.SineCurrent sineCurrent(I=I, f=10) + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=90, + origin={-60,30}))); + Modelica.Electrical.Analog.Basic.Ground groundE + annotation (Placement(transformation(extent={{-50,0},{-30,20}}))); + Modelica.Magnetic.FluxTubes.Sensors.MagneticFluxSensor magFluxSensor + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=90, + origin={0,-60}))); + Modelica.Blocks.Math.Gain fluxDensity(k=1/(airgap.a*airgap.b)) + annotation (Placement(transformation(extent={{20,-70},{40,-50}}))); +equation + connect(coil.port_p, yokeUL.port_p) + annotation (Line(points={{0,40},{0,80},{-40,80}}, color={255,127,0})); + connect(yokeUL.port_n, legL.port_p) + annotation (Line(points={{-60,80},{-80,80},{-80,10}}, color={255,127,0})); + connect(legL.port_n, yokeLL.port_p) annotation (Line(points={{-80,-10},{-80,-80}, + {-60,-80}}, color={255,127,0})); + connect(yokeLL.port_n, groundM.port) + annotation (Line(points={{-40,-80},{0,-80}}, color={255,127,0})); + connect(groundM.port, yokeLR.port_n) + annotation (Line(points={{0,-80},{40,-80}}, color={255,127,0})); + connect(yokeLR.port_p, legR.port_n) + annotation (Line(points={{60,-80},{80,-80},{80,-10}}, color={255,127,0})); + connect(legR.port_p, yokeUR.port_n) + annotation (Line(points={{80,10},{80,80},{60,80}}, color={255,127,0})); + connect(yokeUR.port_p, yokeUL.port_p) + annotation (Line(points={{40,80},{-40,80}}, color={255,127,0})); + connect(coil.port_n, legM.port_n) + annotation (Line(points={{0,20},{0,10}}, color={255,127,0})); + connect(legM.port_p, airgap.port_n) + annotation (Line(points={{0,-10},{0,-20}}, color={255,127,0})); + connect(sineCurrent.n, coil.p) + annotation (Line(points={{-60,40},{-20,40}}, color={0,0,255})); + connect(sineCurrent.p,groundE. p) + annotation (Line(points={{-60,20},{-40,20}}, color={0,0,255})); + connect(groundE.p, coil.n) + annotation (Line(points={{-40,20},{-20,20}}, color={0,0,255})); + connect(magFluxSensor.Phi, fluxDensity.u) + annotation (Line(points={{10,-60},{18,-60}}, color={0,0,127})); + connect(magFluxSensor.port_p, groundM.port) + annotation (Line(points={{0,-70},{0,-80}}, color={255,127,0})); + connect(airgap.port_p, magFluxSensor.port_n) + annotation (Line(points={{0,-40},{0,-50}}, color={255,127,0})); + annotation (experiment( + Interval=0.0001, + Tolerance=1e-06), Documentation(info=" +

+This is a core shaped as an E and an I with an airgap. +

+ + + + + +
Fig. 1: EI - core
+ +
+

+You might vary different parameters: +

+ +")); +end EIcore; diff --git a/Modelica/Magnetic/FluxTubes/Examples/BasicExamples/ShowMaterial.mo b/Modelica/Magnetic/FluxTubes/Examples/BasicExamples/ShowMaterial.mo new file mode 100644 index 0000000000..b9a3e2b87f --- /dev/null +++ b/Modelica/Magnetic/FluxTubes/Examples/BasicExamples/ShowMaterial.mo @@ -0,0 +1,127 @@ +within Modelica.Magnetic.FluxTubes.Examples.BasicExamples; +model ShowMaterial "Show material characteristic" + extends Modelica.Icons.Example; + parameter SI.Current I=1 "Peak exciting current"; + SI.MagneticFieldStrength H=coreNon_Hys.H "Magnetic field strength"; + SI.MagneticPolarization J=coreNon_Hys.B - mu_0*H "Magnetic polarization"; + SI.RelativePermeability mu_r=coreNon_Hys.mu_r "Relative permeability"; + SI.MagneticPolarization J_rD=combiTable1Ds.y[1] "Magnetic polarization from raw data"; + SI.RelativePermeability mu_r_rD=combiTable1Ds.y[2] "Relative permability from raw data"; + Modelica.Electrical.Analog.Sources.SineCurrent source(I=I, f=50) annotation ( + Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=90, + origin={-80,0}))); + Modelica.Electrical.Analog.Basic.Ground groundE1 + annotation (Placement(transformation(extent={{-90,-40},{-70,-20}}))); + Modelica.Magnetic.FluxTubes.Basic.ElectroMagneticConverter excitingCoil(N=700) + annotation (Placement(transformation(extent={{-60,-10},{-40,10}},rotation=0))); + Modelica.Magnetic.FluxTubes.Shapes.FixedShape.GenericFluxTube + coreNon_Hys( + magnetization=Modelica.Magnetic.FluxTubes.Types.Magnetization.Macfadyen, + material= + Modelica.Magnetic.FluxTubes.Material.SoftMagnetic.ElectricSheet.M330_50A(), + materialMacfadyen= + Modelica.Magnetic.FluxTubes.Material.SoftMagnetic.Macfadyen.M330_50A(), + area=0.000112, + l=0.94, + mu_rConst=1000) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={-20,10}))); + Modelica.Magnetic.FluxTubes.Basic.Ground groundM + annotation (Placement(transformation(extent={{-30,-40},{-10,-20}}))); + Modelica.Magnetic.FluxTubes.Basic.ElectroMagneticConverter measurementCoil(N=700) + annotation (Placement(transformation( + extent={{-10,10},{10,-10}}, + rotation=180, + origin={10,0}))); + Modelica.Electrical.Analog.Sensors.VoltageSensor voltageSensor annotation ( + Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=90, + origin={40,0}))); + Modelica.Blocks.Continuous.Integrator integrator(k=1/measurementCoil.N) + annotation (Placement(transformation(extent={{70,-10},{90,10}}))); + Modelica.Electrical.Analog.Basic.Ground groundE2 + annotation (Placement(transformation(extent={{10,-40},{30,-20}}))); + Modelica.Blocks.Math.Harmonic harmonic1(f=source.f, k=1) + annotation (Placement(transformation(extent={{70,-40},{90,-20}}))); + Modelica.Blocks.Math.Harmonic harmonic3(f=source.f, k=3) + annotation (Placement(transformation(extent={{70,-70},{90,-50}}))); + Modelica.Magnetic.FluxTubes.Sensors.MagneticPotentialDifferenceSensor + magVoltageSensor + annotation (Placement(transformation(extent={{-30,40},{-10,20}}))); + Modelica.Blocks.Math.Gain gain(k=1/coreNon_Hys.l) + annotation (Placement(transformation(extent={{-10,40},{10,60}}))); + parameter Modelica.Magnetic.FluxTubes.Material.SoftMagnetic.RawData.M330_50A + material annotation (Placement(transformation(extent={{20,70},{40,90}}))); + Modelica.Blocks.Tables.CombiTable1Ds combiTable1Ds( + table=material.table, + smoothness=Modelica.Blocks.Types.Smoothness.MonotoneContinuousDerivative2, + extrapolation=Modelica.Blocks.Types.Extrapolation.HoldLastPoint) + annotation (Placement(transformation(extent={{20,40},{40,60}}))); +equation + connect(source.p, groundE1.p) + annotation (Line(points={{-80,-10},{-80,-20}}, color={0,0,255})); + connect(source.n, excitingCoil.p) + annotation (Line(points={{-80,10},{-60,10}}, color={0,0,255})); + connect(source.p, excitingCoil.n) + annotation (Line(points={{-80,-10},{-60,-10}}, color={0,0,255})); + connect(excitingCoil.port_p, coreNon_Hys.port_p) + annotation (Line(points={{-40,10},{-30,10}}, + color={255,127,0})); + connect(coreNon_Hys.port_n, measurementCoil.port_p) + annotation (Line(points={{-10,10},{0,10}}, color={255,127,0})); + connect(measurementCoil.port_n, groundM.port) + annotation (Line(points={{0,-10},{-20,-10},{-20,-20}}, color={255,127,0})); + connect(excitingCoil.port_n, groundM.port) annotation (Line(points={{-40,-10}, + {-20,-10},{-20,-20}}, color={255,127,0})); + connect(voltageSensor.v, integrator.u) + annotation (Line(points={{51,0},{68,0}}, color={0,0,127})); + connect(measurementCoil.n, groundE2.p) + annotation (Line(points={{20,-10},{20,-20}}, color={0,0,255})); + connect(measurementCoil.n, voltageSensor.p) + annotation (Line(points={{20,-10},{40,-10}}, color={0,0,255})); + connect(measurementCoil.p, voltageSensor.n) + annotation (Line(points={{20,10},{40,10}}, color={0,0,255})); + connect(voltageSensor.v, harmonic1.u) annotation (Line(points={{51,0},{60,0}, + {60,-30},{68,-30}}, color={0,0,127})); + connect(voltageSensor.v, harmonic3.u) annotation (Line(points={{51,0},{60,0}, + {60,-60},{68,-60}}, color={0,0,127})); + connect(magVoltageSensor.port_p, coreNon_Hys.port_p) + annotation (Line(points={{-30,30},{-30,10}}, color={255,127,0})); + connect(magVoltageSensor.port_n, coreNon_Hys.port_n) + annotation (Line(points={{-10,30},{-10,10}}, color={255,127,0})); + connect(magVoltageSensor.V_m, gain.u) + annotation (Line(points={{-20,40},{-20,50},{-12,50}}, color={0,0,127})); + connect(gain.y, combiTable1Ds.u) + annotation (Line(points={{11,50},{18,50}}, color={0,0,127})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false)), + experiment( + StopTime=0.1, + Interval=1e-05, + Tolerance=1e-06), + Documentation(info=" +

+This example demonstrates how to show the characteristics J(H) and mu_r(H) of a material +by applying a sinusoidal excitation current to the exciting coil. +However, hysteresis is not taken into account. +

+

+Number of turns and measurements of the core are approximately as they would be of an Epstein frame. +

+

+It is possible to compare the approximation with interpolated data from a manufacturer's datasheet (raw Data) J_rD and mu_r_rD, choosing the same material (e.g. M330_50A).
+Note that smoothness (the interpolation method) is set to LinearSegments. This shows the nodes and avoids undesired curvature between them. +

+

+Note the non-sinusoidal trajectory of voltage excitingCoil.v due to saturation and a sonusoidal excitation current. +

+

+Note that the output of the integrated voltage (divided by the number of turns of the measurement coil) shows the magnetic flux in the core. +To achieve satisfying accuracy, a rather small tolerance has to be used. +

+")); +end ShowMaterial; diff --git a/Modelica/Magnetic/FluxTubes/Examples/BasicExamples/package.order b/Modelica/Magnetic/FluxTubes/Examples/BasicExamples/package.order index 1e32b8338f..07363811b9 100644 --- a/Modelica/Magnetic/FluxTubes/Examples/BasicExamples/package.order +++ b/Modelica/Magnetic/FluxTubes/Examples/BasicExamples/package.order @@ -2,3 +2,6 @@ QuadraticCoreAirgap ToroidalCoreAirgap ToroidalCoreQuadraticCrossSection SaturatedInductor +ShowMaterial +CompareModels +EIcore diff --git a/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/Macfadyen/BaseData.mo b/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/Macfadyen/BaseData.mo new file mode 100644 index 0000000000..2a0a4ed7dd --- /dev/null +++ b/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/Macfadyen/BaseData.mo @@ -0,0 +1,17 @@ +within Modelica.Magnetic.FluxTubes.Material.SoftMagnetic.Macfadyen; +record BaseData "Coefficients for approximation of soft magnetic materials" + extends Modelica.Icons.Record; + parameter String label="Macfadyen" "Name of material"; + parameter SI.RelativePermeability mu_ri=1 + sum(Chi_mk) - Chi_mc "Initial relative permeability"; + parameter SI.MagneticPolarization Jsat=mu_0*sum(Chi_mk.*Hk) "Saturation polarization"; + parameter Integer N=1 "Number of exponential terms"; + parameter SI.MagneticFieldStrength Hk[N]={1} "Field strength coefficients"; + parameter SI.MagneticSusceptibility Chi_mk[N]={1} "Susceptibility coefficients"; + parameter SI.MagneticFieldStrength Hc=1 "Field strength for correction at origin"; + parameter SI.MagneticSusceptibility Chi_mc=0 "Susceptibility for correction at origin"; + annotation (defaultComponentPrefixes="parameter", + Icon(graphics={Text( + extent={{-100,-10},{100,-40}}, + textColor={0,0,255}, + textString="%label")})); +end BaseData; diff --git a/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/Macfadyen/M330_50A.mo b/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/Macfadyen/M330_50A.mo new file mode 100644 index 0000000000..0b51a9b595 --- /dev/null +++ b/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/Macfadyen/M330_50A.mo @@ -0,0 +1,11 @@ +within Modelica.Magnetic.FluxTubes.Material.SoftMagnetic.Macfadyen; +record M330_50A "M330-50A @ 50Hz 0/90 deg" + extends Modelica.Magnetic.FluxTubes.Material.SoftMagnetic.Macfadyen.BaseData( + label="M330-50A", + N=4, + Hk={16.866, 189.0, 355.7, 11434}, + Chi_mk={49875, 204.73, 680.20, 41.012}, + Hc=30.407, + Chi_mc= 46703); + annotation (defaultComponentPrefixes="parameter"); +end M330_50A; diff --git a/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/Macfadyen/M400_50A.mo b/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/Macfadyen/M400_50A.mo new file mode 100644 index 0000000000..008e481cdb --- /dev/null +++ b/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/Macfadyen/M400_50A.mo @@ -0,0 +1,11 @@ +within Modelica.Magnetic.FluxTubes.Material.SoftMagnetic.Macfadyen; +record M400_50A "M400-50A @ 50Hz 0/90 deg" + extends Modelica.Magnetic.FluxTubes.Material.SoftMagnetic.Macfadyen.BaseData( + label="M400-50A", + N=4, + Hk={120.579, 65.806, 81.813, 10979.9}, + Chi_mk={6845.6, 3908.6, 754.75, 40.6525}, + Hc=44.32, + Chi_mc=9403.3); + annotation (defaultComponentPrefixes="parameter"); +end M400_50A; diff --git a/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/Macfadyen/package.mo b/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/Macfadyen/package.mo new file mode 100644 index 0000000000..6561e02f30 --- /dev/null +++ b/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/Macfadyen/package.mo @@ -0,0 +1,10 @@ +within Modelica.Magnetic.FluxTubes.Material.SoftMagnetic; +package Macfadyen "Approximation and datasets according to Macfadyen" + extends Modelica.Icons.MaterialPropertiesPackage; + annotation (Documentation(info=" +

+Parameters approximated for the formula of [Macfadyen1973] Macfadyen et al. +See Approximation formulae in the User's Guide. +

+")); +end Macfadyen; diff --git a/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/Macfadyen/package.order b/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/Macfadyen/package.order new file mode 100644 index 0000000000..f3ad30c0d6 --- /dev/null +++ b/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/Macfadyen/package.order @@ -0,0 +1,3 @@ +BaseData +M330_50A +M400_50A diff --git a/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/MaterialSettings.mo b/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/MaterialSettings.mo new file mode 100644 index 0000000000..301d7703a5 --- /dev/null +++ b/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/MaterialSettings.mo @@ -0,0 +1,28 @@ +within Modelica.Magnetic.FluxTubes.Material.SoftMagnetic; +record MaterialSettings "Gathers all settings for a softmagnetic material" + extends Modelica.Icons.Record; + import Modelica.Magnetic.FluxTubes.Types.Magnetization; + parameter Boolean nonLinearPermeability=true + "= true, if non-linear rel. permeability is used, otherwise constant rel. permeability" + annotation (Evaluate=true); + parameter SI.RelativePermeability mu_rConst=1 + "Constant relative permeability; used if nonLinearPermeability=false" + annotation (Dialog(enable=not nonLinearPermeability)); + parameter Magnetization magnetization=Magnetization.Roschke + "Choose the approximation of the magnetization characteristic" + annotation (Evaluate=true, Dialog(enable=nonLinearPermeability)); + parameter Modelica.Magnetic.FluxTubes.Material.SoftMagnetic.BaseData + material=Modelica.Magnetic.FluxTubes.Material.SoftMagnetic.BaseData() + "Ferromagnetic material characteristics, approximation according to Roschke" + annotation (choicesAllMatching=true, Dialog(enable=nonLinearPermeability and magnetization==Magnetization.Roschke)); + parameter Macfadyen.BaseData materialMacfadyen=Macfadyen.BaseData() + "Ferromagnetic material characteristics, approximation according to Macfadyen" + annotation (choicesAllMatching=true, Dialog(enable=nonLinearPermeability + and magnetization == Magnetization.Macfadyen)); + annotation(defaultComponentPrefixes="parameter", Documentation(info=" +

+This parameter record gathers all settings for a softmagnetic material. +It can be used once in an example to propagate to several components the same material settings. +

+")); +end MaterialSettings; diff --git a/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/RawData/Internal/analyzeRawData.mo b/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/RawData/Internal/analyzeRawData.mo new file mode 100644 index 0000000000..9017ca2e1f --- /dev/null +++ b/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/RawData/Internal/analyzeRawData.mo @@ -0,0 +1,33 @@ +within Modelica.Magnetic.FluxTubes.Material.SoftMagnetic.RawData.Internal; +function analyzeRawData "Analyze RawData and caclulate mu_r" + extends Modelica.Icons.Function; + import Modelica.Constants.mu_0; + input Modelica.Units.SI.MagneticPolarization J[:] "Polarization"; + input Modelica.Units.SI.MagneticFieldStrength H[:] "Field strength"; + input Modelica.Units.SI.MagneticPolarization Jsat "Saturation polarization"; + input Modelica.Units.SI.MagneticFieldStrength Hsat "Field strength to achieve Jsat"; + output Modelica.Units.SI.RelativePermeability mu_r[size(J,1)] "Relative permeability"; +algorithm + assert(size(H,1)==size(J,1), "J and H arrays have to have the same length!"); + assert(H[1]>0 and J[1]>0, "J=0 and H=0 are not expected in the given arrays!"); + assert(H[end]H[k - 1], "H is expected with ascending order!"); + end for; + mu_r :={1 + J[k]/(mu_0*H[k]) for k in 1:size(J, 1)}; + annotation (Documentation(info=" +

This helper functions checks

+ +

and calculates relative permeability:

+

+          J
+µr = 1 + ----
+         µ0⋅H
+
+")); +end analyzeRawData; diff --git a/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/RawData/Internal/package.mo b/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/RawData/Internal/package.mo new file mode 100644 index 0000000000..684e7b0a3a --- /dev/null +++ b/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/RawData/Internal/package.mo @@ -0,0 +1,4 @@ +within Modelica.Magnetic.FluxTubes.Material.SoftMagnetic.RawData; +package Internal "Internal helper function(s)" + extends Modelica.Icons.InternalPackage; +end Internal; diff --git a/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/RawData/Internal/package.order b/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/RawData/Internal/package.order new file mode 100644 index 0000000000..6ac8f28b25 --- /dev/null +++ b/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/RawData/Internal/package.order @@ -0,0 +1 @@ +analyzeRawData diff --git a/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/RawData/M330_50A.mo b/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/RawData/M330_50A.mo new file mode 100644 index 0000000000..b5f47ea5c4 --- /dev/null +++ b/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/RawData/M330_50A.mo @@ -0,0 +1,47 @@ +within Modelica.Magnetic.FluxTubes.Material.SoftMagnetic.RawData; +record M330_50A "M330-50A @ 50Hz 0/90 deg" + extends Modelica.Icons.Record; + import Modelica.Math.Vectors.interpolate; + import Modelica.Math.Vectors.find; + import Modelica.Math.Vectors.reverse; + import Modelica.Magnetic.FluxTubes.Material.SoftMagnetic.RawData.Internal.analyzeRawData; + parameter String label="M330-50A @ 50Hz 0/90 deg" "Name of material"; + parameter Modelica.Units.SI.Density rho=7650 "Density of material"; + // Losses + parameter FluxTubes.Types.SpecificPower v15=3.30 + "Specific losses at 1.5 T and fRef"; + parameter Modelica.Units.SI.Frequency fRef=50 "Measurement frequency 1"; + // Saturation + parameter Modelica.Units.SI.MagneticPolarization Jsat=2.0 + "Saturation polarization"; + parameter Modelica.Units.SI.MagneticFieldStrength Hsat=1e5 + "Field strength to achieve Jsat"; + // given data points + parameter Modelica.Units.SI.MagneticPolarization J[:]={0.5,0.6,0.7,0.8,0.9, + 1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9} "Polarization"; + parameter Modelica.Units.SI.MagneticFieldStrength H[:]={53,60,69,79,93,112, + 141,192,313,698,1932,4284,7750,13318,19610} "Field strength"; + // Calculated parameters + parameter Modelica.Units.SI.RelativePermeability mu_r[size(J,1)]= + analyzeRawData(J, H, Jsat, Hsat) "Relative permeability"; + parameter Modelica.Units.SI.RelativePermeability mu_ri=interpolate(H, mu_r, 0) + "Initial relative permeability at origin (extrapolation)"; + parameter Modelica.Units.SI.RelativePermeability mu_rMax=max(mu_r) + "Maximum relative permeability"; + parameter Integer iMax=find(mu_rMax, mu_r) "Index of maximum relative permeability"; + // for interpolation add saturation, origin and mirror at origin + parameter Real table[2*size(J,1) + 3,3]=[ + cat(1, -{Hsat}, -reverse(H), { 0}, H, {Hsat}), + cat(1, -{Jsat}, -reverse(J), { 0}, J, {Jsat}), + cat(1, { 1}, reverse(mu_r), {mu_ri}, mu_r, { 1})] + "Table for interpolation H, J, mu_r"; + annotation (defaultComponentPrefixes="parameter", Documentation(info=" +

+M330-50A at 50Hz for 0/90 deg magnetization table H(J)taken from manufacturer's datasheet. +

+"), + Icon(graphics={Text( + extent={{-100,-10},{100,-40}}, + textColor={0,0,0}, + textString=" %label ")})); +end M330_50A; diff --git a/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/RawData/M400_50A.mo b/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/RawData/M400_50A.mo new file mode 100644 index 0000000000..db7e991a7f --- /dev/null +++ b/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/RawData/M400_50A.mo @@ -0,0 +1,19 @@ +within Modelica.Magnetic.FluxTubes.Material.SoftMagnetic.RawData; +record M400_50A "M400-50A @ 50Hz 0/90 deg" + extends M330_50A( + label="M400-50A @ 50Hz 0/90 deg", + rho=7700, + v15=4.00, + fRef=50, + Jsat=2.0, + Hsat=1e5, + J={0.5, 0.6, 0.7, 0.8, 0.9, 1.0, + 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9}, + H={75, 84, 93, 104, 117, 134, + 159, 199, 282, 505, 1284, 3343, 6787, 11712, 19044}); + annotation (defaultComponentPrefixes="parameter", Documentation(info=" +

+M400-50A at 50Hz for 0/90 deg magnetization table taken from manufacturer's datasheet. +

+")); +end M400_50A; diff --git a/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/RawData/package.mo b/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/RawData/package.mo new file mode 100644 index 0000000000..1058777e64 --- /dev/null +++ b/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/RawData/package.mo @@ -0,0 +1,31 @@ +within Modelica.Magnetic.FluxTubes.Material.SoftMagnetic; +package RawData "Records with measurents or datasheet" + extends Modelica.Icons.RecordsPackage; + import Modelica.Magnetic.FluxTubes.Types.SpecificPower; + + annotation (Documentation(info=" +

+This raw data records cover the following information: +

+ +

+The dataset [H, J, mu_r] is expanded by saturation {Hsat, Jsat, 1}, adding the origin {0, 0, mu_ri} and mirrored at the origin, +so the result can be used for interpolation. +

+

+Additional parameters are calculated: +

+ +")); +end RawData; diff --git a/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/RawData/package.order b/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/RawData/package.order new file mode 100644 index 0000000000..9f41a36023 --- /dev/null +++ b/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/RawData/package.order @@ -0,0 +1,3 @@ +Internal +M330_50A +M400_50A diff --git a/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/package.order b/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/package.order index 86919f923a..8c19d385a6 100644 --- a/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/package.order +++ b/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/package.order @@ -1,3 +1,5 @@ +MaterialSettings +RawData BaseData Steel ElectricSheet @@ -5,3 +7,4 @@ PureIron CobaltIron NickelIron mu_rApprox +Macfadyen diff --git a/Modelica/Magnetic/FluxTubes/Shapes/FixedShape/Cuboid.mo b/Modelica/Magnetic/FluxTubes/Shapes/FixedShape/Cuboid.mo index ecceabbac4..e16870e42f 100644 --- a/Modelica/Magnetic/FluxTubes/Shapes/FixedShape/Cuboid.mo +++ b/Modelica/Magnetic/FluxTubes/Shapes/FixedShape/Cuboid.mo @@ -1,9 +1,8 @@ within Modelica.Magnetic.FluxTubes.Shapes.FixedShape; model Cuboid "Flux tube with rectangular cross-section; fixed shape; linear or non-linear material characteristics" - - extends BaseClasses.FixedShape; extends Modelica.Magnetic.FluxTubes.Icons.Cuboid; + extends BaseClasses.FixedShape(final A=a*b); parameter SI.Length l=0.01 "Length in direction of flux" annotation ( Dialog(group="Fixed geometry", groupImage= @@ -14,9 +13,7 @@ model Cuboid annotation (Dialog(group="Fixed geometry")); equation - A = a*b; G_m = mu_0*mu_r*A/l; - annotation (Documentation(info="

Please refer to the enclosing sub-package FixedShape for a description of all elements of this package and to [Ro41] for derivation and/or coefficients of the equation for permeance G_m. diff --git a/Modelica/Magnetic/FluxTubes/Shapes/FixedShape/GenericFluxTube.mo b/Modelica/Magnetic/FluxTubes/Shapes/FixedShape/GenericFluxTube.mo index 64966d2eeb..19e3f4f8b9 100644 --- a/Modelica/Magnetic/FluxTubes/Shapes/FixedShape/GenericFluxTube.mo +++ b/Modelica/Magnetic/FluxTubes/Shapes/FixedShape/GenericFluxTube.mo @@ -1,9 +1,8 @@ within Modelica.Magnetic.FluxTubes.Shapes.FixedShape; model GenericFluxTube "Flux tube with fixed cross-section and length; linear or non-linear material characteristics" - - extends BaseClasses.FixedShape; extends Modelica.Magnetic.FluxTubes.Icons.Reluctance; + extends BaseClasses.FixedShape(final A=area); parameter SI.Length l=0.01 "Length in direction of flux" annotation(Dialog(group="Fixed geometry", groupImage= @@ -11,9 +10,7 @@ model GenericFluxTube parameter SI.CrossSection area=0.0001 "Area of cross section" annotation (Dialog(group="Fixed geometry")); equation - A = area; G_m = mu_0*mu_r*A/l; - annotation (defaultComponentName="generic", Documentation(info="

Please refer to the enclosing sub-package FixedShape for a description of all elements of this package and to [Ro41] for derivation and/or coefficients of the equation for permeance G_m. diff --git a/Modelica/Magnetic/FluxTubes/Shapes/FixedShape/HollowCylinderAxialFlux.mo b/Modelica/Magnetic/FluxTubes/Shapes/FixedShape/HollowCylinderAxialFlux.mo index fa6388c329..b61081a3a2 100644 --- a/Modelica/Magnetic/FluxTubes/Shapes/FixedShape/HollowCylinderAxialFlux.mo +++ b/Modelica/Magnetic/FluxTubes/Shapes/FixedShape/HollowCylinderAxialFlux.mo @@ -1,9 +1,8 @@ within Modelica.Magnetic.FluxTubes.Shapes.FixedShape; model HollowCylinderAxialFlux "(Hollow) cylinder with axial flux; fixed shape; linear or non-linear material characteristics" - - extends BaseClasses.FixedShape; extends Modelica.Magnetic.FluxTubes.Icons.HollowCylinderAxialFlux; + extends BaseClasses.FixedShape(final A = (r_o^2 - r_i^2)*alpha/2); parameter SI.Length l=0.01 "Axial length (in direction of flux)" annotation (Dialog(group="Fixed geometry", groupImage= @@ -16,9 +15,7 @@ model HollowCylinderAxialFlux parameter SI.Angle alpha=2*pi "Central angle" annotation (Dialog(group="Fixed geometry")); equation - A = (r_o^2 - r_i^2)*alpha/2; G_m = mu_0*mu_r*A/l; - annotation (defaultComponentName="cylinder", Documentation(info="

Please refer to the enclosing sub-package FixedShape for a description of all elements of this package and to [Ro41] for derivation and/or coefficients of the equation for permeance G_m. diff --git a/Modelica/Magnetic/FluxTubes/Shapes/FixedShape/HollowCylinderCircumferentialFlux.mo b/Modelica/Magnetic/FluxTubes/Shapes/FixedShape/HollowCylinderCircumferentialFlux.mo index 6e5127830c..4882daa986 100644 --- a/Modelica/Magnetic/FluxTubes/Shapes/FixedShape/HollowCylinderCircumferentialFlux.mo +++ b/Modelica/Magnetic/FluxTubes/Shapes/FixedShape/HollowCylinderCircumferentialFlux.mo @@ -1,9 +1,9 @@ within Modelica.Magnetic.FluxTubes.Shapes.FixedShape; model HollowCylinderCircumferentialFlux "Hollow cylinder with circumferential flux; fixed shape; linear or non-linear material characteristics" - - extends BaseClasses.FixedShape; extends Modelica.Magnetic.FluxTubes.Icons.HollowCylinderCircumferentialFlux; + extends BaseClasses.FixedShape(final A = (r_o - r_i)*l); + import Modelica.Constants.pi; parameter SI.Length l=0.02 "Width (orthogonal to flux direction)" annotation (Dialog(group= @@ -16,9 +16,7 @@ model HollowCylinderCircumferentialFlux parameter SI.Angle alpha=pi/2 "Angle of cylinder section" annotation (Dialog(group="Fixed geometry")); equation - A = (r_o - r_i)*l; G_m = mu_0*mu_r*A/((r_o + r_i)/2*alpha); - annotation (defaultComponentName="cylinder", Documentation(info="

Please refer to the enclosing sub-package FixedShape for a description of all elements of this package and to [Ro41] for derivation and/or coefficients of the equation for permeance G_m. diff --git a/Modelica/Magnetic/FluxTubes/Shapes/FixedShape/HollowCylinderRadialFlux.mo b/Modelica/Magnetic/FluxTubes/Shapes/FixedShape/HollowCylinderRadialFlux.mo index 2334f537eb..9441061c5e 100644 --- a/Modelica/Magnetic/FluxTubes/Shapes/FixedShape/HollowCylinderRadialFlux.mo +++ b/Modelica/Magnetic/FluxTubes/Shapes/FixedShape/HollowCylinderRadialFlux.mo @@ -1,10 +1,9 @@ within Modelica.Magnetic.FluxTubes.Shapes.FixedShape; model HollowCylinderRadialFlux "Hollow cylinder with radial flux; fixed shape; linear or non-linear material characteristics" - - extends BaseClasses.FixedShape; extends Modelica.Magnetic.FluxTubes.Icons.HollowCylinderRadialFlux; - + extends BaseClasses.FixedShape(final A = l*alpha*(r_o + r_i)/2); + // area at arithmetic mean radius for calculation of average flux density parameter SI.Length l=0.01 "Width (orthogonal to flux direction)" annotation (Dialog(group= "Fixed geometry", groupImage= @@ -16,10 +15,7 @@ model HollowCylinderRadialFlux parameter SI.Angle alpha=2*pi "Central angle" annotation (Dialog(group="Fixed geometry")); equation - A = l*alpha*(r_o + r_i)/2; - // Area at arithmetic mean radius for calculation of average flux density G_m = mu_0*mu_r*alpha*l/Modelica.Math.log(r_o/r_i); - annotation (defaultComponentName="cylinder", Documentation(info="

Please refer to the enclosing sub-package FixedShape for a description of all elements of this package and to [Ro41] for derivation and/or coefficients of the equation for permeance G_m. diff --git a/Modelica/Magnetic/FluxTubes/Shapes/FixedShape/Toroid.mo b/Modelica/Magnetic/FluxTubes/Shapes/FixedShape/Toroid.mo index 8a26a00be3..ea4b94d647 100644 --- a/Modelica/Magnetic/FluxTubes/Shapes/FixedShape/Toroid.mo +++ b/Modelica/Magnetic/FluxTubes/Shapes/FixedShape/Toroid.mo @@ -1,9 +1,9 @@ within Modelica.Magnetic.FluxTubes.Shapes.FixedShape; model Toroid "Toroid with circular cross section; fixed shape; linear or non-linear material characteristics" - - extends BaseClasses.FixedShape; extends Modelica.Magnetic.FluxTubes.Icons.Toroid; + extends BaseClasses.FixedShape(final A = d^2*pi/4); + import Modelica.Constants.pi; parameter SI.Radius r=0.1 "Radius of toroid (middle)" annotation (Dialog(group="Fixed geometry", groupImage= @@ -13,9 +13,7 @@ model Toroid parameter SI.Angle alpha=pi/2 "Angle of toroid section" annotation (Dialog(group="Fixed geometry")); equation - A = d^2*pi/4 "Area at arithmetic mean radius for calculation of average flux density"; G_m = mu_0*mu_r*A/(r*alpha); - annotation (defaultComponentName="cylinder", Documentation(info="

Please refer to the enclosing sub-package FixedShape for a description of all elements of this package and to [Ro41] for derivation and/or coefficients of the equation for permeance G_m. diff --git a/Modelica/Magnetic/FluxTubes/Types/Magnetization.mo b/Modelica/Magnetic/FluxTubes/Types/Magnetization.mo new file mode 100644 index 0000000000..3c6cae7a4c --- /dev/null +++ b/Modelica/Magnetic/FluxTubes/Types/Magnetization.mo @@ -0,0 +1,5 @@ +within Modelica.Magnetic.FluxTubes.Types; +type Magnetization = enumeration( + Roschke "Approximation formula according to Roschke", + Macfadyen "Approximation formula according to Macfadyen et al") + "Enumeration defining the approximation of the magnetization characteristic"; diff --git a/Modelica/Magnetic/FluxTubes/Types/SpecificPower.mo b/Modelica/Magnetic/FluxTubes/Types/SpecificPower.mo new file mode 100644 index 0000000000..90f3f167e1 --- /dev/null +++ b/Modelica/Magnetic/FluxTubes/Types/SpecificPower.mo @@ -0,0 +1,2 @@ +within Modelica.Magnetic.FluxTubes.Types; +type SpecificPower = Real (final quantity="SpecificPower", final unit="W/kg"); diff --git a/Modelica/Magnetic/FluxTubes/Types/package.mo b/Modelica/Magnetic/FluxTubes/Types/package.mo new file mode 100644 index 0000000000..1e0c766b27 --- /dev/null +++ b/Modelica/Magnetic/FluxTubes/Types/package.mo @@ -0,0 +1,5 @@ +within Modelica.Magnetic.FluxTubes; +package Types "Types with choices, especially to build menus" + extends Modelica.Icons.TypesPackage; + +end Types; diff --git a/Modelica/Magnetic/FluxTubes/Types/package.order b/Modelica/Magnetic/FluxTubes/Types/package.order new file mode 100644 index 0000000000..b4eba309d4 --- /dev/null +++ b/Modelica/Magnetic/FluxTubes/Types/package.order @@ -0,0 +1,2 @@ +Magnetization +SpecificPower diff --git a/Modelica/Magnetic/FluxTubes/UsersGuide/Approximation.mo b/Modelica/Magnetic/FluxTubes/UsersGuide/Approximation.mo new file mode 100644 index 0000000000..dc6e0c1c71 --- /dev/null +++ b/Modelica/Magnetic/FluxTubes/UsersGuide/Approximation.mo @@ -0,0 +1,53 @@ +within Modelica.Magnetic.FluxTubes.UsersGuide; +model Approximation "Approximation formulae" + extends Modelica.Icons.Information; + annotation (Documentation(info=" +

+In literature a lot of functions have been discussed for approximation of magnetization characteristics: +[Fischer1956] Fischer and Moser
+In the FluxTubes library it is possible to choose between different approximation functions.
+Originally, the formula of [Ro00] Roschke has been implemented: +

+

+            µri - 1 + ca⋅BNr(B) = 1 + ---------------
+            1 + cb⋅BN + BNn
+     |B|
+BN = -----
+     BµMax
+
+

+BµMax is the flux density where the maximum of µr appears.
+µri is the relative permeability at the origin.
+The other parameters ca, cb, n have to be determined to achieve a best fit of given data.
+Note, this formula takes into account the rise of the relative permeability µr to a maximum at BµMax. +

+

+Additionally, the formula of [Macfadyen1973] Macfadyen et al has been implemented: +

+

+               n
+J(H) = ⋅sign(H)⋅∑ Jk⋅(1 - e-|H|/Hk) - µ0⋅χC⋅H⋅e-|H|/HC.
+               k=1
+Jk = µ0⋅χk⋅Hk
+
+

+The terms with index C were added to the original formula to achieve the rise of the relative permeability µr to a maximum. +

+

+The parameters {Hk, Jk} for k in 1:n have to be determined to achieve a best fit of given data under the following constraints: +

+

+      n
+Jsat = ∑ Jk
+      k=1
+         n
+µri = 1 + ∑ χk  - χC
+         k=1
+
+

+Additonally, it is possible to implement an interpolation based on raw data instead of using approximation functions. +Be careful regarding the interpolation method, it could reveal undesired curvature between the nodes. +

+")); +end Approximation; diff --git a/Modelica/Magnetic/FluxTubes/UsersGuide/BasicFormulae.mo b/Modelica/Magnetic/FluxTubes/UsersGuide/BasicFormulae.mo new file mode 100644 index 0000000000..4ee5030ea0 --- /dev/null +++ b/Modelica/Magnetic/FluxTubes/UsersGuide/BasicFormulae.mo @@ -0,0 +1,105 @@ +within Modelica.Magnetic.FluxTubes.UsersGuide; +model BasicFormulae "Basic relations of properties" + extends Modelica.Icons.Information; + annotation (Documentation(info=" + + + + + + + + + + + + + +
Fig. 1: Passive part of the magnetic circuit: Flux tubeFig. 2: Active part of the magnetic circuit: Electro-Magnetic converter
+

Note:

+

+The coil shown in Fig. 2 is wound counter-clockwise (positive mathematical direction). +For a coil wound clockwise the number of turns N has to be entered negative.
+There is a left-hand assignment between coil current i and magnetic potential difference Vm.
+The magnetomotive force mmf has the opposite direction as the magnetic potential difference Vm +(and therefore a right-hand assignement), but it is not used in this library. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Magnetic potential difference (in an active part, Fig. 2, i.e. Ampere's law)AVm = N⋅i
Ohm's law of the magnetic circuit∑ Vm = 0∑ VmPassive = -∑ VmActive
Magnetic potential difference (in a passive part, Fig. 1)AVm = H⋅l
Magnetic field strengthA/m H = Vm/l
MagnetizationA/mM = χ⋅H
Suceptibility1χ = µr - 1
Relative permeability1µr = 1 + χ
Magnetic constant(V⋅s)/(A⋅m)µ0 = 1.25663706127⋅10-6 ≈ 4⋅π⋅10-7
PolarizationTJ = µ0⋅χ⋅H
Flux densityTB = J + µ0⋅H = µ0⋅µr⋅H
Magnetic flux (per winding)WbΦ = B⋅A
Magnetic conductanceHGm = 1/Rm = Φ/Vm = µ0⋅µr⋅A/l
Magnetic flux linkage (of the whole coil)Wbψ = N⋅Φ
Induced voltage (Farady's law)Vv = -dψ/dt
(Self) InductanceHL = N2⋅µ0⋅µr⋅A/l
+")); +end BasicFormulae; diff --git a/Modelica/Magnetic/FluxTubes/UsersGuide/Contact.mo b/Modelica/Magnetic/FluxTubes/UsersGuide/Contact.mo index ac3ffb7e79..fc850f17aa 100644 --- a/Modelica/Magnetic/FluxTubes/UsersGuide/Contact.mo +++ b/Modelica/Magnetic/FluxTubes/UsersGuide/Contact.mo @@ -23,6 +23,11 @@ class Contact "Contact" Fax: +49 - 351 - 463 37183
email: Johannes.Ziske@tu-dresden.de

+

+ Prof. Anton Haumer (retired)
+ Technical University of Applied Sciences OTH Regensburg, Germany
+ email: Anton.Haumer@oth-regensburg.de +

Acknowledgements

diff --git a/Modelica/Magnetic/FluxTubes/UsersGuide/Literature.mo b/Modelica/Magnetic/FluxTubes/UsersGuide/Literature.mo index aa9f8e9a9c..10aae65a0b 100644 --- a/Modelica/Magnetic/FluxTubes/UsersGuide/Literature.mo +++ b/Modelica/Magnetic/FluxTubes/UsersGuide/Literature.mo @@ -60,6 +60,25 @@ class Literature "Literature"
+
  • Approximation formulae of magnetization characteristics (besides [Ro00] are described in: + +
    + + + + + + + + + +
    [Fischer1956] J. Fischer and H. Moser: + Die Nachbildung von Magnetisierungskurven durch einfache algebraische und transzendente Funktionen, + etz Archiv 42 (1956), pp. 286-299 (in German).
    [Macfadyen1973] W. Macfadyen, W. Woods, R. Simpson and R. Slater: + Representation of magnetization curves by exponential series, + Proceedings of the Institution of Electrical Engineers Vol. 120 (1973), pp. 902-904.

    +
  • +
  • Information related to the implemented hysteresis models can be found in:
    diff --git a/Modelica/Magnetic/FluxTubes/UsersGuide/ParameterFit.mo b/Modelica/Magnetic/FluxTubes/UsersGuide/ParameterFit.mo new file mode 100644 index 0000000000..43b06e082d --- /dev/null +++ b/Modelica/Magnetic/FluxTubes/UsersGuide/ParameterFit.mo @@ -0,0 +1,28 @@ +within Modelica.Magnetic.FluxTubes.UsersGuide; +model ParameterFit "Fitting the parameters" + extends Modelica.Icons.Information; + annotation (Documentation(info=" +

    The magnetisation characteristics of the originally included soft magnetic materials were compiled and measured respectively by Thomas Roschke. +Provision of this data is highly appreciated. He also formulated the approximation function used for description of the magnetisation characteristics of these materials.

    +

    The workflow of paramter fitting for the approximation according to Macfadyen at al can be recommended as follows:

    +
      +
    • N = 4 exponential terms is a good compromise between effort and accuracy.
    • +
    • Use a tool of your choice capable of nonlieanr optimization under nonlinear constraints, e.g. the Solver of Microsoft Excel or OpenOffice Calc, or fmincon of Matlab or Octave.
    • +
    • First, compare the characteristic J(H) of the formula without the correction term (index "C", you may set χC = 0) with measured data, + i.e. sum up the absolute of the differences.
    • +
    • Use as 1st constraint: |1 + ∑ χk - µra| ≤ ε + where µra is an extrapolation of the given relative permeability towards the origin neglecting the potential decline of this characteristics near the origin.
    • +
    • Use as 2nd constraint |∑ χk⋅Hk - Jsat| ≤ ε + where Jsat is the saturation polarization as described in the raw data directory.
    • +
    • Since optimization is sensitive to the starting point, try to guess a good initial parameter set.
    • +
    • Try first with higher allowed deviation ε, then reduce ε step by step.
    • +
    • Check your solution in a diagram. If it looks good (except the region around the origin), proceed:
    • +
    • Try a good guess for HC and χC ≈ µra - µri + where µri is the initial relative permeability as described in the raw data directory.
    • +
    • Change the 1st constraint: |1 + ∑ χk - χC - µri| ≤ ε.
    • +
    • Again, try first with higher allowed deviation, then reduce ε step by step.
    • +
    • Last, check your solution in a diagram. If you are satisfied, you have found a good guess for the parameters.
    • +
    +

    Note: It is possible to neglect the potential decline of the relative permeabilty near the origin and keep χC = 0.

    +")); +end ParameterFit; diff --git a/Modelica/Magnetic/FluxTubes/UsersGuide/ReleaseNotes.mo b/Modelica/Magnetic/FluxTubes/UsersGuide/ReleaseNotes.mo index c667cb7ca0..f0a06e1869 100644 --- a/Modelica/Magnetic/FluxTubes/UsersGuide/ReleaseNotes.mo +++ b/Modelica/Magnetic/FluxTubes/UsersGuide/ReleaseNotes.mo @@ -3,6 +3,15 @@ class ReleaseNotes "Release Notes" extends Modelica.Icons.ReleaseNotes; annotation (Documentation(info=" +
    Version 4.2.0, 2026-02-18 (Anton Haumer)
    + + +
    Version 3.2.2, 2014-12-05 (Johannes Ziske, Thomas Bödrich)
      diff --git a/Modelica/Magnetic/FluxTubes/UsersGuide/package.order b/Modelica/Magnetic/FluxTubes/UsersGuide/package.order index 25e1f11079..c2815151fb 100644 --- a/Modelica/Magnetic/FluxTubes/UsersGuide/package.order +++ b/Modelica/Magnetic/FluxTubes/UsersGuide/package.order @@ -1,4 +1,7 @@ FluxTubeConcept +BasicFormulae +Approximation +ParameterFit ReluctanceForceCalculation Hysteresis Literature diff --git a/Modelica/Magnetic/FluxTubes/package.order b/Modelica/Magnetic/FluxTubes/package.order index d7694b57e1..a672e25663 100644 --- a/Modelica/Magnetic/FluxTubes/package.order +++ b/Modelica/Magnetic/FluxTubes/package.order @@ -9,3 +9,4 @@ Interfaces BaseClasses Icons Utilities +Types diff --git a/Modelica/Resources/Images/Magnetic/FluxTubes/Examples/BasicExamples/EIcore.png b/Modelica/Resources/Images/Magnetic/FluxTubes/Examples/BasicExamples/EIcore.png new file mode 100644 index 0000000000..1e9f450e6c Binary files /dev/null and b/Modelica/Resources/Images/Magnetic/FluxTubes/Examples/BasicExamples/EIcore.png differ diff --git a/Modelica/Resources/Images/Magnetic/FluxTubes/Examples/BasicExamples/EIcore.vsdx b/Modelica/Resources/Images/Magnetic/FluxTubes/Examples/BasicExamples/EIcore.vsdx new file mode 100644 index 0000000000..52e3d550a0 Binary files /dev/null and b/Modelica/Resources/Images/Magnetic/FluxTubes/Examples/BasicExamples/EIcore.vsdx differ diff --git a/Modelica/Resources/Reference/Modelica/Magnetic/FluxTubes/Examples/BasicExamples/CompareModels/comparisonSignals.txt b/Modelica/Resources/Reference/Modelica/Magnetic/FluxTubes/Examples/BasicExamples/CompareModels/comparisonSignals.txt new file mode 100644 index 0000000000..0de018aa6a --- /dev/null +++ b/Modelica/Resources/Reference/Modelica/Magnetic/FluxTubes/Examples/BasicExamples/CompareModels/comparisonSignals.txt @@ -0,0 +1,6 @@ +time +coreNon_Hys.H +coreNon_Hys.B +coreEverett.B + + diff --git a/Modelica/Resources/Reference/Modelica/Magnetic/FluxTubes/Examples/BasicExamples/EIcore/comparisonSignals.txt b/Modelica/Resources/Reference/Modelica/Magnetic/FluxTubes/Examples/BasicExamples/EIcore/comparisonSignals.txt new file mode 100644 index 0000000000..d4bf328b14 --- /dev/null +++ b/Modelica/Resources/Reference/Modelica/Magnetic/FluxTubes/Examples/BasicExamples/EIcore/comparisonSignals.txt @@ -0,0 +1,10 @@ +time +airGap.H +airGap.B +legM.H +legM.B +legL.H +legL.B +legR.H +legR.B +fluxDensity.y diff --git a/Modelica/Resources/Reference/Modelica/Magnetic/FluxTubes/Examples/BasicExamples/ShowMaterial/comparisonSignals.txt b/Modelica/Resources/Reference/Modelica/Magnetic/FluxTubes/Examples/BasicExamples/ShowMaterial/comparisonSignals.txt new file mode 100644 index 0000000000..217f9a49a4 --- /dev/null +++ b/Modelica/Resources/Reference/Modelica/Magnetic/FluxTubes/Examples/BasicExamples/ShowMaterial/comparisonSignals.txt @@ -0,0 +1,9 @@ +time +coreNon_Hys.H +coreNon_Hys.J +coreNon_Hys.mu_r +combiTable1Ds.y[1] +combiTable1Ds.y[2] +coreNon_Hys.Phi +integrator.y +voltageSensor.v